Advertisement
StefanBashkir

Untitled

Feb 17th, 2014
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.17 KB | None | 0 0
  1. local gameIsGoing = false; -- will be true when the round is going. if the reaper leaves, it will become false to restart the game
  2.  
  3. while true do
  4.     for i = 20, 0, -1 do
  5.         wait(1)
  6.         script.Parent.Text = i
  7.     end
  8.     players = game.Players:GetChildren()
  9.     reaper = players[math.random(1, #players)]
  10.     gameIsGoing = true
  11.     Game.Players.PlayerRemoving:connect(p)
  12.         if not reaper or not reaper.Parent then
  13.             gameIsGoing = false;
  14.         end
  15.     end)
  16.  
  17.     a = Instance.new("BoolValue", reaper)
  18.     a.Name = "It"
  19.     for i, v in pairs(players) do
  20.         if v:FindFirstChild("It") == nil and v.Character then
  21.             v.Character:MoveTo(Vector3.new(500, 5, 0))
  22.         elseif v.It ~= nil then
  23.  
  24.         end
  25.     end
  26.     if reaper and reaper.Parent then
  27.         reaper.It:Remove()
  28.     end
  29.  
  30.     script.Parent.Parent.Text1.Text = "Game in progress"
  31.     script.Parent.Parent.Text2.Text = "Game ending in:"
  32.  
  33.     for i = 60, 0, -1 do
  34.         wait(1)
  35.         script.Parent.Text = i
  36.         if not gameIsGoing then
  37.             break
  38.         end
  39.     end
  40.     for i, v in pairs(players) do
  41.         if v.Character then
  42.             v.Character:MoveTo(Vector3.new(0, 5, 0))
  43.         end
  44.     end
  45.  
  46.     script.Parent.Parent.Text1.Text = "No game in progress"
  47.     script.Parent.Parent.Text2.Text = "Time until next game:"
  48. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement