Basic Aimbot

Post gaming related scripts
CPLNet
Posts: 53
Joined: 06 Dec 2016, 11:24

Basic Aimbot

15 Oct 2018, 05:31

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
User avatar
joedf
Posts: 8937
Joined: 29 Sep 2013, 17:08
Location: Canada
Contact:

Re: Basic Aimbot

15 Oct 2018, 10:48

You only look for a black pixel? Was expecting more... :?:
Image Image Image Image Image
Windows 10 x64 Professional, Intel i5-8500, NVIDIA GTX 1060 6GB, 2x16GB Kingston FURY Beast - DDR4 3200 MHz | [About Me] | [About the AHK Foundation] | [Courses on AutoHotkey]
[ASPDM - StdLib Distribution] | [Qonsole - Quake-like console emulator] | [LibCon - Autohotkey Console Library]
Ruevil2
Posts: 173
Joined: 14 Jul 2014, 10:39

Re: Basic Aimbot

16 Oct 2018, 15:43

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?
CPLNet
Posts: 53
Joined: 06 Dec 2016, 11:24

Re: Basic Aimbot

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
Ruevil2
Posts: 173
Joined: 14 Jul 2014, 10:39

Re: Basic Aimbot

23 Oct 2018, 07:48

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.
CPLNet
Posts: 53
Joined: 06 Dec 2016, 11:24

Re: Basic Aimbot

06 Nov 2018, 15:39

thx bro :p
User avatar
Cuadrix
Posts: 236
Joined: 07 May 2017, 08:26

Re: Basic Aimbot

06 Nov 2018, 16:23

You could have made a proper aimbot though. All the tools are available, step it up.
Jk, just ignore me.
User avatar
joedf
Posts: 8937
Joined: 29 Sep 2013, 17:08
Location: Canada
Contact:

Re: Basic Aimbot

07 Nov 2018, 00:22

@Cuadrix AHahaha :lol: :hehe:
Image Image Image Image Image
Windows 10 x64 Professional, Intel i5-8500, NVIDIA GTX 1060 6GB, 2x16GB Kingston FURY Beast - DDR4 3200 MHz | [About Me] | [About the AHK Foundation] | [Courses on AutoHotkey]
[ASPDM - StdLib Distribution] | [Qonsole - Quake-like console emulator] | [LibCon - Autohotkey Console Library]
DebuffedInRl
Posts: 12
Joined: 19 Jul 2019, 02:02

Re: Basic Aimbot

22 Jul 2019, 03:23

Anyone made better then? or more complex?
John
Posts: 78
Joined: 10 Apr 2014, 08:59

Re: Basic Aimbot

23 Aug 2019, 09:03

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.
FlowerBridge
Posts: 14
Joined: 20 Mar 2019, 20:22

Re: Basic Aimbot

12 Apr 2020, 21:15

thank you >.>
calal01
Posts: 1
Joined: 05 May 2020, 23:37

Re: Basic Aimbot

05 May 2020, 23:52

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!
newbie007
Posts: 20
Joined: 21 Jan 2022, 06:34

Re: Basic Aimbot

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

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!
gregster
Posts: 8886
Joined: 30 Sep 2013, 06:48

Re: Basic Aimbot

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? :)
newbie007
Posts: 20
Joined: 21 Jan 2022, 06:34

Re: Basic Aimbot

01 Jun 2022, 04:30

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:

Return to “Gaming Scripts (v1)”

Who is online

Users browsing this forum: No registered users and 28 guests