execute if score .host_mode settings matches 1 unless entity @s[tag=op] run return run tellraw @s {"text":"\nYou do not have permission to toggle modifiers in Host Mode! To toggle Host Mode an operator must type `/function pctf:host_mode/toggle`","color":"red"}
scoreboard players add .wizard_battle settings 1
execute if score .wizard_battle settings matches 2.. run scoreboard players set .wizard_battle settings 0

execute if score .wizard_battle settings matches 0 run setblock 8 100 -2 oak_wall_sign[facing=south]{front_text:{messages:[{"text":"TOGGLE","color":"yellow","bold":true,"click_event":{"action":"run_command","command":"/function pctf:logic/modifiers/wizard_battle/toggle"}},{"text":"Wizard Battle","color":"white"},"",{"text":"OFF","color":"red","bold":true}]},is_waxed:1b} destroy
execute if score .wizard_battle settings matches 1 run setblock 8 100 -2 oak_wall_sign[facing=south]{front_text:{messages:[{"text":"TOGGLE","color":"yellow","bold":true,"click_event":{"action":"run_command","command":"/function pctf:logic/modifiers/wizard_battle/toggle"}},{"text":"Wizard Battle","color":"white"},"",{"text":"ON","color":"green","bold":true}]},is_waxed:1b} destroy

execute if score .wizard_battle settings matches 0 run playsound minecraft:block.note_block.bit player @s ~ ~ ~ 1 0
execute if score .wizard_battle settings matches 1 run playsound minecraft:block.note_block.bit player @s ~ ~ ~ 1 2
execute if score .wizard_battle settings matches 1 run tellraw @s ["",{"text":"Wizard Battle","bold":true,"underlined":true,"color":"yellow"},{"text":"\n\n"},{"text":"- Your sword and bow are replaced with 3 random spells!","color":"gray"},{"text":"\n "}]
