Advertisement
Guest User

Untitled

a guest
Jul 12th, 2014
248
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.62 KB | None | 0 0
  1. function gamefinish()
  2.     for i = game_time, 0, -1 do
  3.         if i <= game_time and i >= game_time - 10 then
  4.             msg.Value = "The door will open in " .. i - (game_time - 10)
  5.         else
  6.             msg.Value = "Time left: " .. i
  7.         end
  8.         wait(1)
  9.         if gameend then
  10.             return "win"
  11.         elseif i == 0 then
  12.             return "timout"
  13.         elseif #igplyrs == 0 then
  14.             return "fail"
  15.         end
  16.     end
  17. end
  18.  
  19. gaim = gamefinish()
  20.  
  21. if gaim == "win" then
  22.     msg.Value = "The players made it out alive!"
  23.     wait(3)
  24. elseif gaim == "fail" then
  25.     msg.Value = "The players lost!"
  26.     wait(3)
  27. elseif gaim == "timout" then
  28.     msg.Value = "The players ran out of time!"
  29.     wait(3)
  30. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement