Code:
init:
#NoEnv
#Persistent
#SingleInstance, Force
#Persistent
#InstallKeybdHook
#UseHook
#KeyHistory, 0
#HotKeyInterval 1
#MaxHotkeysPerInterval 127
version = 2.0
traytip, Sharpshooter %version%, Running in background! Aimspot = Torso > Aim is staying on target, 5, 1
Menu, tray, NoStandard
Menu, tray, Tip, Sharpshooter %version%
Menu, tray, Add, Sharpshooter %version%, return
Menu, tray, Add
Menu, tray, Add, Help, info
Menu, tray, Add, Exit, exit
SetKeyDelay,-1, 8
SetControlDelay, -1
SetMouseDelay, -1
SetWinDelay,-1
SendMode, InputThenPlay
SetBatchLines,-1
ListLines, Off
CoordMode, Pixel, Screen, RGB
CoordMode, Mouse, Screen
PID := DllCall("GetCurrentProcessId")
Process, Priority, %PID%, High
EMCol := [0xF2361B, 0xEF3519, 0xEE4131, 0xED4233, 0xEE4031, 0xCF8790, 0xCF878F, 0xD92411, 0xDC2613, 0xA24D53, 0xA84547, 0xB25C62, 0xAB545B] ;Color to search for, hex!
ColVn := 50 ; Color Variations Allowed (higher number more colors allowed)
AntiShakeX := (A_ScreenWidth // 160)
AntiShakeY := (A_ScreenHeight // 128)
ZeroX := 960
ZeroY := 528 ; Higher The number the Higher The Shot
CFovX := 92 ; Fov in pixel around crosshair
CFovY := 92 ; Fov in pixel around crosshair
ScanL := ZeroX - CFovX
ScanT := ZeroY
ScanR := ZeroX + CFovX
ScanB := ZeroY + CFovY
NearAimScanL := ZeroX - AntiShakeX
NearAimScanT := ZeroY - AntiShakeY
NearAimScanR := ZeroX + AntiShakeX
NearAimScanB := ZeroY + AntiShakeY
Loop, {
KeyWait, LButton, D
PixelSearch, AimPixelX, AimPixelY, NearAimScanL, NearAimScanT, NearAimScanR, NearAimScanB, EMCol, ColVn, Fast RGB
if (!ErrorLevel=0) {
loop, 1 {
PixelSearch, AimPixelX, AimPixelY, ScanL, ScanT, ScanR, ScanB, EMCol, ColVn, Fast RGB
AimX := AimPixelX - ZeroX
AimY := AimPixelY - ZeroY
DirX := -1
DirY := -1
If ( AimX > 0 ) {
DirX := 1
}
If ( AimY > 0 ) {
DirY := 1
}
AimOffsetX := AimX * DirX
AimOffsetY := AimY * DirY
MoveX := Floor(( AimOffsetX ** ( 1 / 2 ))) * DirX
MoveY := Floor(( AimOffsetY ** ( 1 / 2 ))) * DirY
DllCall("mouse_event", uint, 1, int, MoveX * 1.2309, int, MoveY, uint, 0, int, 0) ; MoveX * "1.35" (how fast the aimbot aims)
}
}
}
Return
Pause:: pause
return:
goto, init
info:
msgbox, 0, Sharpshooter %version%, Made by erik96 `nGame must be running in borderless windowed mode.`nPress pause key to pause this program.`nLeft click automatically aims down target near the center of the screen.`nRecommended for near distance.`nTry 1920X1080 as resulution works best for me.
return
exit:
exitapp