local Bin = script.Parent local player = Bin.Parent.Parent function cloak(val) for i, v in pairs(player.Character:GetChildren()) do if v.ClassName == "Part" then v.Transparency = val elseif v.ClassName == "Hat" then v.Handle.Transparency = val end end player.Character.Head.face.Transparency = val end function onKeyDown(key) -- key functions
end
function onButton1Down(mouse) -- click left mouse button if player.Character.Head.Transparency == 0 then cloak(1) else cloak(0) end end
function onButton2Down(mouse) -- click right mouse button
end
function onButton1Up(mouse) -- release left button end
function onButton2Up(mouse) -- release right button
end
function onDeselected() -- when bin is unequipped cloak(0) end
function onSelected(mouse) -- when bin is equipped
mouse.Button1Down:connect(function() onButton1Down(mouse) end) mouse.Button2Down:connect(function() onButton2Down(mouse) end) mouse.Button2Up:connect(function() onButton2Up(mouse) end) mouse.Button1Up:connect(function() onButton1Up(mouse) end) mouse.KeyDown:connect(onKeyDown)
end
Bin.Selected:connect(onSelected) Bin.Deselected:connect(onDeselected)
Closed as Non-Descriptive by TheeDeathCaster, Uroxus, pluginfactory, and TheHospitalDev
This question has been closed because its title or content does not adequately describe the problem you are trying to solve.
Please ensure that your question pertains to your actual problem, rather than your attempted solution. That is, you were trying to solve problem X, and you thought solution Y would work, but instead of asking about X when you ran into trouble, you asked about Y.
Why was this question closed?