Advertisement
Guest User

Untitled

a guest
Jun 19th, 2018
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. local config = {}
  2.  
  3. config.amount = 10
  4.  
  5. config.rate = 5
  6.  
  7. config.healed = { //Add more teams that will automatically heal to their max health.
  8. [TEAM_LOGAN] = true,
  9. [TEAM_POOL] = true,
  10. [TEAM_XI] = true,
  11. }
  12.  
  13. local time = CurTime()
  14.  
  15. hook.Add("Think", "Fozie:Heal", function()
  16. for k, v in pairs(player.GetAll()) do
  17. if config.healed[v:Team()] == nil or config.healed[v:Team()] == false then return end
  18.  
  19. if CurTime() > time then
  20. time = CurTime() + config.rate
  21.  
  22. v:SetHealth(math.Clamp(v:Health() + config.amount, v:GetMaxHealth()))
  23. end
  24. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement