Aimbot / Recoil Control / Triggerbot

Posts 115 of 17 · Page 1 of 2
Aimbot / Recoil Control / Triggerbot
This is Aimbot, Recoil Control and Triggerbot source code. So people that want to make a hack themselves can go off this for help. Enjoy!

Edit: To clarify; this is not my work this is from T_T 3.0 Beta


Aimbot C++ Source


Code:
#include "AimBot.h"
#include "Process.h"
#include "Entity.h"
#include "MyWindow.h"
CAimBot* AimBot = new CAimBot;
//char *AimBonesNames[4] = { "Head", "Neck", "Chest", "Stomach"};
//_OnceXOR("Head"), _OnceXOR("Neck"), _OnceXOR("Chest"), _OnceXOR("Stomach")
CAimBot::CAimBot()
{
}


CAimBot::~CAimBot()
{
}


int CAimBot::AimBonesTable[4] = { 10, 5, 4, 2 };

int CAimBot::SleepTime = 10;
int CAimBot::HotKey = 0x06;//0x2;
int CAimBot::FOV = 5;//15;
int CAimBot::TargetID = -1;
int CAimBot::LastTarget = -1;
int CAimBot::PredictMovment = 17;
int CAimBot::AimBoneID = 10;
int CAimBot::AimBoneIndex = 0;

Bones CAimBot::AimBone;
float CAimBot::DistanceFromCrosshair = 99999;
float CAimBot::Distance = 99999;
float CAimBot::ClosestDistance = 99999;
float CAimBot::m_Ingamesensitivity = 2.0;
float CAimBot::RadiusX = 0;
float CAimBot::RadiusY = 0;
float CAimBot::Radius = 0;
float CAimBot::m_XMultiplayer = 2.0;
float CAimBot::m_YMultiplayer = 2.0;
float CAimBot::BustSpeed = 1.0;
float CAimBot::Pixels = 0;
float CAimBot::Smooth = 1.0;
float CAimBot::StopAimingAtDistance = 0;

float CAimBot::Imprecise = 0;
float CAimBot::ImpreciseX = 0;
float CAimBot::ImpreciseY = 0;
float CAimBot::LastImpreciseX = 0;
float CAimBot::LastImpreciseY = 0;
clock_t CAimBot::flTargetTime;
clock_t CAimBot::LastRandomMove;
float CAimBot::MaxRandTime = 100;
float CAimBot::AdditionalTime = 20;
float CAimBot::RandomMultiplier = 1.5;
float CAimBot::RandomX = 1.5;
float CAimBot::RandomY = 1.5;
bool CAimBot::bRandomMoves = false;
bool CAimBot::StopRandomMovesWhenShooting = true;

bool CAimBot::Active = false;
bool CAimBot::AimOnClosestToPlayer = false;
bool CAimBot::AimOnClosestToCrosshair = true;
bool CAimBot::LockOnTarget = false;
bool CAimBot::DrawFOV = true;//false;
bool CAimBot::bRage = false;//true;
bool CAimBot::DontLockNext = false;
bool CAimBot::FocusOnlySpotted = false;

Vector3D CAimBot::AimPosition;
Vector3D CAimBot::Diffrnce;

clock_t CAimBot::AimbotStartTime = 0;
int CAimBot::StopAimbotAfterXMS = 0;
//bool CAimBot::StopAimbotAfterXMS;



Color CAimBot::FovColor = Color((float)120 / (float)255, (float)0 / (float)255, (float)125 / (float)255, (float)0 / (float)255);


void CAimBot::DropTarget()
{
	TargetID = -1;
	ClosestDistance = Distance = 99999;
	DistanceFromCrosshair = 99999;
}

void CAimBot::GetBestTarget()
{
	//if (TargetID == -1)
	//{
	AimBoneID = AimBonesTable[AimBoneIndex];
	for (int i = 0; i < GlobalVariables::MaxPlayers; i++)
	{
		if (!Entity[i].Valid)
			continue;

		if (!Entity[i].ValidBones)
			continue;

		if (FocusOnlySpotted)
		{
			if (Entity[i].Spotted == false)
				continue;
		}

		if (Entity[i].Team == LocalPlayer->Team)
			continue;
		if (Entity[i].IsLocalPlayer == true)
			continue;

		if (!Entity[i].Bone[AimBoneID].IsOnScreen)
			continue;

		DistanceFromCrosshair = Get3dDistance(Vector3D{ Entity[i].Bone[AimBoneID].PositionOnScreen.x, Entity[i].Bone[AimBoneID].PositionOnScreen.y, 0 }, Vector3D{ (float)(CMyWindow::Width / 2), (float)(CMyWindow::Height / 2), 0 });
		if (AimOnClosestToCrosshair)
			Distance = DistanceFromCrosshair;
		else
			Distance = Entity[i].Distance;

		if (DistanceFromCrosshair <= Radius)
		{
			if (Distance < ClosestDistance)
			{
				ClosestDistance = Distance;
				TargetID = i;
			}
		}

	}
	//}
}

void CAimBot::CheckFov()
{
	/*
	float fov = 0.0f, mag = 0.0f, dot = 0.0f;
	QAngle ang, aim;
	gUtil.calcAngles(source, dest, ang);
	makeVector(angle, aim);
	makeVector(ang, ang);
	mag = sqrt(aim[0] * aim[0] + aim[1] * aim[1] + aim[2] * aim[2]);
	dot = aim[0] * ang[0] + aim[1] * ang[1] + aim[2] * ang[2];
	fov = acos(dot / (mag * mag)) * 57.2957914;
	return fov;
	*/
}

void CAimBot::Rage()
{
	Vector3D TempAimpos = AimPosition;

	TempAimpos.x /= Pixels*(-1.0);
	TempAimpos.y /= Pixels;

	if (TempAimpos.x > 1 || TempAimpos.x < -1)
		AimPosition.x = TempAimpos.x;
	else
		AimPosition.x /= -0.22;

	if (TempAimpos.y > 1 || TempAimpos.y < -1)
		AimPosition.y = TempAimpos.y;
	else
		AimPosition.y /= 0.22;

	if (AimPosition.x > -120 && AimPosition.x  < 120 && AimPosition.y > -120 && AimPosition.y < 120)
	{
		MouseMove(AimPosition.y, AimPosition.x);
	}
}

void CAimBot::Custom()
{
	DistanceFromCrosshair = Get3dDistance(Vector3D{ Entity[TargetID].Bone[AimBoneID].PositionOnScreen.x, Entity[TargetID].Bone[AimBoneID].PositionOnScreen.y, 0 }, Vector3D{ (float)(CMyWindow::Width / 2), (float)(CMyWindow::Height / 2), 0 });
	if (DistanceFromCrosshair  < StopAimingAtDistance)
		return;

	if (AimPosition.x > Smooth)
		AimPosition.x = 0 + Smooth;
	else if (AimPosition.x < -Smooth)
		AimPosition.x = 0 - Smooth;

	if (AimPosition.y > Smooth)
		AimPosition.y = 0 + Smooth;
	else if (AimPosition.y < -Smooth)
		AimPosition.y = 0 - Smooth;

	if (bRandomMoves)
		RandomMoves();

	AimPosition.x /= Pixels*(-1.0);
	AimPosition.y /= Pixels;

	MouseMove(AimPosition.y, AimPosition.x);
}


float randMToN(float M, float N)
{
	return M + (rand() / (RAND_MAX / (N - M)));
}

void CAimBot::RandomMoves()
{
	if (StopRandomMovesWhenShooting)
	{
		if (Process->ReadMemory<int>(GlobalVariables::ClientAddress + Offsets::AttackAddres) == 5)
			return;
	}

	if (LastRandomMove + randMToN(0, MaxRandTime) + AdditionalTime < clock())
	{
		float Deviation1 = randMToN(-RandomMultiplier, RandomMultiplier);
		float Devation2 = randMToN(-RandomX, RandomX);
		float Devation3 = randMToN(-RandomY, RandomY);
		switch (rand() % 2)
		{
		case 0:
			ImpreciseX = Deviation1 * cos(Devation2);
			ImpreciseY = Deviation1 * sin(Devation3);
			break;
		case 1:
			ImpreciseX = Deviation1 * sin(Devation2);
			ImpreciseY = Deviation1 * cos(Devation3);
			break;

		}
		LastRandomMove = clock();
	}

	AimPosition.x += ImpreciseX;
	AimPosition.y += ImpreciseY;

}

/*

clock_t CAimBot::AimbotStartTime;
clock_t CAimBot::StopAimbotAfter;
bool CAimBot::StopAimbotAfterXMS;
*/
DWORD WINAPI CAimBot::Run()
{
	while (!GlobalVariables::ExitCheat)
	{
		Sleep(SleepTime);

		if (!Active)
			continue;

		Radius = FOV *(CMyWindow::Height / 90);

		if (HotKey != 0)
		{
			if (!GetAsyncKeyState(HotKey))
			{
				DropTarget();
				AimbotStartTime = 0;
				continue;
			}
			else if(AimbotStartTime == 0)
			{
				AimbotStartTime = clock();
			}
		}
		
		if (StopAimbotAfterXMS != 0 && AimbotStartTime != 0)
		{
			if (AimbotStartTime + StopAimbotAfterXMS < clock())
			{
				//AimbotStartTime = 0;
				continue;
			}
		}
		

		if (DontLockNext == false)
			DropTarget();


		GetBestTarget();
		if (TargetID < 0 || TargetID > GlobalVariables::MaxPlayers)
			continue;
		if (!Entity[TargetID].Valid)
			continue;

		if (TargetID != -1)
		{
			Vector3D BonePred = Entity[TargetID].Bone[AimBoneID].PositionInGame;
			BonePred.x += Entity[TargetID].Velocity.x / PredictMovment;
			BonePred.y += Entity[TargetID].Velocity.y / PredictMovment;
			BonePred.z += Entity[TargetID].Velocity.z / PredictMovment;

			BonePred.z += 1.5;

			CalcAngle(LocalPlayer->EyePos, BonePred, AimPosition);

			if (AimPosition.x < -360 || AimPosition.x > 360)
				continue;

			if (AimPosition.y < -360 || AimPosition.y > 360)
				continue;
			
			AimPosition.x -= m_XMultiplayer*LocalPlayer->Punch.x;
			AimPosition.y -= m_YMultiplayer*LocalPlayer->Punch.y;
			AimPosition.x = LocalPlayer->vViewAngle.x - AimPosition.x;
			AimPosition.y = LocalPlayer->vViewAngle.y - AimPosition.y;

			if (AimPosition.y < -180.0f)
				AimPosition.y += 360.0f;
			if (AimPosition.y > 180.0f)
				AimPosition.y -= 360.0f;

			if (AimPosition.x < -90.0f)
				AimPosition.x += 180.0f;
			if (AimPosition.x > 90.0f)
				AimPosition.x -= 180.0f;

			m_Ingamesensitivity = Process->ReadMemory<float>(GlobalVariables::ClientAddress + Offsets::SensivityAddress);
			Pixels = ((0.22 * m_Ingamesensitivity * 1) / BustSpeed);

			if (bRage)
				Rage();
			else
				Custom();


		}
	}
	ExitThread(0);
}
AimBot C/C++ Header


Code:
#pragma once
#include "Math.h"
#include "Drawings.h"
extern char *AimBonesNames[4];
class CAimBot
{
public:

	static int SleepTime;
	static int HotKey;
	static int TargetID;
	static int LastTarget;
	static int FOV;
	static int PredictMovment;

	static int AimBonesTable[4];
	static int AimBoneID;
	static int AimBoneIndex;

	static clock_t AimbotStartTime;
	static int StopAimbotAfterXMS;
	//static bool StopAimbotAfterXMS;

	static float LastImpreciseY;
	static clock_t flTargetTime;
	static clock_t LastRandomMove;
	static float MaxRandTime;

