I am making a heal tool that only gives you a certain amount of healings but it's not working can you help me?
Script1:
--H4CKTIM3 <3 Sakura129
bin = script.Parent
function onButton1Down(mouse)
if script.Parent.Uses.Value > 0 then
local player = game.Players.LocalPlayer
if player == nil then return end
player.Character.Humanoid.Health = player.Character.Humanoid.MaxHealth
mouse.Icon = "rbxasset://textures\\ArrowCursor.png"
script.Parent.Uses.Value = script.Parent.Uses.Value - 1
end
function onSelected(mouse)
mouse.Icon = "rbxasset://textures\\ArrowCursor.png"
mouse.Button1Down:connect(function() onButton1Down(mouse) end)
end
else return end
bin.Selected:connect(onSelected)
script2:
while true do
if script.Parent.Uses.Value = 0 then
script.Parent:remove()
wait(0.1)
end
end
They both have something wrong with them but i don't know what.
Script1 is the actual healing script and script2 removes it once you run out of uses. |