Solved My first VB-Aimbot (Assault Cube)

Hexui Undetected CSGO Cheats Sinkicheat PUBG Cheat

CRANKIT

Newbie
Apr 3, 2015
1
1,814
0
I need help with my Code,

I tested my half done Aimbot ingame with WriteDMAFloat nothing happens,
if i use WriteDMAInteger instead, then im aiming at the wrong position.

So both functions aren't working

At first:
If i use ReadDMAFloat instead of ReadDMALong i get the Value 0, thats why im converting byte to float

Can someone help me ?



Here is my Code:

+(ReadWritingMemory Module)

C#:
Imports System.Math

Public Class Aimbot
    Declare Function GetAsyncKeyState Lib "user32.dll" (ByVal nVirtKey As Keys) As Short
    Dim Proc As String = "ac_client"
    Dim PBase As String = "&H18DE1C"
    Dim OffsetHealth As String = "&HF8"
    Dim OffsetSecondary As String = "&H13C"
    Dim OffsetX As String = "&H4"
    Dim OffsetY As String = "&HC"
    Dim OffsetZ As String = "&H8"
    Dim OffsetMouseY As String = "&H40"
    Dim OffsetMouseZ As String = "&H44"
    Dim PBaseAmmoFirst As String = "&H00509B74"
    Dim EBase As String = "&H0050F4F8"
Public Enum VirtualKeys
VK_A = &H41 ' // [A] = 065
VK_B = &H42 ' // = 066
VK_C = &H43 ' // [C] = 067
VK_D = &H44 ' // [D] = 068
VK_E = &H45 ' // [E] = 069
VK_F = &H46 ' // [F] = 070
VK_G = &H47 ' // [G] = 071
VK_H = &H48 ' // [H] = 072
VK_I = &H49 ' // = 073
VK_J = &H4A ' // [J] = 074
VK_K = &H4B ' // [K] = 075
VK_L = &H4C ' // [L] = 076
VK_M = &H4D ' // [M] = 077
VK_N = &H4E ' // [N] = 078
VK_O = &H4F ' // [O] = 079
VK_P = &H50 ' // [P] = 080
VK_Q = &H51 ' // [Q] = 081
VK_R = &H52 ' // [R] = 082
VK_S = &H53 ' // = 083
VK_T = &H54 ' // [T] = 084
VK_U = &H55 ' // = 085
VK_V = &H56 ' // [V] = 086
VK_W = &H57 ' // [W] = 087
VK_X = &H58 ' // [X] = 088
VK_Y = &H59 ' // [Y] = 089
VK_Z = &H5A ' // [Z] = 090
End Enum


The Convert Function i use to convert the Byte to Float end in Crash when my Y-Position is less than 0

C#:
    Public Function ByteFloat(ByVal Value As Integer)
        Dim floatnumber As Single
        Dim floatbytes() As Byte = BitConverter.GetBytes(Value)
        floatnumber = BitConverter.ToSingle(floatbytes, 0)
        Return floatnumber
    End Function

    Public Function FloatByte(ByVal Value As Single)
        Dim longvalue As Integer
        Dim longbytes() As Byte = BitConverter.GetBytes(Value)
        longvalue = BitConverter.ToInt32(longbytes, 0)
        Return longvalue
    End Function
