eppobot

Round system

Apr 22nd, 2022 (edited)
7,169
-1
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.89 KB | None | 0 1
  1. --- SERVER SCRIPT
  2. local map           = game:GetService("ServerStorage"):WaitForChild("Map")
  3. local updateTimer   = game:GetService("ReplicatedStorage"):WaitForChild("UpdateTimer")
  4. local canStart      = false
  5. local endRace       = true
  6.  
  7. while true do
  8.     for i = 10,1,-1 do
  9.         updateTimer:FireAllClients(i)
  10.         wait(1)
  11.     end
  12.    
  13.     if canStart == true then
  14.        
  15.         map.Parent = game.Workspace
  16.    
  17.         for i = 30,1,-1 do
  18.             updateTimer:FireAllClients(i)
  19.             wait(1)
  20.             if endRace == true then
  21.                 break
  22.             end
  23.         end
  24.        
  25.         map.Parent = game.ServerStorage
  26.     end
  27. end
  28.  
  29.  
  30. -----------------------------------
  31. -----------------------------------
  32. -----------------------------------
  33.  
  34. --- LOCAL SCRIPT
  35. local updateTimer = game:GetService("ReplicatedStorage"):WaitForChild("UpdateTimer")
  36. local timer = script.Parent:WaitForChild("Timer")
  37.  
  38. updateTimer.OnClientEvent:Connect(function(currentTime)
  39.     timer.Text = currentTime
  40. end)
Add Comment
Please, Sign In to add comment