Advertisement
Guest User

CSGO BHop (w/ strafe) AHK Script

a guest
May 20th, 2018
4,948
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. #SingleInstance ignore
  6. #NoEnv
  7. SendMode, Input
  8. SetBatchLines -1
  9. CoordMode, Mouse, Screen
  10. F6::Suspend
  11. Home::Reload
  12. jump()
  13. {                                    
  14. Send, {Space}
  15. }
  16. mouseXY(x, y)
  17. {
  18. DllCall("mouse_event",uint,1,int,x,int,y,uint,0,int,0)
  19. }
  20.  
  21. strafe(left)
  22. {
  23. moveCount := 25
  24. sleepInterval := 2
  25. relativeMove := 28
  26. if (left)
  27. {
  28. key := "d"
  29. move := relativeMove
  30. } else
  31. {
  32. key := "a"
  33. move := -relativeMove
  34. }
  35. send {%key% down}
  36. DllCall("Sleep", "UInt", 5)
  37. Loop, %moveCount%
  38. {
  39. mouseXY(move, -(move/4))
  40. DllCall("Sleep", "UInt", sleepInterval)
  41. }
  42. send {%key% up}
  43. }
  44. $mbutton::
  45. while getkeystate("mbutton","P")
  46. {
  47. jump()
  48. strafe(true)
  49. strafe(false)
  50. }
  51.  
  52. Return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement