execute as @s[scores={AttackTimer=18}] run data merge entity @s {NoAI:1,NoGravity:1}

execute at @s[scores={AttackTimer=21}] run tellraw @a[distance=..150] ["",{"text":"[","color":"dark_blue"},{"text":"Cadeyrn the Wretched","color":"gold"},{"text":"] ","color":"dark_blue"},{"text":"THIS","color":"dark_red","italic":true}]
execute at @s[scores={AttackTimer=31}] run tellraw @a[distance=..150] ["",{"text":"[","color":"dark_blue"},{"text":"Cadeyrn the Wretched","color":"gold"},{"text":"] ","color":"dark_blue"},{"text":"ENDS","color":"dark_red","italic":true}]
execute at @s[scores={AttackTimer=41}] run tellraw @a[distance=..150] ["",{"text":"[","color":"dark_blue"},{"text":"Cadeyrn the Wretched","color":"gold"},{"text":"] ","color":"dark_blue"},{"text":"NOW!","color":"dark_red","italic":true}]
execute at @s[scores={AttackTimer=41}] run function zzzzdonotuse:cadeyrn/attacks/finalstand/summonstands

execute at @s[scores={AttackTimer=41}] run execute at @s positioned ~ ~.75 ~ run summon minecraft:armor_stand ~ ~.55 ~ {Marker:0b,Invisible:1b,Silent:1b,Silent:1b,Tags:["DiePls","FinalStandLooky"],NoGravity:1}
execute at @s[scores={AttackTimer=41}] run execute at @s positioned ~ ~.75 ~ run summon minecraft:armor_stand ~ ~ ~ {Marker:0b,Invisible:1b,Silent:1b,Silent:1b,Tags:["DiePls","FinalStandLooky"],NoGravity:1}
execute at @s[scores={AttackTimer=41}] run execute at @s positioned ~ ~.75 ~ run summon minecraft:armor_stand ~ ~-.55 ~ {Marker:0b,Invisible:1b,Silent:1b,Silent:1b,Tags:["DiePls","FinalStandLooky"],NoGravity:1}
execute at @s[scores={AttackTimer=41}] run execute at @s positioned ~ ~.75 ~ run summon minecraft:armor_stand ~ ~-1.1 ~ {Marker:0b,Invisible:1b,Silent:1b,Silent:1b,Tags:["DiePls","FinalStandLooky"],NoGravity:1}


execute at @s[scores={AttackTimer=21}] run execute at @s run playsound minecraft:entity.skeleton.step hostile @a[distance=..150] ~ ~ ~ 1 0.5 1
execute at @s[scores={AttackTimer=31}] run execute at @s run playsound minecraft:entity.skeleton.step hostile @a[distance=..150] ~ ~ ~ 1 0.5 1
execute at @s[scores={AttackTimer=41}] run execute at @s run playsound minecraft:entity.skeleton.step hostile @a[distance=..150] ~ ~ ~ 1 0.5 1


execute at @s[scores={AttackTimer=41..70}] run execute at @e[type=armor_stand,tag=FinalStandPart,limit=5,sort=random] run execute positioned ~ ~ ~ run playsound minecraft:entity.wither.ambient hostile @a[distance=..60] ~ ~ ~ 0.06 0.75 0.06
