Advertisement
Wohlf

AHK CSGO script

Oct 3rd, 2015
12,229
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
  2. ; #Warn  ; Enable warnings to assist with detecting common errors.
  3. SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
  4. SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.
  5.  
  6.  
  7. ;CS:GO Undetected Hack
  8. ;By: Wohlf
  9. ;There is random sleep times for more human-like inputs
  10. ;Happy Hacking!
  11. ;© Wohlf 2015. DO NOT REDISTRIBUTE!
  12.  
  13. #singleInstance, force ;one instance is easier to handle
  14. SendMode Input ;for the fast sending keys
  15.  
  16. SetTitleMatchMode, 3
  17. #IfWinActive Counter-Strike: Global Offensive
  18.  
  19. ;0 = default
  20. ;1 = tap once
  21. ;2 = tap twice
  22. ;3 = burst
  23. ;4 = fully auto for semi auto
  24. fireMode = 0
  25.  
  26. ;0 = off
  27. ;1 = on
  28. noRecoil = 0
  29.  
  30. canAuto = 0
  31.  
  32. BHopOn = 0
  33.  
  34. consistPull = 0
  35.  
  36. firstShotRecoilTimeMax = 15
  37. firstShotRecoilTime = 0
  38.  
  39. firstShotRestTimeMax = 5
  40. firstShotRestTime = 0
  41.  
  42. buyWinShow = 0
  43.  
  44. ;FileRead, tempWepText, %A_WorkingDir%\buy_info.txt
  45. tempWepText := "nova|xm1014|sawedoff|m249|negev|mac10|mp7|ump45|p90|bizon|famas|m4a1|ssg08|aug|awp|scar20`nelite|p250|tec9|deagle`nvest|vesthelm|Taser|defuser`nmolotov|decoy|flashbang|hegrenade|smokegrenade`nNova|XM1014|Sawed-Off/MAG-7|M249|Negev|MAC-10/MP9|MP7|UMP-45|P90|PP-Bizon|Galil AR/FAMAS|AK47/M4A4/M4A1-S|SSG 08|SG 553/AUG|AWP|G3SG1/SCAR-20`nDual Berettas|P250|Tec-9/Five-SeveN/CZ75-Auto|Desert Eagle`nKevlar Vest|Kevlar + Helmet|Zeus x27|Defuse/Rescue Kit`nMolotov/Incendiary Grenade|Decoy Grenade|Flashbang|High Explosive Grenade|Smoke Grenade"
  46.  
  47. ;remove all of the \r for simplicity
  48. StringReplace, tempWepText, tempWepText, `r, ,
  49. ;arrays 1-4 is console name
  50. ;arrays 5-8 is label (alias)
  51. StringSplit, wepArray, tempWepText, `n,
  52. ;the split string array is for the sake of simplicity
  53. StringSplit, wepArraySplit1, wepArray1, |,
  54. StringSplit, wepArraySplit2, wepArray2, |,
  55. StringSplit, wepArraySplit3, wepArray3, |,
  56. StringSplit, wepArraySplit4, wepArray4, |,
  57.  
  58. ;read the saved presets file
  59. FileRead, tempSaveText, %A_WorkingDir%\buy_save.txt
  60. If ErrorLevel = 1
  61. {
  62.     FileAppend, None#None#None#None^None#None#None#None^None#None#None#None, %A_WorkingDir%\buy_save.txt
  63.     FileRead, tempSaveText, %A_WorkingDir%\buy_save.txt
  64. }
  65. StringReplace, tempSaveText, tempSaveText, `r, ,
  66. StringSplit, tempSaveArray, tempSaveText, ^,
  67. StringSplit, tempSaveArraySplit1, tempSaveArray1, #,
  68. StringSplit, tempSaveArraySplit2, tempSaveArray2, #,
  69. StringSplit, tempSaveArraySplit3, tempSaveArray3, #,
  70. ;this is were the saved presets are stored
  71. primary1 := tempSaveArraySplit11
  72. secondary1 := tempSaveArraySplit12
  73. gear1 := tempSaveArraySplit13
  74. grenade1 := tempSaveArraySplit14
  75.  
  76. primary2 := tempSaveArraySplit21
  77. secondary2 := tempSaveArraySplit22
  78. gear2 := tempSaveArraySplit23
  79. grenade2 := tempSaveArraySplit24
  80.  
  81. primary3 := tempSaveArraySplit31
  82. secondary3 := tempSaveArraySplit32
  83. gear3 := tempSaveArraySplit33
  84. grenade3 := tempSaveArraySplit34
  85.  
  86. ;show GUI
  87. Gui, Show, w200 h300, CS:GO Tools
  88. Gui, Add, Button, x10 y10 w180 h20 vSHOWBUYBUTTON gSHOWBUY, Autobuy Settings >>
  89. Gui, Add, GroupBox, x10 y50 w135 h190, Other:
  90. Gui, Add, Text, x20 y70 w200 vFIREMODE cBlue, Fire Mode: Default
  91. Gui, Add, Text, x20 y90 vNORECOIL cBlue, No Recoil: Off
  92. Gui, Add, Text, x20 y110 cBlue, No Recoil Amount:
  93. Gui, Add, Edit
  94. Gui, Add, UpDown, vNORECOILAMT Range1-8, 1
  95. Gui, Add, CheckBox, x20 y160 vFireStop, Stop On Fire
  96. Gui, Add, CheckBox, x20 y180 vSlowAuto, Slow Down Auto Fire
  97. Gui, Add, Text, x20 y200 vBHOP cBlue, BHop: Off
  98. Gui, Add, Text, x20 y220 vCONSISTPULL cBlue, Consistent Pull: Off
  99.  
  100. Gui, Add, GroupBox, x-5 y270 w205 h50,
  101. Gui, Add, Text, x5 y280, © Wohlf 2015
  102.  
  103. Gui, 2:+AlwaysOnTop +ToolWindow -Caption
  104. Gui, 2:Show, x10 y10 w220 h500, CS:GO Buy Settings
  105. Gui, 2:Hide
  106. Gui, 2:Add, Text, x10 y10, Primary:
  107. Gui, 2:Add, DropDownList, x10 y30 w150 vPrimaryWep Choose1 AltSubmit, None|%wepArray5%
  108. Gui, 2:Add, Text, x10 y60, Secondary:
  109. Gui, 2:Add, DropDownList, x10 y80 w150 vSecondaryWep Choose1 AltSubmit, None|%wepArray6%
  110. Gui, 2:Add, Text, x10 y110, Gear:
  111. Gui, 2:Add, ListBox, x10 y130 w150 h120 vGearWep Multi Choose1 AltSubmit, None|%wepArray7%
  112. Gui, 2:Add, Text, x10 y250, Grenade:
  113. Gui, 2:Add, ListBox, x10 y270 w150 h120 vGrenadeWep Multi Choose1 AltSubmit, None|%wepArray8%
  114. Gui, 2:Add, Text, x10 y390, Set As Key:
  115. Gui, 2:Add, Button, x10 y410 w60 h60 vPRESET1BUTTON gPRESET1, Numpad 1
  116. Gui, 2:Add, Button, x80 y410 w60 h60 vPRESET2BUTTON gPRESET2, Numpad 2
  117. Gui, 2:Add, Button, x150 y410 w60 h60 vPRESET3BUTTON gPRESET3, Numpad 3
  118.  
  119. OnExit, GuiClose
  120.  
  121. return ;return so that the program does not run the code below on start-up
  122.  
  123. *Up::
  124.  
  125. GuiControlGet, NORECOILAMT
  126. NORECOILAMT := NORECOILAMT + 1
  127. GuiControl, , NORECOILAMT, %NORECOILAMT%
  128.  
  129. return
  130.  
  131. *Down::
  132.  
  133. GuiControlGet, NORECOILAMT
  134. NORECOILAMT := NORECOILAMT - 1
  135. GuiControl, , NORECOILAMT, %NORECOILAMT%
  136.  
  137. return
  138.  
  139. SHOWBUY:
  140.  
  141. WinGetPos, guiPosX, guiPosY,,, A
  142. guiPosX := guiPosX + 200
  143. if(buyWinShow == 0){
  144.     GuiControl,, SHOWBUYBUTTON, Autobuy Settings <<
  145.     Gui, 2:Show, x%guiPosX% y%guiPosY% Restore
  146.     buyWinShow = 1
  147. }else{
  148.     GuiControl,, SHOWBUYBUTTON, Autobuy Settings >>
  149.     Gui, 2:Hide
  150.     buyWinShow = 0
  151. }
  152.  
  153. return
  154.  
  155. ;handle the preset button clicks
  156. PRESET1:
  157.  
  158. GuiControlGet, PrimaryWep
  159. GuiControlGet, SecondaryWep
  160. GuiControlGet, GearWep
  161. GuiControlGet, GrenadeWep
  162. PrimaryWep -= 1
  163. SecondaryWep -= 1
  164.  
  165. if(PrimaryWep != 0)
  166.     primary1 := wepArraySplit1%PrimaryWep%
  167. else
  168.     primary1 := "None"
  169. if(SecondaryWep != 0)
  170.     secondary1 := wepArraySplit2%SecondaryWep%
  171. else
  172.     secondary1 := "None"
  173.  
  174. Loop, parse, GearWep, |
  175. {
  176.     tempVar := A_LoopField - 1
  177.     if(tempVar != 0){
  178.         if(A_Index == 1)
  179.             gear1 := wepArraySplit3%tempVar%
  180.         else
  181.             gear1 := gear1 . "|" . wepArraySplit3%tempVar%
  182.     }else{
  183.         gear1 := "None"
  184.     }
  185. }
  186.  
  187. Loop, parse, GrenadeWep, |
  188. {
  189.     tempVar := A_LoopField - 1
  190.     if(tempVar != 0){
  191.         if(A_Index == 1)
  192.             grenade1 := wepArraySplit4%tempVar%
  193.         else
  194.             grenade1 := grenade1 . "|" . wepArraySplit4%tempVar%
  195.     }else{
  196.         grenade1 := "None"
  197.         break
  198.     }
  199. }
  200.  
  201. return
  202.  
  203. PRESET2:
  204.  
  205. GuiControlGet, PrimaryWep
  206. GuiControlGet, SecondaryWep
  207. GuiControlGet, GearWep
  208. GuiControlGet, GrenadeWep
  209. PrimaryWep -= 1
  210. SecondaryWep -= 1
  211.  
  212. if(PrimaryWep != 0)
  213.     primary2 := wepArraySplit1%PrimaryWep%
  214. else
  215.     primary2 := "None"
  216. if(SecondaryWep != 0)
  217.     secondary2 := wepArraySplit2%SecondaryWep%
  218. else
  219.     secondary2 := "None"
  220.  
  221. Loop, parse, GearWep, |
  222. {
  223.     tempVar := A_LoopField - 1
  224.     if(tempVar != 0){
  225.         if(A_Index == 1)
  226.             gear2 := wepArraySplit3%tempVar%
  227.         else
  228.             gear2 := gear2 . "|" . wepArraySplit3%tempVar%
  229.     }else{
  230.         gear2 := "None"
  231.     }
  232. }
  233.  
  234. Loop, parse, GrenadeWep, |
  235. {
  236.     tempVar := A_LoopField - 1
  237.     if(tempVar != 0){
  238.         if(A_Index == 1)
  239.             grenade2 := wepArraySplit4%tempVar%
  240.         else
  241.             grenade2 := grenade2 . "|" . wepArraySplit4%tempVar%
  242.     }else{
  243.         grenade2 := "None"
  244.         break
  245.     }
  246. }
  247.  
  248. return
  249.  
  250. PRESET3:
  251.  
  252. GuiControlGet, PrimaryWep
  253. GuiControlGet, SecondaryWep
  254. GuiControlGet, GearWep
  255. GuiControlGet, GrenadeWep
  256. PrimaryWep -= 1
  257. SecondaryWep -= 1
  258.  
  259. if(PrimaryWep != 0)
  260.     primary3 := wepArraySplit1%PrimaryWep%
  261. else
  262.     primary3 := "None"
  263. if(SecondaryWep != 0)
  264.     secondary3 := wepArraySplit2%SecondaryWep%
  265. else
  266.     secondary3 := "None"
  267.  
  268. Loop, parse, GearWep, |
  269. {
  270.     tempVar := A_LoopField - 1
  271.     if(tempVar != 0){
  272.         if(A_Index == 1)
  273.             gear3 := wepArraySplit3%tempVar%
  274.         else
  275.             gear3 := gear3 . "|" . wepArraySplit3%tempVar%
  276.     }else{
  277.         gear3 := "None"
  278.     }
  279. }
  280.  
  281. Loop, parse, GrenadeWep, |
  282. {
  283.     tempVar := A_LoopField - 1
  284.     if(tempVar != 0){
  285.         if(A_Index == 1)
  286.             grenade3 := wepArraySplit4%tempVar%
  287.         else
  288.             grenade3 := grenade3 . "|" . wepArraySplit4%tempVar%
  289.     }else{
  290.         grenade3 := "None"
  291.         break
  292.     }
  293. }
  294.  
  295. return
  296.  
  297. GuiClose:
  298.  
  299. FileDelete, %A_WorkingDir%\buy_save.txt
  300. saveText := primary1 . "#" . secondary1 . "#" . gear1 . "#" . grenade1 . "^" . primary2 . "#" . secondary2 . "#" . gear2 . "#" . grenade2 . "^" . primary3 . "#" . secondary3 . "#" . gear3 . "#" . grenade3
  301. FileAppend, %saveText%, %A_WorkingDir%\buy_save.txt
  302. ExitApp
  303.  
  304. return
  305.  
  306. *CapsLock::
  307.  
  308. BHopOn += 1
  309. if(BHopOn > 1){
  310.     BHopOn = 0
  311. }
  312. if(BHopOn == 0)
  313.     GuiControl, , BHOP, BHop: Off
  314. else
  315.     GuiControl, , BHOP, BHop: On
  316.  
  317. return
  318.  
  319. *Space::
  320.  
  321.     if(BHopOn == 1){
  322.         While GetKeyState("Space", "P"){
  323.             Send {Space Down}
  324.             Sleep 20
  325.             Send {Space Up}
  326.             Sleep 30 ;This is the wait time between the space presses
  327.         }
  328.     }else{
  329.         Send {Space Down}
  330.         KeyWait, Space
  331.         Send {Space Up}
  332.     }
  333.  
  334. return
  335.  
  336. *RAlt::
  337.  
  338. noRecoil += 1
  339. if(noRecoil > 1){
  340.     noRecoil = 0
  341. }
  342. if(noRecoil == 0)
  343.     GuiControl, , NORECOIL, No Recoil: Off
  344. else
  345.     GuiControl, , NORECOIL, No Recoil: On
  346.  
  347. return
  348.  
  349. *RShift::
  350.  
  351. consistPull += 1
  352. if(consistPull > 1){
  353.     consistPull = 0
  354. }
  355. if(consistPull == 0)
  356.     GuiControl, , CONSISTPULL, Consistent Pull: Off
  357. else
  358.     GuiControl, , CONSISTPULL, Consistent Pull: On
  359.  
  360. return
  361.  
  362. ;toggles the fireMode using right ctrl
  363. *RCtrl::
  364.  
  365. fireMode = 0 ;default
  366. KeyWait, RCtrl
  367. GuiControl, , FIREMODE, Fire Mode: Default
  368.  
  369. return
  370.  
  371. *Numpad7::
  372.  
  373. fireMode = 1 ;tap once
  374. KeyWait, Numpad7
  375. GuiControl, , FIREMODE, Fire Mode: 1x Tap Fire
  376.  
  377. return
  378.  
  379. *Numpad8::
  380.  
  381. fireMode = 2 ;tap twice
  382. KeyWait, Numpad8
  383. GuiControl, , FIREMODE, Fire Mode: 2x Tap Fire
  384.  
  385. return
  386.  
  387. *Numpad9::
  388.  
  389. fireMode = 3 ;burst
  390. KeyWait, Numpad9
  391. GuiControl, , FIREMODE, Fire Mode: Burst Fire
  392.  
  393. return
  394.  
  395. *Numpad4::
  396.  
  397. fireMode = 4 ;full auto for semi auto
  398. KeyWait, Numpad4
  399. GuiControl, , FIREMODE, Fire Mode: Auto Fire
  400.  
  401. return
  402.  
  403. *Numpad5::
  404.  
  405. fireMode = 5 ;full auto for semi auto
  406. KeyWait, Numpad5
  407. GuiControl, , FIREMODE, Fire Mode: Knife
  408.  
  409. return
  410.  
  411. *Numpad6::
  412.  
  413. fireMode = 6 ;tap = burst, click and hold = regular fire
  414. KeyWait, Numpad6
  415. GuiControl, , FIREMODE, Fire Mode: TapBurstHoldRegular
  416.  
  417. return
  418.  
  419. ;handles the numpad events (use preset)
  420. *Numpad1::
  421.  
  422. Send ``
  423.  
  424. Random, tempRand, 140, 160
  425. Sleep %tempRand%
  426.  
  427. if(primary1 != "None"){
  428.     Send buy%A_Space%%primary1%
  429.     Random, tempRand, 140, 160
  430.     Sleep %tempRand%
  431.     Send {Enter down}
  432.     Sleep 50
  433.     Send {Enter up}
  434.     Sleep 50
  435. }
  436. if(secondary1 != "None"){
  437.     Send buy%A_Space%%secondary1%
  438.     Random, tempRand, 140, 160
  439.     Sleep %tempRand%
  440.     Send {Enter down}
  441.     Sleep 50
  442.     Send {Enter up}
  443.     Sleep 50
  444. }
  445. if(gear1 != "None"){
  446.     Loop, parse, gear1, |
  447.     {
  448.         Send buy%A_Space%%A_LoopField%
  449.         Random, tempRand, 140, 160
  450.         Sleep %tempRand%
  451.         Send {Enter down}
  452.         Sleep 50
  453.         Send {Enter up}
  454.         Sleep 50
  455.     }
  456. }
  457. if(grenade1 != "None"){
  458.     Loop, parse, grenade1, |
  459.     {
  460.         Send buy%A_Space%%A_LoopField%
  461.         Random, tempRand, 140, 160
  462.         Sleep %tempRand%
  463.         Send {Enter down}
  464.         Sleep 50
  465.         Send {Enter up}
  466.         Sleep 50
  467.     }
  468. }
  469.  
  470. Random, tempRand, 140, 160
  471. Sleep %tempRand%
  472. Send {ESC}
  473.  
  474. return
  475.  
  476. *Numpad2::
  477.  
  478. Send ``
  479.  
  480. Random, tempRand, 140, 160
  481. Sleep %tempRand%
  482.  
  483. if(primary2 != "None"){
  484.     Send buy%A_Space%%primary2%
  485.     Random, tempRand, 140, 160
  486.     Sleep %tempRand%
  487.     Send {Enter down}
  488.     Sleep 50
  489.     Send {Enter up}
  490.     Sleep 50
  491. }
  492. if(secondary2 != "None"){
  493.     Send buy%A_Space%%secondary2%
  494.     Random, tempRand, 140, 160
  495.     Sleep %tempRand%
  496.     Send {Enter down}
  497.     Sleep 50
  498.     Send {Enter up}
  499.     Sleep 50
  500. }
  501. if(gear2 != "None"){
  502.     Loop, parse, gear2, |
  503.     {
  504.         Send buy%A_Space%%A_LoopField%
  505.         Random, tempRand, 140, 160
  506.         Sleep %tempRand%
  507.         Send {Enter down}
  508.         Sleep 50
  509.         Send {Enter up}
  510.         Sleep 50
  511.     }
  512. }
  513. if(grenade2 != "None"){
  514.     Loop, parse, grenade2, |
  515.     {
  516.         Send buy%A_Space%%A_LoopField%
  517.         Random, tempRand, 140, 160
  518.         Sleep %tempRand%
  519.         Send {Enter down}
  520.         Sleep 50
  521.         Send {Enter up}
  522.         Sleep 50
  523.     }
  524. }
  525.  
  526. Random, tempRand, 140, 160
  527. Sleep %tempRand%
  528. Send {ESC}
  529.  
  530. return
  531.  
  532. *Numpad3::
  533.  
  534. Send ``
  535.  
  536. Random, tempRand, 140, 160
  537. Sleep %tempRand%
  538.  
  539. if(primary3 != "None"){
  540.     Send buy%A_Space%%primary3%
  541.     Random, tempRand, 140, 160
  542.     Sleep %tempRand%
  543.     Send {Enter down}
  544.     Sleep 50
  545.     Send {Enter up}
  546.     Sleep 50
  547. }
  548. if(secondary3 != "None"){
  549.     Send buy%A_Space%%secondary3%
  550.     Random, tempRand, 140, 160
  551.     Sleep %tempRand%
  552.     Send {Enter down}
  553.     Sleep 50
  554.     Send {Enter up}
  555.     Sleep 50
  556. }
  557. if(gear3 != "None"){
  558.     Loop, parse, gear3, |
  559.     {
  560.         Send buy%A_Space%%A_LoopField%
  561.         Random, tempRand, 140, 160
  562.         Sleep %tempRand%
  563.         Send {Enter down}
  564.         Sleep 50
  565.         Send {Enter up}
  566.         Sleep 50
  567.     }
  568. }
  569. if(grenade3 != "None"){
  570.     Loop, parse, grenade3, |
  571.     {
  572.         Send buy%A_Space%%A_LoopField%
  573.         Random, tempRand, 140, 160
  574.         Sleep %tempRand%
  575.         Send {Enter down}
  576.         Sleep 50
  577.         Send {Enter up}
  578.         Sleep 50
  579.     }
  580. }
  581.  
  582. Random, tempRand, 140, 160
  583. Sleep %tempRand%
  584. Send {ESC}
  585.  
  586. return
  587.  
  588. ;handles left click for the burst and tap fire
  589. $*LButton::
  590.  
  591. GuiControlGet, FireStop
  592. GuiControlGet, SlowAuto
  593. if(FireStop == 1){
  594.     if(GetKeyState("a", "P") && !GetKeyState("d", "P")){
  595.         Hotkey, *a, dummyLabel, On
  596.         Send {a down}
  597.         Sleep 20
  598.         Send {a up}
  599.     }else if(GetKeyState("d", "P") && !GetKeyState("a", "P")){
  600.         Hotkey, *d, dummyLabel, On
  601.         Send {d down}
  602.         Sleep 20
  603.         Send {d up}
  604.     }
  605.    
  606.     if(GetKeyState("w", "P") && !GetKeyState("s", "P")){
  607.         Hotkey, *w, dummyLabel, On
  608.         Send {w down}
  609.         Sleep 20
  610.         Send {w up}
  611.     }else if(GetKeyState("s", "P") && !GetKeyState("w", "P")){
  612.         Hotkey, *s, dummyLabel, On
  613.         Send {s down}
  614.         Sleep 20
  615.         Send {s up}
  616.     }
  617. }
  618.  
  619. GuiControlGet, NORECOILAMT
  620. if(fireMode == 0){ ;default
  621.     Click down
  622.     While GetKeyState("LButton", "P"){
  623.         if(noRecoil == 1){
  624.             if(consistPull == 0){
  625.                 if(firstShotRestTime > firstShotRestTimeMax){
  626.                     if(firstShotRecoilTime > firstShotRecoilTimeMax){
  627.                         mouseXY(0, NORECOILAMT)
  628.                         Random, tempRand, 200, 220
  629.                         Sleep %tempRand%
  630.                     }else{
  631.                         firstShotRecoilTime += 1
  632.                         mouseXY(0, NORECOILAMT * 2)
  633.                         Random, tempRand, 20, 40
  634.                         Sleep %tempRand%
  635.                     }
  636.                 }else{
  637.                     firstShotRestTime += 1
  638.                     Random, tempRand, 20, 40
  639.                     Sleep %tempRand%
  640.                 }
  641.             }else{
  642.                 if(firstShotRestTime > firstShotRestTimeMax){
  643.                     mouseXY(0, NORECOILAMT)
  644.                     Random, tempRand, 20, 40
  645.                     Sleep %tempRand%
  646.                 }else{
  647.                     firstShotRestTime += 1
  648.                     Random, tempRand, 20, 40
  649.                     Sleep %tempRand%
  650.                 }
  651.             }
  652.         }
  653.     }
  654.     Click up
  655. }else if(fireMode == 1){ ;tap once
  656.     Click down
  657.     Random, tempRand, 40, 60
  658.     Sleep %tempRand%
  659.     Click up
  660. }else if(fireMode == 2){ ;tap twice
  661.     Click down
  662.     Random, tempRand, 40, 60
  663.     Sleep %tempRand%
  664.     Click up
  665.     Random, tempRand, 50, 70
  666.     Sleep %tempRand%
  667.     Click down
  668.     Random, tempRand, 40, 60
  669.     Sleep %tempRand%
  670.     Click up
  671. }else if(fireMode == 3){ ;burst
  672.     Click down
  673.     Random, tempRand, 175, 250
  674.     Sleep %tempRand%
  675.     Click up
  676. }else if(fireMode == 4){ ;auto for semi-autos
  677.     While GetKeyState("LButton", "P"){
  678.         Random, tempRand, 15, 25
  679.         Click down
  680.         Sleep %tempRand%
  681.         Click up
  682.         if(noRecoil == 1 && SlowAuto != 1){
  683.             if(consistPull == 0){
  684.                 if(firstShotRestTime > firstShotRestTimeMax){
  685.                     if(firstShotRecoilTime > firstShotRecoilTimeMax){
  686.                         mouseXY(0, NORECOILAMT)
  687.                         Random, tempRand, 200, 220
  688.                         Sleep %tempRand%
  689.                     }else{
  690.                         firstShotRecoilTime += 1
  691.                         mouseXY(0, NORECOILAMT * 2)
  692.                         Random, tempRand, 20, 40
  693.                         Sleep %tempRand%
  694.                     }
  695.                 }else{
  696.                     firstShotRestTime += 1
  697.                     Random, tempRand, 20, 40
  698.                     Sleep %tempRand%
  699.                 }
  700.             }else{
  701.                 if(firstShotRestTime > firstShotRestTimeMax){
  702.                     mouseXY(0, NORECOILAMT)
  703.                     Random, tempRand, 20, 40
  704.                     Sleep %tempRand%
  705.                 }else{
  706.                     firstShotRestTime += 1
  707.                     Random, tempRand, 20, 40
  708.                     Sleep %tempRand%
  709.                 }
  710.             }
  711.         }
  712.         if(SlowAuto == 1){
  713.             Random, tempRand, 400, 500
  714.         }
  715.         Sleep %tempRand%
  716.         WinGetTitle, title, A
  717.         if(title != "Counter-Strike: Global Offensive")
  718.         {
  719.             break
  720.         }
  721.         If !GetKeyState("LButton", "P")
  722.         {
  723.             break
  724.         }
  725.     }
  726. }else if(fireMode == 5){
  727.     While GetKeyState("LButton", "P"){
  728.         Click down
  729.         Random, tempRand, 20, 30
  730.         Sleep %tempRand%
  731.         Click up
  732.         Random, tempRand, 500, 600
  733.         Sleep %tempRand%
  734.         Click down
  735.         Random, tempRand, 20, 30
  736.         Sleep %tempRand%
  737.         Click up
  738.         Random, tempRand, 500, 600
  739.         Sleep %tempRand%
  740.         Click down right
  741.         Random, tempRand, 20, 30
  742.         Sleep %tempRand%
  743.         Click up right
  744.         Random, tempRand, 1000, 1200
  745.         Sleep %tempRand%
  746.     }
  747. }else if(fireMode == 6){
  748.     Click down
  749.     canAuto = 0
  750.     SetTimer, LButtonHeld, 200
  751.     While GetKeyState("LButton", "P"){
  752.         if(noRecoil == 1){
  753.             if(consistPull == 0){
  754.                 if(firstShotRestTime > firstShotRestTimeMax){
  755.                     if(firstShotRecoilTime > firstShotRecoilTimeMax){
  756.                         mouseXY(0, NORECOILAMT)
  757.                         Random, tempRand, 200, 220
  758.                         Sleep %tempRand%
  759.                     }else{
  760.                         firstShotRecoilTime += 1
  761.                         mouseXY(0, NORECOILAMT * 2)
  762.                         Random, tempRand, 20, 40
  763.                         Sleep %tempRand%
  764.                     }
  765.                 }else{
  766.                     firstShotRestTime += 1
  767.                     Random, tempRand, 20, 40
  768.                     Sleep %tempRand%
  769.                 }
  770.             }else{
  771.                 if(firstShotRestTime > firstShotRestTimeMax){
  772.                     mouseXY(0, NORECOILAMT)
  773.                     Random, tempRand, 20, 40
  774.                     Sleep %tempRand%
  775.                 }else{
  776.                     firstShotRestTime += 1
  777.                     Random, tempRand, 20, 40
  778.                     Sleep %tempRand%
  779.                 }
  780.             }
  781.         }
  782.     }
  783.     if(canAuto == 0){
  784.         Click up
  785.         Random, tempRand, 50, 100
  786.         Sleep %tempRand%
  787.         Click down
  788.         Random, tempRand, 30, 40
  789.         Sleep %tempRand%
  790.         Click up
  791.         SetTimer, LButtonHeld, Off
  792.     }else{
  793.         Click up
  794.     }
  795. }
  796. firstShotRecoilTime = 0
  797. firstShotRestTime = 0
  798. if(FireStop == 1){
  799.     Hotkey, *a, dummyLabel, Off
  800.     Hotkey, *d, dummyLabel, Off
  801.     Hotkey, *w, dummyLabel, Off
  802.     Hotkey, *s, dummyLabel, Off
  803.     if(GetKeyState("a", "P") && !GetKeyState("d", "P")){
  804.         Sleep 20
  805.         Send {a down}
  806.         Sleep 20
  807.         Send {a up}
  808.     }else if(GetKeyState("d", "P") && !GetKeyState("a", "P")){
  809.         Sleep 20
  810.         Send {d down}
  811.         Sleep 20
  812.         Send {d up}
  813.     }
  814.    
  815.     if(GetKeyState("w", "P") && !GetKeyState("s", "P")){
  816.         Sleep 20
  817.         Send {w down}
  818.         Sleep 20
  819.         Send {w up}
  820.     }else if(GetKeyState("s", "P") && !GetKeyState("w", "P")){
  821.         Sleep 20
  822.         Send {s down}
  823.         Sleep 20
  824.         Send {s up}
  825.     }
  826. }
  827.  
  828. return
  829.  
  830. LButtonHeld:
  831.  
  832. canAuto = 1
  833.  
  834. return
  835.  
  836. mouseXY(x, y) ;moves the mouse (relative movements)
  837. {
  838.     DllCall("mouse_event",uint,1,int,x,int,y,uint,0,int,0)
  839. }
  840.  
  841. dummyLabel: ;does nothing (to disable a key)
  842. return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement