execute @s[tag=!on] ~ ~ ~ execute @p[r=3,scores={primarymagic=1,primarylevel=3..}] ~ ~ ~ scoreboard players add @s primaryexp 450
execute @s[tag=!on] ~ ~ ~ execute @p[r=3,scores={secondarymagic=1,secondarylevel=3..}] ~ ~ ~ scoreboard players add @s secondaryexp 450

execute @p[r=3,scores={primarymagic=1,primarylevel=3..}] ~ ~ ~ tag @e[type=vatonage:watercircle4,r=3] add on
execute @p[r=3,scores={secondarymagic=1,secondarylevel=3..}] ~ ~ ~ tag @e[type=vatonage:watercircle4,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_wand4
kill @s[tag=!on]

execute @s[scores={removedebris=1}] ~ ~ ~ playsound random.splash @a ~ ~ ~

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

execute @s[scores={removedebris=30}] ~ ~ ~ execute @p[r=3,tag=magicpvp] ~ ~ ~ effect @a[r=10] water_breathing 30 0 true
execute @s[scores={removedebris=30}] ~ ~ ~ execute @p[r=3,tag=!magicpvp] ~ ~ ~ effect @p[r=10] water_breathing 30 0 true
execute @s[scores={removedebris=30}] ~ ~ ~ tag @a[r=10,tag=magicpvp] add water2
execute @s[scores={removedebris=30}] ~ ~ ~ tag @p[r=10,tag=!magicpvp] add water2
execute @s[scores={removedebris=50}] ~ ~ ~ scoreboard players add @e[r=10,rm=2,tag=!magicpvp,tag=!water2] withereffect 3
execute @s[scores={removedebris=50}] ~ ~ ~ scoreboard players add @e[r=10,rm=2,tag=!magicpvp,tag=!water2] poisoneffect 3

execute @s[scores={removedebris=5}] ~ ~ ~ fill ~-7 ~-7 ~-7 ~7 ~7 ~7 air 0 replace fire
execute @s[scores={removedebris=5}] ~ ~ ~ fill ~-7 ~-7 ~-7 ~7 ~7 ~7 obsidian 0 replace lava