Forja

Roblox round system script

The loop behind most minigames: wait for players, count down, send everyone to the arena, time the round and bring them back, with the countdown on screen.

Where it goes

  1. 1Add two Parts, Anchored, named LobbySpawn and ArenaSpawn, where players should arrive.
  2. 2Add the first script to ServerScriptService.
  3. 3In StarterGui, add a ScreenGui with a TextLabel, and put the second script in it as a LocalScript.
RoundSystem · a Script in ServerScriptService
-- From forja.us/tools/roblox-scripts/round-system-- Intermission, round, back to the lobby, over and over.local Players = game:GetService("Players")local ReplicatedStorage = game:GetService("ReplicatedStorage")local INTERMISSION_SECONDS = 15local ROUND_SECONDS = 60local MIN_PLAYERS = 2local lobbySpawn = workspace:WaitForChild("LobbySpawn")local arenaSpawn = workspace:WaitForChild("ArenaSpawn")local status = Instance.new("StringValue")status.Name = "RoundStatus"status.Parent = ReplicatedStoragelocal function sendEveryoneTo(place)	for _, player in Players:GetPlayers() do		local character = player.Character		if character then			local spread = Vector3.new(math.random(-8, 8), 4, math.random(-8, 8))			character:PivotTo(place.CFrame + spread)		end	endendlocal function countDown(label, seconds)	for left = seconds, 1, -1 do		status.Value = label .. ": " .. left		task.wait(1)	endendwhile true do	while #Players:GetPlayers() < MIN_PLAYERS do		status.Value = "Waiting for players..."		task.wait(1)	end	countDown("Next round in", INTERMISSION_SECONDS)	sendEveryoneTo(arenaSpawn)	countDown("Round ends in", ROUND_SECONDS)	sendEveryoneTo(lobbySpawn)end
RoundStatusLabel · a LocalScript in a TextLabel in StarterGui
-- From forja.us/tools/roblox-scripts/round-system-- Shows the countdown on screen.local ReplicatedStorage = game:GetService("ReplicatedStorage")local status = ReplicatedStorage:WaitForChild("RoundStatus")local label = script.Parentlocal function update()	label.Text = status.Valueendstatus:GetPropertyChangedSignal("Value"):Connect(update)update()

How it works

  • The server runs one loop for everyone, so players can't get out of step.
  • A StringValue in ReplicatedStorage carries the countdown text to each player's screen.
  • spread puts players a little apart, so they don't land on top of each other.

Make it yours

Test it alone
Set MIN_PLAYERS to 1 while you're building.
Prizes
Before sendEveryoneTo(lobbySpawn), give coins to the players still alive.
Want something more? The script generator can write it: “A round system that gives 10 coins to everyone still alive when the round ends, and ends early if one player is left”

Maps to try it on: arena and combat maps

Start from a finished map, and your scripts have a game to run in.

More free Roblox scripts