float Get3D1(float X, float Y, float Z, float eX, float eY, float eZ)
{
return(sqrtf((eX - X) * (eX - X) + (eY - Y) * (eY - Y) + (eZ - Z) * (eZ - Z)));
}
float CloseEnt()
{
//Variables
float fLowest = 100000, TMP;
int iIndex;
for (int i = 0; i < 32; i++)
{
EnemyPlayer[i].ReadInfo(i);
//Store Distances In Array
TMP = Get3D1(EnemyPlayer[0].Posi[0], EnemyPlayer[0].Posi[1], EnemyPlayer[0].Posi[2], EnemyPlayer[i].Posi[0], EnemyPlayer[i].Posi[1], EnemyPlayer[i].Posi[2]);
//If Enemy Has Lower Distance The Player 1, Replace (var)Lowest With Current Enemy Distance
if (TMP < fLowest && EnemyPlayer[i].Health != 0)
{
fLowest = TMP;
iIndex = i;
}
}
return iIndex;
}
void CalcAngle(float *src, float *dst, float *angles, int fFlags)
{
double delta[3] = { (src[0] - dst[0]), (src[1] - dst[1]), (src[2] - dst[2]) };
double hyp = sqrt(delta[0] * delta[0] + delta[1] * delta[1]);
angles[0] = (float)(asinf(delta[2] / hyp) * 57.295779513082f);
angles[1] = (float)(atanf(delta[1] / delta[0]) * 57.295779513082f);
angles[2] = 0.0f;
if (delta[0] >= 0.0)
{
angles[1] += 180.0f;
}
if (fFlags == 775)
angles[0] = angles[0] + 5;
}
void Aimbot() {
if (GetAsyncKeyState(VK_MBUTTON))
{
for (int i = 0; i < 32; i++)
{
EnemyPlayer[i].ReadInfo(i);
//Get Closest Entity Array Index Number
int Index = CloseEnt();
//Calculate Angle To Closest Entity
CalcAngle(EnemyPlayer[0].Posi, EnemyPlayer[i].Posi, EnemyPlayer[i].Angle, EnemyPlayer[i].Flags);
//Write To AngRotation The Current Angle Of The Entity
Mem.Write<float>(dwAngPtr + 0x4C88, EnemyPlayer[i].Angle[0]);
Mem.Write<float>(dwAngPtr + 0x4C8C, EnemyPlayer[i].Angle[1]);
//I did call the games function SetAng Here but it has bugs, Will be fixed on next release
//Ill also add Bone-Aimbot ( i just cba to add it all in with the bulk pointers :P
}
}
}
struct EnemyPlayer_t
{
uintptr_t CEntityList;
int Health;
int TeamNum;
int Dormant;
int ArmorValueInt;
int Flags;
float Posi[3];
float Angle[3];
void ReadInfo(int _pInfo) {
CEntityList = Mem.Read<uintptr_t>(Client + EntityList + (_pInfo * 0x10));
Health = Mem.Read<int>(CEntityList + iHealth);
TeamNum = Mem.Read<int>(CEntityList + iTeamNum);
ArmorValue = Mem.Read<int>(CEntityList + ArmorValue);
Dormant = Mem.Read<int>(CEntityList + IsDormant);
Flags = Mem.Read<int>(CEntityList + m_fFlags);
Posi[0] = Mem.Read<float>(CEntityList + vecOrigin);
Posi[1] = Mem.Read<float>(CEntityList + vecOrigin + 0x4);
Posi[2] = Mem.Read<float>(CEntityList + vecOrigin + 0x8);
Angle[0] = Mem.Read<float>(Client + ViewAngle);
Angle[1] = Mem.Read<float>(Client + ViewAngle + 0x4);
Angle[2] = Mem.Read<float>(Client + ViewAngle + 0x8);
}
}EnemyPlayer[32];

