tag @s add first_join
scoreboard players reset @s join

#If they are in game
execute if score gameStatus gameInfoValues matches 1.. unless score @s gameID = game gameID run function subchronos:join_in_game
execute if score gameStatus gameInfoValues matches 1.. if score @s gameID = game gameID run gamemode survival @s

#If they are in lobby
execute unless score gameStatus gameInfoValues matches 1.. run function subchronos:join_not_in_game

#Gives all recipes
recipe give @a *