local v={}v.__index=v function v.new(u)local X=setmetatable({gameStageHandler=u},v)return X end function v.initialize(v)wait(5)for v,u in pairs(Players:GetPlayers())do TeleportService:Teleport(Conf.lobby_place,u)end end function v.playerAdded(u,v)local X="\080\108\097\121\101\114 "..(v.Name.." \106\111\105\110\101\100 \097\102\116\101\114 \103\097\109\101 \115\116\097\114\116")warn(X)WarningEvent:FireAllClients(X)end function v.destroy(v) end return v


local EndGame = {}
EndGame.__index = EndGame

function EndGame.new(gameStageHandler)
	local self = setmetatable({
		gameStageHandler = gameStageHandler,
	}, EndGame)

	return self
end

function EndGame:initialize()
	wait(5) -- TODO: Have a buffer time at the end of the game based on a configuration

	-- Teleport players back to the main lobby place
	for _, player in pairs(Players:GetPlayers()) do
		TeleportService:Teleport(Conf.lobby_place, player)
	end
end

function EndGame:playerAdded(player)
	local warningMessage = "Player " .. player.Name .. " joined after game start"
	warn(warningMessage)
	WarningEvent:FireAllClients(warningMessage)
end

function EndGame:destroy()
end

return EndGame
