Advertisement
bystander36

Anti-Recoil

Dec 30th, 2017
1,228
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.27 KB | None | 0 0
  1. EnablePrimaryMouseButtonEvents(true)
  2. local recoil = not true;
  3. OutputLogMessage("PROFILE LOADED ")
  4.  
  5. MoveTable = {
  6.     {0,0},
  7.     {3,31},
  8.     {-11,32},
  9.     {13,42},
  10. -- add the rest of your coordinates here
  11. }
  12.  
  13. function OnEvent(event, arg)
  14.  
  15.     if event == "MOUSE_BUTTON_PRESSED" and arg == 1 then
  16.         mb1_pressed = true
  17.     elseif event == "MOUSE_BUTTON_RELEASED" and arg == 1 then
  18.         mb1_pressed = false
  19.     elseif event == "MOUSE_BUTTON_PRESSED" and arg == 2 then
  20.         mb2_pressed = true
  21.     elseif event == "MOUSE_BUTTON_RELEASED" and arg == 2 then
  22.         mb2_pressed = false
  23.     elseif event == "MOUSE_BUTTON_PRESSED" and arg == 6 and recoil then
  24.         recoil = not true
  25.         OutputLogMessage("NR-OFF ")
  26.     elseif event == "MOUSE_BUTTON_PRESSED" and arg == 6 then
  27.         recoil = not recoil
  28.         OutputLogMessage("NR-ON ")
  29.     end
  30.        
  31. --
  32.  
  33.     if mb1_pressed and recoil then
  34.         local i = 1
  35.         repeat
  36.             PressKey("M")
  37.             Sleep(44)
  38.             ReleaseKey("M")
  39.             Sleep(44)
  40.             MoveMouseRelative(MoveTable[i][1],MoveTable[i][2])
  41.             i = i + 1
  42.             if i > #MoveTable then
  43.                 i = 1
  44.             end
  45.         until not IsMouseButtonPressed(1)
  46.     end
  47. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement