bin=script.Parent
function onKeyDown(key)
if key~= nil then
key = key:lower()
local p = game.Players.LocalPlayer
if (key=="r") then
p.Character.Humanoid.Health = 0
end
if (key=="h") then
p.Character.Humanoid.Health = 100
end
end
end
function onSelected(mouse)
print("Selected")
mouse.Icon = "rbxasset://textures\\GunCursor.png"
key.KeyDown:connect(function() onKeyDown(key) end)
end
bin.Selected:connect(onSelected)
|