Advertisement
Guest User

mouse script

a guest
Aug 28th, 2015
204
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.55 KB | None | 0 0
  1. isPressed = false;
  2. isPressed2 = false;
  3.  
  4. function OnEvent(event, arg)
  5.  
  6.       if (event == "MOUSE_BUTTON_PRESSED" and arg == 4) then
  7.         if (not isPressed) then
  8.              PressKey("lshift")
  9.             PressKey("w")
  10.             isPressed = true;
  11.         else
  12.              ReleaseKey("lshift")
  13.             ReleaseKey("w")
  14.             isPressed = false;
  15.         end
  16.       end
  17.       if (event == "MOUSE_BUTTON_PRESSED" and arg == 5) then
  18.         if (not isPressed2) then
  19.             PressMouseButton(1)
  20.             isPressed2 = true;
  21.         else
  22.             ReleaseMouseButton(1)  
  23.             isPressed2 = false;
  24.         end
  25.       end
  26.  
  27. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement