effect give @a minecraft:regeneration 1 255 true
effect give @s minecraft:slow_falling 1 0 true
effect give @s minecraft:blindness 1 0 true

scoreboard objectives setdisplay sidebar
scoreboard objectives setdisplay list
gamerule keep_inventory false
xp set @a 0 levels
xp set @a 0 points
gamemode adventure @a
effect clear @a
clear @a

tag @a remove spectating
team leave @a

schedule clear subchronos:game/end/firework

scoreboard players set startTime gameInfoValues -1
scoreboard players set timeExplosion gameInfoValues -1
scoreboard players set barrelRefill gameInfoValues -1
scoreboard players set .explosionFase temp 0
scoreboard players set teams gameInfoValues 0

scoreboard players set gameStatus gameInfoValues 0
scoreboard players reset * gameKills
scoreboard players reset * die
scoreboard players reset * y

scoreboard players reset game gameID
scoreboard players reset @a gameID

#Updates top
function subchronos:lobby/top/gen_stans

##start button
scoreboard players set .startButtonStatus option 0
function subchronos:lobby/start_button/model/a/unpress/play

execute in minecraft:overworld run tp @a 500.52 99.50 -999.48 1170.23 -3.04

playsound minecraft:entity.illusioner.mirror_move master @a 500.52 99.50 -999.48 1000 1
particle minecraft:squid_ink 500.52 100.50 -999.48 0.5 1 0.5 0 100

function subchronos:game/end/delete_map

scoreboard players reset timer supplyDropCooldown

#Notifies players of new cosmetics
schedule function subchronos:lobby/menu/notify/main 2s