	static Bones AimBone;
	static float Distance;
	static float DistanceFromCrosshair;
	static float ClosestDistance;
	static float m_Ingamesensitivity;
	static float RadiusX;
	static float RadiusY;
	static float Radius;
	static float m_XMultiplayer;
	static float m_YMultiplayer;
	static float BustSpeed;
	static float Pixels;
	static float Smooth;
	static float StopAimingAtDistance;

	static float Imprecise;
	static float ImpreciseX;
	static float ImpreciseY;
	static float LastImpreciseX;
	static float AdditionalTime;
	static float RandomMultiplier;
	static float RandomX;
	static float RandomY;
	static bool bRandomMoves;
	static bool StopRandomMovesWhenShooting;


	static bool Active;
	static bool IsAiming;
	static bool AimOnClosestToPlayer;
	static bool AimOnClosestToCrosshair;
	static bool LockOnTarget;
	static bool DrawFOV;
	static bool bRage;
	static bool DontLockNext;
	static bool FocusOnlySpotted;


	static Vector3D AimPosition;
	static Vector3D Diffrnce;

	static void GetBestTarget();
	static void DropTarget();
	static void Rage();
	static void Custom();
	static void CheckFov();
	static void RandomMoves();
	static DWORD WINAPI Run();

	static Color FovColor;

	CAimBot();
	~CAimBot();
};
extern CAimBot* AimBot;
RecoilControl C++ Source


Code:
#include "RecoilControl.h"
#include "AimBot.h"
#include "Entity.h"
#include "Process.h"
CRecoilControl* RecoilControl = new CRecoilControl;

CRecoilControl::CRecoilControl()
{
}


CRecoilControl::~CRecoilControl()
{
}

bool CRecoilControl::Active = false;
int CRecoilControl::ShootingState = false;
int CRecoilControl::SleepTime = 2;
Vector3D CRecoilControl::vDelta = Vector3D{ 0, 0, 0 };
Vector3D CRecoilControl::vPunch = Vector3D{ 0, 0, 0 };
Vector3D CRecoilControl::vPrevPunch = Vector3D{ 0, 0, 0 };
float CRecoilControl::m_Yaw = 0.022;
float CRecoilControl::m_Ingamesensitivity = 2.0;
float CRecoilControl::m_Windowssensitivity = 1;
float CRecoilControl::m_XMultiplayer = 1.6;
float CRecoilControl::m_YMultiplayer = 1.8;
int CRecoilControl::RecoilDrawType = 0;
float CRecoilControl::RecoilDrawResolution = 4;

int CRecoilControl::HotKey = VK_F4;
clock_t CRecoilControl::LastKeyPress = 0;

DWORD WINAPI CRecoilControl::Run()
{
	while (true)
	{
		Sleep(SleepTime);
		if (CAimBot::Active && (GetAsyncKeyState(CAimBot::HotKey) || CAimBot::HotKey == 0))
			continue;

		if (GetAsyncKeyState(HotKey) && LastKeyPress + 250 < clock())
		{
			Active = !Active;
			LastKeyPress = clock();
		}


		if (Active && LocalPlayer->Address != NULL)
		{
			vPunch = LocalPlayer->ReadPunch();
			ShootingState = Process->ReadMemory<int>(GlobalVariables::ClientAddress + Offsets::AttackAddres);
			if (ShootingState == 4)
			{
				vDelta = Vector3D{ 0, 0, 0 };
				vPrevPunch = vPunch;
			}
			else
			{
				m_Ingamesensitivity = Process->ReadMemory<float>(GlobalVariables::ClientAddress + Offsets::SensivityAddress);
				vDelta.x = ((LocalPlayer->Punch.x - vPrevPunch.x)*m_YMultiplayer) / (m_Yaw * m_Ingamesensitivity * GlobalVariables::MouseMultiplyer)*(-1.0);
				vDelta.y = ((LocalPlayer->Punch.y - vPrevPunch.y)*m_XMultiplayer) / (m_Yaw * m_Ingamesensitivity * GlobalVariables::MouseMultiplyer);
				vPrevPunch = LocalPlayer->Punch;

				MouseMove(vDelta.y, vDelta.x);
			}
		}

	}
	return 0x0;
}
RecoilControl C/C++ Header


