execute if score count_phantom darkmobs matches 1 run tp @s ~ -512 ~
execute if score count_phantom darkmobs matches 1 run kill @s
execute if score count_phantom darkmobs matches 2 run tp @s ~ -512 ~
execute if score count_phantom darkmobs matches 2 run kill @s
execute if score count_phantom darkmobs matches 3.. run tp @s ~ -512 ~
execute if score count_phantom darkmobs matches 3.. run kill @s


tag @s add not_mob1
scoreboard players add count_phantom darkmobs 1
execute if score count_phantom darkmobs matches 4.. run scoreboard players set count_phantom darkmobs 0