while true do while Humanoid.Health<Humanoid.MaxHealth do local q=wait(REGEN_STEP)local f=(q*REGEN_RATE)*Humanoid.MaxHealth Humanoid.Health=math.min(Humanoid.Health+f,Humanoid.MaxHealth)end Humanoid.HealthChanged:Wait()end
--------------------------------------------------------------------------------

while true do
	while Humanoid.Health < Humanoid.MaxHealth do
		local dt = wait(REGEN_STEP)
		local dh = dt * REGEN_RATE * Humanoid.MaxHealth
		Humanoid.Health = math.min(Humanoid.Health + dh, Humanoid.MaxHealth)
	end
	Humanoid.HealthChanged:Wait()
end