Code:
#pragma once
#include "Globals.h"
#include "Math.h"

class CRecoilControl
{
public:
	static clock_t RefreshRate;
	static clock_t LastRefersh;

	static int SleepTime;
	static int ShootingState;

	static bool Active;

	static Vector3D vDelta;
	static Vector3D vPunch;
	static Vector3D vPrevPunch;
	static float m_Yaw;
	static float m_Ingamesensitivity;
	static float m_Windowssensitivity;
	static float m_XMultiplayer;
	static float m_YMultiplayer;

	static int RecoilDrawType;
	static float RecoilDrawResolution;

	static DWORD WINAPI Run();

	static int HotKey;
	static clock_t LastKeyPress;

	CRecoilControl();
	~CRecoilControl();
	//SwapLines0
};

extern CRecoilControl* RecoilControl;
TriggerBot C++ Source


Code:
#include "TriggerBot.h"
#include "Process.h"
#include "Entity.h"

CTriggerBot TriggerBot;

CTriggerBot::CTriggerBot()
{
}


CTriggerBot::~CTriggerBot()
{
}
bool CTriggerBot::Active = false;
bool CTriggerBot::OnHotKey = false;
bool CTriggerBot::ShootOnHitBox = false;
bool CTriggerBot::Shoot = false;
bool CTriggerBot::SniperMode = false;

float CTriggerBot::MaxPunch = 2;
int CTriggerBot::HotKey = 2;
int CTriggerBot::SleepTime = 2;
int CTriggerBot::DelayTime = 0;
int CTriggerBot::ShootingTime = 0;;
int CTriggerBot::BreakTime = 0;;

int CTriggerBot::Target = -1;
int CTriggerBot::LastTarget = -69;

int CTriggerBot::ExtraShootingTime = 0;
clock_t CTriggerBot::LastExtraShootingTime = 0;

clock_t CTriggerBot::LastTimeTargetUnderCrosshair = 0;

Bones Bone;
//SwapLines0
void CTriggerBot::ShootOnLoseTarget()
{
	if (Shoot && LastTimeTargetUnderCrosshair + ExtraShootingTime > clock())
	{
		MouseButton(MOUSEEVENTF_LEFTDOWN);
		Sleep(ShootingTime);
		MouseButton(MOUSEEVENTF_LEFTUP);
		Sleep(BreakTime);
	}
	else
	{
		Shoot = false;
	}
};


DWORD WINAPI CTriggerBot::Run()
{
	while (true)
	{
		Sleep(SleepTime);
		if (!Active)
			continue;

		if (OnHotKey)
		{
			if (!GetAsyncKeyState(HotKey))
				continue;
		}
		else
		{
			if (GetAsyncKeyState(0x1))
				continue;
		}

		if (LocalPlayer->Clip1 <= 0)
			continue;

		Target = Process->ReadMemory<int>(LocalPlayer->Address + 0x00002400) - 1;

		if (Target < 0)
		{
			LastTarget = -69;
			ShootOnLoseTarget();
			continue;
		}
		if (Target > GlobalVariables::MaxPlayers)
		{
			LastTarget = -69;
			ShootOnLoseTarget();
			continue;
		}

		if (Entity[Target].Team == LocalPlayer->Team)
		{
			LastTarget = -69;
			continue;
		}

		if (LocalPlayer->Punch.x >= MaxPunch || LocalPlayer->Punch.y >= MaxPunch)
			continue;

		if (LocalPlayer->Punch.x <= -MaxPunch || LocalPlayer->Punch.y <= -MaxPunch)
			continue;

		if (SniperMode)
		{
			if (LocalPlayer->WeaponID == 9 || LocalPlayer->WeaponID == 38 || LocalPlayer->WeaponID == 11 || LocalPlayer->WeaponID == 40)
			{
				if (LocalPlayer->Fov == 90)
					continue;
			}
		}

		if (ShootOnHitBox)
		{
			Vector3D Bone = Entity[Target].GetBoneFast(10);
			Vector3D BottomHitboxHead = Bone;
			BottomHitboxHead.x += -2.771300f;
			BottomHitboxHead.y += -2.878300f;
			BottomHitboxHead.z += -3.103000f;

			Vector3D TopHitboxHead = Bone;
			TopHitboxHead.x += 6.955000f;
			TopHitboxHead.y += 4.020300f;
			TopHitboxHead.z += 5.006700f;

			Vector3D ViewDirection = AngleToDirection(LocalPlayer->vViewAngle);
			if (!RayTrace->Trace(ViewDirection, BottomHitboxHead, TopHitboxHead))
				continue;
		}

		Sleep(DelayTime);

		MouseButton(MOUSEEVENTF_LEFTDOWN);
		Sleep(ShootingTime);
		MouseButton(MOUSEEVENTF_LEFTUP);

		Sleep(BreakTime);

		Shoot = true;

		LastTarget = Target;
		LastTimeTargetUnderCrosshair = clock();

	}
}
TriggerBot C/C++ Header


