execute if score @s pctf_gamemode matches 0 run gamemode survival @s
execute if score @s pctf_gamemode matches 1 run gamemode creative @s
execute if score @s pctf_gamemode matches 2 run gamemode adventure @s
execute if score @s pctf_gamemode matches 3 run gamemode spectator @s