execute unless score #KyuQStructuresInstall KyuDummy5 matches 1 run execute at @s[tag=HorseSpell2,tag=!HorseReset,tag=!HorseUpgrade2] positioned ~ ~1 ~ run summon minecraft:horse ^ ^ ^1 {Variant:4,Attributes:[{Name:generic.movement_speed,Base:0.225},{Name:horse.jump_strength,Base:0.77}],Tame:1b,SaddleItem:{id:"minecraft:saddle",Count:1b},CustomName:"\"Kien\""}
execute unless score #KyuQStructuresInstall KyuDummy5 matches 1 run execute at @s[tag=HorseSpell2,tag=!HorseReset,tag=HorseUpgrade2] positioned ~ ~1 ~ run summon minecraft:horse ^ ^ ^1 {Variant:4,Attributes:[{Name:generic.movement_speed,Base:0.285},{Name:horse.jump_strength,Base:0.88}],Tame:1b,SaddleItem:{id:"minecraft:saddle",Count:1b},CustomName:"\"Kien 2.0\""}
execute unless score #KyuQStructuresInstall KyuDummy5 matches 1 run tellraw @s[tag=HorseSpell2,tag=!HorseReset] ["",{"text":"Summon Horse has been activated!","color":"green"}]

execute unless score #KyuQStructuresInstall KyuDummy5 matches 1 run tellraw @s[tag=HorseSpell2,tag=HorseReset] ["",{"text":"You have already used the Summon Horse spell today - You may use it again tomorrow.","color":"yellow"}]

execute unless score #KyuQStructuresInstall KyuDummy5 matches 1 run tag @s remove KyuLatentHorseSpell

execute unless score #KyuQStructuresInstall KyuDummy5 matches 1 run tag @s[tag=HorseSpell2] add HorseReset
execute unless score #KyuQStructuresInstall KyuDummy5 matches 1 run tag @s[tag=HorseUpgrade2,tag=HorseSpell2,tag=K,tag=HorseReset,tag=!HorseCharge1] remove HorseReset
execute unless score #KyuQStructuresInstall KyuDummy5 matches 1 run tellraw @s[tag=HorseUpgrade2,tag=HorseSpell2,tag=K,tag=!HorseReset,tag=!HorseCharge1] ["",{"text":"Horse charges left: 1","color":"yellow"}]
execute unless score #KyuQStructuresInstall KyuDummy5 matches 1 run tag @s[tag=HorseUpgrade2,tag=HorseSpell2,tag=K,tag=!HorseReset,tag=!HorseCharge1] add HorseCharge1




#scoreboard players set @s KyuSpells 0








######structures version




execute if score #KyuQStructuresInstall KyuDummy5 matches 1 run execute at @s[tag=HorseSpell2,tag=!HorseReset,tag=!HorseUpgrade2] positioned ~ ~1 ~ run summon minecraft:horse ^ ^ ^1 {Variant:4,Attributes:[{Name:generic.movement_speed,Base:0.225},{Name:horse.jump_strength,Base:0.77}],Tame:1b,SaddleItem:{id:"minecraft:saddle",Count:1b},CustomName:"\"Kien\""}
execute if score #KyuQStructuresInstall KyuDummy5 matches 1 run execute at @s[tag=HorseSpell2,tag=!HorseReset,tag=HorseUpgrade2] positioned ~ ~1 ~ run summon minecraft:horse ^ ^ ^1 {Variant:4,Attributes:[{Name:generic.movement_speed,Base:0.285},{Name:horse.jump_strength,Base:0.88}],Tame:1b,SaddleItem:{id:"minecraft:saddle",Count:1b},CustomName:"\"Kien 2.0\""}
execute if score #KyuQStructuresInstall KyuDummy5 matches 1 run tellraw @s[tag=HorseSpell2,tag=HorseReset] ["",{"text":"You have already used the Summon Horse spell today - You may use it again tomorrow.","color":"yellow"}]
execute if score #KyuQStructuresInstall KyuDummy5 matches 1 run tellraw @s[tag=HorseSpell2,tag=!HorseReset] ["",{"text":"Summon Horse has been activated!","color":"green"}]
execute if score #KyuQStructuresInstall KyuDummy5 matches 1 run tag @s remove KyuLatentHorseSpell

execute if score #KyuQStructuresInstall KyuDummy5 matches 1 run tellraw @s[tag=!HorseUpgrade2,tag=HorseSpell2,tag=!HorseReset,tag=!HorseSpawnedOnce] ["",{"text":"Horse charges left: 1","color":"yellow"}]
execute if score #KyuQStructuresInstall KyuDummy5 matches 1 run tellraw @s[tag=!HorseUpgrade2,tag=HorseSpell2,tag=!HorseReset,tag=HorseSpawnedOnce] ["",{"text":"Horse charges left: 0","color":"yellow"}]
execute if score #KyuQStructuresInstall KyuDummy5 matches 1 run tag @s[tag=!HorseUpgrade2,tag=HorseSpell2,tag=HorseSpawnedOnce] add HorseReset
execute if score #KyuQStructuresInstall KyuDummy5 matches 1 run tag @s[tag=!HorseUpgrade2,tag=HorseSpell2,tag=!HorseSpawnedOnce] add HorseSpawnedOnce



execute if score #KyuQStructuresInstall KyuDummy5 matches 1 run tellraw @s[tag=HorseUpgrade2,tag=HorseSpell2,tag=!HorseReset,tag=!HorseSpawnedOnce,tag=!HorseSpawnedTwice] ["",{"text":"Horse charges left: 2","color":"yellow"}]
execute if score #KyuQStructuresInstall KyuDummy5 matches 1 run tellraw @s[tag=HorseUpgrade2,tag=HorseSpell2,tag=!HorseReset,tag=HorseSpawnedOnce,tag=!HorseSpawnedTwice] ["",{"text":"Horse charges left: 1","color":"yellow"}]
execute if score #KyuQStructuresInstall KyuDummy5 matches 1 run tellraw @s[tag=HorseUpgrade2,tag=HorseSpell2,tag=!HorseReset,tag=HorseSpawnedOnce,tag=HorseSpawnedTwice] ["",{"text":"Horse charges left: 0","color":"yellow"}]
execute if score #KyuQStructuresInstall KyuDummy5 matches 1 run tag @s[tag=HorseUpgrade2,tag=HorseSpell2,tag=!HorseReset,tag=HorseSpawnedOnce,tag=HorseSpawnedTwice] add HorseReset
execute if score #KyuQStructuresInstall KyuDummy5 matches 1 run tag @s[tag=HorseUpgrade2,tag=HorseSpell2,tag=HorseSpawnedOnce] add HorseSpawnedTwice
execute if score #KyuQStructuresInstall KyuDummy5 matches 1 run tag @s[tag=HorseUpgrade2,tag=HorseSpell2,tag=!HorseSpawnedOnce] add HorseSpawnedOnce



#execute if score #KyuQStructuresInstall KyuDummy5 matches 1 run scoreboard players set @s KyuSpells 0