execute at @s[scores={health=-50..}] run function main:game/mobs/spawn/id/id4004 {"speed":0}
execute at @s[scores={health=-100..}] run function main:game/mobs/spawn/id/id4004 {"speed":0.25}
execute at @s[scores={health=-150..}] run function main:game/mobs/spawn/id/id4004 {"speed":-0.25}


execute at @s[scores={health=..0}] positioned ~ ~1 ~ run function main:particles/explosion_green
execute as @e[type=block_display,tag=id4_particle,predicate=healthbars:invalid-bar] run kill @s

function main:game/mobs/ai/death