C#:
    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        calc.start
    End Sub

    Private Sub calc_Tick(sender As Object, e As EventArgs) Handles rechner.Tick
        'PLAYER
        xpos.Text = ReadDMALong(Proc, PBase, Offsets:={OffsetX}, Level:=1, nsize:=4)
        ypos.Text = ReadDMALong(Proc, PBase, Offsets:={OffsetY}, Level:=1, nsize:=4)
        zpos.Text = ReadDMALong(Proc, PBase, Offsets:={OffsetZ}, Level:=1, nsize:=4)
        ymouse.Text = ReadDMALong(Proc, PBase, Offsets:={OffsetMouseY}, Level:=1, nsize:=4)
        zmouse.Text = ReadDMALong(Proc, PBase, Offsets:={OffsetMouseZ}, Level:=1, nsize:=4)
        health.Text = ReadDMALong(Proc, PBase, Offsets:={OffsetHealth}, Level:=1, nsize:=4)
        ammo1.Text = ReadDMALong(Proc, PBaseAmmoFirst, Offsets:={&H36C, &H18, &H1E8, &H10, &H1C}, Level:=5, nsize:=4)
        ammo2.Text = ReadDMALong(Proc, PBase, Offsets:={OffsetSecondary}, Level:=1, nsize:=4)
        'ENEMY
        expos.Text = ReadDMALong(Proc, EBase, Offsets:={&H4, &H4}, Level:=2, nsize:=4)
        eypos.Text = ReadDMALong(Proc, EBase, Offsets:={&H4, &HC}, Level:=2, nsize:=4)
        ezpos.Text = ReadDMALong(Proc, EBase, Offsets:={&H4, &H8}, Level:=2, nsize:=4)
        ehealth.Text = ReadDMALong(Proc, EBase, Offsets:={&H4, &HF8}, Level:=2, nsize:=4)
        'KEYPRESS
        If GetAsyncKeyState(VirtualKeys.VK_F) = -32767 Then
            If aim.Enabled = True Then
                aim.Enabled = False
            Else
                aim.Enabled = True
            End If
        Else
        End If
    End Sub

    Private Sub aim_Tick(sender As Object, e As EventArgs) Handles aim.Tick
        Dim scaleMul As String = Math.Sqrt(Math.Pow(ByteFloat(expos.Text) - ByteFloat(xpos.Text), 2))
        Dim length As String = Math.Sqrt(Math.Pow(ByteFloat(expos.Text) - ByteFloat(xpos.Text), 2) + Math.Pow(ByteFloat(eypos.Text) - ByteFloat(ypos.Text), 2))
        Dim result As String = Math.Acos(scaleMul / length) * 180 / Math.PI

       

        WriteDMAInteger("ac_client", &H18DE1C, Offsets:={&H40}, Value:=result, Level:=1, nsize:=4) 'X = PITCH Byte
        'WriteDMAFloat("ac_client", &H18DE1C, Offsets:={&H40}, Value:=result, Level:=1, nsize:=4) 'X = PITCH Float
        'WriteDMAInteger("ac_client", &H18DE1C, Offsets:={&H44}, Value:=result, Level:=1, nsize:=4) 'Y = YAW
    End Sub
End Class

Fleep:YT-Link Fleep Aimbot C#
AimbotMaths
myg0t: Aimbot Maths Source
DNA: Converter Source
 

squeenie

Hacker
Meme Tier VIP
Dank Tier Donator
Mar 6, 2013
677
5,478
37
Why do you need to convert a byte to a float in the first place? Sounds like a huge recipe for disaster.

Edit: just noticed your reasoning.

Just because you are getting the val 0 doesn't mean it is a byte. Floats are represented very differently from ints and bytes. Check your offsets again or maybe the math because this is definitely not the way to go about solving it.

Complete vb.net memory class Source Code - Nether's VB Memory Class
 
Last edited by a moderator:
Attention! Before you post:

Read the How to Ask Questions Guide
99% of questions are answered in the Beginner's Guide, do it before asking a question.

No Hack Requests. Post in the correct section.  Search the forum first. Read the rules.

How to make a good post:

  • Fill out the form correctly
  • Tell us the game name & coding language
  • Post everything we need to know to help you
  • Ask specific questions, be descriptive
  • Post errors, line numbers & screenshots
  • Post code snippets using code tags
  • If it's a large project, zip it up and attach it

If you do not comply, your post may be deleted.  We want to help, please make a good post and we will do our best to help you.

Community Mods