Advertisement
Guest User

Untitled

a guest
Sep 6th, 2016
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VB.NET 3.13 KB | None | 0 0
  1. Public Class Form1
  2.  
  3.     Public Declare Function ReadProcessMemory Lib "kernel32" (ByVal Handle As Integer, ByVal Address As Integer, ByRef Value As Long, ByVal Size As Long, ByRef BytesWritten As Long) As Long
  4.     Public Declare Sub mouse_event Lib "user32" Alias "mouse_event" (ByVal dwFlags As Long, ByVal dx As Long, ByVal dy As Long, ByVal cButtons As Long, ByVal dwExtraInfo As Long)
  5.     Public Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Long) As Integer
  6.  
  7.     Dim triggerbot_loop_thread As System.Threading.Thread = New System.Threading.Thread(AddressOf triggerbot_loop)
  8.  
  9.     Dim csgo_process As Process()
  10.     Dim exit_thread As Boolean = False
  11.     Dim client_dll_base As Integer
  12.     'Offsets hier bitte ändern"'
  13.     Dim LocalPlayer_offset As Integer = &A3A43C
  14.     Dim EntityList_offset As Integer = &4A57EA4
  15.  
  16.     Dim InCross_offset As Integer = &29B8
  17.     Dim Team_offset As Integer = &00F0
  18.  
  19.     Private Sub Form1_Load(ByVal sender As Object, ByVal e As EventArgs) Handles MyBase.Load
  20.         csgo_process = Process.GetProcessesByName("csgo")
  21.         If csgo_process.Length > 0 Then
  22.             For Each [Module] As System.Diagnostics.ProcessModule In csgo_process(0).Modules
  23.                 If [Module].ModuleName = "client.dll" Then
  24.                     client_dll_base = [Module].BaseAddress
  25.                 End If
  26.             Next
  27.             triggerbot_loop_thread.Start()
  28.         Else
  29.             MsgBox("Start zuerst CSGO!")
  30.             Application.Exit()
  31.         End If
  32.     End Sub
  33.  
  34.     Private Sub Form1_FormClosing(ByVal sender As Object, ByVal e As FormClosingEventArgs) Handles Me.FormClosing
  35.         exit_thread = True
  36.     End Sub
  37.  
  38.     Function triggerbot_loop()
  39.         Dim pointer_to_localplayer As Integer
  40.         Dim pointer_to_incross_player As Integer
  41.         Dim player_index_incross As Integer
  42.         Dim my_team As Integer
  43.         Dim incross_team As Integer
  44.         While (Not exit_thread)
  45.             If GetAsyncKeyState(Keys.MButton) Then
  46.                 ReadProcessMemory(csgo_process(0).Handle, client_dll_base + LocalPlayer_offset, pointer_to_localplayer, 4, 0)
  47.                 ReadProcessMemory(csgo_process(0).Handle, pointer_to_localplayer + InCross_offset, player_index_incross, 4, 0)
  48.                 If player_index_incross > 0 And player_index_incross < 65 Then
  49.                     ReadProcessMemory(csgo_process(0).Handle, pointer_to_localplayer + Team_offset, my_team, 4, 0)
  50.                     ReadProcessMemory(csgo_process(0).Handle, client_dll_base + EntityList_offset + ((player_index_incross - 1) * &H10), pointer_to_incross_player, 4, 0)
  51.                     ReadProcessMemory(csgo_process(0).Handle, pointer_to_incross_player + Team_offset, incross_team, 4, 0)
  52.                     If Not my_team = incross_team Then
  53.                         mouse_event(&H2, 0, 0, 0, 1)
  54.                         Threading.Thread.Sleep(15)
  55.                         mouse_event(&H4, 0, 0, 0, 1)
  56.                         Threading.Thread.Sleep(10)
  57.                     End If
  58.                 End If
  59.             End If
  60.             Threading.Thread.Sleep(10)
  61.         End While
  62.     End Function
  63. End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement