scoreboard players add teams_mode option 1
execute if score teams_mode option matches 2.. run scoreboard players set teams_mode option 0

execute at @s if score teams_mode option matches 0 run function subchronos:lobby/options/teams_mode/off
execute at @s if score teams_mode option matches 1 run function subchronos:lobby/options/teams_mode/on