Advertisement
Guest User

Untitled

a guest
Sep 25th, 2016
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.83 KB | None | 0 0
  1. --Const
  2. PW = 5 -- intermission break for players
  3. wait(1)
  4. math.randomseed(tick())
  5. function driver()
  6.      local GM = { -- How do I make this constant?
  7.          "Team death match!"
  8.         ,"Free for all!"
  9.         ,"Vote on the next match!"
  10.         ,"Zombies vs Survivors!"
  11. }
  12.     local p = GM[ math.random( #GM ) ]
  13.     if p == GM[1] then TDM() end if p == GM[2] then FFA() end if p== GM[3] then VOTE() end if p== GM[4] then ZOMBIES() end
  14. end
  15.  
  16. function TDM()
  17.     print("TDM")
  18.     waitfor(5)
  19. end
  20.  
  21. function FFA()
  22.     print("FFA")
  23.     waitfor(5)
  24. end
  25.  
  26. function VOTE()
  27.     print("VOTE")
  28.     waitfor(5)
  29. end
  30.  
  31. function ZOMBIES()
  32.     print("ZOMBIES")
  33.     waitfor(5)
  34. end
  35.  
  36. function waitfor(t) local a = game.Players:GetChildren()
  37.     repeat  
  38.         for i = 1, #a do a[i].PlayerGui.TLG.Frame.Counter.Text = t t = t -1 wait(1) end
  39.     until t < 0 end
  40.  
  41. while 1 do
  42. driver()
  43. wait(1)
  44. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement