Advertisement
Guest User

Untitled

a guest
Mar 17th, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.35 KB | None | 0 0
  1. --variable definition
  2. sleeptime = 22
  3. btn7down = false
  4. btn8down = false
  5. shakerecoil = true
  6. nextlean = "right"
  7.  
  8.  
  9.  
  10. --func def
  11.  
  12. function booltostring(mybool)
  13.  
  14. if mybool then
  15.  
  16. return "true"
  17.  
  18. else
  19.  
  20. return "false"
  21. end
  22.  
  23. end
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30. function OnEvent(event, arg)
  31.  
  32. --initialization
  33. OutputLogMessage("event = %s, arg = %d\n", event, arg)
  34.  
  35. -- profile intialization
  36. if (event == "PROFILE_ACTIVATED") then
  37. OutputLogMessage("profile activated! everythings on !\n")
  38. EnablePrimaryMouseButtonEvents(true)
  39. elseif event == "PROFILE_DEACTIVATED" then
  40. ReleaseMouseButton(2) -- to prevent it from being stuck on
  41. end
  42.  
  43.  
  44.  
  45.  
  46.  
  47. --handle recoil (capslock off)
  48.  
  49. if (event == "MOUSE_BUTTON_PRESSED" and arg == 1 and IsMouseButtonPressed(3) and shakerecoil and not IsKeyLockOn("capslock")) then
  50.  
  51. x = 3
  52. y = 6
  53.  
  54. repeat
  55.  
  56.  
  57. --[[MoveMouseRelative(0, 4)
  58. Sleep(1)
  59. MoveMouseRelative(2, 0)
  60. Sleep(1)
  61. MoveMouseRelative(-2, -4)
  62. Sleep(1)
  63. MoveMouseRelative(-2, 0)
  64. Sleep(1)
  65. MoveMouseRelative(2, 4)
  66. Sleep(1)
  67. MoveMouseRelative(0, -4)
  68. Sleep(1)]]
  69.  
  70.  
  71. --[[MoveMouseRelative(0, y)
  72. Sleep(1)
  73. MoveMouseRelative(x, 0)
  74. Sleep(1)
  75. MoveMouseRelative(-x, -y)
  76. Sleep(1)
  77. MoveMouseRelative(-x, 0)
  78. Sleep(1)
  79. MoveMouseRelative(x, y)
  80. Sleep(1)
  81. MoveMouseRelative(0, -y)
  82. Sleep(1)]]
  83.  
  84.  
  85. MoveMouseRelative(-1,5)
  86. Sleep(14)
  87. MoveMouseRelative(1,-5)
  88. Sleep(14)
  89.  
  90.  
  91. until not IsMouseButtonPressed(1)
  92.  
  93.  
  94.  
  95. end
  96.  
  97.  
  98. --[[MoveMouseRelative(0, 1)
  99. Sleep(sleeptime + 2)
  100. MoveMouseRelative(0, 2)
  101. Sleep(sleeptime)]]
  102.  
  103.  
  104. --[[mouseXY(3,0)
  105. sleep 1
  106. mouseXY(0,10)
  107. sleep 1
  108. mouseXY(-3,-10)
  109. sleep 1
  110. mouseXY(-3,0)
  111. sleep 1
  112. mouseXY(3,10)
  113. sleep 1
  114. mouseXY(0,-10)
  115. sleep 1 ]]
  116.  
  117.  
  118.  
  119. if (event == "MOUSE_BUTTON_PRESSED" and arg == 8 ) then
  120.  
  121.  
  122. shakerecoil = not shakerecoil
  123.  
  124.  
  125. OutputLogMessage("shakerecoil:" .. booltostring(shakerecoil) .. "\n")
  126.  
  127.  
  128. end
  129.  
  130.  
  131. --move mouse for spam lean recoil
  132.  
  133.  
  134. if (event == "MOUSE_BUTTON_PRESSED" and arg == 1 and IsMouseButtonPressed(3) and shakerecoil and IsKeyLockOn("capslock")) then
  135.  
  136.  
  137.  
  138. repeat
  139.  
  140.  
  141.  
  142. MoveMouseRelative(-1,7)
  143. Sleep(14)
  144. MoveMouseRelative(1,-7)
  145. Sleep(14)
  146.  
  147.  
  148.  
  149.  
  150.  
  151.  
  152.  
  153.  
  154. until not IsMouseButtonPressed(1)
  155.  
  156.  
  157.  
  158.  
  159.  
  160.  
  161.  
  162.  
  163. end
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176. --lean tool
  177.  
  178.  
  179. --[[if (event == "MOUSE_BUTTON_PRESSED" and arg == 5) then
  180. if IsMouseButtonPressed(5) then
  181.  
  182. if nextlean == "right" then
  183.  
  184. PlayMacro("leanleft")
  185.  
  186. nextlean = "left"
  187.  
  188. else
  189.  
  190. PlayMacro("leanright")
  191.  
  192. nextlean = "right"
  193.  
  194. end
  195.  
  196. end]]
  197.  
  198.  
  199.  
  200. --detect btn 5 press (working)
  201.  
  202. --[[btn5keydown = false
  203.  
  204. if (event == "MOUSE_BUTTON_PRESSED" and arg == 5) then
  205.  
  206. btn5keydown = true
  207.  
  208. --OutputLogMessage(booltostring(btn5keydown) .. "\n")
  209.  
  210. end
  211.  
  212.  
  213.  
  214.  
  215. if (event == "MOUSE_BUTTON_RELEASED" and arg == 5) then
  216.  
  217.  
  218. btn5keydown = false
  219.  
  220. --OutputLogMessage(booltostring(btn5keydown) .. "\n")
  221.  
  222. end]]
  223.  
  224.  
  225.  
  226.  
  227.  
  228.  
  229.  
  230.  
  231. -- quick peek tool (work)
  232.  
  233.  
  234. --[[if (event == "MOUSE_BUTTON_PRESSED" and arg == 5 ) then --btn5 to peek left
  235.  
  236. PressAndReleaseKey("q")
  237.  
  238. PressKey("a")
  239. Sleep(185)
  240. ReleaseKey("a")
  241.  
  242. Sleep(50)
  243.  
  244. PressAndReleaseKey("e")
  245.  
  246. PressKey("d")
  247. Sleep(195)
  248. ReleaseKey("d")
  249.  
  250. Sleep(280)
  251.  
  252.  
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260. end
  261.  
  262.  
  263. if (event == "MOUSE_BUTTON_PRESSED" and arg == 4 ) then --btn4 to peek right
  264.  
  265.  
  266.  
  267. PressAndReleaseKey("e")
  268.  
  269. PressKey("d")
  270. Sleep(185)
  271. ReleaseKey("d")
  272.  
  273. Sleep(50)
  274.  
  275. PressAndReleaseKey("q")
  276.  
  277. PressKey("a")
  278. Sleep(195)
  279. ReleaseKey("a")
  280.  
  281. Sleep(280)
  282.  
  283.  
  284.  
  285.  
  286.  
  287. end ]]
  288.  
  289.  
  290.  
  291.  
  292.  
  293.  
  294.  
  295.  
  296.  
  297.  
  298.  
  299.  
  300.  
  301.  
  302.  
  303.  
  304.  
  305.  
  306.  
  307.  
  308.  
  309.  
  310.  
  311.  
  312.  
  313.  
  314.  
  315.  
  316.  
  317.  
  318.  
  319.  
  320.  
  321. --peek spam (working)
  322.  
  323. --[[if (event == "MOUSE_BUTTON_PRESSED" and arg == 5 ) then
  324.  
  325. repeat
  326.  
  327.  
  328. PlayMacro("leanleft")
  329. Sleep(200)
  330. PlayMacro("leanright")
  331. Sleep(200)
  332.  
  333. until not IsMouseButtonPressed(5)
  334.  
  335.  
  336.  
  337. end]]
  338.  
  339.  
  340. --[[if (event == "MOUSE_BUTTON_PRESSED" and arg == 4) then
  341.  
  342.  
  343.  
  344. repeat
  345.  
  346. PressMouseButton(3)
  347. Sleep(55)
  348. PressMouseButton(1)
  349. Sleep(20)
  350. ReleaseMouseButton(1)
  351. Sleep(20)
  352. ReleaseMouseButton(3)
  353.  
  354. Sleep(50)
  355.  
  356. until not IsMouseButtonPressed(4)
  357.  
  358.  
  359.  
  360. end ]]
  361.  
  362.  
  363.  
  364. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement