<roblox xmlns:xmime="http://www.w3.org/2005/05/xmlmime" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.roblox.com/roblox.xsd" version="4">
	<External>null</External>
	<External>nil</External>
	<Item class="Script" referent="RBX0">
		<Properties>
			<bool name="Disabled">false</bool>
			<Content name="LinkedSource"><null></null></Content>
			<string name="Name">Health</string>
			<ProtectedString name="Source">--Responsible for regening a player&apos;s humanoid&apos;s health. Fixed by Bitl.
function waitForChild(parent, childName)
	local child = parent:findFirstChild(childName)
	if child then return child end
   while true do
		child = parent.ChildAdded:wait()
		if child.Name==childName then return child end
   end
end

-- declarations
local Figure = script.Parent
local Head = waitForChild(Figure, &quot;Head&quot;)
local Humanoid = waitForChild(Figure, &quot;Humanoid&quot;)
local regening = false

-- regeneration
function regenHealth()
&#9;if regening then return end
&#9;regening = true
&#9;
&#9;while Humanoid.Health &lt; Humanoid.MaxHealth do
&#9;&#9;local s = wait(1)
&#9;&#9;local health = Humanoid.Health
&#9;&#9;if health &gt; 0 and health &lt; Humanoid.MaxHealth then
&#9;&#9;&#9;local newHealthDelta = 0.01 * s * Humanoid.MaxHealth
&#9;&#9;&#9;health = health + newHealthDelta
&#9;&#9;&#9;Humanoid.Health = math.min(health,Humanoid.MaxHealth)
&#9;&#9;end
&#9;end
&#9;
&#9;if Humanoid.Health &gt; Humanoid.MaxHealth then
&#9;&#9;Humanoid.Health = Humanoid.MaxHealth
&#9;end
&#9;
&#9;regening = false
end

Humanoid.HealthChanged:connect(regenHealth)
  </ProtectedString>
		</Properties>
	</Item>
</roblox>