Advertisement
Guest User

Fortnite Macro Script For PC [official]

a guest
Apr 29th, 2024
301
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.27 KB | None | 0 0
  1. #Requires AutoHotkey v2.0
  2. SendMode "Input"
  3.  
  4. Global AppWindowTitle := "Fortnite"
  5. Global Toggled := False
  6. Global LastKey := ""
  7.  
  8. F10:: { ; Reset last key and Exit AHK app.
  9.     if (LastKey != "") {
  10.         Send "{" LastKey " up}"
  11.     }
  12.     SoundBeep 500, 250
  13.     SoundBeep 250, 200
  14.     ExitApp
  15. }
  16.  
  17. F9:: { ; Start/Stop Macro
  18.     Global
  19.     if (Not WinExist(AppWindowTitle)) {
  20.         MsgBox "Cannot find Fortnite, make sure this is running and you've loaded fortnite lego, feastivel or creative map."
  21.         return
  22.     }
  23.     if (Toggled := !Toggled) {
  24.         SoundBeep 750, 500
  25.         SetTimer(MakeMeMove,500)
  26.         return
  27.     } else {
  28.         SetTimer(MakeMeMove,0)
  29.         SoundBeep 500, 500
  30.     }
  31. }
  32. MakeMeMove() {
  33.     Global
  34.     keylist := ["w","a","s","d"]
  35.  
  36.     For k,v in keylist {
  37.         if (Not WinActive(AppWindowTitle)) {
  38.             ; Stop if windows is no longer active.
  39.             if (Toggled == True) {
  40.                 Toggled := False
  41.             }
  42.         }
  43.         if (Toggled == False) {
  44.             SoundBeep 500, 500
  45.             SetTimer(MakeMeMove,0)
  46.             Exit
  47.         }
  48.         RandomNumber := Random(500, 1500)
  49.         LastKey := v
  50.         Send "{" v " down}"
  51.         sleep RandomNumber
  52.         Send "{" v " up}"
  53.     }
  54. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement