local tool = script.Parent
local remote = tool:WaitForChild("RemoteEvent")
local function showHealEffect(player)
local char = player.Character
if not char then return end
local head = char:FindFirstChild("Head")
if not head then return end
local gui = Instance.new("BillboardGui")
gui.Size = UDim2.new(0, 100, 0, 40)
gui.Adornee = head
gui.StudsOffset = Vector3.new(0, 2, 0)
gui.AlwaysOnTop = true
local label = Instance.new("TextLabel")
label.Size = UDim2.new(1, 0, 1, 0)
label.BackgroundTransparency = 1
label.Text = "+10 HP"
label.TextColor3 = Color3.new(0, 1, 0)
label.TextStrokeTransparency = 0.3
label.TextScaled = true
label.Font = Enum.Font.GothamBold
label.Parent = gui
gui.Parent = head
game.Debris:AddItem(gui, 1)
end
remote.OnServerEvent:Connect(function(player)
local char = player.Character
if not char then return end
local humanoid = char:FindFirstChildWhichIsA("Humanoid")
if humanoid then
humanoid.Health = math.min(humanoid.Health + 10, humanoid.MaxHealth)
showHealEffect(player)
end
end)