Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SCRIPT 1. STARTERGUI
- local status = game.ReplicatedStorage:WaitForChild("Status")
- local text = script.Parent:WaitForChild("StatusText")
- status:GetPropertyChangedSignal("Value"):Connect(function()
- text.Text = status.Value
- end)
- SCRIPT 2. SERVERSCRIPTSERVICE
- local status = game.ReplicatedStorage.Status
- local text = game.StarterGui.GameStatus.StatusText.Text
- local players = game.Players
- local map = game.Workspace.Map
- local spawnPoint = game.Workspace.SpawnLocation
- local weapons = game.ReplicatedStorage.Weapons
- local intermission = 10
- local roundLength = 10
- players.PlayerAdded:Connect(function(plr)
- while true do
- -- Counts down the intermission
- for i = intermission, 0, -1 do
- status.Value = "Intermission:".. i
- wait(1)
- end
- -- Gets players ready for the game to start
- status.Value = "Starting!"
- wait(3)
- plr.Character.HumanoidRootPart.CFrame = map.CFrame
- local swordClone = weapons.ClassicSword:Clone()
- swordClone.Parent = plr.Character
- -- Counts down the round length
- for i = roundLength, 0, -1 do
- status.Value = "Time: ".. i
- wait(1)
- end
- status.Value = "Game Over!"
- swordClone:Destroy()
- wait(3)
- plr.Character.HumanoidRootPart.CFrame = spawnPoint.CFrame
- task.wait(1)
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement