Visual Basic Aimbot Source Code

Posts 1–15 of 20 · Page 1 of 2
Visual Basic Aimbot Source Code
I think i found a source code for a pixel aimbot.
I'm not sure how helpful this will be but im pretty sure this code still works.
Also, im not very good with Visual Basics but anyone good with visual basics try coding one with this source.

Code:
' MODULE...
' =========
Option Explicit

Public Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Public Declare Function GetForegroundWindow Lib "user32" () As Long
Public Declare Function GetDC Lib "user32" (ByVal hwnd As Long) As Long
Public Declare Function ReleaseDC Lib "user32" (ByVal hwnd As Long, ByVal hdc As Long) As Long
Public Declare Sub mouse_event Lib "user32" (ByVal dwFlags As Long, ByVal dx As Long, ByVal dy As Long, ByVal cButtons As Long, ByVal dwExtraInfo As Long)
Public Declare Function GetCursorPos Lib "user32" (lpPoint As Point) As Long
Public Declare Function GetPixel Lib "gdi32" (ByVal hdc As Long, ByVal X As Long, ByVal Y As Long) As Long

Public Const MOUSEEVENTF_LEFTDOWN = &H2

Public Type Point
X As Long
Y As Long
End Type:


' FORM...
' =======

Option Explicit

Dim ProcessHandle As Long, ProcessDC As Long

Private Sub Form_Activate()
ProcessHandle = FindWindow(vbNullString, "Window Name Here")
ProcessDC = GetDC(0)
End Sub

Private Sub Form_Unload(Cancel As Integer)
Call ReleaseDC(0, ProcessDC)
End Sub

Private Sub Timer1_Timer()
On Error Resume Next

Dim X As Long, Y As Long, PixelColor As Long
Dim CursorPosition As Point

If (ProcessHandle <> GetForegroundWindow()) Then
Exit Sub
End If

Call GetCursorPos(CursorPosition)

For X = CursorPosition.X - 20 To CursorPosition.X + 20
For Y = CursorPosition.Y - 20 To CursorPosition.Y + 20
PixelColor = GetPixel(ProcessDC, X, Y)

'Replace RGB value for your specified color
If (PixelColor = RGB(255, 255, 255)) Then
Call mouse_event(MOUSEEVENTF_LEFTDOWN, CursorPosition.X, CursorPosition.Y, 0, 0)
Exit Sub
End If
Next Y
Next X
End Sub
Credit for code: cOlo
Credit for post: whitten001


[EDIT] - If this is doesn't work, mods feel free to close.
Hmm...good job whitten. Maybe Legify or ddd555 could use this.
Quote Originally Posted by Ryan View Post
Hmm...good job whitten. Maybe Legify or ddd555 could use this.
Yes, i will try -since i reinstall my windows
Cool, maybe I could make a hack with this.
very very good sir
Well.. when i put this in my microsoft VB program there were a ton of errors... invalid name spaces.... repeats of certain functions... i don't believe this works... or maybe just not for me
Quote Originally Posted by gwentravolta View Post
Well.. when i put this in my microsoft VB program there were a ton of errors... invalid name spaces.... repeats of certain functions... i don't believe this works... or maybe just not for me

Dont copy -paste
VB6 or VB .NET?

Their different.
Meh what do I care, VB sucks IMO.
C Languages ftw
i saw this exact post some where i can remeber O_O
Quote Originally Posted by zlavik View Post
i saw this exact post some where i can remeber O_O
like i said i found it...
meaning leeched from another site.
so like i said idk if it works, but you people that are good with vb try it.
kk igonna try now

Edit:it works alright but how the hell do i activate it
2 bad i cants code...
Its vb6 coding will edit this post later with results. Thanks
There is a module and a Form, read the comments. Make a module and paste teh code there, get the form and paste that code there. Then I think you need to exit the window to get it to start.
Quote Originally Posted by User1 View Post
There is a module and a Form, read the comments. Make a module and paste teh code there, get the form and paste that code there. Then I think you need to exit the window to get it to start.
meh i did that
Posts 1–15 of 20 · Page 1 of 2
This thread is closed for replies.

Similar Threads

Tags for this Thread

Need help?