clear @s vatonage:primary_magic_orb 0 1
gamerule sendcommandfeedback false
scoreboard players random @s primarymagic 0 9

execute @s[scores={primarymagic=0,secondarymagic=0}] ~ ~ ~ scoreboard players random @s primarymagic 1 9
execute @s[scores={primarymagic=1,secondarymagic=1}] ~ ~ ~ scoreboard players random @s primarymagic 2 9
execute @s[scores={primarymagic=2,secondarymagic=2}] ~ ~ ~ scoreboard players random @s primarymagic 3 9
execute @s[scores={primarymagic=3,secondarymagic=3}] ~ ~ ~ scoreboard players random @s primarymagic 4 9
execute @s[scores={primarymagic=4,secondarymagic=4}] ~ ~ ~ scoreboard players random @s primarymagic 5 9
execute @s[scores={primarymagic=5,secondarymagic=5}] ~ ~ ~ scoreboard players random @s primarymagic 0 4
execute @s[scores={primarymagic=6,secondarymagic=6}] ~ ~ ~ scoreboard players random @s primarymagic 0 5
execute @s[scores={primarymagic=7,secondarymagic=7}] ~ ~ ~ scoreboard players random @s primarymagic 0 6
execute @s[scores={primarymagic=8,secondarymagic=8}] ~ ~ ~ scoreboard players random @s primarymagic 0 7
execute @s[scores={primarymagic=9,secondarymagic=9}] ~ ~ ~ scoreboard players random @s primarymagic 0 9

execute @s[scores={primarymagic=0}] ~ ~ ~ /tellraw @s {"rawtext":[{"text":"§7§l[§r§7Wind Magic§7§l]"}]}
execute @s[scores={primarymagic=0}] ~ ~ ~ /tellraw @s {"rawtext":[{"text":"§7Wind Magic users cast spells which increase their mobility."}]}
execute @s[scores={primarymagic=0}] ~ ~ ~ /tellraw @s {"rawtext":[{"text":"Your primary magic has been changed to Wind Magic"}]}

execute @s[scores={primarymagic=1}] ~ ~ ~ /tellraw @s {"rawtext":[{"text":"§7§l[§r§1Water Magic§7§l]"}]}
execute @s[scores={primarymagic=1}] ~ ~ ~ /tellraw @s {"rawtext":[{"text":"§7Water Magic users cast spells quickly to defeat their opponent."}]}
execute @s[scores={primarymagic=1}] ~ ~ ~ /tellraw @s {"rawtext":[{"text":"Your primary magic has been changed to Water Magic"}]}

execute @s[scores={primarymagic=2}] ~ ~ ~ /tellraw @s {"rawtext":[{"text":"§7§l[§r§aPoison Magic§7§l]"}]}
execute @s[scores={primarymagic=2}] ~ ~ ~ /tellraw @s {"rawtext":[{"text":"§7Poison Magic users cast spells to slowly defeat enemies."}]}
execute @s[scores={primarymagic=2}] ~ ~ ~ /tellraw @s {"rawtext":[{"text":"Your primary magic has been changed to Poison Magic"}]}

execute @s[scores={primarymagic=3}] ~ ~ ~ /tellraw @s {"rawtext":[{"text":"§7§l[§r§5Necromancy Magic§7§l]"}]}
execute @s[scores={primarymagic=3}] ~ ~ ~ /tellraw @s {"rawtext":[{"text":"§7Necromancy Magic users cast spells to summon allies to fight for them."}]}
execute @s[scores={primarymagic=3}] ~ ~ ~ /tellraw @s {"rawtext":[{"text":"Your primary magic has been changed to Necromancy Magic"}]}

execute @s[scores={primarymagic=4}] ~ ~ ~ /tellraw @s {"rawtext":[{"text":"§7§l[§r§eLight Magic§7§l]"}]}
execute @s[scores={primarymagic=4}] ~ ~ ~ /tellraw @s {"rawtext":[{"text":"§7Light Magic users cast spells to defeat enemies while healing the user."}]}
execute @s[scores={primarymagic=4}] ~ ~ ~ /tellraw @s {"rawtext":[{"text":"Your primary magic has been changed to Light Magic"}]}

execute @s[scores={primarymagic=5}] ~ ~ ~ /tellraw @s {"rawtext":[{"text":"§7§l[§r§bIce Magic§7§l]"}]}
execute @s[scores={primarymagic=5}] ~ ~ ~ /tellraw @s {"rawtext":[{"text":"§7Ice Magic users cast spells to slow their enemies down."}]}
execute @s[scores={primarymagic=5}] ~ ~ ~ /tellraw @s {"rawtext":[{"text":"Your primary magic has been changed to Ice Magic"}]}

execute @s[scores={primarymagic=6}] ~ ~ ~ /tellraw @s {"rawtext":[{"text":"§7§l[§r§2Grass Magic§7§l]"}]}
execute @s[scores={primarymagic=6}] ~ ~ ~ /tellraw @s {"rawtext":[{"text":"§7Grass Magic users cast spells to boost their allies."}]}
execute @s[scores={primarymagic=6}] ~ ~ ~ /tellraw @s {"rawtext":[{"text":"Your primary magic has been changed to Grass Magic"}]}

execute @s[scores={primarymagic=7}] ~ ~ ~ /tellraw @s {"rawtext":[{"text":"§7§l[§r§4Fire Magic§7§l]"}]}
execute @s[scores={primarymagic=7}] ~ ~ ~ /tellraw @s {"rawtext":[{"text":"§7Fire Magic users cast destructive spells to defeat their opponent."}]}
execute @s[scores={primarymagic=7}] ~ ~ ~ /tellraw @s {"rawtext":[{"text":"Your primary magic has been changed to Fire Magic"}]}

execute @s[scores={primarymagic=8}] ~ ~ ~ /tellraw @s {"rawtext":[{"text":"§7§l[§r§6Electric Magic§7§l]"}]}
execute @s[scores={primarymagic=8}] ~ ~ ~ /tellraw @s {"rawtext":[{"text":"§7Electric Magic users cast powerful spells to defeat specific enemies."}]}
execute @s[scores={primarymagic=8}] ~ ~ ~ /tellraw @s {"rawtext":[{"text":"Your primary magic has been changed to Electric Magic"}]}

execute @s[scores={primarymagic=9}] ~ ~ ~ /tellraw @s {"rawtext":[{"text":"§7§l[§r§0Death Magic§7§l]"}]}
execute @s[scores={primarymagic=9}] ~ ~ ~ /tellraw @s {"rawtext":[{"text":"§7Death Magic users cast dark spells to defeat enemies."}]}
execute @s[scores={primarymagic=9}] ~ ~ ~ /tellraw @s {"rawtext":[{"text":"Your primary magic has been changed to Death Magic"}]}