Advertisement
Guest User

Untitled

a guest
Dec 7th, 2019
144
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.11 KB | None | 0 0
  1. local Countdown = game:GetService('ReplicatedStorage'):WaitForChild('Values'):WaitForChild('Countdown')
  2. local SideText = game:GetService('ReplicatedStorage'):WaitForChild('Values'):WaitForChild('SideText')
  3. local MapchooseName = game:GetService('ReplicatedStorage'):WaitForChild('Values'):WaitForChild('MapchooseName')
  4. local DefaultSpawn = game:GetService('Workspace'):WaitForChild('Main'):WaitForChild('Lobby'):WaitForChild('Spawnpoints')
  5. local cooldown = 1
  6.  
  7. while game:GetService("RunService").Heartbeat:Wait() do
  8. for _,plr in next, game.Players:GetPlayers() do
  9.  
  10. for i = 20,0,-1 do
  11. wait(1)
  12. Countdown.Value = i
  13. SideText.Value = ' Seconds until the next match'
  14. if i == 0 then
  15. wait()
  16. print('Wave is starting')
  17. wait(cooldown)
  18. SideText.Value = ' The wave is now starting'
  19. local mapchoose = math.random(1,2)
  20. MapchooseName.Value = mapchoose
  21. game:GetService('ServerStorage'):WaitForChild(MapchooseName.Value).Parent = game:GetService('Workspace')
  22. local ToolToEquip = game:GetService('ReplicatedStorage'):WaitForChild('Tools'):WaitForChild(1) or game:GetService('ReplicatedStorage'):WaitForChild('EquippedTools'):WaitForChild(ToolEquipped)
  23. local ToolToEquipCloned = ToolToEquip:Clone()
  24. ToolToEquipCloned.Parent = plr.Backpack
  25. local SpawnToTeleport = math.random(1,7)
  26. local Character = plr.Character
  27. Character:MoveTo(game:GetService('Workspace'):WaitForChild(mapchoose):WaitForChild('Spawns'):WaitForChild(SpawnToTeleport).Position + Vector3.new(0))
  28. for i = 30,0,-1 do
  29. wait(1)
  30.  
  31. SideText.Value = ' Seconds until match ends'
  32. Countdown.Value = i
  33. if i == 0 then
  34. ToolToEquipCloned:Destroy()
  35. wait()
  36. local DefaultSpawnLocation = math.random(1,4)
  37. Character:MoveTo(game:GetService('Workspace'):WaitForChild('Main'):WaitForChild('Lobby'):WaitForChild('Spawnpoints'):WaitForChild(DefaultSpawnLocation).Position + Vector3.new(0))
  38. SideText.Value = ' Round ended'
  39. Countdown.Value = 0
  40. end
  41. end
  42. end
  43. end
  44. end
  45. end
  46. wait(1)
  47. game:GetService('Workspace'):WaitForChild(MapchooseName.Value).Parent = game:GetService('ServerStorage')
  48. SideText.Value = ' Seconds until the next match'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement