Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local lobbytime = 10
- local waittime = 5
- local roundtime = 20
- -- change the timing according to your wish
- local timev = game.ReplicatedStorage.Time
- local manager = game.ReplicatedStorage.Manager
- while true do
- manager.Value = "Lobby"
- timev.Value = lobbytime
- repeat
- timev.Value = timev.Value - 1
- wait(1)
- until timev.Value == 0
- manager.Value = "Round Starting"
- timev.Value = waittime
- repeat
- timev.Value = timev.Value - 1
- wait(1)
- until timev.Value == 0
- local unusedspawns = game.Workspace.Map.Spawns:GetChildren()
- for i,plr in pairs(game.Players:GetPlayers()) do
- local allocated = false
- local spawns = game.Workspace.Map.Spawns:GetChildren()
- for i,spawnlo in pairs(spawns) do
- for ind, unused in pairs(unusedspawns) do
- if spawnlo==unused and allocated==false then
- allocated = true
- table.remove(unusedspawns, ind)
- if plr.Character:FindFirstChild("Torso") then
- plr.Character.Torso.CFrame = CFrame.new(spawnlo.Position + Vector3.new(0,3,0))
- elseif plr.Character:FindFirstChild("UpperTorso") then
- plr.Character.UpperTorso.CFrame = CFrame.new(spawnlo.Position + Vector3.new(0,3,0))
- end
- end
- end
- end
- end
- manager.Value = "Round In Progress"
- timev.Value = roundtime
- repeat
- timev.Value = timev.Value - 1
- wait(1)
- until timev.Value == 0
- for i, player in pairs(game.Players:GetPlayers()) do
- player.Character:FindFirstChild("Humanoid").Health = 0
- end
- manager.Value = "Round Ending"
- timev.Value = waittime
- repeat
- timev.Value = timev.Value - 1
- wait(1)
- until timev.Value == 0
- end
Add Comment
Please, Sign In to add comment