Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local config = {}
- config.amount = 10
- config.rate = 5
- config.healed = { //Add more teams that will automatically heal to their max health.
- [TEAM_LOGAN] = true,
- [TEAM_POOL] = true,
- [TEAM_XI] = true,
- }
- local time = CurTime()
- hook.Add("Think", "Fozie:Heal", function()
- for k, v in pairs(player.GetAll()) do
- if config.healed[v:Team()] == nil or config.healed[v:Team()] == false then return end
- if CurTime() > time then
- time = CurTime() + config.rate
- v:SetHealth(math.Clamp(v:Health() + config.amount, v:GetMaxHealth()))
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement