Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function startround()
- if #game.Players:GetChildren() >= 2 then
- local Roundinprocess = true
- for i = 1,5 do
- game.StarterGui.ScreenGui.TextLabel.Text = "Starting round in "..i.." Seconds"
- end
- for i,v in pairs(game.Players:GetChildren()) do
- local character = v.Character
- if not character or not character.Parent then
- character = v.CharacterAdded:wait()
- end
- character.HumanoidRootPart.Position = Vector3.new(0,10,0)
- local sword = game.ReplicatedStorage.ClassicSword:Clone()
- sword.Parent = v.BackPack
- end
- while Roundinprocess == true do
- wait(1)
- local part = game.Workspace.region
- local region3 = Region3.new(part.Position + Vector3.new(part.Position - (0.5 * part.Size),part.Position - (0.5 * part.Size)))
- local partsinreason = workspace:FindPartsInRegion3(region3, part)
- local tableofparts = workspace:FindPartsInRegion3(region3, part)
- local players = 0
- for i , v in pairs(partsinreason) do
- if v:FindFirstChild("Humanoid") then
- players = players + 1
- end
- if players == 1 then
- Roundinprocess = false
- end
- end
- end
- else
- game.StarterGui.ScreenGui.TextLabel.Text = "Waiting for more players"
- end
- end
- while wait(5) do
- startround()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement