scoreboard players add @s KyuDummy2 1


#run these only once
execute at @s[tag=!FirstTP] run summon marker ~ ~ ~ {Tags:["MiningCatMarkerMid"]}
execute at @s[tag=!FirstTP] run tp @s ~-4 ~-2 ~-4
tag @s add FirstTP


#summon a wall of markers
execute at @s[scores={KyuDummy2=1..8}] run summon marker ~ ~ ~ {Tags:["MiningCatMarker"]}
execute at @s[scores={KyuDummy2=1..8}] run summon marker ~ ~1 ~ {Tags:["MiningCatMarker"]}
execute at @s[scores={KyuDummy2=1..8}] run summon marker ~ ~2 ~ {Tags:["MiningCatMarker"]}
execute at @s[scores={KyuDummy2=1..8}] run summon marker ~ ~3 ~ {Tags:["MiningCatMarker"]}
execute at @s[scores={KyuDummy2=1..8}] run summon marker ~ ~4 ~ {Tags:["MiningCatMarker"]}
execute at @s[scores={KyuDummy2=1..8}] run tp @s ~1 ~ ~


#have the markers move and destroy blocks, essentially acting as a square /fill command but it won't destroy certain blocks
execute at @s[scores={KyuDummy2=9..16}] run execute at @e[distance=..13,type=marker,tag=MiningCatMarkerMid] run execute as @e[distance=..4,type=marker,tag=MiningCatMarker] run execute at @s run function zzzzdonotuse:specialitems/miningcatalyst/miningcatalystexplodecheck
execute at @s[scores={KyuDummy2=9..16}] run execute at @e[distance=..13,type=marker,tag=MiningCatMarkerMid] run execute as @e[distance=..12,type=marker,tag=MiningCatMarker] run execute at @s run tp @s ~ ~ ~1


#perish
execute at @s[scores={KyuDummy2=17}] run kill @e[distance=..13,type=marker,tag=MiningCatMarkerMid]
execute at @s[scores={KyuDummy2=17}] run kill @e[distance=..13,type=marker,tag=MiningCatMarker]
execute at @s[scores={KyuDummy2=17}] run kill @s[type=marker]
execute at @s[scores={KyuDummy2=17}] run kill @s[type=item]


execute at @s[scores={KyuDummy2=1..18}] run function zzzzdonotuse:specialitems/miningcatalyst/miningcatalystexplode
