execute @s[tag=!on] ~ ~ ~ execute @p[r=3,scores={primarymagic=9}] ~ ~ ~ scoreboard players add @s primaryexp 90
execute @s[tag=!on] ~ ~ ~ execute @p[r=3,scores={secondarymagic=9}] ~ ~ ~ scoreboard players add @s secondaryexp 90

execute @p[r=3,scores={primarymagic=9}] ~ ~ ~ tag @e[type=vatonage:deathball,r=3] add on
execute @p[r=3,scores={secondarymagic=9}] ~ ~ ~ tag @e[type=vatonage:deathball,r=3] add on
execute @s[tag=!on] ~ ~ ~ tellraw @p {"rawtext":[{"text":"§cYou haven't unlocked this magic"}]}
execute @s[tag=!on] ~ ~ ~ replaceitem entity @p slot.weapon.mainhand 0 vatonage:empty_wand
kill @s[tag=!on]

execute @s[scores={removedebris=1}] ~ ~ ~ playsound step.soul_sand @a ~ ~ ~
particle minecraft:sparkler_emitter ~ ~0.1 ~

scoreboard objectives add removedebris dummy removedebris
scoreboard players add @s removedebris 1
execute @s[scores={removedebris=500..}] ~ ~ ~ kill @s

scoreboard players add @e[r=6] withereffect 0
execute @s[scores={removedebris=1..9}] ~ ~ ~ scoreboard players add @e[r=6,type=!player,scores={withereffect=..2}] withereffect 1
execute @s[scores={removedebris=10..}] ~ ~ ~ scoreboard players add @e[r=6,tag=!magicpvp,scores={withereffect=..2}] withereffect 1
execute @s[scores={removedebris=10..}] ~ ~ ~ fill ~-2 ~-2 ~-2 ~2 ~2 ~2 dirt 0 replace grass