execute as @s[scores={CadeyrnTimer=56..},tag=!FightReset,tag=!PhaseTwo] run function zzzzdonotuse:cadeyrn/doattack
execute as @s[scores={CadeyrnTimer=50..},tag=!FightReset,tag=PhaseTwo] run function zzzzdonotuse:cadeyrn/doattackphase2
tag @a remove CadeyrnFightTag
execute as @s run execute at @e[type=armor_stand,name=CadeyrnFight] positioned ~32 126 ~32 run tag @a[dx=-64,dy=30,dz=-64,gamemode=!spectator,gamemode=!creative] add CadeyrnFightTag
execute as @s run execute if entity @a[tag=CadeyrnFightTag,tag=!GaveCadHP,gamemode=!spectator] run function zzzzdonotuse:cadeyrn/increasebosshp
execute if entity @a[tag=CadeyrnFightTag] run tag @s remove FightReset
execute unless entity @a[tag=CadeyrnFightTag] run execute as @s[tag=!FightReset] run function zzzzdonotuse:cadeyrn/reset
bossbar set minecraft:cadeyrn players @a[tag=CadeyrnFightTag]

execute as @a[tag=CadeyrnFightTag,tag=!MusicTagKyu,gamemode=survival] run execute at @s run playsound minecraft:music_disc.piggyidklol record @s ~ ~5000 ~ 0.20 1 0.20

tag @a[tag=CadeyrnFightTag] add MusicTagKyu
