CUBE BURSTSTUDIOS
round-system.zip
Details

Round System (Intermission + Timer)

Intermission countdown, teleport into the map, round timer, survivors win, back to the lobby. Includes an on-screen status label.

Category
Code
File
round-system.zip
Size
2.6 KB
Downloads
0
Added
16 Oct 2026
Licence
Free to use, no credit needed (CC0)

#rounds#minigame#intermission#timer#lobby#luau#roblox#script

⚑ Report this

Intermission countdown, teleport into the map, round timer, survivors win, back to the lobby. Includes an on-screen status label.

Intermission -> teleport everyone into the map -> round timer -> survivors win -> back to the lobby. Forever.

SETUP
1. Workspace: a Part called "LobbySpawn" (where players wait) and a Folder "MapSpawns" with a few Parts
where players appear for the round.
2. Put this Script in ServerScriptService.
3. For an on-screen status, add the StatusLabel LocalScript (included in the download) to StarterGui.
Winners get +1 "Wins" if you're also using the Leaderstats + Saving script.

The download also includes StatusLabel.client.lua.

The main script is shown below with a Copy button, or grab the download with every file and a README.

RoundSystem.server.lua
--[[
	Round System  ·  by Cube Burst Studios  ·  CC0
	Intermission -> teleport everyone into the map -> round timer -> survivors win -> back to the lobby. Forever.

	SETUP
	1. Workspace: a Part called "LobbySpawn" (where players wait) and a Folder "MapSpawns" with a few Parts
	   where players appear for the round.
	2. Put this Script in ServerScriptService.
	3. For an on-screen status, add the StatusLabel LocalScript (included in the download) to StarterGui.
	Winners get +1 "Wins" if you're also using the Leaderstats + Saving script.
]]

local Players = game:GetService("Players")
local ReplicatedStorage = game:GetService("ReplicatedStorage")

local INTERMISSION = 20 -- seconds between rounds
local ROUND_TIME = 90
local MIN_PLAYERS = 2

local lobbySpawn = workspace:WaitForChild("LobbySpawn")
local mapSpawns = workspace:WaitForChild("MapSpawns")

-- everyone's screen reads this text (see StatusLabel)
local status = ReplicatedStorage:FindFirstChild("RoundStatus") or Instance.new("StringValue")
status.Name = "RoundStatus"
status.Parent = ReplicatedStorage

local function teleport(player, part)
	local root = player.Character and player.Character:FindFirstChild("HumanoidRootPart")
	if root then
		root.CFrame = part.CFrame + Vector3.new(0, 4, 0)
	end
end

local function alive(player)
	local humanoid = player.Character and player.Character:FindFirstChildOfClass("Humanoid")
	return humanoid ~= nil and humanoid.Health > 0
end

local function addWin(player)
	local stats = player:FindFirstChild("leaderstats")
	local wins = stats and stats:FindFirstChild("Wins")
	if wins then
		wins.Value += 1
	end
end

while true do
	-- 1. wait for enough players
	while #Players:GetPlayers() < MIN_PLAYERS do
		status.Value = "Waiting for " .. MIN_PLAYERS .. " players..."
		task.wait(1)
	end

	-- 2. intermission
	for t = INTERMISSION, 1, -1 do
		status.Value = "Next round in " .. t
		task.wait(1)
	end

	-- 3. start: send everyone who is alive into the map
	local spawns = mapSpawns:GetChildren()
	local inRound = {}
	for i, player in ipairs(Players:GetPlayers()) do
		if alive(player) and #spawns > 0 then
			teleport(player, spawns[(i - 1) % #spawns + 1])
			inRound[player] = true
			local humanoid = player.Character:FindFirstChildOfClass("Humanoid")
			humanoid.Died:Once(function()
				inRound[player] = nil
			end)
		end
	end

	-- 4. play until time runs out or one (or nobody) is left
	for t = ROUND_TIME, 1, -1 do
		local left = 0
		for player in pairs(inRound) do
			if player.Parent and alive(player) then
				left += 1
			else
				inRound[player] = nil
			end
		end
		status.Value = "Round: " .. t .. "s  ·  " .. left .. " left"
		if left <= 1 then
			break
		end
		task.wait(1)
	end

	-- 5. survivors win, everyone back to the lobby
	local winners = {}
	for player in pairs(inRound) do
		if player.Parent and alive(player) then
			addWin(player)
			table.insert(winners, player.DisplayName)
		end
	end
	status.Value = #winners > 0 and ("Winners: " .. table.concat(winners, ", ")) or "Nobody survived!"
	for _, player in ipairs(Players:GetPlayers()) do
		if alive(player) then
			teleport(player, lobbySpawn)
		end
	end
	task.wait(5)
end

MORE
CODE

View all ↗