#Initialisation
scoreboard players add @a[tag=Spawn] Spawning 1
spreadplayers 500 500 0 5 false @a[score_Spawning_min=5,score_Spawning=5,tag=Spawn]
gamemode 2 @a[score_Spawning_min=5,score_Spawning=5,tag=Spawn]
scoreboard players tag @a[score_Spawning_min=5,score_Spawning=5] add Lobby
function main:scoreboard/lobby if @a[tag=Lobby,score_Spawning_min=5,score_Spawning=5]
title @a[score_Spawning_min=5,score_Spawning=5,tag=Spawn] times 20 70 30
execute @a[score_Spawning_min=5,score_Spawning=5,tag=Spawn] ~ ~ ~ tellraw @a ["",{"text":"Freezun","color":"aqua","bold":"true"},{"text":" »","color":"dark_gray"},{"text":" Welcome to the map ","color":"aqua"},{"selector":"@s[score_Spawning_min=5,score_Spawning=5,tag=Spawn]","color":"dark_aqua","bold":true},{"text":"!","color":"aqua"}]
execute @a[score_Spawning_min=5,score_Spawning=5,tag=Spawn] ~ ~ ~ title @s[score_Spawning_min=5,score_Spawning=5,tag=Spawn] title ["",{"text":"Welcome ","color":"aqua"},{"selector":"@s[score_Spawning_min=5,score_Spawning=5,tag=Spawn]","color":"dark_aqua"}]

scoreboard players tag @a[name=Theticman,tag=Spawn,score_Spawning_min=5,score_Spawning=5] add MapMaker
scoreboard players tag @a[name=ChildOfStars,tag=Spawn,score_Spawning_min=5,score_Spawning=5] add MapMaker
scoreboard players tag @a[name=ChildOfMoon,tag=Spawn,score_Spawning_min=5,score_Spawning=5] add MapMaker

scoreboard players tag @a[name=Thetacman,tag=Spawn,score_Spawning_min=5,score_Spawning=5] add Tester
scoreboard players tag @a[name=Vilder50,tag=Spawn,score_Spawning_min=5,score_Spawning=5] add Tester
scoreboard players tag @a[name=iWacky,tag=Spawn,score_Spawning_min=5,score_Spawning=5] add Tester
scoreboard players tag @a[name=Tiliba,tag=Spawn,score_Spawning_min=5,score_Spawning=5] add Tester
scoreboard players tag @a[name=Flannou,tag=Spawn,score_Spawning_min=5,score_Spawning=5] add Tester
scoreboard players tag @a[name=Konath,tag=Spawn,score_Spawning_min=5,score_Spawning=5] add Tester
scoreboard players tag @a[name=Elmarchio,tag=Spawn,score_Spawning_min=5,score_Spawning=5] add Tester
scoreboard players tag @a[name=EbayMinecon2012,tag=Spawn,score_Spawning_min=5,score_Spawning=5] add Tester
scoreboard players tag @a[name=Marc,tag=Spawn,score_Spawning_min=5,score_Spawning=5] add Tester
scoreboard players tag @a[name=Pulluxx,tag=Spawn,score_Spawning_min=5,score_Spawning=5] add Tester
function main:lobby/lobby/teams if @a[score_Spawning_min=5,score_Spawning=5,tag=Spawn]

title @a[score_Spawning_min=30,score_Spawning=30,tag=Spawn] subtitle {"text":"on the map","color":"aqua"}
title @a[score_Spawning_min=50,score_Spawning=50,tag=Spawn] title {"text":"Freezun","color":"aqua","bold":"true","underlined":"true"}
title @a[score_Spawning_min=50,score_Spawning=50,tag=Spawn] subtitle {"text":" "}
title @a[score_Spawning_min=60,score_Spawning=60,tag=Spawn] subtitle ["",{"text":"By","color":"aqua"},{"text":" Theticman","color":"dark_aqua","bold":"true"},{"text":",","color":"aqua"},{"text":" ChildOfStars","color":"dark_aqua","bold":"true"},{"text":" and","color":"aqua"},{"text":" ChildOfMoon","color":"dark_aqua","bold":"true"}]
scoreboard players tag @a[score_Spawning_min=120,score_Spawning=120,tag=Spawn] remove Spawn
scoreboard players reset @a[score_Spawning_min=120,score_Spawning=120] Spawning