Advertisement
PassionCraft

Untitled

Nov 25th, 2017
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.99 KB | None | 0 0
  1. local EVENT = {}
  2.  
  3. EVENT.Title = "A Random Person will be revived every 90 seconds! Check that scoreboard!"
  4.  
  5. function EVENT:Begin()
  6.  
  7.     timer.Create("RandomatRevive",90,0, function()
  8.         local plys = {}
  9.         for _, ply in pairs(self:GetPlayers(true)) do
  10.             if !ply:IsTerror() then
  11.                 table.insert(plys, ply)
  12.             end
  13.         end
  14.         self:SmallNotify("Test123")
  15.         local player = plys[math.random(0,#plys)]
  16.         self:SmallNotify("           Test456")
  17.         if !player:IsTerror() then
  18.             self:SmallNotify("                      789")
  19.             player:SpawnForRound()
  20.             self:SmallNotify("!!!!!!!!!!!                      ")
  21.             self:SmallNotify(player:Nick() .. " has come back to life!")
  22.             --DamageLog("Randomat: " .. player:Nick() .. " has been revived.")
  23.            
  24.  
  25.         else
  26.             self:SmallNotify("No one was revived!")
  27.            
  28.         end
  29.     end)
  30. end
  31.  
  32.  
  33. function EVENT:End()
  34.     self:SmallNotify("yooooooooooooooooooooooooooooooooooooo")
  35.     self:CleanUpHooks()
  36.     timer.Remove("RandomatRevive")
  37. end
  38.  
  39. Randomat:register("explode", EVENT)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement