scoreboard players add @s ChangeLocationK 1



execute at @s[scores={ChangeLocationK=1}] run function zzzzdonotuse:cadeyrn/attacks/changelocation/setrandomlocation
execute at @s[scores={ChangeLocationK=2..}] run execute as @e[tag=CadeyrnTP,distance=..5] run execute at @s run tp @s ^ ^ ^.2 facing entity @e[type=armor_stand,tag=CadeyrnMoveHere,tag=MoveCadeyrnHere,limit=1] feet
execute at @s[scores={ChangeLocationK=2..}] run execute as @e[tag=CadeyrnTP,distance=..5] run execute at @s run tp @s ^ ^ ^.2 facing entity @e[type=armor_stand,tag=CadeyrnMoveHere,tag=MoveCadeyrnHere,limit=1] feet
execute at @s[scores={ChangeLocationK=2..}] run execute as @e[tag=CadeyrnTP,distance=..5] run execute at @s run fill ~ ~ ~ ~ ~ ~ air destroy
execute at @s[scores={ChangeLocationK=2..}] run execute if entity @e[type=armor_stand,tag=CadeyrnMoveHere,tag=MoveCadeyrnHere,distance=...75] run execute as @s[scores={ChangeLocationK=2..}] run function zzzzdonotuse:cadeyrn/attacks/changelocation/stopmove