Code:
#pragma once
#include "Math.h"
#include "Globals.h"
#include "Entity.h"
#include "RayTrace.h"

class CTriggerBot
{
public:

	static bool Active;
	static bool OnHotKey;
	static bool ShootOnHitBox;
	static bool Shoot;
	static bool SniperMode;

	static float MaxPunch;

	static int HotKey;

	static int SleepTime;

	static int DelayTime;
	static clock_t LastDelayTime;

	static int ShootingTime;
	static clock_t LastShootingTime;

	static int BreakTime;
	static clock_t LastBreakTime;

	static int ExtraShootingTime;
	static clock_t LastExtraShootingTime;

	static clock_t LastTimeTargetUnderCrosshair;



	static int Target;
	static int LastTarget;

	static Bones Bone;

	static DWORD WINAPI Run();

	static void ShootOnLoseTarget();

	CTriggerBot();
	~CTriggerBot();

};
extern CTriggerBot TriggerBot;
I still don't know how any of this work or how to put it together ;_:
So you rip these from T_T's source and don't give any credit, lol ok.
Interesting I would try this later
Quote Originally Posted by Pajamathur View Post
~thread
Give credits to the original creator if you're gonna upload stuff
Credits: T_TGod, its the source from his Hack.
how to remove circle aimbot? and make a square?
The recoil code is much clean than the other one I've seen before. Interesting!
Can anyone tell me how to install this ?
Quote Originally Posted by Smurfiukas View Post
Can anyone tell me how to install this ?
1. Learn C++
2. Make non-cheat programs
3. Go little steps into cheat-scene
4. Learn from sources
5. Do your own sh*t and don't c+p
[QUOTE=reaLD;12143594]1. Learn C++
2. Make non-cheat programs
3. Go little steps into cheat-scene
4. Learn from sources
5. Do your own sh*t and don't c+p [/QUO

Yeah dont c+p pls
Thanks for shareing
Sorry, gonna ask a stupid question but does anyone know where I can find the drawings and entity header files? I know how to program in c++ but I'm new to making cheats so am I missing something?
Quote Originally Posted by chepsy12 View Post
Sorry, gonna ask a stupid question but does anyone know where I can find the drawings and entity header files? I know how to program in c++ but I'm new to making cheats so am I missing something?
I know I am late on this one but here is the link to the full source, /forum/showthread.php?t=953854

well part of it since I can't post links yet......
100 % internal ofc next level shit xDDDDD

MouseButton(MOUSEEVENTF_LEFTDOWN);
Sleep(ShootingTime);
MouseButton(MOUSEEVENTF_LEFTUP);
Sleep(BreakTime);
Posts 115 of 17 · Page 1 of 2

Post a Reply

Similar Threads

Tags for this Thread

None

Need help?