// math.h - Author Unknown
#pragma once
#define M_RADPI 57.295779513082f
#define M_PI 3.14159265358979323846
#define M_PI_F ((float)(M_PI))
#define SQUARE( a ) a*a
#define DEG2RAD( x ) ( (float)(x) * (float)( M_PI_F / 180.f ) )
#define RAD2DEG( x ) ( (float)(x) * (float)( 180.f/M_PI_F ) )
double inline __declspec ( naked ) __fastcall FastSQRT( double n )
{
_asm fld qword ptr[ esp + 4 ]
_asm fsqrt
_asm ret 8
}
class Vector3
{
public:
float x, y, z;
Vector3()
{
x = y = z = 0.0f;
}
Vector3( float X, float Y, float Z )
{
x = X; y = Y; z = Z;
}
Vector3( float XYZ )
{
x = XYZ; y = XYZ; z = XYZ;
}
Vector3( float* v )
{
x = v[ 0 ]; y = v[ 1 ]; z = v[ 2 ];
}
Vector3( const float* v )
{
x = v[ 0 ]; y = v[ 1 ]; z = v[ 2 ];
}
inline Vector3& operator=( const Vector3& v )
{
x = v.x; y = v.y; z = v.z; return *this;
}
inline Vector3& operator=( const float* v )
{
x = v[ 0 ]; y = v[ 1 ]; z = v[ 2 ]; return *this;
}
inline float& operator[]( int i )
{
return ( ( float* )this )[ i ];
}
inline float operator[]( int i ) const
{
return ( ( float* )this )[ i ];
}
inline Vector3& operator+=( const Vector3& v )
{
x += v.x; y += v.y; z += v.z; return *this;
}
inline Vector3& operator-=( const Vector3& v )
{
x -= v.x; y -= v.y; z -= v.z; return *this;
}
inline Vector3& operator*=( const Vector3& v )
{
x *= v.x; y *= v.y; z *= v.z; return *this;
}
inline Vector3& operator/=( const Vector3& v )
{
x /= v.x; y /= v.y; z /= v.z; return *this;
}
inline Vector3& operator+=( float v )
{
x += v; y += v; z += v; return *this;
}
inline Vector3& operator-=( float v )
{
x -= v; y -= v; z -= v; return *this;
}
inline Vector3& operator*=( float v )
{
x *= v; y *= v; z *= v; return *this;
}
inline Vector3& operator/=( float v )
{
x /= v; y /= v; z /= v; return *this;
}
inline Vector3 operator-( ) const
{
return Vector3( -x, -y, -z );
}
inline Vector3 operator+( const Vector3& v ) const
{
return Vector3( x + v.x, y + v.y, z + v.z );
}
inline Vector3 operator-( const Vector3& v ) const
{
return Vector3( x - v.x, y - v.y, z - v.z );
}
inline Vector3 operator*( const Vector3& v ) const
{
return Vector3( x * v.x, y * v.y, z * v.z );
}
inline Vector3 operator/( const Vector3& v ) const
{
return Vector3( x / v.x, y / v.y, z / v.z );
}
inline Vector3 operator+( float v ) const
{
return Vector3( x + v, y + v, z + v );
}
inline Vector3 operator-( float v ) const
{
return Vector3( x - v, y - v, z - v );
}
inline Vector3 operator*( float v ) const
{
return Vector3( x * v, y * v, z * v );
}
inline Vector3 operator/( float v ) const
{
return Vector3( x / v, y / v, z / v );
}
inline float Length() const
{
return sqrtf( x * x + y * y + z * z );
}
inline float LengthSqr() const
{
return ( x * x + y * y + z * z );
}
inline float LengthXY() const
{
return sqrtf( x * x + y * y );
}
inline float LengthXZ() const
{
return sqrtf( x * x + z * z );
}
inline float DistTo( const Vector3& v ) const
{
return ( *this - v ).Length();
}
inline float Dot( const Vector3& v ) const
{
return ( x * v.x + y * v.y + z * v.z );
}
inline Vector3 Cross( const Vector3& v ) const
{
return Vector3( y * v.z - z * v.y, z * v.x - x * v.z, x * v.y - y * v.x );
}
inline bool IsZero() const
{
return ( x > -0.01f && x < 0.01f
&& y > -0.01f && y < 0.01f
&& z > -0.01f && z < 0.01f );
}
};
class Matrix4x4
{
public:
union
{
struct
{
float _11, _12, _13, _14;
float _21, _22, _23, _24;
float _31, _32, _33, _34;
float _41, _42, _43, _44;
};
float m[ 4 ][ 4 ];
float mm[ 16 ];
struct
{
__m128 m1, m2, m3, m4;
};
};
inline void Transpose()
{
for( int i = 0; i < 4; i++ )
{
for( int j = 0; j < 4; j++ )
{
m[ i ][ j ] = m[ j ][ i ];
}
}
}
inline Vector3& GetAxis( int i )
{
return *( Vector3* )&m[ i ][ 0 ];
}
};
class Matrix3x4
{
public:
union
{
struct
{
float _11, _12, _13, _14;
float _21, _22, _23, _24;
float _31, _32, _33, _34;
};
float m[ 3 ][ 4 ];
float mm[ 12 ];
};
inline Vector3& GetAxis( int i )
{
return *( Vector3* )&m[ i ][ 0 ];
}
};
class Math
{
public:
Math()
{
srand( time( NULL ) );
}
void inline SinCos( float radians, float *sine, float *cosine )
{
_asm
{
fld DWORD PTR[ radians ]
fsincos
mov edx, DWORD PTR[ cosine ]
mov eax, DWORD PTR[ sine ]
fstp DWORD PTR[ edx ]
fstp DWORD PTR[ eax ]
}
*sine = sin( radians );
*cosine = cos( radians );
}
void AngleVectors( const Vector3 &angles, Vector3 *forward )
{
float sr, sp, sy, cr, cp, cy;
SinCos( DEG2RAD( angles[ 0 ] ), &sy, &cy );
SinCos( DEG2RAD( angles[ 1 ] ), &sp, &cp );
SinCos( DEG2RAD( angles[ 2 ] ), &sr, &cr );
if( forward )
{
forward->x = cp*cy;
forward->y = cp*sy;
forward->z = -sp;
}
}
void AngleVectors( const Vector3 &angles, Vector3 *forward, Vector3 *right, Vector3 *up )
{
float sr, sp, sy, cr, cp, cy;
SinCos( DEG2RAD( angles[ 0 ] ), &sy, &cy );
SinCos( DEG2RAD( angles[ 1 ] ), &sp, &cp );
SinCos( DEG2RAD( angles[ 2 ] ), &sr, &cr );
if( forward )
{
forward->x = cp*cy;
forward->y = cp*sy;
forward->z = -sp;
}
if( right )
{
right->x = ( -1 * sr*sp*cy + -1 * cr*-sy );
right->y = ( -1 * sr*sp*sy + -1 * cr*cy );
right->z = -1 * sr*cp;
}
if( up )
{
up->x = ( cr*sp*cy + -sr*-sy );
up->y = ( cr*sp*sy + -sr*cy );
up->z = cr*cp;
}
}
float DotProduct( Vector3 &v1, float* v2 )
{
return v1.x*v2[ 0 ] + v1.y*v2[ 1 ] + v1.z*v2[ 2 ];
}
float Dot( const Vector3 &v1, Vector3 &v2 )
{
return v1[ 0 ] * v2[ 0 ] + v1[ 1 ] * v2[ 1 ] + v1[ 2 ] * v2[ 2 ];
}
void VectorTransform( Vector3 &in1, Matrix3x4& in2, Vector3 &out )
{
out.x = DotProduct( in1, in2.m[ 0 ] ) + in2.m[ 0 ][ 3 ];
out.y = DotProduct( in1, in2.m[ 1 ] ) + in2.m[ 1 ][ 3 ];
out.z = DotProduct( in1, in2.m[ 2 ] ) + in2.m[ 2 ][ 3 ];
}
float VecLength( Vector3& vec )
{
return FastSQRT( vec.x * vec.x + vec.y * vec.y + vec.z * vec.z );
}
float VecDist( Vector3& fVec1, Vector3& fVec2 )
{
return FastSQRT( pow( fVec1.x - fVec2.x, 2 ) + pow( fVec1.y - fVec2.y, 2 ) + pow( fVec1.z - fVec2.z, 2 ) );
}
float GetFov( Vector3 angle, Vector3 src, Vector3 dst )
{
Vector3 ang, aim;
ang = CalcAngle( src, dst );
MakeVector( angle, aim );
MakeVector( ang, ang );
float mag = FastSQRT( pow( aim.x, 2 ) + pow( aim.y, 2 ) + pow( aim.z, 2 ) );
float u_dot_v = Dot( aim, ang );
return RAD2DEG( acos( u_dot_v / ( pow( mag, 2 ) ) ) );
}
Vector3 CalcAngle( Vector3 PlayerPos, Vector3 EnemyPos )
{
Vector3 AimAngles;
Vector3 delta = PlayerPos - EnemyPos;
float hyp = FastSQRT( ( delta.x * delta.x ) + ( delta.y * delta.y ) ); //SUPER SECRET IMPROVEMENT CODE NAME DONUT STEEL
AimAngles.x = atanf( delta.z / hyp ) * M_RADPI;
AimAngles.y = atanf( delta.y / delta.x ) * M_RADPI;
AimAngles.z = 0.0f;
if( delta.x >= 0.0 )
AimAngles.y += 180.0f;
return AimAngles;
}
void VectorAngles( const Vector3& dir, Vector3 &angles )
{
float hyp = FastSQRT( ( dir.x * dir.x ) + ( dir.y * dir.y ) ); //SUPER SECRET IMPROVEMENT CODE NAME DONUT STEEL
angles.x = atanf( dir.z / hyp ) * M_RADPI;
angles.y = atanf( dir.y / dir.x ) * M_RADPI;
angles.z = 0.0f;
if( dir.x >= 0.0 )
angles.y += 180.0f;
}
void ClampAngle( Vector3& angles )
{
if( angles.x < -89.0f )
angles.x = 89.0f;
if( angles.x > 89.0f )
angles.x = 89.0f;
if( angles.y < -180.0f )
angles.y += 360.0f;
if( angles.y > 180.0f )
angles.y -= 360.0f;
if( angles.z != 0.0f )
angles.z = 0.0f;
}
void VectorNormalize( Vector3& v )
{
float l = VecLength( v );
if( l != 0.0f )
{
v /= l;
}
else
{
v.x = v.y = 0.0f; v.z = 1.0f;
}
}
void SmoothAngle( Vector3& ViewAngle, Vector3& DestAngles, float smooth )
{
Vector3 vecDelta = ViewAngle - DestAngles;
ClampAngle( vecDelta );
DestAngles = ViewAngle - vecDelta / 100.0f * smooth; // 50.0f is ur smooth value
}
void MakeVector( Vector3 angle, Vector3& vector )
{
float pitch = float( angle[ 0 ] * M_PI / 180 );
float yaw = float( angle[ 1 ] * M_PI / 180 );
float tmp = float( cos( pitch ) );
vector[ 0 ] = float( -tmp * -cos( yaw ) );
vector[ 1 ] = float( sin( yaw )*tmp );
vector[ 2 ] = float( -sin( pitch ) );
}
Vector3 AngleToDirection( Vector3 angle )
{
// Convert angle to radians
angle.x = ( float )DEG2RAD( angle.x );
angle.y = ( float )DEG2RAD( angle.y );
float sinYaw = sin( angle.y );
float cosYaw = cos( angle.y );
float sinPitch = sin( angle.x );
float cosPitch = cos( angle.x );
Vector3 direction;
direction.x = cosPitch * cosYaw;
direction.y = cosPitch * sinYaw;
direction.z = -sinPitch;
return direction;
}
void VectorITransform( Vector3& in1, const Matrix3x4& in2, Vector3& out )
{
float in1t[ 3 ];
in1t[ 0 ] = in1.x - in2.m[ 0 ][ 3 ];
in1t[ 1 ] = in1.y - in2.m[ 1 ][ 3 ];
in1t[ 2 ] = in1.z - in2.m[ 2 ][ 3 ];
out.x = in1t[ 0 ] * in2.m[ 0 ][ 0 ] + in1t[ 1 ] * in2.m[ 1 ][ 0 ] + in1t[ 2 ] * in2.m[ 2 ][ 0 ];
out.y = in1t[ 0 ] * in2.m[ 0 ][ 1 ] + in1t[ 1 ] * in2.m[ 1 ][ 1 ] + in1t[ 2 ] * in2.m[ 2 ][ 1 ];
out.z = in1t[ 0 ] * in2.m[ 0 ][ 2 ] + in1t[ 1 ] * in2.m[ 1 ][ 2 ] + in1t[ 2 ] * in2.m[ 2 ][ 2 ];
}
void VectorIRotate( Vector3& in1, const Matrix3x4& in2, Vector3& out )
{
out.x = in1.x*in2.m[ 0 ][ 0 ] + in1.y*in2.m[ 1 ][ 0 ] + in1.z*in2.m[ 2 ][ 0 ];
out.y = in1.x*in2.m[ 0 ][ 1 ] + in1.y*in2.m[ 1 ][ 1 ] + in1.z*in2.m[ 2 ][ 1 ];
out.z = in1.x*in2.m[ 0 ][ 2 ] + in1.y*in2.m[ 1 ][ 2 ] + in1.z*in2.m[ 2 ][ 2 ];
}
};
Aimbot for loop iteration 1
CloseEnt for loop iteration 1
CloseEnt for loop iteration 2
CloseEnt for loop iteration 3
.....................................
CloseEnt for loop iteration 32
Aimbot for loop iteration 2
CloseEnt for loop iteration 1
CloseEnt for loop iteration 2
CloseEnt for loop iteration 3
.....................................
CloseEnt for loop iteration 32
..................................
Aimbot for loop iteration 32
CloseEnt for loop iteration 1
CloseEnt for loop iteration 2
CloseEnt for loop iteration 3
.....................................
CloseEnt for loop iteration 32
Return out of Aimbot for other stuff ( bunnyhop, glow or whatever if in the same thread )
void Aimbot() {
if (GetAsyncKeyState(VK_MBUTTON))
{
int Index = CloseEnt();
EnemyPlayer[Index].ReadInfo(Index);
int LocalPlayerIndex = 0; // Get the index of your LocalPlayer here.
EnemyPlayer[LocalPlayerIndex].ReadInfo(LocalPlayerIndex);
CalcAngle(EnemyPlayer[LocalPlayerIndex].Posi, EnemyPlayer[Index].Posi, EnemyPlayer[Index].Angle, EnemyPlayer[Index].Flags);
Mem.Write<float>(dwAngPtr + 0x4C88, EnemyPlayer[Index].Angle[0]);
Mem.Write<float>(dwAngPtr + 0x4C8C, EnemyPlayer[Index].Angle[1]);
}
}
void Aimbot()
{
if (GetAsyncKeyState(VK_MBUTTON))
{
int Index = CloseEnt();
EnemyPlayer[Index].ReadInfo(Index);
int LocalPlayerIndex = 0x178; // Get the index of your LocalPlayer here.
EnemyPlayer[LocalPlayerIndex].ReadInfo(LocalPlayerIndex);
CalcAngle(EnemyPlayer[LocalPlayerIndex].Posi, EnemyPlayer[Index].Posi, EnemyPlayer[Index].Angle, EnemyPlayer[Index].Flags);
Mem.Write<float>(dwAngPtr + 0x4C88, EnemyPlayer[Index].Angle[0]);
Mem.Write<float>(dwAngPtr + 0x4C8C, EnemyPlayer[Index].Angle[1]);
}
}
struct EnemyPlayer_t
{
uintptr_t CEntityList;
int Health;
int TeamNum;
int Dormant;
int ArmorValueInt;
int Flags;
float Posi[3];
float Angle[3];
void ReadInfo(int _pInfo) {
CEntityList = Mem.Read<uintptr_t>(Client + EntityList + (_pInfo * 0x10));
Health = Mem.Read<int>(CEntityList + iHealth);
TeamNum = Mem.Read<int>(CEntityList + iTeamNum);
ArmorValue = Mem.Read<int>(CEntityList + ArmorValue);
Dormant = Mem.Read<int>(CEntityList + IsDormant);
Flags = Mem.Read<int>(CEntityList + m_fFlags);
Posi[0] = Mem.Read<float>(CEntityList + vecOrigin);
Posi[1] = Mem.Read<float>(CEntityList + vecOrigin + 0x4);
Posi[2] = Mem.Read<float>(CEntityList + vecOrigin + 0x8);
Angle[0] = Mem.Read<float>(Client + ViewAngle);
Angle[1] = Mem.Read<float>(Client + ViewAngle + 0x4);
Angle[2] = Mem.Read<float>(Client + ViewAngle + 0x8);
}
}EnemyPlayer[32];
int LocalPlayerIndex = 0x178; // Get the index of your LocalPlayer here. EnemyPlayer[LocalPlayerIndex].ReadInfo(LocalPlayerIndex);
void Aimbot()
{
if (GetAsyncKeyState(VK_MBUTTON))
{
int Index = CloseEnt();
EnemyPlayer[Index].ReadInfo(Index);
dwAngPtr = Mem.Read<float>(Engine + ClientState);
int LocalPlayerIndex = Mem.Read<int>(ClientState + 0x178); // Get the index of your LocalPlayer here.
EnemyPlayer[LocalPlayerIndex].ReadInfo(LocalPlayerIndex);
CalcAngle(EnemyPlayer[LocalPlayerIndex].Posi, EnemyPlayer[Index].Posi, EnemyPlayer[Index].Angle, EnemyPlayer[Index].Flags);
Mem.Write<float>(dwAngPtr + 0x4C88, EnemyPlayer[Index].Angle[0]);
Mem.Write<float>(dwAngPtr + 0x4C8C, EnemyPlayer[Index].Angle[1]);
}
struct EnemyPlayer_t
{
uintptr_t CEntityList;
int Health;
int TeamNum;
int Dormant;
int ArmorValueInt;
int Flags;
float Posi[3];
float Angle[3];
void ReadInfo(int _pInfo) {
CEntityList = Mem.Read<uintptr_t>(Client + EntityList + (_pInfo * 0x10));
Health = Mem.Read<int>(CEntityList + iHealth);
TeamNum = Mem.Read<int>(CEntityList + iTeamNum);
ArmorValue = Mem.Read<int>(CEntityList + ArmorValue);
Dormant = Mem.Read<int>(CEntityList + IsDormant);
Flags = Mem.Read<int>(CEntityList + m_fFlags);
Posi[0] = Mem.Read<float>(CEntityList + vecOrigin);
Posi[1] = Mem.Read<float>(CEntityList + vecOrigin + 0x4);
Posi[2] = Mem.Read<float>(CEntityList + vecOrigin + 0x8);
Angle[0] = Mem.Read<float>(Client + ViewAngle);
Angle[1] = Mem.Read<float>(Client + ViewAngle + 0x4);
Angle[2] = Mem.Read<float>(Client + ViewAngle + 0x8);
}
}EnemyPlayer[32];
void Aimbot()
{
if (GetAsyncKeyState(VK_MBUTTON))
{
int Index = CloseEnt();
EnemyPlayer[Index].ReadInfo(Index);
dwAngPtr = Mem.Read<float>(Engine + ClientState);
int LocalPlayerIndex = Mem.Read<int>(dwAngPtr + 0x178) - 1; // Get the index of your LocalPlayer here.
EnemyPlayer[LocalPlayerIndex].ReadInfo(LocalPlayerIndex);
CalcAngle(EnemyPlayer[LocalPlayerIndex].Posi, EnemyPlayer[Index].Posi, EnemyPlayer[Index].Angle, EnemyPlayer[Index].Flags);
Mem.Write<float>(dwAngPtr + 0x4C88, EnemyPlayer[Index].Angle[0]);
Mem.Write<float>(dwAngPtr + 0x4C8C, EnemyPlayer[Index].Angle[1]);
}
}
#include <windows.h>
#include <d3d9.h>
#include "Offsets.h"
#include "ProcMem.h"
#include <iostream>
#include <d3dx9.h>
#include <Dwmapi.h>
#include <TlHelp32.h>
#include <cstdlib>
#pragma once
void Triggerbot()
{
if (Trigger)
{
int RandomDelay = rand() % 100 + 1;
if ((inCross > 0 && inCross <= 64) && Triggerbot_Entity_TeamID != Local_Player_Team)
{
if (TriggerKey)
{
if (GetAsyncKeyState(VK_MBUTTON) & 0x8000)
{
if (RandomDelayEnabled)
Sleep(RandomDelay);
Mem.Write<int>(Client + attack, 1);
Sleep(10);
Mem.Write<int>(Client + attack, 0);
}
}
else {
if (RandomDelayEnabled)
Sleep(RandomDelay);
Mem.Write<int>(Client + attack, 1);
Sleep(10);
Mem.Write<int>(Client + attack, 0);
}
}
}
Sleep(1);
}
#pragma once
#include "Offsets.h"
#include "hDirectX.h"
#include <math.h>
//AIM
float Get3D1(float X, float Y, float Z, float eX, float eY, float eZ)
{
return(sqrtf((eX - X) * (eX - X) + (eY - Y) * (eY - Y) + (eZ - Z) * (eZ - Z)));
}
float CloseEnt()
{
//Variables
float fLowest = 100000, TMP;
int iIndex;
for (int i = 0; i < 32; i++)
{
EnemyPlayer[i].ReadInfo(i);
//Store Distances In Array
TMP = Get3D1(EnemyPlayer[0].Posi[0], EnemyPlayer[0].Posi[1], EnemyPlayer[0].Posi[2], EnemyPlayer[i].Posi[0], EnemyPlayer[i].Posi[1], EnemyPlayer[i].Posi[2]);
//If Enemy Has Lower Distance The Player 1, Replace (var)Lowest With Current Enemy Distance
if (TMP < fLowest && EnemyPlayer[i].Health != 0)
{
fLowest = TMP;
iIndex = i;
}
}
return iIndex;
}
void CalcAngle(float *src, float *dst, float *angles, int fFlags)
{
double delta[3] = { (src[0] - dst[0]), (src[1] - dst[1]), (src[2] - dst[2]) };
double hyp = sqrt(delta[0] * delta[0] + delta[1] * delta[1]);
angles[0] = (float)(asinf(delta[2] / hyp) * 57.295779513082f);
angles[1] = (float)(atanf(delta[1] / delta[0]) * 57.295779513082f);
angles[2] = 0.0f;
if (delta[0] >= 0.0)
{
angles[1] += 180.0f;
}
if (fFlags == 775)
angles[0] = angles[0] + 5;
}
void Aimbot()
{
if (GetAsyncKeyState(VK_LSHIFT))
{
int Index = CloseEnt();
EnemyPlayer[Index].ReadInfo(Index);
dwAngPtr = Mem.Read<float>(Engine + ClientState);
int LocalPlayerIndex = Mem.Read<int>(dwAngPtr + 0x178) - 1; // Get the index of your LocalPlayer here.
EnemyPlayer[LocalPlayerIndex].ReadInfo(LocalPlayerIndex);
CalcAngle(EnemyPlayer[LocalPlayerIndex].Posi, EnemyPlayer[Index].Posi, EnemyPlayer[Index].Angle, EnemyPlayer[Index].Flags);
Mem.Write<float>(dwAngPtr + 0x4C88, EnemyPlayer[Index].Angle[0]);
Mem.Write<float>(dwAngPtr + 0x4C8C, EnemyPlayer[Index].Angle[1]);
}
}
#pragma once
#include <windows.h>
#include "ProcMem.h"
ProcMem Mem;
/* Changing */
DWORD LocalPlayer = 0x00A844DC;
DWORD EntityList = 0x04A9F8D4;
DWORD GlowObjectBase = 0x04FB576C;
DWORD attack = 0x02EDF8D0;
DWORD jump = 0x04F34C68;
DWORD sensitivity = 0x00A89CE4;
DWORD ViewAngle = 0x4D0C;
DWORD Mouse = 0x00A89D40;
DWORD ClientState = 0x00610344;
DWORD ViewMatrix = 0x4A91464; // ViewMatrix offset
DWORD iHealth = 0xFC; // iHealth offset [Always: 0xFC]
DWORD iTeamNum = 0xF0; // Team offset [Always: 0xF0]
DWORD ArmorValue = 0xA9E8; // Armor Value [Cuz cool?]
DWORD IsDormant = 0xE9; // Is dormant or na? [Always: 0xE9]
DWORD vecOrigin = 0x134;// vecOrigin offset [Always: 0x134];
/* Constant */
DWORD LocalPlayerIndex_a = 0x178;
DWORD m_iCrossHairID = 0xAA44;
DWORD m_iTeamNum = 0xF0;
DWORD m_fFlags = 0x100;
DWORD GlowIndex = 0xA310;
DWORD isDormant = 0xE9;
DWORD bSpotted = 0x939;
DWORD bSpottedByMask = 0x97C;
DWORD FlashMaxAlpha = 0xA2F4;
DWORD dw_EntityLoopDistance = 0x10;
DWORD dw_healthOffset = 0xFC;
DWORD m_vecOrigin = 0x134;
DWORD m_iFOV = 0x31C8;
DWORD punch = 0x300C;
DWORD DrawViewmodel = 0x3033;
DWORD ZoomLevel = 0x3330;
DWORD WeaponID = 0x0030;
DWORD EnginePosition = 0x006BEB3C;
float dwAngPtr;
DWORD EnginePointer;
DWORD VectorPunch;
bool AimbotMenu = false;
bool VisualsMenu = true;
bool OtherMenu = false;
bool OptionsMenu = false;
int menux = 100;
int menuy = 100;
int MenuR = 26;
int MenuG = 184;
int MenuB = 237;
int AccentR = 17;
int AccentG = 17;
int AccentB = 17;
bool MenuSelectR = true;
bool MenuSelectG = false;
bool MenuSelectB = false;
bool Trigger = false;
bool bhop = false;
bool GlowESPEnabled = false;
bool SlowAimEnabled = false;
bool NoFlashEnabled = false;
bool RadarEnabled = false;
bool FirstScan = true;
bool DrawCrosshair = false;
bool FovEnabled = false;
bool RandomDelayEnabled = false;
bool TriggerKey = false;
bool RCSEnabled = false;
bool AutoShootEnabled = false;
bool RainbowMenu = false;
bool RainbowCrosshair = false;
bool BoxESPEnabled = false;
bool SnapLinesEnabled = false;
bool AimbotEnabled = false;
bool SpottedCrosshair = false;
int IdleCrossR = 237;
int IdleCrossG = 184;
int IdleCrossB = 26;
int SpottedCrossR = 26;
int SpottedCrossG = 184;
int SpottedCrossB = 237;
int SnapEnemyR = 255;
int SnapEnemyG = 0;
int SnapEnemyB = 0;
int SnapTeamR = 0;
int SnapTeamG = 255;
int SnapTeamB = 0;
bool BoxRSelected = true;
bool BoxGSelected = false;
bool BoxBSelected = false;
int BoxR = 255;
int BoxG = 0;
int BoxB = 0;
bool SpottedR = true;
bool SpottedG = false;
bool SpottedB = false;
bool IdleR = true;
bool IdleG = false;
bool IdleB = false;
bool TeamCRed = false;
bool TeamCGreen = true;
bool TeamCBlue = false;
bool TeamCYellow = false;
bool TeamCOrange = false;
bool TeamCPurple = false;
bool TeamCWhite = false;
bool TeamCMint = false;
bool TeamCSkyBlue = false;
bool TeamCHotPink = false;
bool EnemyCRed = true;
bool EnemyCGreen = false;
bool EnemyCBlue = false;
bool EnemyCYellow = false;
bool EnemyCOrange = false;
bool EnemyCPurple = false;
bool EnemyCWhite = false;
bool EnemyCMint = false;
bool EnemyCSkyBlue = false;
bool EnemyCHotPink = false;
#define PI 3.14159265//Defining what PI is. PI is a Circle
int CenterX = GetSystemMetrics(0) / 2 - 1;//Gets screen X resolution then cutting it in half to ##### the center.
int CenterY = GetSystemMetrics(1) / 2 - 1;//Gets screen Y resolution then cutting it in half to ##### the center.
struct GlowStruct
{
float r; // Red
float g; // Green
float b; // Blue
int a; // Alpha
bool rwo; // RenderWhenOccluded
bool rwuo; // RenderWhenUnoccluded
};
int Current_Player_GlowIndex;
int Current_Player_Team;
DWORD Client;
DWORD Engine;
DWORD LocalBase;
DWORD GlowPointer;
int Local_Player_Team;
int inCross;
DWORD Trigger_EntityBase;
int Triggerbot_Entity_TeamID;
DWORD Crosshair_EntityBase;
int Crosshair_Entity_TeamID;
DWORD SlowAim_EntityBase;
int SlowAim_Entity_TeamID;
float Flash_Max_Alpha;
int FOV = 100;
int MySensitivity;
DWORD Current_Player;
bool Current_Player_Dormant;
DWORD G_Current_Player;
bool G_Current_Player_Spotted;
bool SeeMenu = true;
struct SimplePlayer_t
{
uintptr_t pLocal;
int Health;
int TeamNum;
int Dormant;
int ArmorValueInt;
float Posi[3];
void ReadInfo() {
pLocal = Mem.Read<uintptr_t>(Client + LocalPlayer);
Health = Mem.Read<int>(pLocal + iHealth);
TeamNum = Mem.Read<int>(pLocal + iTeamNum);
ArmorValue = Mem.Read<int>(pLocal + ArmorValue);
Dormant = Mem.Read<int>(pLocal + IsDormant);
Posi[0] = Mem.Read<float>(pLocal + vecOrigin);
Posi[1] = Mem.Read<float>(pLocal + vecOrigin + 0x4);
Posi[2] = Mem.Read<float>(pLocal + vecOrigin + 0x8);
Posi[3] = Mem.Read<float>(pLocal + vecOrigin + 0x8);
}
}SimplePlayer;
typedef struct
{
float flMatrix[4][4];
}WorldToScreenMatrix_t;
struct EnemyPlayer_t
{
uintptr_t CEntityList;
int Health;
int TeamNum;
int Dormant;
int ArmorValueInt;
int Flags;
float Posi[3];
float Angle[3];
void ReadInfo(int _pInfo) {
CEntityList = Mem.Read<uintptr_t>(Client + EntityList + (_pInfo * 0x10));
Health = Mem.Read<int>(CEntityList + iHealth);
TeamNum = Mem.Read<int>(CEntityList + iTeamNum);
ArmorValue = Mem.Read<int>(CEntityList + ArmorValue);
Dormant = Mem.Read<int>(CEntityList + IsDormant);
Flags = Mem.Read<int>(CEntityList + m_fFlags);
Posi[0] = Mem.Read<float>(CEntityList + vecOrigin);
Posi[1] = Mem.Read<float>(CEntityList + vecOrigin + 0x4);
Posi[2] = Mem.Read<float>(CEntityList + vecOrigin + 0x8);
Angle[0] = Mem.Read<float>(Client + ViewAngle);
Angle[1] = Mem.Read<float>(Client + ViewAngle + 0x4);
Angle[2] = Mem.Read<float>(Client + ViewAngle + 0x8);
}
}EnemyPlayer[32];
RECT m_Rect;
RECT OurWindow;
RECT OurWindow1;