nothing happens (other than hp regen ofc)
-- Gradually regenerates the Humanoid's Health over time.
local REGEN_RATE = 1/100 -- Regenerate this fraction of MaxHealth per second.
local REGEN_STEP = 1 -- Wait this long between each regeneration step.
--------------------------------------------------------------------------------
local Character = script.Parent
local Humanoid = Character:WaitForChild'Humanoid'
--------------------------------------------------------------------------------
while task.wait() do
while Humanoid.Health < Humanoid.MaxHealth do
local dt = task.wait(REGEN_STEP)
local dh = dt*REGEN_RATE*Humanoid.MaxHealth
Humanoid.Health = math.min(Humanoid.Health + dh, Humanoid.MaxHealth)
end
while Humanoid:GetAttribute("Mana") < Humanoid:GetAttribute("MaxMana") do
local dt = task.wait(REGEN_STEP)
local dh = dt*REGEN_RATE*Humanoid:GetAttribute("MaxMana")
Humanoid:GetAttribute("Mana", math.min(Humanoid:GetAttribute("Mana") + dh, Humanoid:GetAttribute("MaxMana")))
end
while Humanoid:GetAttribute("Stamina") < Humanoid:GetAttribute("MaxStamina") do
local dt = task.wait(REGEN_STEP)
local dh = dt*REGEN_RATE*Humanoid:GetAttribute("MaxStamina")
Humanoid:GetAttribute("Stamina", math.min(Humanoid:GetAttribute("Stamina") + dh, Humanoid:GetAttribute("MaxStamina")))
end
end