execute if predicate kiwi2:chance_random_10 run scoreboard players add @s mob_first_skill_counter 1
scoreboard players add @s mob_second_skill_counter 1

execute if score @s mob_first_skill_counter matches 600 run function kiwi2:custom_mobs_fx/phantom_cultist/phantom_cultist_spawn_end_crystal
execute if score @s mob_first_skill_counter matches 600 run schedule function kiwi2:custom_mobs_fx/phantom_cultist/phantom_cultist_homing 1t
execute if score @s mob_first_skill_counter matches 600.. store result score @s mob_first_skill_counter run random value 1..100

execute if score @s[nbt={HurtTime:5s}] mob_second_skill_counter matches 750.. if predicate kiwi2:chance_random_20 run function kiwi2:custom_mobs_fx/phantom_cultist/phantom_cultist_disappear