Advertisement
Tacidus

Intermission

Apr 16th, 2021
135
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.25 KB | None | 0 0
  1. Main Script--
  2.  
  3. ServerStorage = game:GetService("ServerStorage")
  4. ReplicatedStorage = game:GetService("ReplicatedStorage")
  5. Players = game:GetService("Players")
  6.  
  7. Maps = ServerStorage:WaitForChild('Maps'):GetChildren()
  8. Status = ReplicatedStorage:WaitForChild('Status')
  9.  
  10. while true do
  11.  
  12. -- script made by KillerWolfie2112
  13. -- Youtube: XxGAMERxX
  14.    
  15.     local Countdown = 10 -- Intermission Time
  16.    
  17.     repeat wait(1)
  18.         Countdown = Countdown - 1
  19.        
  20.         Status.Value = 'Intermission : '..Countdown
  21.     until Countdown <= 0
  22.    
  23.    
  24.    
  25.     Status.Value = 'Choosing Map.'
  26.    
  27.     local ChosenMap = Maps[math.random(1, #Maps)]:Clone()
  28.     local Spawns = ChosenMap:FindFirstChild('Spawns'):GetChildren()
  29.     local RandomSpawn = Spawns[math.random(1, #Spawns)]
  30.    
  31.     wait(5) -- little pause, make this as long as you want
  32.    
  33.     ChosenMap.Parent = workspace
  34.     Status.Value = 'Map chosen, teleporting players.'
  35.    
  36.     wait(2) -- little pause, make this as long as you want
  37.    
  38.    
  39.    
  40.     for _, Player in pairs(Players:GetChildren())do
  41.         if Player.Character and Player.Character:FindFirstChild('Humanoid') then
  42.             Player.Character.HumanoidRootPart.CFrame = RandomSpawn.CFrame
  43.         end
  44.     end
  45.    
  46.     Countdown = 3 -- Starting Round In, make this as long as you want
  47.    
  48.     repeat wait(1)
  49.         Countdown = Countdown - 1
  50.        
  51.         Status.Value = ' Round Starts in : '..Countdown
  52.     until Countdown <= 0
  53.    
  54.     Countdown = 10 -- Game Time.
  55.    
  56.     repeat wait(1)
  57.         Countdown = Countdown - 1
  58.        
  59.         Status.Value = 'Time Left : '..Countdown
  60.     until Countdown <= 0
  61.    
  62.    
  63.    
  64.     for _, Player in pairs(Players:GetChildren())do
  65.         if Player.Character and Player.Character:FindFirstChild('Humanoid') then
  66.             Player.Character.Humanoid:TakeDamage(2000)
  67.         end
  68.     end
  69.    
  70.     ChosenMap:Destroy()
  71.    
  72.     Status.Value = 'Round Ended, waiting for new game.'
  73.    
  74.     wait(4) -- little pause, make this as long as you want.
  75.    
  76. end
  77. ServerStorage = game:GetService("ServerStorage")
  78. ReplicatedStorage = game:GetService("ReplicatedStorage")
  79. Players = game:GetService("Players")
  80.  
  81. GUI Script -
  82.  
  83. local ReplicatedStorage = game:GetService("ReplicatedStorage")
  84. local Status = ReplicatedStorage:WaitForChild('Status')
  85.  
  86. local TextStatus = script.Parent.TextLabel
  87.  
  88. TextStatus.Text = Status.Value
  89.  
  90. Status.Changed:Connect(function()
  91.     TextStatus.Text = Status.Value
  92. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement