scoreboard players add .host_mode settings 1
execute if score .host_mode settings matches 2.. run scoreboard players set .host_mode settings 0
tag @s add op

execute if score .host_mode settings matches 1 run tellraw @s ["",{"text":"\n"},{"text":"Host Mode is now","color":"yellow"},{"text":" ON","bold":true,"color":"green"},{"text":"!\n\n","color":"yellow"},{"text":"Players without the '","color":"yellow"},{"text":"op","color":"aqua"},{"text":"' tag will no longer be able to do the following:","color":"yellow"},{"text":"\n\n"},{"text":"- Initiate or cancel the start countdown\n- Toggle modifiers\n- Create or edit a map","color":"yellow"}]
execute if score .host_mode settings matches 1 run tellraw @s ["",{"text":"\n"},{"text":"By typing this command you have been given the '","color":"dark_aqua"},{"text":"op","color":"aqua"},{"text":"' tag! Give other players the tag with '","color":"dark_aqua"},{"text":"/tag ","color":"yellow"},{"text":"player_name_here","italic":true,"underlined":true,"color":"yellow"},{"text":" add op","color":"yellow"},{"text":"'","color":"dark_aqua"}]
execute if score .host_mode settings matches 1 run playsound minecraft:entity.blaze.death player @s ~ ~ ~ 1 2
execute if score .host_mode settings matches 0 run tellraw @s ["",{"text":"\nHost Mode is now "},{"text":"OFF","bold":true,"color":"red"},{"text":"!"}]
execute if score .host_mode settings matches 0 run playsound minecraft:entity.blaze.hurt player @s ~ ~ ~ 1 1.5