Advertisement
RichardiOS275

Dead Rails Weapon Spam

May 23rd, 2025
606
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #Requires AutoHotkey v2.0
  2. #SingleInstance Force
  3. #HotIf WinActive("ahk_exe RobloxPlayerBeta.exe")
  4.  
  5. ; Dead Rails Spam Script by RichardiOS275
  6. ; Written by ChatGPT 4o & RichardiOS275
  7.  
  8. ; === CONFIGURATION ===
  9.  
  10. ; Visit https://www.autohotkey.com/docs/v2/KeyList.htm to view valid triggerKey(s)
  11. triggerKey := "XButton2"
  12. cycleStart := 1
  13. weaponAmount := 10
  14. weaponDelay := 250 ; Milliseconds
  15. clickInterval := weaponDelay / weaponAmount
  16.  
  17. ; === CONFIGURATION CHECKER ===
  18.  
  19. if weaponAmount + (cycleStart - 1) > 10 {
  20.     msgBox "Configuration Error: Too many weapons."
  21.     throw Error("Configuration Error: Too many weapons.")
  22. }
  23.  
  24.  
  25. ; === VARIABLES ===
  26.  
  27. numberKeys := ["1", "2", "3", "4", "5", "6", "7", "8", "9", "0"]
  28. currentKeyIndex := cycleStart
  29. isClicking := false
  30.  
  31. ; === FUNCTIONS ===
  32. StartClicking() {
  33.     global isClicking
  34.     if !isClicking {
  35.         isClicking := true
  36.         ClickLoop()
  37.         SetTimer(ClickLoop, clickInterval)
  38.     }
  39. }
  40.  
  41. StopClicking() {
  42.     global isClicking
  43.     if isClicking {
  44.         isClicking := false
  45.         SetTimer(ClickLoop, 0)
  46.     }
  47. }
  48.  
  49. ClickLoop(*) {
  50.     global numberKeys, currentKeyIndex
  51.     Send(numberKeys[currentKeyIndex + cycleStart])
  52.     Click()
  53.     currentKeyIndex := Mod(currentKeyIndex + 1, weaponAmount - 1)
  54. }
  55.  
  56. ; === HOTKEY BINDS ===
  57.  
  58. ; Keyboard key press (if used)
  59. Hotkey("~" triggerKey, (*) => StartClicking())
  60. Hotkey("~" triggerKey " up", (*) => StopClicking())
  61.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement