execute unless entity @e[type=marker,distance=..40,tag=KyuPreventEscapeSpell] run execute at @s[tag=EscapeSpell2,tag=!LadderReset,tag=!LadderUpgrade2] positioned ~ ~-2 ~ run summon minecraft:armor_stand ^ ^ ^1 {CustomName:"\"EscapeLadder\"",NoGravity:1,Invisible:1b,Silent:1b}
execute unless entity @e[type=marker,distance=..40,tag=KyuPreventEscapeSpell] run execute at @s[tag=EscapeSpell2,tag=!LadderReset,tag=LadderUpgrade2] positioned ~ ~-2 ~ run summon minecraft:armor_stand ^ ^ ^1 {Tags:["Upgraded"],CustomName:"\"EscapeLadder\"",NoGravity:1,Invisible:1b,Silent:1b}
execute unless entity @e[type=marker,distance=..40,tag=KyuPreventEscapeSpell] run 
execute unless entity @e[type=marker,distance=..40,tag=KyuPreventEscapeSpell] run tellraw @s[tag=EscapeSpell2,tag=LadderReset] ["",{"text":"You have already used this spell today - You may use it again tomorrow.","color":"yellow"}]
execute unless entity @e[type=marker,distance=..40,tag=KyuPreventEscapeSpell] run execute as @s[tag=EscapeSpell2,tag=!LadderReset] run execute in minecraft:overworld run data merge block 999988 126 999976 {auto:1b}
execute unless entity @e[type=marker,distance=..40,tag=KyuPreventEscapeSpell] run tag @s[tag=EscapeSpell2,tag=!LadderReset] add LadderReset
scoreboard players set @s KyuSpells 0


execute if entity @e[type=marker,distance=..40,tag=KyuPreventEscapeSpell] run tellraw @s ["",{"text":"A mysterious force prevents you from using this spell here.","color":"gold"}]
