and after that the intermission text
local StarterGui = game:GetService("StarterGui"):WaitForChild("TimerGui").TimerDisplay
local part = game.Workspace:WaitForChild("BorderPart")
local roundLeg = 258
local intermessionLength = 10
local inRound = game.ReplicatedStorage.InRound
local Status = game.ReplicatedStorage.Status
local player = game.Players.LocalPlayer
local lobby = game.Workspace:WaitForChild("Floor")
inRound.Changed:Connect(function()
wait(1)
if inRound.Value == true then
part.Transparency = 1
part.CanCollide = false
part.SurfaceGui.TextLabel.Visible = false
else
part.Transparency = 0.2
part.CanCollide = true
part.SurfaceGui.TextLabel.Visible = true
for _, v in pairs(game.Players:GetChildren()) do
local char = v.Character
char.HumanoidRootPart.CFrame = lobby.CFrame
end
end
end)
local function roundTimer()
while wait() do
for i = intermessionLength, 0, -1 do
inRound.Value = false
wait(1)
Status.Value = "Intermission: " .. i .. " seconds left!"
end
for i = roundLeg, 0, -1 do
inRound.Value = true
wait(1)
Status.Value = "Game: " .. i .. " seconds left!"
end
if Status.Value == player.Name.. " wins!" then
for i = intermessionLength, 0, -1 do
inRound.Value = false
wait(1)
Status.Value = "Intermission: " .. i .. " seconds left!"
end
end
end
end
spawn(roundTimer)
local part = script.Parent
local sht = part.ToAddWins
local shp = part.ToAddMoney
local Status = game:GetService("ReplicatedStorage"):WaitForChild("Status")
part.Touched:Connect(function(hit)
local player = game:GetService("Players"):GetPlayerFromCharacter(hit.Parent)
player.leaderstats.Wins.Value += sht.Value
player.leaderstats.Cash.Value += shp.Value
Status.Value = player.Name.. " wins!"
end)
