Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Requires AutoHotkey v2.0
- #SingleInstance Force
- #HotIf WinActive("ahk_exe RobloxPlayerBeta.exe")
- ; Dead Rails Spam Script by RichardiOS275
- ; Written by ChatGPT 4o & RichardiOS275
- ; === CONFIGURATION ===
- ; Visit https://www.autohotkey.com/docs/v2/KeyList.htm to view valid triggerKey(s)
- triggerKey := "XButton2"
- cycleStart := 1
- weaponAmount := 10
- weaponDelay := 250 ; Milliseconds
- clickInterval := weaponDelay / weaponAmount
- ; === CONFIGURATION CHECKER ===
- if weaponAmount + (cycleStart - 1) > 10 {
- msgBox "Configuration Error: Too many weapons."
- throw Error("Configuration Error: Too many weapons.")
- }
- ; === VARIABLES ===
- numberKeys := ["1", "2", "3", "4", "5", "6", "7", "8", "9", "0"]
- currentKeyIndex := cycleStart
- isClicking := false
- ; === FUNCTIONS ===
- StartClicking() {
- global isClicking
- if !isClicking {
- isClicking := true
- ClickLoop()
- SetTimer(ClickLoop, clickInterval)
- }
- }
- StopClicking() {
- global isClicking
- if isClicking {
- isClicking := false
- SetTimer(ClickLoop, 0)
- }
- }
- ClickLoop(*) {
- global numberKeys, currentKeyIndex
- Send(numberKeys[currentKeyIndex + cycleStart])
- Click()
- currentKeyIndex := Mod(currentKeyIndex + 1, weaponAmount - 1)
- }
- ; === HOTKEY BINDS ===
- ; Keyboard key press (if used)
- Hotkey("~" triggerKey, (*) => StartClicking())
- Hotkey("~" triggerKey " up", (*) => StopClicking())
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement