Advertisement
Mitsei

AutoHotKey trigger bot CSGO

Jul 12th, 2018
1,893
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. sens:=2
  2. delz:=0
  3. holdtiem:=600
  4. crossset:=2
  5. ;color split
  6. SplitRGBColor(RGBColor, ByRef Red, ByRef Green, ByRef Blue)
  7. {
  8. Red := RGBColor >> 16 & 0xFF
  9. Green := RGBColor >> 8 & 0xFF
  10. Blue := RGBColor & 0xFF
  11. }
  12.  
  13. SplitBGRColor(BGRColor, ByRef Red, ByRef Green, ByRef Blue)
  14. {
  15. Red := BGRColor & 0xFF
  16. Green := BGRColor >> 8 & 0xFF
  17. Blue := BGRColor >> 16 & 0xFF
  18. }
  19.  
  20. ;Menu loop
  21. loop
  22. {
  23. GetKeyState, state, F10
  24. if state = D
  25. {
  26. SoundPlay, %A_ScriptDir%\8.mp3
  27. sleep 2000
  28. ExitApp
  29. }
  30.  
  31. GetKeyState, state, F11
  32. if state = D
  33. {
  34. trigger:=false
  35. }
  36.  
  37. GetKeyState, state, Insert
  38. if state = D
  39. {
  40. trigger:=true
  41. }
  42.  
  43. ;Beta trigger
  44. if !GetKeyState("LShift") && trigger==true
  45. {
  46. sleep 50
  47. MouseGetPos, oneX, oneY
  48. PixelGetColor, colorone, oneX+crossset, oneY+crossset
  49. SplitRGBColor(colorone, oneRed, oneGreen, oneBlue)
  50. }
  51.  
  52. if GetKeyState("LShift") && trigger==true
  53. {
  54. sleep 1
  55. MouseGetPos, twoX, twoY
  56. PixelGetColor, colortwo, twoX+crossset, twoY+crossset
  57. SplitRGBColor(colortwo, twoRed, twoGreen, twoBlue)
  58.  
  59. if (((oneRed-sens)<=twoRed) && ((oneRed+sens)<=twoRed)) or (((oneRed-sens)>=twoRed) && ((oneRed+sens)>=twoRed)) or (((oneGreen-sens)<=twoGreen) && ((oneGreen+sens)<=twoGreen)) or (((oneGreen-sens)>=twoGreen) && ((oneGreen+sens)>=twoGreen)) or (((oneBlue-sens)<=twoBlue) && ((oneBlue+sens)<=twoBlue)) or (((oneBlue-sens)>=twoBlue) && ((oneBlue+sens)>=twoBlue))
  60. {
  61. sleep delz
  62. DllCall("mouse_event", uint, 2, int, 0, int, 0, uint, 0, int, 0)
  63. sleep holdtiem
  64. DllCall("mouse_event", uint, 4, int, 0, int, 0, uint, 0, int, 0)
  65. }
  66. }
  67. }
Advertisement
Advertisement
Advertisement
RAW Paste Data Copied
Advertisement