Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function gamefinish()
- for i = game_time, 0, -1 do
- if i <= game_time and i >= game_time - 10 then
- msg.Value = "The door will open in " .. i - (game_time - 10)
- else
- msg.Value = "Time left: " .. i
- end
- wait(1)
- if gameend then
- return "win"
- elseif i == 0 then
- return "timout"
- elseif #igplyrs == 0 then
- return "fail"
- end
- end
- end
- gaim = gamefinish()
- if gaim == "win" then
- msg.Value = "The players made it out alive!"
- wait(3)
- elseif gaim == "fail" then
- msg.Value = "The players lost!"
- wait(3)
- elseif gaim == "timout" then
- msg.Value = "The players ran out of time!"
- wait(3)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement