nicebruh

11/07/2025 CW Macro AHK

Jul 11th, 2025 (edited)
666
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Autohotkey 12.76 KB | Gaming | 0 0
  1. ; Macro made by mudbourn.
  2.  
  3. { ; These values are Default settings for certain macros; Feel free to change these.
  4.  
  5.     global DefaultValue = 2285 ; Super Jump Spin Speed.
  6.  
  7.     global CurrentBow = 0 ; Main Bow/Bow Currently in use. ( Default = 0 / No bow)
  8.  
  9.     global SleepDelay = 21 ; Amount of time between mouse movements in the Super Throw macro.
  10.  
  11.     global PixelAmount = 70 ; The size of the outline for the spin in the Super Throw macro.
  12.  
  13. }
  14.  
  15. ; WARNING: Messing with the content below can break the script.
  16. ; Scroll down to "Binds" to find the binds for the macros.
  17.  
  18. { ; AHK script settings. (DO NOT TOUCH)
  19.  
  20.     SetWorkingDir %A_ScriptDir%
  21.     SetTitleMatchMode 2
  22.     SetControlDelay -1
  23.     SetWinDelay -1
  24.     SetKeyDelay, 0, -1, Input
  25.     SetMouseDelay -1
  26.     SetBatchLines -1
  27.     SendMode, Event
  28.     #IfWinActive Roblox
  29.     global NirCmdPath = A_ScriptDir "\nircmd.exe"
  30.     global ScriptPath = A_ScriptDir
  31.     global SuperJumpSpinRan = 0
  32.     global loopIndex = 0
  33.     global SuperJumpCooldown = 0
  34.     global GuiUsed = 0
  35.     global SlideAllowed = 0
  36.     global SuperThrowRun = 0
  37.     global ReloadMacrosRun = 0
  38.     global AutoFireToggler = 0
  39.     global InputField = 2285
  40.     global Scaled = 0
  41.     global IsRunning = 0
  42.     global XInt = DefaultValue
  43.     global YInt = 305
  44.     global ScaledX = Round(XInt * 1.375492341)
  45.     global ScaledY = Round(YInt * 4.327868852)
  46.     global ChargeJump = 0
  47.     global ChainsawMode = 0
  48.     SetTimer, ReleaseKeys, -10
  49.     Sleep, 100
  50.     SetTimer, ReleaseKeys, Off
  51.     SetTimer, NirCmdCheck, 1
  52.  
  53. }
  54.  
  55. { ; Essential script control macros.
  56.  
  57.     NirCmdCheck()
  58.     {
  59.         If (FileExist(NirCmdPath))
  60.         {
  61.             SetTimer, NirCmdCheck, Off
  62.         }
  63.         Else
  64.         {
  65.             MsgBox, NirCmd was not found; Contact mudbourn for help on Discord.
  66.             MsgBox, %ScriptPath%
  67.             SetTimer, NirCmdCheck, Off
  68.         }
  69.     }
  70.  
  71.     IsRobloxActive()
  72.     {
  73.         WinGetTitle, title, A
  74.         return InStr(title, "Roblox")
  75.         return
  76.     }
  77.  
  78.  
  79.     ~F5::Pause
  80.  
  81.     ChatCancel()
  82.     {
  83.         While GetKeyState("/", "U")
  84.         {
  85.             if GetKeyState("/", "P")
  86.             {
  87.                 Send, {Esc}
  88.                 return
  89.             }
  90.         }
  91.         return
  92.     }
  93.  
  94.     ~*=::
  95.     Suspend, Permit
  96.     if GetKeyState("LAlt", "P")
  97.     {
  98.         Run "C:\Program Files\AutoHotkey\SciTE\SciTE.exe" "%A_ScriptFullPath%"
  99.         return
  100.     }
  101.     SetTimer, ChatCancel, 1
  102.     SoundPlay, beep.mp3
  103.     ReloadMacros()
  104.     return
  105.  
  106.     ReloadMacros()
  107.     {
  108.         Soundplay, beep.mp3
  109.         Sleep, 100
  110.         if UsingItem1 = 1
  111.         {
  112.             Flourish1()
  113.         }
  114.         SetTimer, ChatCancel, Off
  115.         Reload
  116.         return
  117.     }
  118.  
  119.     ~*/::
  120.     SusOn:
  121.     Suspend, Permit
  122.     Suspend, On
  123.     Return
  124.  
  125.     ~*Esc::
  126.     SusTog:
  127.     Suspend, Permit
  128.     Suspend, Toggle
  129.     Send, {Esc}
  130.     Return
  131.  
  132.     ~*Enter::
  133.     SusOff:
  134.     Suspend, Permit
  135.     Suspend, Off
  136.     Return
  137.  
  138.     ReleaseKeys:
  139.     SetTimer, ChatCancel, 1
  140.     Send, {w up}{a up}{s up}{d up}{Shift up}{Ctrl up}{Alt up}{Space up}{LButton up}{RButton up}{C Up}{X Up}{O Up}{R Up}
  141.     Send, {Esc}
  142.     Sleep, 50
  143.     Send, {Esc}
  144.     Sleep, 5
  145.     SetTimer, ReleaseKeys, Off
  146.     SetTimer, ChatCancel, Off
  147.     return
  148.  
  149. }
  150.  
  151. { ; Main macros.
  152.  
  153.     { ; Bow Auto Fire.
  154.  
  155.         AutoFireBow()
  156.         {
  157.             If (FileExist(nircmdPath))
  158.             {
  159.                 if CurrentBow = 1
  160.                 {
  161.                     Longbow()
  162.                 }
  163.                 if CurrentBow = 2
  164.                 {
  165.                     Crossbow()
  166.                 }
  167.                 if CurrentBow = 3
  168.                 {
  169.                     HeavyBow()
  170.                 }
  171.             }
  172.         }
  173.  
  174.         Longbow()
  175.         {
  176.             While GetKeyState("B", "P")
  177.             {
  178.                 Send, {LButton Down}
  179.                 Sleep, 20
  180.                 Send, {F}
  181.                 Sleep, 500
  182.                 Send, {LButton Up}
  183.                 Sleep, 5
  184.                 Send, {R}
  185.                 Sleep, 825
  186.             }
  187.             Send, {R}
  188.             Sleep, 10
  189.         }
  190.  
  191.         CrossBow()
  192.         {
  193.             While GetKeyState("B", "P")
  194.             {
  195.                 Send,{LButton}
  196.                 Sleep, 25
  197.                 Send, {R}{F}
  198.                 Sleep, 1285
  199.             }
  200.             Send, {R}
  201.             Sleep, 10
  202.         }
  203.  
  204.         HeavyBow()
  205.         {
  206.             While GetKeyState("B", "P")
  207.             {
  208.                 Send, {LButton Down}
  209.                 Sleep, 20
  210.                 Send, {F}
  211.                 Sleep, 850
  212.                 Send, {LButton Up}
  213.                 Sleep, 5
  214.                 Send, {R}
  215.                 Sleep, 1450
  216.             }
  217.             Send, {R}
  218.             Sleep, 10
  219.         }
  220.  
  221.         AutoFireKillSwitch()
  222.         {
  223.             AutoFireToggler = 0
  224.             SetTimer, ReleaseKeys, 1
  225.             SetTimer, HeavyBow, Off
  226.             SetTimer, Crossbow, Off
  227.             SetTimer, Longbow, Off
  228.             SetTimer, AutoFireKillSwitch, Off
  229.         }
  230.  
  231.     }
  232.  
  233.     { ; Super Jump.
  234.  
  235.         SuperJump()
  236.         {
  237.             if (SuperJumpCooldown = 0)
  238.             {
  239.                 SuperJumpCooldown = 1
  240.                 loopIndex = 0
  241.                 If GetKeyState("x", "P")
  242.                 {
  243.                     ChargeJump = 1
  244.                     Send, {C}
  245.                     Send, {C Down}
  246.                     Sleep, 15
  247.                     Send, {Space Down}
  248.                     Sleep, 300
  249.                     Send, {Space Up}{C Up}
  250.                     Sleep, 3
  251.                     SetTimer,  SuperJumpGlitch, -1
  252.                     Return
  253.                 }
  254.                 ; Otherwise
  255.                 SetTimer,  SuperJumpGlitch, -1
  256.                 Return
  257.             }
  258.             Return
  259.         }
  260.  
  261.         SuperJumpGlitch()
  262.         {
  263.             SuperJumpSpinRan = 0
  264.             if GetKeyState("W", "P") or GetKeyState("LShift", "P")
  265.             {
  266.                 IsRunning = 1
  267.                 Sleep, 30
  268.             }
  269.             if IsRunning = 0
  270.             {
  271.                 Send, {LShift Down}
  272.                 Sleep, 10
  273.                 Send, {W Down}
  274.                 Sleep, 30
  275.             }
  276.             Send, {Space}
  277.             Loop, 2
  278.             {
  279.                 DllCall("user32.dll\mouse_event", "UInt", 0x0001, "Int", 0, "Int", 1400)
  280.                 Sleep, 2
  281.             }
  282.             Send, {E}
  283.             Sleep, 30
  284.             SetTimer, SuperJumpSpin, 1
  285.             SetTimer, SuperJumpSlide, 20
  286.             Sleep, 500
  287.             If IsRunning = 0
  288.             {
  289.                 Send, {W Up}{LShift Up}
  290.             }
  291.             Sleep, 10
  292.             SlideAllowed = 1
  293.             Sleep, 1500
  294.             SlideAllowed = 0
  295.             SuperJumpCooldown = 0
  296.             IsRunning = 0
  297.             SetTimer, SuperJumpSlide, Off
  298.             SetTimer, SuperJumpGlitch, Off
  299.         }
  300.  
  301.         SuperJumpSpin()
  302.         {
  303.             Critical, On
  304.             SuperJumpSpinRan = 1
  305.             loopIndex++
  306.             Send, {Space Down}
  307.             DllCall("user32.dll\mouse_event", "UInt", 0x0001, "Int", XInt, "Int", YInt)
  308.             if (loopIndex >= 34)
  309.             {
  310.                 ResetCamera = 1
  311.                 Send, {Space Up}
  312.                 loopIndex = 0
  313.                 Sleep, 30
  314.                 DllCall("user32.dll\mouse_event", "UInt", 0x0001, "Int", -ScaledX, "Int", -ScaledY)
  315.                 SetTimer, SuperJumpSpin, Off
  316.             }
  317.             Return
  318.         }
  319.  
  320.         SuperJumpSlide()
  321.         {
  322.             if SlideAllowed = 1
  323.             {
  324.                 While GetKeyState("Z", "P") && SlideAllowed = 1
  325.                 {
  326.                     Sliding = 1
  327.                     Sleep, 5
  328.                     Send, {LShift Down}
  329.                     Sleep, 50
  330.                     Send, {W Down}
  331.                     Sleep, 50
  332.                     Send, {C Down}
  333.                     ResetCamera = 0
  334.                 }
  335.                 if Sliding = 1
  336.                 {
  337.                     Send, {LShift Up}{W}{C Up}
  338.                     SetTimer, SuperJumpSlide, Off
  339.                 }
  340.                 Return
  341.             }
  342.         }
  343.  
  344.     }
  345.  
  346.     { ; Super Throw.
  347.  
  348.         SuperThrow()
  349.         {
  350.             Critical, Off
  351.             SuperThrowRun = 1
  352.             While SuperThrowRun = 1
  353.             {
  354.                 DllCall("user32.dll\mouse_event", "UInt", 0x0001, "Int", 0, "Int", 1700)
  355.                 Sleep, 15
  356.                 Send, {Z}
  357.                 Sleep, 15
  358.                 Send, {C Down}
  359.                 Sleep, 15
  360.                 Send, {Space Down}{X Down}
  361.                 MouseMove, 830, 610, 100
  362.                 Sleep, 450
  363.                 Send, {Space Up}
  364.                 Sleep, 15
  365.                 SetTimer, SuperThrowSpin, 2
  366.                 Sleep, 5
  367.                 Send, {Z Up}{C Up}{Space Up}
  368.                 Sleep, 10
  369.                 Send, {Z}
  370.                 Sleep, 10
  371.                 global SuperThrowRun = 0
  372.                 SetTimer, SuperThrow, Off
  373.                 Return
  374.             }
  375.         }
  376.  
  377.         SuperThrowSpin()
  378.         {
  379.             Send, {X Up}
  380.             Sleep, 30
  381.             Loop, 5
  382.             {
  383.                 DllCall("user32.dll\mouse_event", "UInt", 0x0001, "Int", -PixelAmount, "Int", 0)
  384.                 Sleep, SleepDelay
  385.                 DllCall("user32.dll\mouse_event", "UInt", 0x0001, "Int", -PixelAmount, "Int", 0)
  386.                 Sleep, SleepDelay
  387.                 DllCall("user32.dll\mouse_event", "UInt", 0x0001, "Int", 0, "Int", -PixelAmount)
  388.                 Sleep, SleepDelay
  389.                 DllCall("user32.dll\mouse_event", "UInt", 0x0001, "Int", 0, "Int", -PixelAmount)
  390.                 Sleep, SleepDelay
  391.                 DllCall("user32.dll\mouse_event", "UInt", 0x0001, "Int", PixelAmount, "Int", 0)
  392.                 Sleep, SleepDelay
  393.                 DllCall("user32.dll\mouse_event", "UInt", 0x0001, "Int", PixelAmount, "Int", 0)
  394.                 Sleep, SleepDelay
  395.                 DllCall("user32.dll\mouse_event", "UInt", 0x0001, "Int", 0, "Int", PixelAmount)
  396.                 Sleep, SleepDelay
  397.                 DllCall("user32.dll\mouse_event", "UInt", 0x0001, "Int", 0, "Int", PixelAmount)
  398.                 Sleep, SleepDelay
  399.             }
  400.             SetTimer, SuperThrowSpin, Off
  401.             Return
  402.         }
  403.  
  404.     Bail()
  405.     {
  406.         if GetKeyState("LButton", "P")
  407.         {
  408.             Send, {Z}
  409.             Sleep, 15
  410.             ReloadMacros()
  411.         }
  412.     }
  413.  
  414.     }
  415.  
  416.     { ; Tricks.
  417.  
  418.         Scaler()
  419.         {
  420.              if Scaled = 0
  421.             {
  422.                 Scaled = 1
  423.                 Run, nircmd.exe setdisplay 1600 900 32
  424.             }
  425.             else if Scaled = 1
  426.             {
  427.                 Scaled = 0
  428.                 Run, nircmd.exe setdisplay 1920 1080 32
  429.             }
  430.         }
  431.  
  432.         Flourish1()
  433.         {
  434.             Send, {1 Down}
  435.             Sleep, 3
  436.             Send, {X Down}
  437.             Send, {1 Up}{X Up}
  438.             return
  439.         }
  440.  
  441.         Flourish2()
  442.         {
  443.             Send, {2 down}
  444.             Sleep, 50
  445.             send, {x down}
  446.             Send, {2 up}
  447.             send, {x up}
  448.             return
  449.         }
  450.  
  451.         Flourish3()
  452.         {
  453.             Send, {3 down}
  454.             Sleep, 50
  455.             send, {x down}
  456.             Send, {3 up}
  457.             send, {x up}
  458.             return
  459.         }
  460.  
  461.         GKCancel()
  462.         {
  463.             Send, {G}
  464.             Sleep, 300
  465.             Send, {Q}
  466.             Return
  467.         }
  468.  
  469.         FakeSwing()
  470.         {
  471.             While GetKeyState("XButton2", "P")
  472.             {
  473.                 if ChainsawMode = 0
  474.                 {
  475.                     Send, {LButton}
  476.                     Sleep, 142
  477.                     Send, {x}
  478.                     Sleep, 540
  479.                 }
  480.                 else if ChainsawMode = 1
  481.                 {
  482.                     SetTimer, ChainSawGlitchFlick, -1
  483.                 }
  484.             }
  485.             Return
  486.         }
  487.  
  488.         ChainSawGlitchFlick() ; DOES NOT WORK
  489.         {
  490.             Send, {LButton}
  491.             Loop, 1
  492.             {
  493.                 DllCall("user32.dll\mouse_event", "UInt", 0x0001, "Int", 500, "Int", 0)
  494.                 Sleep, 33
  495.                 DllCall("user32.dll\mouse_event", "UInt", 0x0001, "Int", -500, "Int", 0)
  496.                 Sleep, 33
  497.                 DllCall("user32.dll\mouse_event", "UInt", 0x0001, "Int", -500, "Int", 0)
  498.                 Sleep, 33
  499.                 DllCall("user32.dll\mouse_event", "UInt", 0x0001, "Int", 500, "Int", 0)
  500.                 Sleep, 33
  501.             }
  502.         }
  503.     }
  504. }
  505.  
  506. { ; Choices and settings menu for certain macros.
  507.  
  508.     Settings()
  509.     {
  510.         Gui, New, +AlwaysOnTop +OwnDialogs, Choose an Option
  511.         Gui, Add, Text, Center, Settings
  512.         Gui, Add, Button, gChooseA1 w175 Center, Bow Type Selector
  513.         Gui, Add, Button, gChooseC3 w175 Center, Disable AutoFire Hotkey
  514.         Gui, Add, Button, gChooseD4 w175 Center, Super Jump Spin
  515.         Gui, Add, Button, gChooseE5 w175 Center, Chainsaw Glitch
  516.         Gui, Show, w300, Made by mudbourn.
  517.         Return
  518.     }
  519.  
  520.     BowSelector()
  521.     {
  522.         Gui, New, +AlwaysOnTop +OwnDialogs, Choose an Option
  523.         Gui, Add, Text, Center, Please select your current bow type
  524.         Gui, Add, Button, gChooseA w175 Center, LongBow
  525.         Gui, Add, Button, gChooseB w175 Center, Crossbow
  526.         Gui, Add, Button, gChooseC w175 Center, Heavy Bow
  527.         Gui, Show, w300, Made by mudbourn.
  528.         Return
  529.     }
  530.  
  531.     SpinSpeedSetting()
  532.     {
  533.         Gui, Add, Text, Center, Enter a spin speed :
  534.         if GuiUsed = 0
  535.         {
  536.             GuiUsed = 1
  537.             Gui, Add, Edit, vInputField 175
  538.         }
  539.         else if GuiUsed = 1
  540.         {
  541.         }
  542.         Gui, Add, Button, gSubmitInput Center, Submit
  543.         Gui, Show, w300, Made by mudbourn.
  544.         return
  545.     }
  546.  
  547.     ChooseA1:
  548.     {
  549.         Gui, Destroy
  550.         BowSelector()
  551.         Return
  552.     }
  553.  
  554.     ChooseC3:
  555.     {
  556.         Gui, Destroy
  557.         CurrentBow = -1
  558.         Return
  559.     }
  560.  
  561.     ChooseD4:
  562.     {
  563.         Gui, Destroy
  564.         SpinSpeedSetting()
  565.         Return
  566.     }
  567.  
  568.     ChooseE5:
  569.     {
  570.         Gui, Destroy
  571.         if ChainsawMode = 0
  572.         {
  573.             ChainsawMode = 1
  574.             MsgBox Chainsaw Glitch Enabled
  575.         }
  576.         else if ChainsawMode = 1
  577.         {
  578.             ChainsawMode = 0
  579.             MsgBox Chainsaw Glitch Disabled
  580.         }
  581.         return
  582.     }
  583.  
  584.     SubmitInput:
  585.     {
  586.         Gui, Submit  ; Save the GUI's input to variables
  587.         global XInt = InputField  ; Assign GUI input to global variablew
  588.         if (Trim(XInt) = "" or Trim(XInt) < 1 or !RegExMatch(XInt, "^\d+$"))
  589.         {
  590.             XInt = %DefaultValue%
  591.             MsgBox, Invalid Speed; Set value to %XInt%.
  592.             Return
  593.         }
  594.         if (Trim(XInt) > 2800)
  595.         {
  596.             MsgBox, (WARNING)`n`nThis value is much higher than the deafult and may cause problems.
  597.             Return
  598.         }
  599.                 if (Trim(XInt) < 1800 )
  600.         {
  601.             MsgBox, (WARNING)`n`nThis value is much lower than the default and may cause problems.
  602.             Return
  603.         }
  604.         MsgBox, Your spin speed is now: %XInt%
  605.         return
  606.     }
  607.  
  608.     ChooseA:
  609.     {
  610.         Gui, Destroy
  611.         GuiClose1:
  612.         GuiEscape1:
  613.             CurrentBow = 1
  614.             if CurrentBow = 1
  615.             {
  616.                 MsgBox Your choice has been saved as "1"
  617.                 SetTimer, AutoFireKillSwitch, 1
  618.             }
  619.         Return
  620.     }
  621.  
  622.     ChooseB:
  623.     {
  624.         Gui, Destroy
  625.         GuiClose2:
  626.         GuiEscape2:
  627.             CurrentBow = 2
  628.             if CurrentBow = 2
  629.             {
  630.                 MsgBox Your choice has been saved as "2"
  631.                 SetTimer, AutoFireKillSwitch, 1
  632.             }
  633.         Return
  634.     }
  635.  
  636.     ChooseC:
  637.     {
  638.         Gui, Destroy
  639.         GuiClose3:
  640.         GuiEscape3:
  641.             CurrentBow = 3
  642.             if CurrentBow = 3
  643.             {
  644.                 MsgBox Your choice has been saved as "3"
  645.                 SetTimer, AutoFireKillSwitch, 1
  646.             }
  647.         Return
  648.     }
  649.  
  650.     Choose1:
  651.     {
  652.             Gui, Destroy
  653.             Send, {1}
  654.             SetTimer, AutoFireKillSwitch, 1
  655.             CurrentBow = 0
  656.             UsingItem1 = 0
  657.             Return
  658.     }
  659.  
  660.     Choose2:
  661.     {
  662.         Gui, Destroy
  663.         SetTimer, AutoFireKillSwitch, 1
  664.         CurrentBow = 0
  665.         UsingItem1 = 0
  666.         Return
  667.     }
  668. }
  669.  
  670. { ; Binds
  671.  
  672.     { ; Binds required for certain macros.
  673.  
  674.         v::z
  675.  
  676.         z::v
  677.  
  678.     }
  679.  
  680.     { ; Optional extra macros.
  681.  
  682.         *1::Flourish1()
  683.  
  684.         2::Flourish2()
  685.  
  686.         3::Flourish3()
  687.  
  688.     }
  689.  
  690.     { ; Feel free to change these binds at will.
  691.  
  692.         ; " ~ " stops the macro from cancelling the key's proper output.
  693.         ; " * " allows the macros to run regardless of the modifier keys that are being held.
  694.         ; " + " allows the hotkey to be pressed when the shift button is pressed.
  695.  
  696.         ~*F8::Scaler()
  697.  
  698.         ~b::AutoFireBow()
  699.  
  700.         ~*XButton2::FakeSwing()
  701.  
  702.         *XButton1::SuperJump()
  703.  
  704.         +q::GKCancel()
  705.  
  706.         j::SuperThrow()
  707.  
  708.         ~*]::Settings() ; Gui for some macro settings
  709.     }
  710. }
Advertisement
Add Comment
Please, Sign In to add comment