local Tool = script.Parent
local Player = game.Players.LocalPlayer
local Humanoid = Player.Character and Player.Character:FindFirstChild("Humanoid")
local HealAmount = 20 -- Change this to adjust the amount of health restored
if not Humanoid then
Player.CharacterAdded:Connect(function(char)
Humanoid = char:WaitForChild("Humanoid")
end)
end
function onActivated()
if Humanoid.Health == Humanoid.MaxHealth then
return -- Don't do anything if already at full health
end
Humanoid.Health = math.min(Humanoid.Health + HealAmount, Humanoid.MaxHealth) -- Add the healing amount, capped at the maximum health
end
Tool.Activated:Connect(onActivated)
after like 2 seconds it reverts back to half health
** You are now Level 1! **