- Status
- Offline
- Joined
- Mar 3, 2026
- Messages
- 247
- Reaction score
- 7
Decided to drop a little something I have been messing with for The Division 2. It is a basic external color-picker based aimbot written in AutoHotkey. Nothing fancy, but it gets the job done for both auto and semi-auto weapons if you get your color range set right at the shooting range.
Features:
Has anyone else messed with color-based detection in The Division 2? Curious if you guys have found better ways to stabilize the pixel scanning without hitting performance issues. Drop your tweaks below if you have improved the logic.
Features:
- Mode Switching: Toggle between Full-Auto and Semi-Auto using F1.
- Recoil Compensation: Integrated RCS functionality with a toggle (F2) and configurable vertical/horizontal values (F3).
- Config GUI: Built-in overlay to adjust fire rate and recoil strength on the fly.
- Open the script and hit the shooting range to calibrate the color search range.
- Use F1 to swap your firing mode to match your current gun.
- F2 turns the RCS on or off. F3 pulls up the config menu to dial in your jitter.
Code:
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
#Persistent ; Keeps the script running until the user exits it.
; Define global variables
leftDown := 0
rightDown := 0
isAutoMode := 1 ; 1 = Fully Automatic Mode, 0 = Semi-Automatic Mode
recoilForce := 5 ; Initial vertical recoil force (pixels)
horizontalRecoil := 2 ; Initial horizontal recoil force (pixels, positive left, negative right)
fireRate := 600 ; Initial weapon fire rate (RPM)
recoilControlEnabled := 0 ; Recoil control toggle, 0 = Off, 1 = On
configToggle := 0 ; Recoil configuration GUI toggle, 0 = Hidden, 1 = Shown
; Create main status GUI (displays auto/semi-auto mode)
Gui, ModeGui: +AlwaysOnTop -Caption +ToolWindow
Gui, ModeGui: Color, 000000
Gui, ModeGui: Font, s10, Arial
Gui, ModeGui: Add, Text, cLime vModeText, Fully Automatic Mode
Gui, ModeGui: Show, x0 y300
; Create recoil status GUI (displays recoil control toggle status)
Gui, RecoilStatusGui: +AlwaysOnTop -Caption +ToolWindow
Gui, RecoilStatusGui: Color, 000000
Gui, RecoilStatusGui: Font, s10, Arial
Gui, RecoilStatusGui: Add, Text, cLime vRecoilStatusText, Recoil Control: Off
Gui, RecoilStatusGui: Show, x0 y330 ; Below the mode GUI
; Create recoil configuration GUI (shown with F3)
Gui, RecoilConfig: +AlwaysOnTop +ToolWindow
Gui, RecoilConfig: Add, Text,, Vertical Recoil Force (pixels):
Gui, RecoilConfig: Add, Edit, vRecoilForce w100, %recoilForce%
Gui, RecoilConfig: Add, Text,, Horizontal Recoil Force (pixels, positive left, negative right):
Gui, RecoilConfig: Add, Edit, vHorizontalRecoil w100, %horizontalRecoil%
Gui, RecoilConfig: Add, Text,, Weapon Fire Rate (RPM):
Gui, RecoilConfig: Add, Edit, vFireRate w100, %fireRate%
Gui, RecoilConfig: Add, Button, gApplySettings, Apply
Gui, RecoilConfig: Show, Hide ; Initially hidden
; F1 toggles between fully automatic and semi-automatic mode
F1::
isAutoMode := !isAutoMode
if (isAutoMode)
GuiControl, ModeGui:, ModeText, Fully Automatic Mode
else
GuiControl, ModeGui:, ModeText, Semi-Automatic Mode
return
; F2 toggles recoil control on/off
F2::
recoilControlEnabled := !recoilControlEnabled
if (recoilControlEnabled)
GuiControl, RecoilStatusGui:, RecoilStatusText, Recoil Control: On
else
GuiControl, RecoilStatusGui:, RecoilStatusText, Recoil Control: Off
return
; F3 shows/hides the recoil configuration GUI
F3::
configToggle := !configToggle
if (configToggle)
Gui, RecoilConfig: Show
else
Gui, RecoilConfig: Hide
return
; Apply user settings
ApplySettings:
Gui, RecoilConfig: Submit
recoilForce := RecoilForce
horizontalRecoil := HorizontalRecoil
fireRate := FireRate
return
; Right mouse button triggers recoil control
RButton::
Send {RButton down}
rightDown := 1
if (isAutoMode) ; Fully Automatic Mode
{
fireInterval := 60000 / fireRate ; Calculate fire interval (milliseconds)
lastFireTime := A_TickCount - fireInterval
while (rightDown)
{
if (!GetKeyState("RButton", "P"))
{
rightDown := 0
Send {RButton up}
if (leftDown)
{
Send {LButton up}
leftDown := 0
}
break
}
PixelSearch, Px, Py, 1230, 694, 1360, 754, 0xF43636, 0, Fast RGB
if (ErrorLevel = 0)
{
if (!leftDown)
{
Send {LButton down}
leftDown := 1
}
if (recoilControlEnabled && A_TickCount - lastFireTime >= fireInterval)
{
DllCall("mouse_event", "UInt", 0x01, "UInt", -horizontalRecoil, "UInt", recoilForce, "UInt", 0, "UPtr", 0)
lastFireTime := A_TickCount
}
}
else
{
if (leftDown)
{
Send {LButton up}
leftDown := 0
}
}
Sleep, 10
}
}
else ; Semi-Automatic Mode
{
while (rightDown)
{
if (!GetKeyState("RButton", "P"))
{
rightDown := 0
Send {RButton up}
break
}
PixelSearch, Px, Py, 1230, 694, 1360, 754, 0xF43636, 0, Fast RGB
if (ErrorLevel = 0)
{
Send {LButton down}
Sleep, 1
Send {LButton up}
if (recoilControlEnabled)
{
DllCall("mouse_event", "UInt", 0x01, "UInt", -horizontalRecoil, "UInt", recoilForce, "UInt", 0, "UPtr", 0)
}
Sleep, 150
}
else
{
Sleep, 10
}
}
}
return
Has anyone else messed with color-based detection in The Division 2? Curious if you guys have found better ways to stabilize the pixel scanning without hitting performance issues. Drop your tweaks below if you have improved the logic.