Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local GamepassId = 81050086
- local Regen_rate = 5/100
- local Regen_rate2 = 5/150
- local Regen_Step = 5
- game.Players.PlayerAdded:Connect(function(player)
- if game:GetService("MarketplaceService"):UserOwnsGamePassAsync(player.UserId, GamepassId) then
- player.CharacterAdded:Connect(function(char)
- while true do
- if char.Humanoid.Health > char.Humanoid.MaxHealth then
- local DT = wait(Regen_Step)
- local DH = DT*Regen_rate*char.Humanoid.Health
- char.Humanoid.Health = math.min(char.Humanoid.Health + DH, char.Humanoid.Health)
- else
- local DT = wait(Regen_rate2)
- local DH = DT*Regen_rate2*char.Humanoid.Health
- char.Humanoid.Health = math.min(char.Humanoid.Health + DH, char.Humanoid.Health)
- end
- end
- end)
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement