(In a local script)
game:GetService("UserInputService").InputBegan:connect(function(input)
if not input.UserInputType== Enum.UserInputType.MouseButton1 or Enum.UserInputType.MouseButton2 or Enum.UserInputType.MouseButton3 then
--Do my other code here
end

1 comment
Works perfectly, thank you!