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

execute @p[r=3,scores={primarymagic=8,primarylevel=3..}] ~ ~ ~ tag @e[type=vatonage:electriccircle4,r=3] add on
execute @p[r=3,scores={secondarymagic=8,secondarylevel=3..}] ~ ~ ~ tag @e[type=vatonage:electriccircle4,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 conduit.activate @a ~ ~ ~

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

execute @s[scores={removedebris=50}] ~ ~ ~ effect @e[r=10,rm=1,tag=!magicpvp,tag=!electric3] slowness 10 1 true
execute @s[scores={removedebris=50}] ~ ~ ~ effect @e[r=10,rm=1tag=!magicpvp,tag=!electric3] blindness 3 1 true
execute @s[scores={removedebris=5}] ~ ~ ~ tag @a[r=10,tag=magicpvp] add electric3
execute @s[scores={removedebris=5}] ~ ~ ~ tag @p[r=10,tag=!magicpvp] add electric3
execute @s[scores={removedebris=50}] ~ ~ ~ execute @e[r=10,rm=1,type=!lightning_bolt,tag=!magicpvp,tag=!electric3] ~ ~ ~ summon lightning_bolt
execute @s[scores={removedebris=40}] ~ ~ ~ execute @p[r=10,tag=magicpvp] ~ ~ ~ effect @a[r=10] fire_resistance 4 0 true
execute @s[scores={removedebris=40}] ~ ~ ~ execute @p[r=10,tag=!magicpvp] ~ ~ ~ effect @p[r=2] fire_resistance 4 0 true