scoreboard players add @s[team=!spectating] total_games_played 1
team join lobby
gamemode adventure @s
clear @s
scoreboard players reset @s countdown
tag @s remove playing
tag @s remove end_game
tag @s remove winner

scoreboard players set @s kill_streak 0
scoreboard players set @s kill_streak_timer 2

scoreboard players set @s coins_to_add 0
scoreboard players set @s gems_to_add 0
attribute @s minecraft:fall_damage_multiplier base set 0
execute at @n[tag=main_lobby] run spawnpoint @s ~ ~1 ~ 0 ~
scoreboard players set .game_in_progress lobby 0
function pctf:tp/lobby