bin = script.Parent
targ = nil
OT = nil
function onButton1Down(mouse)
local targ=mouse.Target
if targ then
if targ.Parent:findFirstChild("Torso") and game.Players:playerFromCharacter(targ.Parent) then
local Torso = targ.Parent.Torso
local OT=script.Parent
if OT then
if OT.Parent:findFirstChild("Torso") and game.Players:playerFromCharacter(OT.Parent) then
if targ.Parent:findFirstChild("Torso")~=nil and game.Players:playerFromCharacter(targ.Parent)~=nil then
local s = script.Damager
s:clone().Parent = OT.Parent:findFirstChild("Torso")
wait(1)
s:remove()
end
end
end
end
end -- Also I dont know about the ends
bin.Selected:connect(onButton1Down)
end |