Page 1 of 1

Basic Aimbot

Posted: 15 Oct 2018, 05:31
by CPLNet

Code: Select all

ZeroX := (A_ScreenWidth // 2) ;dont touch?
ZeroY := (A_ScreenHeight // 2)
CFovX := 200
CFovY := 200
ScanL := ZeroX - CFovX
ScanT := ZeroY - CFovY
ScanR := ZeroX + CFovX
ScanB := ZeroY + CFovY

loop {
if getkeystate("LButton", "p")
{

PixelSearch, AimPixelX, AimPixelY, ScanL, ScanT, ScanR, ScanB, 0x000000, 0,  Fast RGB
if errorlevel = 0
{
if (AimPixelX < A_ScreenWidth)
{
 DllCall("mouse_event", uint, 1, int, AimPixelX/760, int, 0, uint, 0, int, 0)
sleep 150
}
if (AimPixelX > A_ScreenWidth)
{
 DllCall("mouse_event", uint, 1, int, -AimPixelX/760, int, 0, uint, 0, int, 0)
sleep 150
}}
}}


return
INS::Pause

Re: Basic Aimbot

Posted: 15 Oct 2018, 10:48
by joedf
You only look for a black pixel? Was expecting more... :?:

Re: Basic Aimbot

Posted: 16 Oct 2018, 15:43
by Ruevil2
CPLNet wrote:
15 Oct 2018, 05:31
ZeroX := (A_ScreenWidth // 2) ;dont touch?
ZeroY := (A_ScreenHeight // 2)
CFovX := 200
CFovY := 200
ScanL := ZeroX - CFovX
ScanT := ZeroY - CFovY
ScanR := ZeroX + CFovX
ScanB := ZeroY + CFovY

loop {
if getkeystate("LButton", "p")
{

PixelSearch, AimPixelX, AimPixelY, ScanL, ScanT, ScanR, ScanB, 0x000000, 0, Fast RGB
if errorlevel = 0
{
if (AimPixelX < A_ScreenWidth)
{
DllCall("mouse_event", uint, 1, int, AimPixelX/760, int, 0, uint, 0, int, 0)
sleep 150
}
if (AimPixelX > A_ScreenWidth)
{
DllCall("mouse_event", uint, 1, int, -AimPixelX/760, int, 0, uint, 0, int, 0)
sleep 150
}}
}}


return
INS::Pause
Why are you dividing by 760 here? Shouldn't this vary based on the current screen size?

Re: Basic Aimbot

Posted: 21 Oct 2018, 03:32
by CPLNet
its a x axis variable divide by 760 for slower movement becasue 0x000000 black are many present on map so too many color found i fake then

Re: Basic Aimbot

Posted: 23 Oct 2018, 07:48
by Ruevil2
CPLNet wrote:
21 Oct 2018, 03:32
its a x axis variable divide by 760 for slower movement becasue 0x000000 black are many present on map so too many color found i fake then
Thank you. This is a nice short piece of code. I like it. Good work!

It might be difficult to get a good color without too much variation with only one PixelSearch. Sometimes I like to check a couple other pixels to see if they are 'close' to the target one.

Re: Basic Aimbot

Posted: 06 Nov 2018, 15:39
by CPLNet
thx bro :p

Re: Basic Aimbot

Posted: 06 Nov 2018, 16:23
by Cuadrix
You could have made a proper aimbot though. All the tools are available, step it up.
Jk, just ignore me.

Re: Basic Aimbot

Posted: 07 Nov 2018, 00:22
by joedf
@Cuadrix AHahaha :lol: :hehe:

Re: Basic Aimbot

Posted: 22 Jul 2019, 03:23
by DebuffedInRl
Anyone made better then? or more complex?

Re: Basic Aimbot

Posted: 23 Aug 2019, 09:03
by John
Of course. Everything from more sophisticated pixelbots to memory aimbots to "opencv & friends" implementations of varying degrees, but it's still a good start. A good next step would be to swap AHK's PixelSearch to a faster solution using gdip and lockbits.

Re: Basic Aimbot

Posted: 12 Apr 2020, 21:15
by FlowerBridge
thank you >.>

Re: Basic Aimbot

Posted: 05 May 2020, 23:52
by calal01
CPLNet wrote:
15 Oct 2018, 05:31
ZeroX := (A_ScreenWidth // 2) ;dont touch?
ZeroY := (A_ScreenHeight // 2)
CFovX := 200
CFovY := 200
ScanL := ZeroX - CFovX
ScanT := ZeroY - CFovY
ScanR := ZeroX + CFovX
ScanB := ZeroY + CFovY

loop {
if getkeystate("LButton", "p")
{

PixelSearch, AimPixelX, AimPixelY, ScanL, ScanT, ScanR, ScanB, 0x000000, 0, Fast RGB
if errorlevel = 0
{
if (AimPixelX < A_ScreenWidth)
{
DllCall("mouse_event", uint, 1, int, AimPixelX/760, int, 0, uint, 0, int, 0)
sleep 150
}
if (AimPixelX > A_ScreenWidth)
{
DllCall("mouse_event", uint, 1, int, -AimPixelX/760, int, 0, uint, 0, int, 0)
sleep 150
}}
}}


return
INS::Pause
This is really good for a start and to learn.
I still cannot wrap my head around how to adopt multi pixel searching within this code.
I can see this searches for one color but from here what would a multi pixel search look like?

Thanks again for the release!

Re: Basic Aimbot

Posted: 01 Jun 2022, 03:19
by newbie007
This is actually stolen by a Youtuber who wrote this code. Here is the Video link: https://www.youtube.com/watch?v=sTQd-ts5tYk&ab_channel=Ninkjeboi

And here is the Code:

Code: Select all

init:
#NoEnv
#SingleInstance, Force
#Persistent
#InstallKeybdHook
#UseHook
#KeyHistory, 0
#HotKeyInterval 1
#MaxHotkeysPerInterval 127
version = badeverything v0.02


V::

Pause

Suspend

return


k:: Hotkey, *~$LButton, Toggle


*~$LButton::

SetKeyDelay,-1, 1
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 := 0xD82A35
ColVn := 64
AntiShakeX := (A_ScreenHeight // 160)
AntiShakeY := (A_ScreenHeight // 128)
ZeroX := (A_ScreenWidth // 2) ;dont touch?
ZeroY := (A_ScreenHeight // 2) 
CFovX := (A_ScreenWidth // 64)  ;configure 64 for FOV up = smaller lower= bigger current boxes right fov
CFovY := (A_ScreenHeight // 64)
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, 10 {
			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.5, int, MoveY, uint, 0, int, 0) ;turing mouse to color were it says * is the speed of the aimbot turn up for unhuman reactions lower for human
		}
	}
}

Pause:: u
return:
goto, init

info:
return
Z::ExitApp

You could atleast give credits since you steal a part of the code!

Re: Basic Aimbot

Posted: 01 Jun 2022, 03:29
by gregster
newbie007 wrote:
01 Jun 2022, 03:19
This is actually stolen by a Youtuber who wrote this code. Here is the Video link: https://www.youtube.com/watch?v=sTQd-ts5tYk&ab_channel=Ninkjeboi
[...]
You could atleast give credits since you steal a part of the code!
"stolen by" or "from" a Youtuber?? :think:
The original forum post is from 2018, the YT video from 2019 :geek: So, tell me... who came first?
My guess is that the Youtuber built on the (simpler) 2018 forum code and expanded it. Could even be the same guy for all we know.

Both codes variants are still relatively trivial, but sure: in general, where credits are due, they should be given.
But I seriously doubt that our forum member is in possession of a time machine :shock:. Are you? :)

Re: Basic Aimbot

Posted: 01 Jun 2022, 04:30
by newbie007
gregster wrote:
01 Jun 2022, 03:29
newbie007 wrote:
01 Jun 2022, 03:19
This is actually stolen by a Youtuber who wrote this code. Here is the Video link: https://www.youtube.com/watch?v=sTQd-ts5tYk&ab_channel=Ninkjeboi
[...]
You could atleast give credits since you steal a part of the code!
"stolen by" or "from" a Youtuber?? :think:
The original forum post is from 2018, the YT video from 2019 :geek: So, tell me... who came first?
My guess is that the Youtuber built on the (simpler) 2018 forum code and expanded it. Could even be the same guy for all we know.

Both codes variants are still relatively trivial, but sure: in general, where credits are due, they should be given.
But I seriously doubt that our forum member is in possession of a time machine :shock:. Are you? :)
Damn you got me. I have a time machine. :monkeysay: