execute as @s[scores={AttackTimer=50}] run execute as @e[type=armor_stand,name=CadeyrnFight] run execute at @s run function zzzzdonotuse:cadeyrn/attacks/deathanim/placelava

execute as @e[type=armor_stand,tag=DeathGoMid] run execute at @s run tp @s ^ ^ ^.3 facing entity @e[type=armor_stand,limit=1,name=CadeyrnFight]
execute at @e[type=armor_stand,tag=DeathGoMid] run execute if entity @e[type=armor_stand,limit=1,name=CadeyrnFight,distance=...4] run scoreboard players set @s AttackTimer 300
execute at @e[type=armor_stand,tag=DeathGoMid] run execute if entity @e[type=armor_stand,limit=1,name=CadeyrnFight,distance=...4] run execute as @e[type=stray,tag=CadeyrnTP] run execute at @s run tp @s ~ 131 ~
execute as @e[type=armor_stand,tag=DeathGoMid] run execute at @s run execute if entity @e[type=armor_stand,limit=1,name=CadeyrnFight,distance=...4] run kill @s
execute at @e[type=armor_stand,tag=DeathGoMid] run execute unless entity @e[type=armor_stand,limit=1,name=CadeyrnFight,distance=...4] run tp @e[tag=CadeyrnTP,distance=..2,type=stray] ~ ~ ~ facing entity @p[tag=CadeyrnFightTag,gamemode=!spectator]

