0% found this document useful (0 votes)
155 views64 pages

Unity Game Hacking Techniques Guide

The document contains C++ code for a game hacking tool that includes functionalities like aimbot, speed hacks, and ESP (Extra Sensory Perception). It utilizes various libraries and methods to manipulate game memory and enhance player capabilities. The code also features server initialization and player data handling for multiplayer scenarios.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
155 views64 pages

Unity Game Hacking Techniques Guide

The document contains C++ code for a game hacking tool that includes functionalities like aimbot, speed hacks, and ESP (Extra Sensory Perception). It utilizes various libraries and methods to manipulate game memory and enhance player capabilities. The code also features server initialization and player data handling for multiplayer scenarios.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd

#include <list>

#include <vector>
#include <map>
#include <unordered_map>
#include <chrono>
#include <string.h>
#include <pthread.h>
#include <cstring>
#include <jni.h>
#include <unistd.h>
#include <fstream>
#include <iostream>
#include <dlfcn.h>
#include "Tools/Includes/Logger.h"
#include "Tools/Includes/obfuscate.h"
#include "Tools/Includes/Utils.h"
#include "Tools/SOCKET/Server.h"
#include "Tools/KittyMemory/[Link]"
#include "Hack/Memory.h"
#include "Hack/Offsets.h"
#include "Hack/class.h"
#include "Hack/il2cpp.h"

#define targetLibName OBFUSCATE("[Link]")


#include "Tools/Includes/Macros.h"
#include "Tools/Canvas/[Link]"
#include "Tools/Substrate/SubstrateHook.h"
#include <sys/mman.h>
#define LOGI(...) __android_log_print(ANDROID_LOG_INFO, "VASTCLIENT", __VA_ARGS__)

void *getAbsoluteAddress2(const char *libraryName, uintptr_t relativeAddr) {


void *handle = dlopen(libraryName, RTLD_NOW);
if (!handle) return nullptr;

void *baseAddr = dlsym(handle, "base");


dlclose(handle);

if (!baseAddr) return nullptr;


return (void *)((uintptr_t)baseAddr + relativeAddr);
}
#define HOOK_LIB2(offset, ptr, orig) MSHookFunction((void
*)getRealOffset((offset)), (void *)ptr, (void **)&orig)

struct {
float YflyPower = 1.0f; // 1.0 = neutral
float flySpeedPower = 1.0f; // 1.0 = neutral speed
} FlyControl;

struct {
bool enableAimbot = false;

bool medikitrun = false;


bool Aimkilltp = false;
bool AimkillUp = false;
bool resetguest = false;
bool Aimkillrotate = false;
float aimbotFOV = 1000.0f;
bool Aimkillrotatev2 = false;
bool shakekill = false;
bool aimkillbrutal = false;
bool POFFNNMOOBM = false;
bool Aimkilltpv2 = false;
bool aimbody = false;
bool upplayerx = false;
bool teleportcarr = false;
bool telehack = false;
int GDKLMFLNNGM = 0;
bool FOV = true;
bool ActivateAll = false;
bool freeze = false;
bool AimSilent = false;
bool AimSilent360 = false;
bool Aimkill = false;
bool downplayer = false;
bool Aimkill360 = false;
bool UpPlayer = false;
bool speedhackjoy = false;
bool speedHack = false;
bool flyhack = false;
bool downaimkill = false;
bool autoswitch = false;
bool spawnkill = false;
bool telekill = false;
bool RowdyKill = false;

bool AutoSwitchEnabled = false;


bool UltraSwitchEnabled = false;
bool PullEnemyV2Enabled = false;
int PullEnemyV2TickMs = 6;
float PullEnemyV2MaxDistance = 200.0f;
float PullEnemyV2Strength = 1.0f;
bool PullEnemyV3VisibleEnabled = false;
int PullEnemyV3VisibleTickMs = 6;
float PullEnemyV3VisibleMaxDistance = 200.0f;
float PullEnemyV3VisibleStrength = 1.0f;
bool BulletTeleport = false;

} MasterBool;
struct {

float TFPosX = 0.0f;


float TFPosY = 0.0f;
float TFPosZ = 0.0f;

} NT;

int g_screenWidth, g_screenHeight;


// Unity screen resolution (game render resolution)
// If ESP is incorrect, try changing these values to match Unity's actual render
resolution
// Common values: 1280x720, 1920x1080, or check Unity [Link]/height
static int g_unityScreenWidth = 1280;
static int g_unityScreenHeight = 720;
ElfScanner g_il2cppELF;

static int isSpeed = 1;

enum Mode {
InitMode = 1,
HackMode = 2,
StopMode = 98,
EspMode = 99,
};

struct Request {
int Mode;
bool boolean;
int value;
int ScreenWidth;
int ScreenHeight;
};

#define maxplayerCount 54

struct PlayerData {
Vector3 headPosition;
Vector3 bottomPlayerPosition;

float health;
char name[2000];
bool isDieing;
float distance;
};

struct Response {
bool Success;
int PlayerCount;
PlayerData Players[maxplayerCount];
};

SocketServer server;

int InitServer() {
if (![Link]()) {
return -1;
}
if (![Link]()) {
return -1;
}
if (![Link]()) {
return -1;
}
return 0;
}

uintptr_t getLibBase(const char* libName) {


uintptr_t base = 0;
FILE* fp = fopen("/proc/self/maps", "rt");
if (!fp) return 0;

char line[512];
while (fgets(line, sizeof(line), fp)) {
if (strstr(line, libName)) {
base = strtoul(line, NULL, 16);
break;
}
}
fclose(fp);
return base;
}
MemoryPatch patchFunction;
void unlockMemory(uintptr_t address) {
uintptr_t pageStart = address & ~(getpagesize() - 1);
mprotect((void*)pageStart, getpagesize(), PROT_READ | PROT_WRITE | PROT_EXEC);
}

MemoryPatch patchFunction2;
MemoryPatch patchFunction3;

using namespace std;


std::string utf16le_to_utf82(const std::u16string &u16str) {
if ([Link]()) { return std::string(); }
const char16_t *p = [Link]();
std::u16string::size_type len = [Link]();
if (p[0] == 0xFEFF) {
p += 1;
len -= 1;
}

std::string u8str;
[Link](len * 3);

char16_t u16char;
for (std::u16string::size_type i = 0; i < len; ++i) {

u16char = p[i];

if (u16char < 0x0080) {


u8str.push_back((char) (u16char & 0x00FF));
continue;
}
if (u16char >= 0x0080 && u16char <= 0x07FF) {
u8str.push_back((char) (((u16char >> 6) & 0x1F) | 0xC0));
u8str.push_back((char) ((u16char & 0x3F) | 0x80));
continue;
}
if (u16char >= 0xD800 && u16char <= 0xDBFF) {
uint32_t highSur = u16char;
uint32_t lowSur = p[++i];
uint32_t codePoint = highSur - 0xD800;
codePoint <<= 10;
codePoint |= lowSur - 0xDC00;
codePoint += 0x10000;
u8str.push_back((char) ((codePoint >> 18) | 0xF0));
u8str.push_back((char) (((codePoint >> 12) & 0x3F) | 0x80));
u8str.push_back((char) (((codePoint >> 06) & 0x3F) | 0x80));
u8str.push_back((char) ((codePoint & 0x3F) | 0x80));
continue;
}
{
u8str.push_back((char) (((u16char >> 12) & 0x0F) | 0xE0));
u8str.push_back((char) (((u16char >> 6) & 0x3F) | 0x80));
u8str.push_back((char) ((u16char & 0x3F) | 0x80));
continue;
}
}

return u8str;
}

typedef struct _monoStringlk {


void *klass;
void *monitor;
int length;
char chars[1];
int getLength() {
return length;
}
const char *toChars(){
u16string ss((char16_t *) getChars(), 0, getLength());
string str = utf16le_to_utf82(ss);
return str.c_str();
}
char *getChars() {
return chars;
}
std::string get_string() {

return std::string(toChars());
}
} monoStringlk;

void CreateExtraSensoryPerceptionhackFixed(Response &response)


{

if ([Link]) {
void *GameFacade = *(void **) getRealOffset([Link]);
if (GameFacade != nullptr) {
void *MatchGame = *(void **) ((uint64_t) GameFacade +
[Link]);
if (MatchGame != nullptr) {
void *ClassMatchGame = *(void **) ((uint64_t) MatchGame +
[Link]);
if (ClassMatchGame != nullptr) {
void *current_match = *(void **) ((uint64_t) ClassMatchGame +
pAddress.m_Match);
if (current_match != nullptr) {
auto matchStatus = *(uint32_t *) ((uint64_t) current_match
+ [Link]);
if (matchStatus == 1) {
void *CurrentLocalPlayer = Current_Local_Player();
if (CurrentLocalPlayer != nullptr) {

System_Collections_Generic_Dictionary_IHAAMHPPLMG__Player__o *MonoPlayer =
*(System_Collections_Generic_Dictionary_IHAAMHPPLMG__Player__o **)((uint64_t)
current_match + [Link]);
if (MonoPlayer != nullptr) {
COW_GamePlay_Player_array *players =
MonoPlayer->valueSlots;
if (players != nullptr) {
int countagempartida = players->max_length;
if (countagempartida != 1)
{
for (int i = 0; i < countagempartida; +
+i) {
if (players->m_Items[i] != nullptr
&& players->m_Items[i] != CurrentLocalPlayer) {
if (IsStreamerVisible(players-
>m_Items[i]) &&!IsLocalTeammate(players->m_Items[i]) &&GetHp(players->m_Items[i]) >
0) {

void *HeadTF =
TransformNode(*(void **) ((uintptr_t) players->m_Items[i] +[Link]));
void *PesTF =
TransformNode(*(void **) ((uintptr_t) players->m_Items[i] +[Link]));
void *HeadTFLocal =
TransformNode(*(void **) ((uintptr_t) CurrentLocalPlayer +[Link]));
Vector3 WorldToScreenHead =
WorldToScreenPoint(Transform_INTERNAL_GetPosition(HeadTF));
Vector3 WorldToScreenPes =
WorldToScreenPoint(Transform_INTERNAL_GetPosition(PesTF));

// Scale Unity screen


coordinates to actual device screen resolution
// This fixes ESP
positioning when Unity render resolution != device screen resolution
// For 1920x1080 device
with 1280x720 Unity: scale = 1.5x
if (g_screenWidth !=
g_unityScreenWidth || g_screenHeight != g_unityScreenHeight) {
float scaleX =
(float)g_screenWidth / (float)g_unityScreenWidth;
float scaleY =
(float)g_screenHeight / (float)g_unityScreenHeight;
WorldToScreenHead.X *=
scaleX;
WorldToScreenHead.Y *=
scaleY;
WorldToScreenPes.X *=
scaleX;
WorldToScreenPes.Y *=
scaleY;
}

bool Caido2 =
IsDieing(players->m_Items[i]);
float distance =
Vector3::Distance(Transform_INTERNAL_GetPosition(HeadTFLocal),Transform_INTERNAL_Ge
tPosition(HeadTF));
monoStringlk *Nick =
*(monoStringlk **) ((uint64_t) players->m_Items[i] + [Link]);
PlayerData *data =
&[Link][[Link]];
if (data != nullptr) {
data->headPosition =
WorldToScreenHead;
data-
>bottomPlayerPosition = WorldToScreenPes;
data->distance =
distance;
data->isDieing =
Caido2;
data->health =
GetHp(players->m_Items[i]);
if (Nick->toChars() !=
NULL) {
strcpy(data-
>name,Nick->toChars());
}

}
++[Link];
}
}
}
}
}
}
}
} else {

[Link] = 0;
}
}
}
}
}

}
}

void ghoston() {
uintptr_t libBase = getLibBase("[Link]");
if (libBase == 0) {
return;
}
uintptr_t targetOffset = [Link]; //private void
SyncPlayerState(Player player) { }
uintptr_t targetAddress = libBase + targetOffset;
unlockMemory(targetAddress);
patchFunction = MemoryPatch::createWithHex(targetAddress, "00 00 A0 E3 1E FF 2F
E1"); // fast switch
[Link]();
}
void ghostoff() {
uintptr_t libBase = getLibBase("[Link]");
if (libBase == 0) {
return;
}
uintptr_t targetOffset = [Link];
uintptr_t targetAddress = libBase + targetOffset;
unlockMemory(targetAddress);
patchFunction = MemoryPatch::createWithHex(targetAddress, "D5 C5 75 36 8B DC DD
3E"); // fast switch D5 C5 75 36 8B DC DD 3E //09 0B 1A E8 08 0B 0B 01
[Link]();
}

void ProcessDownKill(void* ClosestEnemy) {


// Backup flags
static bool wasDownKill = false;
static bool prevAutoSwitch = false;
static std::map<uint64_t, Vector3> enemyOriginalPositions; // Store original
positions
static Vector3 playerOriginalPos;
static bool playerPositionSet = false;

// Oscillation timer for enemies (up and down movement)


static auto lastOscillationTime = std::chrono::steady_clock::now();
static float oscillationPhase = 0.0f;
static bool oscillationInitialized = false;

if ([Link]) {
if (!wasDownKill) {
// Save old values only once when DOWNKILL turns ON
prevAutoSwitch = [Link];
[Link] = true;
wasDownKill = true;
[Link]();
playerPositionSet = false;
oscillationPhase = 0.0f;
oscillationInitialized = false;
lastOscillationTime = std::chrono::steady_clock::now(); // Initialize
timer
}

// Update oscillation phase (continuous up and down movement)


float oscillationOffset = 0.0f;
auto now = std::chrono::steady_clock::now();
auto elapsed = std::chrono::duration_cast<std::chrono::milliseconds>(now -
lastOscillationTime).count();
if (elapsed > 50) { // Update every 50ms for smooth oscillation
oscillationPhase += 0.15f; // Speed of oscillation
if (oscillationPhase >= 6.28f) oscillationPhase = 0.0f; // Reset at
2*PI
lastOscillationTime = now;
}

// Calculate oscillation offset (sin wave: -1 to +1, scaled to -1.0f to


+1.0f)
oscillationOffset = sinf(oscillationPhase) * 1.0f; // Oscillates between -
1.0 and +1.0

// ==== LOCAL PLAYER ==== (Move player down a little)


void* LocalPlayer = Current_Local_Player();
if (LocalPlayer != nullptr && (uintptr_t)LocalPlayer > 0x1000) {
// Get player root bone transform chain (same method as enemy)
void* playerRoot = *(void**)((uint64_t)LocalPlayer + 0x380);
if (playerRoot != nullptr && (uintptr_t)playerRoot > 0x1000)
{
void* playerTransformValue = *(void**)((uint64_t)playerRoot + 0x8);
if (playerTransformValue != nullptr &&
(uintptr_t)playerTransformValue > 0x1000)
{
void* playerTransformObj = *(void**)
((uint64_t)playerTransformValue + 0x8);
if (playerTransformObj != nullptr &&
(uintptr_t)playerTransformObj > 0x1000)
{
void* playerMatrix = *(void**)((uint64_t)playerTransformObj
+ 0x20);
if (playerMatrix != nullptr && (uintptr_t)playerMatrix >
0x1000)
{
Vector3 myPos = *(Vector3*)((uint64_t)playerMatrix +
0x80);

// Store original position first time


if (!playerPositionSet) {
playerOriginalPos = myPos;
playerPositionSet = true;
}

// Move player down a little (not too much)


myPos.Y = playerOriginalPos.Y - 1.2f; // Small down
movement
*(Vector3*)((uint64_t)playerMatrix + 0x80) = myPos;
}
}
}
}
}

// ==== ALL ENEMIES ==== (Move enemies down a little and make them
oscillate up and down)
// Ensure LocalPlayer is initialized before using in enemy loop
if (LocalPlayer == nullptr) {
LocalPlayer = Current_Local_Player();
}

void* GameFacade = *(void**)getRealOffset([Link]);


if (GameFacade != nullptr)
{
void* MatchGame = *(void**)((uint64_t)GameFacade +
[Link]);
if (MatchGame != nullptr)
{
void* ClassMatchGame = *(void**)((uint64_t)MatchGame +
[Link]);
if (ClassMatchGame != nullptr)
{
void* current_match = *(void**)((uint64_t)ClassMatchGame +
pAddress.m_Match);
if (current_match != nullptr)
{
auto matchStatus = *(uint32_t*)((uint64_t)current_match +
[Link]);
if (matchStatus == 1)
{

System_Collections_Generic_Dictionary_IHAAMHPPLMG__Player__o* MonoPlayer =
*(System_Collections_Generic_Dictionary_IHAAMHPPLMG__Player__o**)
((uint64_t)current_match + [Link]);
if (MonoPlayer != nullptr)
{
COW_GamePlay_Player_array* players = MonoPlayer-
>valueSlots;
if (players != nullptr && players->m_Items !=
nullptr)
{
int playerCount = players->max_length;

// Iterate through ALL enemies


if (playerCount > 0 && playerCount <= 100) //
Safety check
{
for (int i = 0; i < playerCount; ++i)
{
if (i >= players->max_length) break; //
Extra safety check
void* enemy = players->m_Items[i];
if (enemy == nullptr ||
(uintptr_t)enemy < 0x1000) continue;
if (LocalPlayer != nullptr && enemy ==
LocalPlayer) continue;

// Validate enemy
if (!IsStreamerVisible(enemy))
continue;
if (IsDieing(enemy)) continue;
if (IsLocalTeammate(enemy)) continue;
if (GetHp(enemy) <= 0) continue;

uint64_t enemyAddr = (uint64_t)enemy;

// Get enemy root bone transform chain


(like Pull Enemy V2)
void* rootBone = *(void**)
((uint64_t)enemy + 0x3B8);
if (rootBone == nullptr ||
(uintptr_t)rootBone < 0x1000) continue;

void* transformValue = *(void**)


((uint64_t)rootBone + 0x8);
if (transformValue == nullptr ||
(uintptr_t)transformValue < 0x1000) continue;

void* transformObjPtr = *(void**)


((uint64_t)transformValue + 0x8);
if (transformObjPtr == nullptr ||
(uintptr_t)transformObjPtr < 0x1000) continue;

void* matrixPtr = *(void**)


((uint64_t)transformObjPtr + 0x20);
if (matrixPtr == nullptr ||
(uintptr_t)matrixPtr < 0x1000) continue;

// Get current position from matrix


Vector3 currentPos = *(Vector3*)
((uint64_t)matrixPtr + 0x80);
// Store original position first time
for this enemy
if
([Link](enemyAddr) == [Link]()) {
enemyOriginalPositions[enemyAddr] =
currentPos;
}

// Calculate new position: down a


little + oscillation (up and down)
Vector3 originalPos =
enemyOriginalPositions[enemyAddr];
Vector3 newPos;
newPos.X = originalPos.X; // Keep X
position
newPos.Z = originalPos.Z; // Keep Z
position
// Base down position (-1.2f) +
oscillation (oscillates between -1.0 and +1.0)
newPos.Y = originalPos.Y - 1.2f +
oscillationOffset; // Little down + continuous up/down oscillation

// Write directly to matrix (same as


Pull Enemy V2)
*(Vector3*)((uint64_t)matrixPtr + 0x80)
= newPos;
}
}
}
}
}
}
}
}
}
} else {
if (wasDownKill) {
// Restore original positions when DOWNKILL turns OFF
void* LocalPlayer = Current_Local_Player();
if (LocalPlayer != nullptr && playerPositionSet &&
(uintptr_t)LocalPlayer > 0x1000) {
// Restore player position using matrix
void* playerRoot = *(void**)((uint64_t)LocalPlayer + 0x380);
if (playerRoot != nullptr && (uintptr_t)playerRoot > 0x1000)
{
void* playerTransformValue = *(void**)((uint64_t)playerRoot +
0x8);
if (playerTransformValue != nullptr &&
(uintptr_t)playerTransformValue > 0x1000)
{
void* playerTransformObj = *(void**)
((uint64_t)playerTransformValue + 0x8);
if (playerTransformObj != nullptr &&
(uintptr_t)playerTransformObj > 0x1000)
{
void* playerMatrix = *(void**)
((uint64_t)playerTransformObj + 0x20);
if (playerMatrix != nullptr && (uintptr_t)playerMatrix
> 0x1000)
{
*(Vector3*)((uint64_t)playerMatrix + 0x80) =
playerOriginalPos;
}
}
}
}
}

// Restore all enemy positions using matrix


for (auto it = [Link](); it !=
[Link](); ++it) {
uint64_t enemyAddr = it->first;
Vector3 originalPos = it->second;

void* enemy = (void*)enemyAddr;


if (enemy == nullptr || (uintptr_t)enemy < 0x1000) continue;

// Restore using matrix (same method)


void* rootBone = *(void**)((uint64_t)enemy + 0x3B8);
if (rootBone == nullptr || (uintptr_t)rootBone < 0x1000) continue;

void* transformValue = *(void**)((uint64_t)rootBone + 0x8);


if (transformValue == nullptr || (uintptr_t)transformValue <
0x1000) continue;

void* transformObjPtr = *(void**)((uint64_t)transformValue + 0x8);


if (transformObjPtr == nullptr || (uintptr_t)transformObjPtr <
0x1000) continue;

void* matrixPtr = *(void**)((uint64_t)transformObjPtr + 0x20);


if (matrixPtr == nullptr || (uintptr_t)matrixPtr < 0x1000)
continue;

*(Vector3*)((uint64_t)matrixPtr + 0x80) = originalPos;


}

[Link]();
playerPositionSet = false;

// Restore old values when DOWNKILL turns OFF


[Link] = prevAutoSwitch;
wasDownKill = false;
}
}
}

void allfunction(){
// Don't initialize hooks here - let them initialize when needed
// This prevents crashes when entering matches

if([Link]){
// DownKill is now handled by ProcessDownKill function
}

if([Link]){
if(MasterBool.Aimkilltpv2){
ghoston();
}
else{
ghostoff();
}
}
}

void *CreateServer(void *) {
if (InitServer() == 0) {
if ([Link]()) {
Request request{};
while ([Link]((void*)&request) > 0) {
Response response{};
if ([Link] == Mode::InitMode) {
[Link] = true;
} else if ([Link] == Mode::EspMode) {
// ESP uses DYNAMIC resolution from device (NOT fixed 1280x720)
// Resolution is sent from client based on actual device screen
size
g_screenWidth = [Link];
g_screenHeight = [Link];

[Link] = true;
CreateExtraSensoryPerceptionhackFixed(response);
} else if ([Link] == 3) {
[Link] = [Link];
[Link] = true;
}
else if ([Link] == 890) {
MasterBool.Aimkillrotatev2 = [Link];
[Link] = true;
}
else if ([Link] == 892) {
[Link] = [Link];
[Link] = true;
}
else if ([Link] == 1002) {
[Link] = [Link];
[Link] = true;
}

else if ([Link] == 891) {


[Link] = [Link];
[Link] = true;
}
else if([Link] == 269)
{
[Link] = [Link];
[Link] = true;
}

else if ([Link] == 100)


{
[Link] = [Link];
[Link] = true;
}
else if ([Link] == 105)
{
[Link] = [Link];
[Link] = true;
}
else if ([Link] == 104) {
[Link] = [Link];
// LOGI(" [Link] %f", [Link]);
[Link] = true;
}else if([Link] == 199)
{

[Link] = true;
}

else if([Link] == 155)


{
[Link] = [Link];
[Link] = true;
}
else if([Link] == 161)
{
[Link] = [Link];
[Link] = true;
}
else if([Link] == 162)
{
[Link] = [Link];
[Link] = true;
}
else if([Link] == 925)
{
[Link] = [Link];
[Link] = true;
}
else if([Link] == 926)
{
[Link] = [Link];
[Link] = true;
}
else if([Link] == 927)
{
[Link] = [Link];
[Link] = true;
}

else if ([Link] == 129) {


[Link] = [Link];
[Link] = true;
}
else if ([Link] == 111) {
[Link] = [Link];
[Link] = true;
}
else if ([Link] == 198){
MasterBool.Aimkill360 = [Link];
[Link] = true;
}

else if([Link] == 920){


[Link] = [Link];
[Link] = true;
}
else if([Link] == 922){
[Link] = [Link];
[Link] = true;
}
else if([Link] == 923){
[Link] = [Link];
[Link] = true;
}
else if([Link] == 924){
MasterBool.PullEnemyV2Enabled = [Link];
[Link] = true;
}
else if([Link] == 928){
MasterBool.PullEnemyV3VisibleEnabled = [Link];
[Link] = true;
}
else if([Link] == 123213){
[Link] = [Link];
[Link] = true;
}
else if([Link] == 153){
[Link] = [Link];
[Link] = true;
}
else if([Link] == 154){
MasterBool.Aimkillrotatev2 = [Link];
[Link] = true;
}

[Link]((void*)& response, sizeof(response));


}
}
}
return NULL;
}

bool isInsideFOV(int x, int y) {

float circle_x = g_screenWidth / 2;


float circle_y = g_screenHeight / 2;
float rad = [Link];
return (x - circle_x) * (x - circle_x) + (y - circle_y) * (y - circle_y) <= rad
* rad;
}

Vector3 cSubtract(Vector3 src, Vector3 dst)


{
Vector3 diff;
diff.X = src.X - dst.X;
diff.Y = src.Y - dst.Y;
diff.Z = src.Z - dst.Z;
return diff;
}
float cMagnitude(Vector3 vec)
{
return sqrtf(vec.X*vec.X + vec.Y*vec.Y + vec.Z*vec.Z);
}

float cClamp(float value, float min, float max)


{
if (value < min)
value = min;
else if (value > max)
value = max;
return value;
}

float CalculateDistance(Vector3 src, Vector3 dst)


{
Vector3 diff = cSubtract(src, dst);
return cMagnitude(diff);
}

float Vector3Distance(const Vector3& a, const Vector3& b)


{
float dx = a.X - b.X;
float dy = a.Y - b.Y;
float dz = a.Z - b.Z;
return sqrtf(dx * dx + dy * dy + dz * dz);
}

//#define lbil2cpp(address, original, backup) DobbyHook((void


*)getRealOffset(address), (void *)original, (void **)&backup)
void* GetClosestEnemy360()
{
void* closestEnemy = nullptr;
float closestDistance = 999999.0f;

void* GameFacade = *(void**) getRealOffset([Link]);


if (!GameFacade) return nullptr;

void* MatchGame = *(void**)((uint64_t)GameFacade + [Link]);


if (!MatchGame) return nullptr;

void* ClassMatchGame = *(void**)((uint64_t)MatchGame +


[Link]);
if (!ClassMatchGame) return nullptr;

void* current_match = *(void**)((uint64_t)ClassMatchGame + pAddress.m_Match);


if (!current_match) return nullptr;

uint32_t matchStatus = *(uint32_t*)((uint64_t)current_match +


[Link]);
if (matchStatus != 1) return nullptr; // Not in a live match

void* LocalPlayer = Current_Local_Player();


if (!LocalPlayer) return nullptr;

Vector3 LocalPosition(0.0f, 0.0f, 0.0f);

void* LocalHead = TransformNode(*(void**)((uint64_t)LocalPlayer +


[Link]));
if (LocalHead) {
LocalPosition = Transform_INTERNAL_GetPosition(LocalHead);
} else {
return nullptr; // Local player head not found
}

auto* MonoPlayer =
*(System_Collections_Generic_Dictionary_IHAAMHPPLMG__Player__o**)
((uint64_t)current_match + [Link]);
if (!MonoPlayer) return nullptr;

COW_GamePlay_Player_array* players = MonoPlayer->valueSlots;


if (!players) return nullptr;

int playerCount = players->max_length;


if (playerCount <= 1) return nullptr; // Only you in match

for (int i = 0; i < playerCount; ++i)


{
void* enemy = players->m_Items[i];
if (!enemy || enemy == LocalPlayer) continue; // Skip null or self

// Strong checking if enemy is valid


if (!IsStreamerVisible(enemy)) continue;
if (IsDieing(enemy)) continue;
if (IsLocalTeammate(enemy)) continue;
if (GetHp(enemy) <= 0) continue;

void* EnemyHead = TransformNode(*(void**)((uint64_t)enemy +


[Link]));
if (!EnemyHead) continue;

Vector3 EnemyPosition = Transform_INTERNAL_GetPosition(EnemyHead);

float Distance = Vector3Distance(LocalPosition, EnemyPosition);

if (Distance < closestDistance)


{
closestDistance = Distance;
closestEnemy = enemy;
}
}

return closestEnemy;
}

void *GetEnemyInsideFOV()
{

float MaxDist = 9999.0f;


void *closestEnemy = nullptr;
void *GameFacade = *(void **) getRealOffset([Link]);
if (GameFacade != nullptr) {
void *MatchGame = *(void **) ((uint64_t) GameFacade + [Link]);
if (MatchGame != nullptr) {
void *ClassMatchGame = *(void **) ((uint64_t) MatchGame +
[Link]);
if (ClassMatchGame != nullptr) {
void *current_match = *(void **) ((uint64_t) ClassMatchGame +
pAddress.m_Match);
if (current_match != nullptr) {
auto matchStatus = *(uint32_t *) ((uint64_t) current_match +
[Link]);
if (matchStatus == 1) {
void *CurrentLocalPlayer = Current_Local_Player();
if (CurrentLocalPlayer != nullptr) {

System_Collections_Generic_Dictionary_IHAAMHPPLMG__Player__o *MonoPlayer =
*(System_Collections_Generic_Dictionary_IHAAMHPPLMG__Player__o **)((uint64_t)
current_match + [Link]);
if (MonoPlayer != nullptr) {
COW_GamePlay_Player_array *players = MonoPlayer-
>valueSlots;
if (players != nullptr) {
int countagempartida = players->max_length;
if (countagempartida != 1) {
for (int i = 0; i < countagempartida; ++i)
{
if (players->m_Items[i] != nullptr
&&players->m_Items[i] != CurrentLocalPlayer) {
if (IsStreamerVisible(players-
>m_Items[i]) && !IsDieing(players->m_Items[i]) && !IsLocalTeammate(players-
>m_Items[i]) && GetHp(players->m_Items[i]) > 0) {
void *HeadTF =
TransformNode(*(void **) ((uint64_t) players->m_Items[i] +[Link]));
if (HeadTF != nullptr) {
Vector3 currentLocation =
Transform_INTERNAL_GetPosition(HeadTF);
Vector3 WorldToScreenHead =
WorldToScreenPoint(currentLocation);

if (WorldToScreenHead.Z >=
0.01f) {
Vector3 v2Middle =
Vector3((float) (g_screenWidth / 2),(float) (g_screenHeight / 2));
Vector3 v2Loc =
Vector3(WorldToScreenHead.X,WorldToScreenHead.Y);
float Distance =
(float) CalculateDistance(v2Middle, v2Loc);
if (isInsideFOV((int)
WorldToScreenHead.X,(int) WorldToScreenHead.Y)) {
if (Distance <
MaxDist) {
closestEnemy =
players->m_Items[i];
MaxDist =
Distance;
}
}
}

}
}
}
}
}
}
}
}
}
}
}
}
}
return closestEnemy;

std::vector<void*> GetAllEnemiesNoFOV()
{
std::vector<void*> enemies;
void* GameFacade = *(void**)getRealOffset([Link]);
if (GameFacade != nullptr) {
void* MatchGame = *(void**)((uint64_t)GameFacade + [Link]);
if (MatchGame != nullptr) {
void* ClassMatchGame = *(void**)((uint64_t)MatchGame +
[Link]);
if (ClassMatchGame != nullptr) {
void* current_match = *(void**)((uint64_t)ClassMatchGame +
pAddress.m_Match);
if (current_match != nullptr) {
auto matchStatus = *(uint32_t*)((uint64_t)current_match +
[Link]);
if (matchStatus == 1) {

System_Collections_Generic_Dictionary_IHAAMHPPLMG__Player__o* MonoPlayer =
*(System_Collections_Generic_Dictionary_IHAAMHPPLMG__Player__o**)
((uint64_t)current_match + [Link]);
if (MonoPlayer != nullptr) {
COW_GamePlay_Player_array* players = MonoPlayer-
>valueSlots;
if (players != nullptr) {
int playerCount = players->max_length;
if (playerCount > 1) {
void* LocalPlayer = Current_Local_Player();
for (int i = 0; i < playerCount; ++i) {
void* enemy = players->m_Items[i];
if (enemy == nullptr || enemy ==
LocalPlayer) continue;
if (!IsStreamerVisible(enemy)) continue;
if (IsDieing(enemy)) continue;
if (IsLocalTeammate(enemy)) continue;
if (GetHp(enemy) <= 0) continue;
enemies.push_back(enemy);
}
}
}
}
}
}
}
}
}
return enemies;
}
bool (*Old_Physics$$Raycast)(Vector3, Vector3, UnityEngine_RaycastHit_o *hitInfo,
float, int32_t);
bool New_Physics$$Raycast(Vector3 origin, Vector3
direction,UnityEngine_RaycastHit_o *hitInfo, float maxDistance, int32_t layerMask)
{
if ([Link]) {
if ([Link]) {
void *closestEnemy = GetEnemyInsideFOV();
if (closestEnemy != NULL) {

void *HeadTF = TransformNode(


*(void **) ((uint64_t) closestEnemy + [Link]));

Vector3 enemyHeadPosition = Transform_INTERNAL_GetPosition(HeadTF);

direction = enemyHeadPosition - origin;

auto position = WorldToScreenPoint(enemyHeadPosition);


position.Y = g_screenHeight - position.Y;
if (pow(position.X - g_screenWidth / 2, 2) +
pow(position.Y - g_screenHeight / 2, 2) >=
pow([Link], 2)) {
direction = enemyHeadPosition - origin;
}
}
}

}
return Old_Physics$$Raycast(origin, direction, hitInfo, maxDistance,
layerMask);
}

void applyPatch() {
uintptr_t libBase = getLibBase("[Link]");
if (libBase == 0) {
return;
}
uintptr_t targetAddress = libBase + [Link];
unlockMemory(targetAddress);
patchFunction = MemoryPatch::createWithHex(targetAddress, ""); // fast switch
[Link]();

struct COW_GamePlay_PlayerID {
uint32_t m_Value;
uint32_t m_ID;
uint8_t m_TeamID;
uint8_t m_ShortID;
uint64_t m_IDMask;
};

struct DamageInfo2_o {
void *klass;
void *monitor;
int32_t DBLBLKADCNP;
int32_t KENBMOOEHBG;
monoString* JANPNJIFOJJ;
bool NNNADMOFPIE;
COW_GamePlay_PlayerID DHGCIEKPBFA;
void* GPBDEDFKJNA;
int32_t PIAMIOFEBKF;
Vector3 CNEICNJFGLM;
Vector3 HECJHKEDFEB;
Vector3 JNLGFLFLBHO;
uint8_t ACAKHEABPEJ;
bool MJIHLDJNHLF;
int32_t LOKIMAEAPCB;
monoDictionary<uint8_t*, void **> *FHLFLAHCIBN;
};

COW_GamePlay_PlayerID GetplayerID(void *_this)


{
return ((COW_GamePlay_PlayerID (*)(void *))getRealOffset([Link]))
(_this);
}
uint32_t CFFPIACECIG(COW_GamePlay_PlayerID IDNEFEOPGIF)
{
return ((uint32_t (*)
(COW_GamePlay_PlayerID))getRealOffset([Link]))(IDNEFEOPGIF);
}

monoList<float *> *LCLHHHKFCFP(void *Weapon, void *CAGCICACKCF, void *HFBDJJDICLN,


bool LDGHPOPPPNL, DamageInfo2_o *DamageInfo)
{
return ((monoList<float *> * (*)(void*, void*, void*, bool,
DamageInfo2_o*))getRealOffset([Link]))(Weapon, CAGCICACKCF,
HFBDJJDICLN, LDGHPOPPPNL, DamageInfo);
}

// Original Player_TakeDamage function pointer


int32_t (*Original_Player_TakeDamage)(void *Player, int32_t p_damage,
COW_GamePlay_PlayerID PlayerID, DamageInfo2_o *DamageInfo, int32_t WeaponDataID,
Vector3 FirePos, Vector3 TargetPos, monoList<float *> *CheckParams, void *p_idk1,
int32_t p_idk2) = nullptr;

int32_t Hooked_Player_TakeDamage(void *Player, int32_t p_damage,


COW_GamePlay_PlayerID PlayerID, DamageInfo2_o *DamageInfo, int32_t WeaponDataID,
Vector3 FirePos, Vector3 TargetPos, monoList<float *> *CheckParams, void *p_idk1,
int32_t p_idk2)
{
// Bullet Teleportation - Teleport bullet directly to enemy head
if ([Link] && Player != nullptr)
{
void* localPlayer = Current_Local_Player();
if (localPlayer != nullptr && Player != localPlayer)
{
// Check if target is an enemy (not teammate, not dying, has HP)
if (!IsLocalTeammate(Player) && !IsDieing(Player) && GetHp(Player) > 0
&& IsStreamerVisible(Player))
{
// Get enemy head position
void* EnemyHeadTF = TransformNode(*(void**)((uint64_t)Player +
[Link]));
if (EnemyHeadTF != nullptr)
{
Vector3 headPos = Transform_INTERNAL_GetPosition(EnemyHeadTF);

// Small accuracy adjustment


headPos.Y += 0.1f;

// Modify DamageInfo to teleport bullet to head


if (DamageInfo != nullptr)
{
// Modify HitPos - where the bullet actually hit
*(Vector3*)((uint64_t)DamageInfo + [Link]) =
headPos;

// Modify HitNormal to point from FirePos to headPos for


proper hit direction
Vector3 hitNormal = headPos - FirePos;
float normalLength = sqrtf(hitNormal.X * hitNormal.X +
hitNormal.Y * hitNormal.Y + hitNormal.Z * hitNormal.Z);
if (normalLength > 0.0001f)
{
hitNormal.X /= normalLength;
hitNormal.Y /= normalLength;
hitNormal.Z /= normalLength;
*(Vector3*)((uint64_t)DamageInfo + [Link])
= hitNormal;
}
}

// Modify TargetPos by passing head position to original


function
TargetPos = headPos;
}
}
}
}

// Call original function with modified TargetPos


if (Original_Player_TakeDamage != nullptr)
{
return Original_Player_TakeDamage(Player, p_damage, PlayerID, DamageInfo,
WeaponDataID, FirePos, TargetPos, CheckParams, p_idk1, p_idk2);
}

// Fallback to direct call if hook not initialized


return ((int32_t (*)(void *, int32_t, COW_GamePlay_PlayerID, DamageInfo2_o *,
int32_t, Vector3, Vector3, monoList<float *> *, void *,
uint32_t))getRealOffset(pAddress.Player_TakeDamage))(Player, p_damage, PlayerID,
DamageInfo, WeaponDataID, FirePos, TargetPos, CheckParams, p_idk1, p_idk2);
}

int32_t Player_TakeDamage(void *Player, int32_t p_damage, COW_GamePlay_PlayerID


PlayerID, DamageInfo2_o *DamageInfo, int32_t WeaponDataID, Vector3 FirePos, Vector3
TargetPos, monoList<float *> *CheckParams, void *p_idk1, int32_t p_idk2)
{
// Use hooked version if available, otherwise call original
if (Original_Player_TakeDamage != nullptr)
{
return Hooked_Player_TakeDamage(Player, p_damage, PlayerID, DamageInfo,
WeaponDataID, FirePos, TargetPos, CheckParams, p_idk1, p_idk2);
}
return ((int32_t (*)(void *, int32_t, COW_GamePlay_PlayerID, DamageInfo2_o *,
int32_t, Vector3, Vector3, monoList<float *> *, void *,
uint32_t))getRealOffset(pAddress.Player_TakeDamage))(Player, p_damage, PlayerID,
DamageInfo, WeaponDataID, FirePos, TargetPos, CheckParams, p_idk1, p_idk2);
}

/*void CheckNotableDamage(void *Pthis, void *localplayer, void *damager)


{
return ((void (*)(void *, void *, void
*))getRealOffset([Link]))(Pthis, localplayer, damager);
}*/

#include <cstdint>

void ForceAutoSwitchReliable()
{
static int currentSlot = 0;
static int switchCounter = 0;
static int skipCounter = 0;

// Simple counter-based method - slow switching for stability


constexpr int switchInterval = 150; // Switch every 150 calls - very slow,
ensures all guns switch properly
constexpr int skipAfterSwitch = 8; // Skip more calls after switching to give
game time to process all weapons
constexpr int maxSlots = 5; // Include weapon slots: primary1, primary2,
secondary, melee, throwable (hand slot)

void* localPlayer = Current_Local_Player();


if (localPlayer == nullptr) {
switchCounter = 0;
skipCounter = 0;
return;
}

if (![Link]) {
switchCounter = 0;
skipCounter = 0;
return;
}

// Skip a few calls immediately after switching to prevent rapid fire


if (skipCounter > 0) {
skipCounter--;
return;
}

// Increment counter on each call


switchCounter++;

// Only switch when counter reaches interval - prevents crashes


if (switchCounter < switchInterval) {
return;
}

// Reset counter and set skip counter


switchCounter = 0;
skipCounter = skipAfterSwitch;

// Cycle to next slot sequentially (0->1->2->3->4->0->1...) - switches through


all 5 weapon slots
currentSlot = (currentSlot + 1) % maxSlots;

// Use both methods to ensure ALL weapons switch properly - all guns will
switch
// Method 1: SwapWeapon2 - works for all slots including melee (3) and
throwable (4)
if (SwapWeapon2 != nullptr && localPlayer != nullptr) {
SwapWeapon2(localPlayer, currentSlot, 1);
}

// Method 2: SwapWeapon - works for regular weapons (0, 1, 2) and backup for
all slots
// Using both methods ensures every weapon slot switches - no guns will be
skipped
if (SwapWeapon != nullptr && localPlayer != nullptr) {
SwapWeapon(localPlayer, currentSlot);
}
}

void* lockedSilentAimTarget = nullptr;

// Pull Enemy V2 - Aggressively pull enemies out of cover onto firing line
static std::map<uint64_t, Vector3> pullEnemyV2OriginalPositions;
static uint64_t pullEnemyV2CurrentTargetAddr = 0;
static float pullEnemyV2Time = 0.0f;
static bool wasFiring = false;
static auto lastPullEnemyV2Call = std::chrono::steady_clock::now();

void ApplyPullEnemyV2()
{
if (!MasterBool.PullEnemyV2Enabled)
{
wasFiring = false;
pullEnemyV2Time = 0.0f;
[Link]();
pullEnemyV2CurrentTargetAddr = 0;
return;
}

// Throttle execution based on PullEnemyV2TickMs


auto now = std::chrono::steady_clock::now();
auto elapsed = std::chrono::duration_cast<std::chrono::milliseconds>(now -
lastPullEnemyV2Call).count();
if (elapsed < MasterBool.PullEnemyV2TickMs)
{
return;
}
lastPullEnemyV2Call = now;

void* localPlayer = Current_Local_Player();


if (localPlayer == nullptr)
{
wasFiring = false;
return;
}

// Check if firing (sAim1)


uint32_t isFiringValue = *(uint32_t*)((uint64_t)localPlayer + pAddress.sAim1);
bool isFiring = (isFiringValue != 0);

// Detect when firing just started (instant pull trigger)


bool firingJustStarted = isFiring && !wasFiring;
wasFiring = isFiring;

if (isFiring)
{
// Find best target by FOV and distance (prioritize closest to crosshair)
void* bestTarget = nullptr;
float closestDist = FLT_MAX;
float screenCenterX = (float)(g_screenWidth / 2.0f);
float screenCenterY = (float)(g_screenHeight / 2.0f);

void* GameFacade = *(void**)getRealOffset([Link]);


if (GameFacade != nullptr)
{
void* MatchGame = *(void**)((uint64_t)GameFacade +
[Link]);
if (MatchGame != nullptr)
{
void* ClassMatchGame = *(void**)((uint64_t)MatchGame +
[Link]);
if (ClassMatchGame != nullptr)
{
void* current_match = *(void**)((uint64_t)ClassMatchGame +
pAddress.m_Match);
if (current_match != nullptr)
{
auto matchStatus = *(uint32_t*)((uint64_t)current_match +
[Link]);
if (matchStatus == 1)
{

System_Collections_Generic_Dictionary_IHAAMHPPLMG__Player__o* MonoPlayer =
*(System_Collections_Generic_Dictionary_IHAAMHPPLMG__Player__o**)
((uint64_t)current_match + [Link]);
if (MonoPlayer != nullptr)
{
COW_GamePlay_Player_array* players = MonoPlayer-
>valueSlots;
if (players != nullptr)
{
int playerCount = players->max_length;
if (playerCount > 1)
{
Vector3 camPos =
CameraPosition(localPlayer);

for (int i = 0; i < playerCount; ++i)


{
void* enemy = players->m_Items[i];
if (enemy == nullptr || enemy ==
localPlayer) continue;
if (!IsStreamerVisible(enemy))
continue;
if (IsDieing(enemy)) continue;
if (IsLocalTeammate(enemy)) continue;
if (GetHp(enemy) <= 0) continue;

void* EnemyHeadTF =
TransformNode(*(void**)((uint64_t)enemy + [Link]));
if (EnemyHeadTF == nullptr) continue;

Vector3 headPos =
Transform_INTERNAL_GetPosition(EnemyHeadTF);
Vector3 head2D =
WorldToScreenPoint(headPos);

if (head2D.X < 1 || head2D.Y < 1)


continue;

float dist3D = Vector3Distance(camPos,


headPos);
if (dist3D >
MasterBool.PullEnemyV2MaxDistance) continue;

float fovDist = sqrtf((head2D.X -


screenCenterX) * (head2D.X - screenCenterX) + (head2D.Y - screenCenterY) *
(head2D.Y - screenCenterY));
if (fovDist > [Link])
continue;

if (fovDist < closestDist)


{
closestDist = fovDist;
bestTarget = enemy;
}
}
}
}
}
}
}
}
}
}

if (bestTarget != nullptr)
{
uint64_t targetAddr = (uint64_t)bestTarget;

// Get root bone transform chain


void* rootBone = *(void**)((uint64_t)bestTarget + 0x3B8); // Root bone
offset
if (rootBone == nullptr) return;

void* transformValue = *(void**)((uint64_t)rootBone + 0x8);


if (transformValue == nullptr) return;

void* transformObjPtr = *(void**)((uint64_t)transformValue + 0x8);


if (transformObjPtr == nullptr) return;
void* matrixPtr = *(void**)((uint64_t)transformObjPtr + 0x20);
if (matrixPtr == nullptr) return;

// Get current position


Vector3 currentPos = *(Vector3*)((uint64_t)matrixPtr + 0x80);

// Store original position if first time


if ([Link](targetAddr) ==
[Link]())
{
pullEnemyV2OriginalPositions[targetAddr] = currentPos;
}

Vector3 originalPos = pullEnemyV2OriginalPositions[targetAddr];

// Get camera forward direction


void* cameraTransform = Component_get_transform(get_main());
if (cameraTransform == nullptr) return;

Vector3 fireDirection = Transform_get_forward(cameraTransform);


fireDirection = Vector3::Normalized(fireDirection);

// Get camera position


Vector3 camPos = CameraPosition(localPlayer);

// Get enemy head position


void* EnemyHeadTF = TransformNode(*(void**)((uint64_t)bestTarget +
[Link]));
if (EnemyHeadTF == nullptr) return;

Vector3 headPos = Transform_INTERNAL_GetPosition(EnemyHeadTF);

// Project enemy HEAD position on firing line for perfect bullet


connection
Vector3 toHead = headPos - camPos;
float projLength = Vector3::Dot(toHead, fireDirection);
Vector3 headLinePoint = camPos + fireDirection * projLength;

// Calculate root bone position relative to head


Vector3 headToRoot = currentPos - headPos;

// Target position = head on firing line + root offset


Vector3 idealRootPos = headLinePoint + headToRoot;

// If firing just started, INSTANTLY pull to firing line (no smooth


animation)
Vector3 pulledPosition;
if (firingJustStarted)
{
// Instant teleport to firing line when fire starts
pulledPosition = idealRootPos;
pullEnemyV2Time = 1.0f; // Set to max for instant effect
}
else
{
// Aggressive smooth pull while firing
pullEnemyV2Time += 0.08f; // Faster pull speed
float pullProgress = (pullEnemyV2Time *
(MasterBool.PullEnemyV2Strength * 2.0f) > 1.0f) ? 1.0f : pullEnemyV2Time *
(MasterBool.PullEnemyV2Strength * 2.0f);

// Enhanced lerp with easing for smoother but faster pull


float easedProgress = pullProgress * pullProgress * (3.0f - 2.0f *
pullProgress); // Smoothstep
pulledPosition = Vector3::Lerp(currentPos, idealRootPos,
easedProgress);
}

// Keep Y axis close to original (prevent floating)


float yAdjust = currentPos.Y - idealRootPos.Y;
if (fabsf(yAdjust) > 0.5f)
{
// Only adjust Y if difference is significant (cover situations)
pulledPosition.Y = currentPos.Y * 0.7f + idealRootPos.Y * 0.3f;
}
else
{
pulledPosition.Y = idealRootPos.Y;
}

// Limit max pull distance (XZ only) - increased limit for pulling out
of cover
float origX = originalPos.X;
float origZ = originalPos.Z;
float pulledX = pulledPosition.X;
float pulledZ = pulledPosition.Z;
float distance = sqrtf((pulledX - origX) * (pulledX - origX) + (pulledZ
- origZ) * (pulledZ - origZ));
float maxDistance = 25.0f; // Increased from 15.0f to pull enemies
further out of cover

if (distance > maxDistance)


{
// Limit pull but still allow significant movement
float dirX = pulledX - origX;
float dirZ = pulledZ - origZ;
float len = sqrtf(dirX * dirX + dirZ * dirZ);
if (len > 0.0001f)
{
dirX /= len;
dirZ /= len;
pulledPosition.X = origX + dirX * maxDistance;
pulledPosition.Z = origZ + dirZ * maxDistance;
}
}

// Write position aggressively for instant response


*(Vector3*)((uint64_t)matrixPtr + 0x80) = pulledPosition;
pullEnemyV2CurrentTargetAddr = targetAddr;
}
}
else
{
// Reset pull timer when not firing
if (wasFiring)
{
pullEnemyV2Time = 0.0f;
}
// Restore all positions when not firing
for (auto it = [Link](); it !=
[Link](); ++it)
{
uint64_t addr = it->first;
Vector3 orig = it->second;

void* enemy = (void*)addr;


if (enemy == nullptr) continue;

void* rootBone = *(void**)((uint64_t)enemy + 0x3B8);


if (rootBone == nullptr) continue;

void* transformValue = *(void**)((uint64_t)rootBone + 0x8);


if (transformValue == nullptr) continue;

void* transformObjPtr = *(void**)((uint64_t)transformValue + 0x8);


if (transformObjPtr == nullptr) continue;

void* matrixPtr = *(void**)((uint64_t)transformObjPtr + 0x20);


if (matrixPtr == nullptr) continue;

*(Vector3*)((uint64_t)matrixPtr + 0x80) = orig;


}

// Clear positions map only after a delay to prevent flicker


if (!wasFiring)
{
[Link]();
pullEnemyV2CurrentTargetAddr = 0;
pullEnemyV2Time = 0.0f;
}
}
}

// Pull Enemy V3[Visible] - Exact copy of V2, renamed to V3


static std::map<uint64_t, Vector3> pullEnemyV3OriginalPositions;
static uint64_t pullEnemyV3CurrentTargetAddr = 0;
static float pullEnemyV3Time = 0.0f;
static bool wasFiringV3 = false;
static auto lastPullEnemyV3Call = std::chrono::steady_clock::now();

void ApplyPullEnemyV3Visible()
{
if (!MasterBool.PullEnemyV3VisibleEnabled)
{
wasFiringV3 = false;
pullEnemyV3Time = 0.0f;
[Link]();
pullEnemyV3CurrentTargetAddr = 0;
return;
}

// Throttle execution based on PullEnemyV3VisibleTickMs


auto now = std::chrono::steady_clock::now();
auto elapsed = std::chrono::duration_cast<std::chrono::milliseconds>(now -
lastPullEnemyV3Call).count();
if (elapsed < MasterBool.PullEnemyV3VisibleTickMs)
{
return;
}
lastPullEnemyV3Call = now;

void* localPlayer = Current_Local_Player();


if (localPlayer == nullptr)
{
wasFiringV3 = false;
return;
}

// Check if firing (sAim1)


uint32_t isFiringValue = *(uint32_t*)((uint64_t)localPlayer + pAddress.sAim1);
bool isFiring = (isFiringValue != 0);

// Detect when firing just started (instant pull trigger)


bool firingJustStarted = isFiring && !wasFiringV3;
wasFiringV3 = isFiring;

if (isFiring)
{
// Find best target by FOV and distance (prioritize closest to crosshair)
void* bestTarget = nullptr;
float closestDist = FLT_MAX;
float screenCenterX = (float)(g_screenWidth / 2.0f);
float screenCenterY = (float)(g_screenHeight / 2.0f);

void* GameFacade = *(void**)getRealOffset([Link]);


if (GameFacade != nullptr)
{
void* MatchGame = *(void**)((uint64_t)GameFacade +
[Link]);
if (MatchGame != nullptr)
{
void* ClassMatchGame = *(void**)((uint64_t)MatchGame +
[Link]);
if (ClassMatchGame != nullptr)
{
void* current_match = *(void**)((uint64_t)ClassMatchGame +
pAddress.m_Match);
if (current_match != nullptr)
{
auto matchStatus = *(uint32_t*)((uint64_t)current_match +
[Link]);
if (matchStatus == 1)
{

System_Collections_Generic_Dictionary_IHAAMHPPLMG__Player__o* MonoPlayer =
*(System_Collections_Generic_Dictionary_IHAAMHPPLMG__Player__o**)
((uint64_t)current_match + [Link]);
if (MonoPlayer != nullptr)
{
COW_GamePlay_Player_array* players = MonoPlayer-
>valueSlots;
if (players != nullptr)
{
int playerCount = players->max_length;
if (playerCount > 1)
{
Vector3 camPos =
CameraPosition(localPlayer);

for (int i = 0; i < playerCount; ++i)


{
void* enemy = players->m_Items[i];
if (enemy == nullptr || enemy ==
localPlayer) continue;

if (!IsStreamerVisible(enemy))
continue;
if (IsDieing(enemy)) continue;
if (IsLocalTeammate(enemy)) continue;
if (GetHp(enemy) <= 0) continue;

void* EnemyHeadTF =
TransformNode(*(void**)((uint64_t)enemy + [Link]));
if (EnemyHeadTF == nullptr) continue;

Vector3 headPos =
Transform_INTERNAL_GetPosition(EnemyHeadTF);
Vector3 head2D =
WorldToScreenPoint(headPos);

if (head2D.X < 1 || head2D.Y < 1)


continue;

float dist3D = Vector3Distance(camPos,


headPos);
if (dist3D >
MasterBool.PullEnemyV3VisibleMaxDistance) continue;

float fovDist = sqrtf((head2D.X -


screenCenterX) * (head2D.X - screenCenterX) + (head2D.Y - screenCenterY) *
(head2D.Y - screenCenterY));
if (fovDist > [Link])
continue;

if (fovDist < closestDist)


{
closestDist = fovDist;
bestTarget = enemy;
}
}
}
}
}
}
}
}
}
}

if (bestTarget != nullptr)
{
uint64_t targetAddr = (uint64_t)bestTarget;

// Get root bone transform chain


void* rootBone = *(void**)((uint64_t)bestTarget + 0x3B8); // Root bone
offset
if (rootBone == nullptr) return;

void* transformValue = *(void**)((uint64_t)rootBone + 0x8);


if (transformValue == nullptr) return;

void* transformObjPtr = *(void**)((uint64_t)transformValue + 0x8);


if (transformObjPtr == nullptr) return;

void* matrixPtr = *(void**)((uint64_t)transformObjPtr + 0x20);


if (matrixPtr == nullptr) return;

// Get current position


Vector3 currentPos = *(Vector3*)((uint64_t)matrixPtr + 0x80);

// Store original position if first time


if ([Link](targetAddr) ==
[Link]())
{
pullEnemyV3OriginalPositions[targetAddr] = currentPos;
}

Vector3 originalPos = pullEnemyV3OriginalPositions[targetAddr];

// Get camera forward direction (same as V2)


void* cameraTransform = Component_get_transform(get_main());
if (cameraTransform == nullptr) return;

Vector3 fireDirection = Transform_get_forward(cameraTransform);


fireDirection = Vector3::Normalized(fireDirection);

// Get camera position


Vector3 camPos = CameraPosition(localPlayer);

// Get enemy head position


void* EnemyHeadTF = TransformNode(*(void**)((uint64_t)bestTarget +
[Link]));
if (EnemyHeadTF == nullptr) return;

Vector3 headPos = Transform_INTERNAL_GetPosition(EnemyHeadTF);

// Check if enemy is visible


void* hitObj = NULL;
bool hit = Physics_Raycast(camPos, headPos, 12, &hitObj);

// Only pull if enemy is NOT visible (behind wall)


if (!hit)
{
// Already visible, don't pull (let silent aim handle it)
return;
}

// Enemy is behind wall, find nearest visible position within 10m


radius
Vector3 headToRoot = currentPos - headPos;
Vector3 originalHeadPos = originalPos + headToRoot;

// Direction from enemy to camera


Vector3 toCamera = camPos - originalHeadPos;
float toCameraDist = Vector3::Magnitude(toCamera);
if (toCameraDist < 0.1f) return;

Vector3 toCameraDir = Vector3::Normalized(toCamera);


Vector3 horizontalDir = Vector3::Normalized(Vector3(toCamera.X, 0,
toCamera.Z));

// Simple search: test key directions with binary search for efficiency
Vector3 bestVisibleRootPos = originalPos;
float bestMoveDist = FLT_MAX;
float maxRadius = 10.0f;

// Test only essential directions: towards camera, perpendicular, and


up
Vector3 testDirs[5];
testDirs[0] = horizontalDir; // Towards camera (horizontal)
testDirs[1] = Vector3(horizontalDir.Z, 0, -horizontalDir.X); //
Perpendicular right
testDirs[2] = Vector3(-horizontalDir.Z, 0, horizontalDir.X); //
Perpendicular left
testDirs[3] = Vector3(0, 1, 0); // Up
testDirs[4] = Vector3::Normalized(horizontalDir + Vector3(0, 0.5f, 0));
// Towards camera + up

// For each direction, use binary search to find minimum visible


distance
for (int dirIdx = 0; dirIdx < 5; dirIdx++)
{
float minDist = 0.0f;
float maxDist = maxRadius;
float bestDist = maxRadius;
bool foundVisible = false;

// Binary search for minimum visible distance in this direction


for (int i = 0; i < 15; i++) // Reduced iterations
{
float testDist = (minDist + maxDist) * 0.5f;
Vector3 testRootPos = originalPos + testDirs[dirIdx] *
testDist;
Vector3 testHeadPos = testRootPos + headToRoot;

void* testHitObj = NULL;


bool testHit = Physics_Raycast(camPos, testHeadPos, 12,
&testHitObj);

if (!testHit)
{
// Visible! Try to get closer
foundVisible = true;
bestDist = testDist;
maxDist = testDist;
}
else
{
minDist = testDist;
}

if (maxDist - minDist < 0.2f) break; // Less precision for


speed
}

if (foundVisible && bestDist < bestMoveDist)


{
bestMoveDist = bestDist;
bestVisibleRootPos = originalPos + testDirs[dirIdx] * bestDist;
}
}

// If we found a visible position, use it


Vector3 idealRootPos;
if (bestMoveDist < FLT_MAX)
{
idealRootPos = bestVisibleRootPos;
}
else
{
// No visible position found within 10m, don't pull
return;
}

// If firing just started, INSTANTLY pull to visible position (no


smooth animation)
Vector3 pulledPosition;
if (firingJustStarted)
{
// Instant teleport to firing line when fire starts
pulledPosition = idealRootPos;
pullEnemyV3Time = 1.0f; // Set to max for instant effect
}
else
{
// Aggressive smooth pull while firing
pullEnemyV3Time += 0.08f; // Faster pull speed
float pullProgress = (pullEnemyV3Time *
(MasterBool.PullEnemyV3VisibleStrength * 2.0f) > 1.0f) ? 1.0f : pullEnemyV3Time *
(MasterBool.PullEnemyV3VisibleStrength * 2.0f);

// Enhanced lerp with easing for smoother but faster pull


float easedProgress = pullProgress * pullProgress * (3.0f - 2.0f *
pullProgress); // Smoothstep
pulledPosition = Vector3::Lerp(currentPos, idealRootPos,
easedProgress);
}

// Keep Y axis close to original (prevent floating)


float yAdjust = currentPos.Y - idealRootPos.Y;
if (fabsf(yAdjust) > 0.5f)
{
// Only adjust Y if difference is significant (cover situations)
pulledPosition.Y = currentPos.Y * 0.7f + idealRootPos.Y * 0.3f;
}
else
{
pulledPosition.Y = idealRootPos.Y;
}

// Limit max pull distance (XZ only) - increased limit for pulling out
of cover
float origX = originalPos.X;
float origZ = originalPos.Z;
float pulledX = pulledPosition.X;
float pulledZ = pulledPosition.Z;
float distance = sqrtf((pulledX - origX) * (pulledX - origX) + (pulledZ
- origZ) * (pulledZ - origZ));
float maxDistance = 25.0f; // Increased from 15.0f to pull enemies
further out of cover

if (distance > maxDistance)


{
// Limit pull but still allow significant movement
float dirX = pulledX - origX;
float dirZ = pulledZ - origZ;
float len = sqrtf(dirX * dirX + dirZ * dirZ);
if (len > 0.0001f)
{
dirX /= len;
dirZ /= len;
pulledPosition.X = origX + dirX * maxDistance;
pulledPosition.Z = origZ + dirZ * maxDistance;
}
}

// Write position aggressively for instant response


*(Vector3*)((uint64_t)matrixPtr + 0x80) = pulledPosition;
pullEnemyV3CurrentTargetAddr = targetAddr;
}
}
else
{
// Reset pull timer when not firing
if (wasFiringV3)
{
pullEnemyV3Time = 0.0f;
}

// Restore all positions when not firing


for (auto it = [Link](); it !=
[Link](); ++it)
{
uint64_t addr = it->first;
Vector3 orig = it->second;

void* enemy = (void*)addr;


if (enemy == nullptr) continue;

void* rootBone = *(void**)((uint64_t)enemy + 0x3B8);


if (rootBone == nullptr) continue;

void* transformValue = *(void**)((uint64_t)rootBone + 0x8);


if (transformValue == nullptr) continue;

void* transformObjPtr = *(void**)((uint64_t)transformValue + 0x8);


if (transformObjPtr == nullptr) continue;

void* matrixPtr = *(void**)((uint64_t)transformObjPtr + 0x20);


if (matrixPtr == nullptr) continue;
*(Vector3*)((uint64_t)matrixPtr + 0x80) = orig;
}

// Clear positions map only after a delay to prevent flicker


if (!wasFiringV3)
{
[Link]();
pullEnemyV3CurrentTargetAddr = 0;
pullEnemyV3Time = 0.0f;
}
}
}

// Bullet Teleportation - Teleport bullet directly to enemy head by modifying start


position and direction
void ApplyBulletTeleport()
{
if (![Link])
{
return;
}

void* localPlayer = Current_Local_Player();


if (localPlayer == nullptr)
{
return;
}

// Check if player is firing (sAim1)


uint32_t isFiringValue = *(uint32_t*)((uint64_t)localPlayer + pAddress.sAim1);
if (isFiringValue == 0)
{
return;
}

// Get silent aim object (sAim2 = HitObjInfoWeapon) - this is where bullet


trajectory is stored
uint64_t silentObj = *(uint64_t*)((uint64_t)localPlayer + pAddress.sAim2);
if (silentObj == 0)
{
return;
}

// Find best target (closest enemy to crosshair within FOV)


void* bestTarget = nullptr;
float closestDist = FLT_MAX;
float screenCenterX = (float)(g_screenWidth / 2.0f);
float screenCenterY = (float)(g_screenHeight / 2.0f);

void* GameFacade = *(void**)getRealOffset([Link]);


if (GameFacade != nullptr)
{
void* MatchGame = *(void**)((uint64_t)GameFacade + [Link]);
if (MatchGame != nullptr)
{
void* ClassMatchGame = *(void**)((uint64_t)MatchGame +
[Link]);
if (ClassMatchGame != nullptr)
{
void* current_match = *(void**)((uint64_t)ClassMatchGame +
pAddress.m_Match);
if (current_match != nullptr)
{
auto matchStatus = *(uint32_t*)((uint64_t)current_match +
[Link]);
if (matchStatus == 1)
{

System_Collections_Generic_Dictionary_IHAAMHPPLMG__Player__o* MonoPlayer =
*(System_Collections_Generic_Dictionary_IHAAMHPPLMG__Player__o**)
((uint64_t)current_match + [Link]);
if (MonoPlayer != nullptr)
{
COW_GamePlay_Player_array* players = MonoPlayer-
>valueSlots;
if (players != nullptr)
{
int playerCount = players->max_length;
if (playerCount > 1)
{
for (int i = 0; i < playerCount; ++i)
{
void* enemy = players->m_Items[i];
if (enemy == nullptr || enemy ==
localPlayer) continue;

if (!IsStreamerVisible(enemy)) continue;
if (IsDieing(enemy)) continue;
if (IsLocalTeammate(enemy)) continue;
if (GetHp(enemy) <= 0) continue;

void* EnemyHeadTF = TransformNode(*(void**)


((uint64_t)enemy + [Link]));
if (EnemyHeadTF == nullptr) continue;

Vector3 headPos =
Transform_INTERNAL_GetPosition(EnemyHeadTF);
Vector3 head2D =
WorldToScreenPoint(headPos);

if (head2D.X < 1 || head2D.Y < 1) continue;

// Calculate distance to crosshair center


float fovDist = sqrtf((head2D.X -
screenCenterX) * (head2D.X - screenCenterX) + (head2D.Y - screenCenterY) *
(head2D.Y - screenCenterY));

// Only consider enemies within FOV


if (fovDist > [Link])
continue;

// Select closest to crosshair


if (fovDist < closestDist)
{
closestDist = fovDist;
bestTarget = enemy;
}
}
}
}
}
}
}
}
}
}

// If we found a target, teleport bullet to its head


if (bestTarget != nullptr && !IsDieing(bestTarget))
{
// Write head collider for better hit registration (like silent aim does)
void* headCollider = get_HeadCollider(bestTarget);
if (headCollider != nullptr)
{
*(void**)((uint64_t)bestTarget + 0x50) = headCollider;
}

// Get target head position


void* EnemyHeadTF = TransformNode(*(void**)((uint64_t)bestTarget +
[Link]));
if (EnemyHeadTF != nullptr)
{
Vector3 target = Transform_INTERNAL_GetPosition(EnemyHeadTF);

// Small accuracy adjustment


target.Y += 0.1f;

// Get camera forward direction for proper orientation


void* cameraTransform = Component_get_transform(get_main());
Vector3 cameraForward = Vector3(0, 0, -1); // Default forward
if (cameraTransform != nullptr)
{
cameraForward = Transform_get_forward(cameraTransform);
cameraForward = Vector3::Normalized(cameraForward);
}

// Bullet teleportation - move start position very close to target


// Set start position just behind the target relative to camera (for
wall penetration)
Vector3 teleportPos = target;
// Move start position slightly behind target in camera direction (for
wall penetration)
teleportPos.X -= cameraForward.X * 0.1f;
teleportPos.Y -= cameraForward.Y * 0.1f;
teleportPos.Z -= cameraForward.Z * 0.1f;

// Write start position (sAim3 = offset 0x38) - teleport start position


near target
*(Vector3*)((uint64_t)silentObj + pAddress.sAim3) = teleportPos;

// Set direction to move a very short distance to target (instant hit)


Vector3 shortDir = target - teleportPos;
float len = sqrtf(shortDir.X * shortDir.X + shortDir.Y * shortDir.Y +
shortDir.Z * shortDir.Z);
if (len > 0.0001f)
{
// Normalize direction
shortDir.X /= len;
shortDir.Y /= len;
shortDir.Z /= len;
// Make it a very short distance for instant hit (0.1f as in
example)
shortDir.X *= 0.1f; // Very short distance for instant teleport
shortDir.Y *= 0.1f;
shortDir.Z *= 0.1f;
}
else
{
// If positions are too close, use a tiny forward vector
shortDir = cameraForward;
shortDir.X *= 0.1f;
shortDir.Y *= 0.1f;
shortDir.Z *= 0.1f;
}

// Write direction (sAim4 = offset 0x2C) - very short distance for


instant hit
*(Vector3*)((uint64_t)silentObj + pAddress.sAim4) = shortDir;

// Also modify ObjectPool to ensure hit registration works through


cover
void* ObjectPool = *(void**)((uint64_t)localPlayer +
[Link]);
if (ObjectPool != nullptr)
{
if (headCollider != nullptr)
{
// Modify ObjectPool to point to enemy head - ensures hit
registration
*(void**)((uint64_t)ObjectPool + [Link]) =
get_gameObject(headCollider);
*(void**)((uint64_t)ObjectPool + [Link]) =
headCollider;
*(int*)((uint64_t)ObjectPool + [Link]) = 1; // Head
group
}
}
}
}
}

void ApplySilentAim()
{
if (![Link])
{
lockedSilentAimTarget = nullptr;
return;
}

void* localPlayer = Current_Local_Player();


if (localPlayer == nullptr)
{
lockedSilentAimTarget = nullptr;
return;
}
// Check if player is firing (sAim1) - read as 32-bit value
uint32_t isFiringValue = *(uint32_t*)((uint64_t)localPlayer + pAddress.sAim1);
if (isFiringValue == 0)
{
lockedSilentAimTarget = nullptr;
return;
}

// Get silent aim object (sAim2 = HitObjInfoWeapon)


uint64_t silentObj = *(uint64_t*)((uint64_t)localPlayer + pAddress.sAim2);
if (silentObj == 0)
{
return;
}

// Read start position (sAim3)


Vector3 startPos = *(Vector3*)((uint64_t)silentObj + pAddress.sAim3);

// Disable bullet trace in POV when silent aim is active (hide bullet tracking)
void* weaponOnHand = GetWeaponOnHand(localPlayer);
if (weaponOnHand != nullptr) {
void* weaponData = *(void**)((uint64_t)weaponOnHand + [Link]);
if (weaponData != nullptr) {
// Disable ShowMyGunTraceEffect to hide bullet trail in POV
*(bool*)((uint64_t)weaponData +
pAddress.WeaponEffectConfigData_ShowMyGunTraceEffect) = false;
}
}

// Always find the closest enemy to crosshair for maximum accuracy


void* bestTarget = nullptr;
float closestDist = FLT_MAX;
float screenCenterX = (float)(g_screenWidth / 2.0f);
float screenCenterY = (float)(g_screenHeight / 2.0f);

void* GameFacade = *(void**)getRealOffset([Link]);


if (GameFacade != nullptr)
{
void* MatchGame = *(void**)((uint64_t)GameFacade + [Link]);
if (MatchGame != nullptr)
{
void* ClassMatchGame = *(void**)((uint64_t)MatchGame +
[Link]);
if (ClassMatchGame != nullptr)
{
void* current_match = *(void**)((uint64_t)ClassMatchGame +
pAddress.m_Match);
if (current_match != nullptr)
{
auto matchStatus = *(uint32_t*)((uint64_t)current_match +
[Link]);
if (matchStatus == 1)
{

System_Collections_Generic_Dictionary_IHAAMHPPLMG__Player__o* MonoPlayer =
*(System_Collections_Generic_Dictionary_IHAAMHPPLMG__Player__o**)
((uint64_t)current_match + [Link]);
if (MonoPlayer != nullptr)
{
COW_GamePlay_Player_array* players = MonoPlayer-
>valueSlots;
if (players != nullptr)
{
int playerCount = players->max_length;
if (playerCount > 1)
{
for (int i = 0; i < playerCount; ++i)
{
void* enemy = players->m_Items[i];
if (enemy == nullptr || enemy ==
localPlayer) continue;

if (!IsStreamerVisible(enemy)) continue;
if (IsDieing(enemy)) continue;
if (IsLocalTeammate(enemy)) continue;
if (GetHp(enemy) <= 0) continue;

void* EnemyHeadTF = TransformNode(*(void**)


((uint64_t)enemy + [Link]));
if (EnemyHeadTF == nullptr) continue;

Vector3 headPos =
Transform_INTERNAL_GetPosition(EnemyHeadTF);
Vector3 head2D =
WorldToScreenPoint(headPos);

if (head2D.X < 1 || head2D.Y < 1) continue;

// Calculate distance to crosshair center


float fovDist = sqrtf((head2D.X -
screenCenterX) * (head2D.X - screenCenterX) + (head2D.Y - screenCenterY) *
(head2D.Y - screenCenterY));

// Only consider enemies within FOV


if (fovDist > [Link])
continue;

// Select closest to crosshair


if (fovDist < closestDist)
{
closestDist = fovDist;
bestTarget = enemy;
}
}
}
}
}
}
}
}
}
}

if (bestTarget != nullptr && !IsDieing(bestTarget))


{
lockedSilentAimTarget = bestTarget;
// Write head collider for better hit registration
void* headCollider = get_HeadCollider(bestTarget);
if (headCollider != nullptr)
{
*(void**)((uint64_t)bestTarget + 0x50) = headCollider;
}

// Get target head position


void* EnemyHeadTF = TransformNode(*(void**)((uint64_t)bestTarget +
[Link]));
if (EnemyHeadTF != nullptr)
{
Vector3 target = Transform_INTERNAL_GetPosition(EnemyHeadTF);

// Enhanced accuracy adjustments for better connection


target.Y += 0.1f; // Accuracy adjustment

// Calculate precise aim direction (target - startPos) - exact


direction to target
Vector3 aimDirection;
aimDirection.X = target.X - startPos.X;
aimDirection.Y = target.Y - startPos.Y;
aimDirection.Z = target.Z - startPos.Z;

// Normalize direction to eliminate ALL spread (no recoil, no random


spread)
float directionLength = sqrtf(aimDirection.X * aimDirection.X +
aimDirection.Y * aimDirection.Y + aimDirection.Z * aimDirection.Z);
if (directionLength > 0.0001f) {
// Normalize to perfect unit vector (length = 1) - eliminates all
spread
aimDirection.X /= directionLength;
aimDirection.Y /= directionLength;
aimDirection.Z /= directionLength;
} else {
// Fallback: use forward direction if calculation fails
aimDirection = Vector3(0.0f, 0.0f, 1.0f);
}

// Write normalized direction vector every frame - prevents spread and


ensures straight bullets
// This overwrites any game spread/recoil calculations
*(Vector3*)((uint64_t)silentObj + pAddress.sAim4) = aimDirection;
}
}
else
{
lockedSilentAimTarget = nullptr; // Reset if no valid target

// Even when no target, write normalized forward direction to prevent


spread
// This ensures bullets always go straight even when not aiming at enemy
Vector3 forwardDir = Vector3(0.0f, 0.0f, 1.0f); // Forward direction
*(Vector3*)((uint64_t)silentObj + pAddress.sAim4) = forwardDir;
}
}

bool (*OriginalFunction)();
bool HookedFunction()
{
// Only hide damage if aimkill is active
if ([Link] || MasterBool.Aimkill360) {
return true;
}
// If aimkill is off, call original function to show damage
if (OriginalFunction != nullptr) {
return OriginalFunction();
}
return false;
}
void HideDamageShow() {
static bool hookApplied = false;
if (!hookApplied) {
MSHookFunction((void*)getRealOffset([Link]),
(void*)&HookedFunction, (void **)&OriginalFunction);
hookApplied = true;
}
}

void Syns_SwapWeapon(void *LocalPlayer)


{
void *WeaponOnHand = GetWeaponOnHand(LocalPlayer);
if (WeaponOnHand != nullptr) {
void *Class_RUDP_CHANGE_INVENTORY_ON_HAND_c = *(void
**)getRealOffset(pAddress.RUDP_CHANGE_INVENTORY_ON_HAND_c);
if (Class_RUDP_CHANGE_INVENTORY_ON_HAND_c == nullptr) {
int max = 5;
SwapWeapon2(LocalPlayer, rand() % max, 1);
}
if (Class_RUDP_CHANGE_INVENTORY_ON_HAND_c != nullptr) {
auto RUDP_CHANGE_INVENTORY_ON_HAND = ((void * (*)(void
*))getRealOffset(pAddress.RUDP_CHANGE_INVENTORY_ON_HAND))
(Class_RUDP_CHANGE_INVENTORY_ON_HAND_c);
if (RUDP_CHANGE_INVENTORY_ON_HAND) {
*(uint32_t*)((uint64_t)RUDP_CHANGE_INVENTORY_ON_HAND + 0xc) =
CFFPIACECIG(GetplayerID(LocalPlayer));
*(uint32_t*)((uint64_t)RUDP_CHANGE_INVENTORY_ON_HAND + 0x10) =
*(uint32_t*)((uint64_t)WeaponOnHand + 0x8);
GameFacade_Send(108, (GCommon_UDPClientMessageBase_o
*)RUDP_CHANGE_INVENTORY_ON_HAND, 2, 0);
}
}
}
return;
}

void StartAimKill(void* targetVivo)


{
void *LocalPlayer = Current_Local_Player();
if (LocalPlayer != NULL) {
void *weaponOnHand = GetWeaponOnHand(LocalPlayer);
if (weaponOnHand != nullptr) {
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized) {
SetStartDamage(weaponOnHand, *(void **)((uintptr_t)LocalPlayer +
[Link]));
((void* (*)(void *))getRealOffset(pAddress.DamageS2c))
(LocalPlayer);
s_Il2CppMethodIntialized = true;
}
void* targetEnemy = targetVivo;
if (targetEnemy != nullptr && (uintptr_t)targetEnemy > 0x1000) {
void *ObjectPool = *(void **)((uintptr_t)LocalPlayer +
[Link]);
if (ObjectPool != nullptr && (uintptr_t)ObjectPool > 0x1000) {
Syns_SwapWeapon(LocalPlayer);
((void* (*)(void *, void
*))getRealOffset([Link]))(LocalPlayer, weaponOnHand);
auto WeaponData = *(void **) ((uintptr_t) weaponOnHand +
[Link]);
if (WeaponData != nullptr && (uintptr_t)WeaponData > 0x1000) {
auto weaponDataID = *(int *)((uintptr_t)WeaponData +
[Link]);
auto baseDamage = GetDamage(weaponOnHand);
auto playerID = GetplayerID(LocalPlayer);
auto playerID2 = GetplayerID(targetEnemy);
void *HeadTF = TransformNode(*(void **)
((uint64_t)targetEnemy + [Link]));
if (HeadTF != nullptr && (uintptr_t)HeadTF > 0x1000) {
Vector3 m_Head =
Transform_INTERNAL_GetPosition(HeadTF);
void *HeadTF2 = TransformNode(*(void **)
((uint64_t)LocalPlayer + [Link]));
if (HeadTF2 != nullptr && (uintptr_t)HeadTF2 > 0x1000)
{
Vector3 m_HeadLocal =
Transform_INTERNAL_GetPosition(HeadTF2);
Vector3 LocalPlayerPos =
CameraPosition(LocalPlayer);
auto DamageS2c = (message_CHDLJFJCPFN_o *)((void*
(*)(void *))getRealOffset(pAddress.DamageS2c))(LocalPlayer);
if (DamageS2c) {
auto DamageInfo = (DamageInfo2_o *)((void *(*)
(void *))getRealOffset([Link]))(*(void
**)getRealOffset([Link]));
if (DamageInfo && (uintptr_t)DamageInfo >
0x1000) {
void* headCollider =
get_HeadCollider(targetEnemy);
if (headCollider != nullptr &&
(uintptr_t)headCollider > 0x1000) {
*(int *)((uintptr_t)DamageInfo +
[Link]) = baseDamage;
*(int *)((uintptr_t)DamageInfo +
[Link]) = 1;
*(void **) ((uintptr_t) DamageInfo +
[Link]) = weaponOnHand;
*(int*)((char*)DamageInfo +
[Link]) = weaponDataID;
*(COW_GamePlay_PlayerID *)
((char*)DamageInfo + [Link]) = playerID;
*(void **) ((uint64_t) ObjectPool +
[Link]) = get_gameObject(headCollider);
*(void **) ((uint64_t) ObjectPool +
[Link]) = headCollider;
*(int*)((uint64_t)ObjectPool +
[Link]) = 1;
monoList<float *> *CheckParametros =
LCLHHHKFCFP(GetWeaponOnHand(LocalPlayer), GKHECDLGAJA(LocalPlayer, ObjectPool),
headCollider, false, DamageInfo);
if (CheckParametros != nullptr) {
Player_TakeDamage(targetEnemy,
baseDamage, playerID, DamageInfo, weaponDataID, m_HeadLocal, m_Head,
CheckParametros, CheckParametros, 0);
}
}
}
}
}
}
}
}
}
}
}
return;
}

// SpawnKill - Teleport player to random enemy within 200m range


void ApplySpawnKill()
{
if (![Link])
return;

static auto lastCall = std::chrono::steady_clock::now();


auto now = std::chrono::steady_clock::now();
auto elapsed = std::chrono::duration_cast<std::chrono::milliseconds>(now -
lastCall).count();

// Throttle to every 200ms to avoid detection


if (elapsed < 200)
return;

void* localPlayer = Current_Local_Player();


if (localPlayer == nullptr)
return;

// Get player position first


void* playerRoot = *(void**)((uintptr_t)localPlayer + 0x380);
if (!playerRoot) return;

void* playerTransformValue = *(void**)((uintptr_t)playerRoot + 0x8);


if (!playerTransformValue) return;

void* playerTransformObj = *(void**)((uintptr_t)playerTransformValue + 0x8);


if (!playerTransformObj) return;

void* playerMatrix = *(void**)((uintptr_t)playerTransformObj + 0x20);


if (!playerMatrix) return;

Vector3 localPosition = *(Vector3*)((uintptr_t)playerMatrix + 0x80);

// Get all enemies within 200m range


void* GameFacade = *(void**)getRealOffset([Link]);
if (!GameFacade) return;
void* MatchGame = *(void**)((uint64_t)GameFacade + [Link]);
if (!MatchGame) return;

void* ClassMatchGame = *(void**)((uint64_t)MatchGame +


[Link]);
if (!ClassMatchGame) return;

void* current_match = *(void**)((uint64_t)ClassMatchGame + pAddress.m_Match);


if (!current_match) return;

auto* MonoPlayer =
*(System_Collections_Generic_Dictionary_IHAAMHPPLMG__Player__o**)
((uint64_t)current_match + [Link]);
if (!MonoPlayer) return;

COW_GamePlay_Player_array* players = MonoPlayer->valueSlots;


if (!players) return;

int playerCount = players->max_length;


const float maxRange = 200.0f; // 200 meters

// Collect all enemies within range


std::vector<void*> enemiesInRange;

for (int i = 0; i < playerCount; ++i)


{
void* enemy = players->m_Items[i];
if (!enemy || enemy == localPlayer) continue;

if (IsDieing(enemy)) continue;
if (IsLocalTeammate(enemy)) continue;
if (GetHp(enemy) <= 0) continue;

// Get enemy position


void* enemyRoot = *(void**)((uintptr_t)enemy + 0x3B8);
if (!enemyRoot) continue;

void* enemyTransformValue = *(void**)((uintptr_t)enemyRoot + 0x8);


if (!enemyTransformValue) continue;

void* enemyTransformObj = *(void**)((uintptr_t)enemyTransformValue + 0x8);


if (!enemyTransformObj) continue;

void* enemyMatrix = *(void**)((uintptr_t)enemyTransformObj + 0x20);


if (!enemyMatrix) continue;

Vector3 enemyPosition = *(Vector3*)((uintptr_t)enemyMatrix + 0x80);

// Check distance
float distance = Vector3Distance(enemyPosition, localPosition);
if (distance <= maxRange && distance > 0.0f) {
enemiesInRange.push_back(enemy);
}
}

// If no enemies in range, return


if ([Link]())
return;
// Pick random enemy from those in range
int randomIndex = rand() % [Link]();
void* targetEnemy = enemiesInRange[randomIndex];

// Get target enemy position


void* targetEnemyRoot = *(void**)((uintptr_t)targetEnemy + 0x3B8);
if (!targetEnemyRoot) return;

void* targetEnemyTransformValue = *(void**)((uintptr_t)targetEnemyRoot + 0x8);


if (!targetEnemyTransformValue) return;

void* targetEnemyTransformObj = *(void**)((uintptr_t)targetEnemyTransformValue


+ 0x8);
if (!targetEnemyTransformObj) return;

void* targetEnemyMatrix = *(void**)((uintptr_t)targetEnemyTransformObj + 0x20);


if (!targetEnemyMatrix) return;

Vector3 targetPosition = *(Vector3*)((uintptr_t)targetEnemyMatrix + 0x80);

// Teleport player to random enemy position


*(Vector3*)((uintptr_t)playerMatrix + 0x80) = targetPosition;

lastCall = now;
}

// TeleKill - Teleport enemies to player when within 10m range


void ApplyTeleKill()
{
if (![Link])
return;

static auto lastCall = std::chrono::steady_clock::now();


auto now = std::chrono::steady_clock::now();
auto elapsed = std::chrono::duration_cast<std::chrono::milliseconds>(now -
lastCall).count();

// Throttle to every 100ms to avoid detection and crashes


if (elapsed < 100)
return;

void* localPlayer = Current_Local_Player();


if (localPlayer == nullptr)
return;

// Get player position with proper validation


void* playerRoot = *(void**)((uintptr_t)localPlayer + 0x380);
if (!playerRoot || (uintptr_t)playerRoot < 0x1000) return;

void* playerTransformValue = *(void**)((uintptr_t)playerRoot + 0x8);


if (!playerTransformValue || (uintptr_t)playerTransformValue < 0x1000) return;

void* playerTransformObj = *(void**)((uintptr_t)playerTransformValue + 0x8);


if (!playerTransformObj || (uintptr_t)playerTransformObj < 0x1000) return;

void* playerMatrix = *(void**)((uintptr_t)playerTransformObj + 0x20);


if (!playerMatrix || (uintptr_t)playerMatrix < 0x1000) return;

Vector3 localPosition = *(Vector3*)((uintptr_t)playerMatrix + 0x80);


// Get all enemies and teleport those within 10m
void* GameFacade = *(void**)getRealOffset([Link]);
if (!GameFacade || (uintptr_t)GameFacade < 0x1000) return;

void* MatchGame = *(void**)((uint64_t)GameFacade + [Link]);


if (!MatchGame || (uintptr_t)MatchGame < 0x1000) return;

void* ClassMatchGame = *(void**)((uint64_t)MatchGame +


[Link]);
if (!ClassMatchGame || (uintptr_t)ClassMatchGame < 0x1000) return;

void* current_match = *(void**)((uint64_t)ClassMatchGame + pAddress.m_Match);


if (!current_match || (uintptr_t)current_match < 0x1000) return;

auto* MonoPlayer =
*(System_Collections_Generic_Dictionary_IHAAMHPPLMG__Player__o**)
((uint64_t)current_match + [Link]);
if (!MonoPlayer || (uintptr_t)MonoPlayer < 0x1000) return;

COW_GamePlay_Player_array* players = MonoPlayer->valueSlots;


if (!players || (uintptr_t)players < 0x1000) return;

int playerCount = players->max_length;


if (playerCount <= 0 || playerCount > 100) return; // Safety check

const float teleportRange = 10.0f; // 10 meters

for (int i = 0; i < playerCount; ++i)


{
void* enemy = players->m_Items[i];
if (!enemy || enemy == localPlayer || (uintptr_t)enemy < 0x1000) continue;

// Validate enemy before accessing


if (IsDieing(enemy)) continue;
if (IsLocalTeammate(enemy)) continue;
if (GetHp(enemy) <= 0) continue;

// Get enemy position with validation


void* enemyRoot = *(void**)((uintptr_t)enemy + 0x3B8);
if (!enemyRoot || (uintptr_t)enemyRoot < 0x1000) continue;

void* enemyTransformValue = *(void**)((uintptr_t)enemyRoot + 0x8);


if (!enemyTransformValue || (uintptr_t)enemyTransformValue < 0x1000)
continue;

void* enemyTransformObj = *(void**)((uintptr_t)enemyTransformValue + 0x8);


if (!enemyTransformObj || (uintptr_t)enemyTransformObj < 0x1000) continue;

void* enemyMatrix = *(void**)((uintptr_t)enemyTransformObj + 0x20);


if (!enemyMatrix || (uintptr_t)enemyMatrix < 0x1000) continue;

Vector3 enemyPosition = *(Vector3*)((uintptr_t)enemyMatrix + 0x80);

// Check distance
float distance = Vector3Distance(enemyPosition, localPosition);
if (distance <= teleportRange && distance > 0.0f) {
// Teleport enemy to player position
*(Vector3*)((uintptr_t)enemyMatrix + 0x80) = localPosition;
}
}

lastCall = now;
}

// RowdyKill - Combines Silent Aim + Pull Enemy: Pulls enemy to firing line and
kills them
static std::map<uint64_t, Vector3> rowdyKillOriginalPositions;
static bool rowdyKillWasFiring = false;

void ApplyRowdyKill()
{
if (![Link])
return;

static auto lastCall = std::chrono::steady_clock::now();


auto now = std::chrono::steady_clock::now();
auto elapsed = std::chrono::duration_cast<std::chrono::milliseconds>(now -
lastCall).count();

// Throttle to every 6ms for smooth operation


if (elapsed < 6)
return;

void* localPlayer = Current_Local_Player();


if (localPlayer == nullptr)
{
rowdyKillWasFiring = false;
return;
}

// Check if firing (sAim1)


uint32_t isFiringValue = *(uint32_t*)((uint64_t)localPlayer + pAddress.sAim1);
bool isFiring = (isFiringValue != 0);

// Detect when firing just started


bool firingJustStarted = isFiring && !rowdyKillWasFiring;
rowdyKillWasFiring = isFiring;

if (isFiring)
{
// Get silent aim object to get firing position
uint64_t silentObj = *(uint64_t*)((uint64_t)localPlayer + pAddress.sAim2);
if (silentObj == 0)
return;

// Read start position (firing position)


Vector3 startPos = *(Vector3*)((uint64_t)silentObj + pAddress.sAim3);

// Get camera forward direction for firing line


void* cameraTransform = Component_get_transform(get_main());
if (cameraTransform == nullptr)
return;

Vector3 fireDirection = Transform_get_forward(cameraTransform);


fireDirection = Vector3::Normalized(fireDirection);

// Get camera position


Vector3 camPos = CameraPosition(localPlayer);

// Find closest enemy to crosshair


void* bestTarget = nullptr;
float closestDist = FLT_MAX;
float screenCenterX = (float)(g_screenWidth / 2.0f);
float screenCenterY = (float)(g_screenHeight / 2.0f);

void* GameFacade = *(void**)getRealOffset([Link]);


if (GameFacade != nullptr)
{
void* MatchGame = *(void**)((uint64_t)GameFacade +
[Link]);
if (MatchGame != nullptr)
{
void* ClassMatchGame = *(void**)((uint64_t)MatchGame +
[Link]);
if (ClassMatchGame != nullptr)
{
void* current_match = *(void**)((uint64_t)ClassMatchGame +
pAddress.m_Match);
if (current_match != nullptr)
{
auto matchStatus = *(uint32_t*)((uint64_t)current_match +
[Link]);
if (matchStatus == 1)
{

System_Collections_Generic_Dictionary_IHAAMHPPLMG__Player__o* MonoPlayer =
*(System_Collections_Generic_Dictionary_IHAAMHPPLMG__Player__o**)
((uint64_t)current_match + [Link]);
if (MonoPlayer != nullptr)
{
COW_GamePlay_Player_array* players = MonoPlayer-
>valueSlots;
if (players != nullptr)
{
int playerCount = players->max_length;
if (playerCount > 1)
{
for (int i = 0; i < playerCount; ++i)
{
void* enemy = players->m_Items[i];
if (enemy == nullptr || enemy ==
localPlayer) continue;

if (!IsStreamerVisible(enemy))
continue;
if (IsDieing(enemy)) continue;
if (IsLocalTeammate(enemy)) continue;
if (GetHp(enemy) <= 0) continue;

void* EnemyHeadTF =
TransformNode(*(void**)((uint64_t)enemy + [Link]));
if (EnemyHeadTF == nullptr) continue;

Vector3 headPos =
Transform_INTERNAL_GetPosition(EnemyHeadTF);
Vector3 head2D =
WorldToScreenPoint(headPos);

if (head2D.X < 1 || head2D.Y < 1)


continue;

// Calculate distance to crosshair


center
float fovDist = sqrtf((head2D.X -
screenCenterX) * (head2D.X - screenCenterX) + (head2D.Y - screenCenterY) *
(head2D.Y - screenCenterY));

// Only consider enemies within FOV


if (fovDist > [Link])
continue;

// Select closest to crosshair


if (fovDist < closestDist)
{
closestDist = fovDist;
bestTarget = enemy;
}
}
}
}
}
}
}
}
}
}

if (bestTarget != nullptr && !IsDieing(bestTarget))


{
// Get weapon for range and visibility validation
void* weaponOnHand = GetWeaponOnHand(localPlayer);
if (weaponOnHand == nullptr)
return;

// CRITICAL VALIDATIONS to prevent fake damage (like aimkill does):


// 1. Check if enemy is within weapon range
if (!isEnemyInRangeWeapon(localPlayer, bestTarget, weaponOnHand))
return;

// 2. Check if enemy is visible (raycast check - no walls blocking)


if (!isVisible_Aimbot(bestTarget))
return;

// 3. Additional validation: Re-check enemy is still valid


if (IsDieing(bestTarget) || IsLocalTeammate(bestTarget) ||
GetHp(bestTarget) <= 0)
return;

// Get enemy root bone transform


void* enemyRoot = *(void**)((uint64_t)bestTarget + 0x3B8);
if (enemyRoot != nullptr)
{
void* transformValue = *(void**)((uint64_t)enemyRoot + 0x8);
if (transformValue != nullptr)
{
void* transformObjPtr = *(void**)((uint64_t)transformValue +
0x8);
if (transformObjPtr != nullptr)
{
void* matrixPtr = *(void**)((uint64_t)transformObjPtr +
0x20);
if (matrixPtr != nullptr)
{
// Get current enemy position
Vector3 currentPos = *(Vector3*)((uint64_t)matrixPtr +
0x80);

// Store original position if first time


uint64_t targetAddr = (uint64_t)bestTarget;
if ([Link](targetAddr) ==
[Link]())
{
rowdyKillOriginalPositions[targetAddr] =
currentPos;
}

// Get enemy head position


void* EnemyHeadTF = TransformNode(*(void**)
((uint64_t)bestTarget + [Link]));
if (EnemyHeadTF == nullptr) return;

Vector3 headPos =
Transform_INTERNAL_GetPosition(EnemyHeadTF);

// Project enemy head position onto firing line


Vector3 toHead = headPos - camPos;
float projLength = Vector3::Dot(toHead, fireDirection);
Vector3 headLinePoint = camPos + fireDirection *
projLength;

// Calculate root bone position relative to head


Vector3 headToRoot = currentPos - headPos;

// Target position = head on firing line + root offset


Vector3 idealRootPos = headLinePoint + headToRoot;

// Pull enemy to firing line (instant on first fire,


smooth afterwards)
Vector3 pulledPosition;
if (firingJustStarted)
{
// Instant pull when firing starts
pulledPosition = idealRootPos;
}
else
{
// Smooth pull while firing
pulledPosition.X = currentPos.X * 0.3f +
idealRootPos.X * 0.7f;
pulledPosition.Y = currentPos.Y * 0.3f +
idealRootPos.Y * 0.7f;
pulledPosition.Z = currentPos.Z * 0.3f +
idealRootPos.Z * 0.7f;
}
// Write position to pull enemy
*(Vector3*)((uint64_t)matrixPtr + 0x80) =
pulledPosition;

// Apply silent aim to ensure bullet hits pulled enemy


Vector3 target = headLinePoint;
target.Y += 0.1f; // Accuracy adjustment

Vector3 aimDirection;
aimDirection.X = target.X - startPos.X;
aimDirection.Y = target.Y - startPos.Y;
aimDirection.Z = target.Z - startPos.Z;

// Write aim direction to silent aim object


*(Vector3*)((uint64_t)silentObj + pAddress.sAim4) =
aimDirection;

// Deal damage to pulled enemy (with rate limiting to


prevent fake damage spam)
static auto lastDamageTime =
std::chrono::steady_clock::now();
auto currentTime = std::chrono::steady_clock::now();
auto damageElapsed =
std::chrono::duration_cast<std::chrono::milliseconds>(currentTime -
lastDamageTime).count();

// Rate limit damage to every 50ms (prevents fake


damage spam)
if (damageElapsed >= 50)
{
// Final validation before damage
if (!IsDieing(bestTarget) && !
IsLocalTeammate(bestTarget) && GetHp(bestTarget) > 0)
{
static bool rowdyKillInitialized = false;
if (!rowdyKillInitialized)
{
SetStartDamage(weaponOnHand, *(void**)
((uintptr_t)localPlayer + [Link]));
((void* (*)(void
*))getRealOffset(pAddress.DamageS2c))(localPlayer);
rowdyKillInitialized = true;
}

void* ObjectPool = *(void**)


((uintptr_t)localPlayer + [Link]);
if (ObjectPool != nullptr)
{
Syns_SwapWeapon(localPlayer);
((void* (*)(void *, void
*))getRealOffset([Link]))(localPlayer, weaponOnHand);

auto WeaponData = *(void**)


((uintptr_t)weaponOnHand + [Link]);
if (WeaponData == nullptr) return;

auto weaponDataID = *(int*)


((uintptr_t)WeaponData + [Link]);
auto baseDamage = GetDamage(weaponOnHand);

// Validate damage is valid (not 0 or


negative)
if (baseDamage <= 0 || weaponDataID <= 0)
return;

auto playerID = GetplayerID(localPlayer);

void* HeadTF = TransformNode(*(void**)


((uint64_t)bestTarget + [Link]));
if (HeadTF == nullptr) return;

Vector3 m_Head =
Transform_INTERNAL_GetPosition(HeadTF);
void* HeadTF2 = TransformNode(*(void**)
((uint64_t)localPlayer + [Link]));
if (HeadTF2 == nullptr) return;

Vector3 m_HeadLocal =
Transform_INTERNAL_GetPosition(HeadTF2);

// Validate head collider exists


void* headCollider =
get_HeadCollider(bestTarget);
if (headCollider == nullptr) return;

auto DamageS2c = (message_CHDLJFJCPFN_o*)


((void* (*)(void*))getRealOffset(pAddress.DamageS2c))(localPlayer);
if (DamageS2c)
{
auto DamageInfo = (DamageInfo2_o*)
((void*(*)(void*))getRealOffset([Link]))
(*(void**)getRealOffset([Link]));
if (DamageInfo)
{
*(int*)((uintptr_t)DamageInfo +
[Link]) = baseDamage;
*(int*)((uintptr_t)DamageInfo +
[Link]) = 1;
*(void**)((uintptr_t)DamageInfo +
[Link]) = weaponOnHand;
*(int*)((char*)DamageInfo +
[Link]) = weaponDataID;
*(COW_GamePlay_PlayerID*)
((char*)DamageInfo + [Link]) = playerID;
*(void**)((uint64_t)ObjectPool +
[Link]) = get_gameObject(headCollider);
*(void**)((uint64_t)ObjectPool +
[Link]) = headCollider;
*(int*)((uint64_t)ObjectPool +
[Link]) = 1;
monoList<float*>* CheckParametros =
LCLHHHKFCFP(GetWeaponOnHand(localPlayer), GKHECDLGAJA(localPlayer, ObjectPool),
headCollider, false, DamageInfo);
Player_TakeDamage(bestTarget,
baseDamage, playerID, DamageInfo, weaponDataID, m_HeadLocal, m_Head,
CheckParametros, CheckParametros, 0);
lastDamageTime = currentTime;
}
}
}
}
}
}
}
}
}
}
}
else
{
// Restore original positions when not firing
if (rowdyKillWasFiring)
{
for (auto it = [Link](); it !=
[Link](); ++it)
{
uint64_t addr = it->first;
Vector3 orig = it->second;

void* enemy = (void*)addr;


if (enemy == nullptr) continue;

void* rootBone = *(void**)((uint64_t)enemy + 0x3B8);


if (rootBone == nullptr) continue;

void* transformValue = *(void**)((uint64_t)rootBone + 0x8);


if (transformValue == nullptr) continue;

void* transformObjPtr = *(void**)((uint64_t)transformValue + 0x8);


if (transformObjPtr == nullptr) continue;

void* matrixPtr = *(void**)((uint64_t)transformObjPtr + 0x20);


if (matrixPtr == nullptr) continue;

*(Vector3*)((uint64_t)matrixPtr + 0x80) = orig;


}
[Link]();
}
rowdyKillWasFiring = false;
}

lastCall = now;
}

/*void Telekillkk(void* targetVivo)


{

if ([Link])
{
void *LocalPlayer = Current_Local_Player();
if (LocalPlayer != NULL) {
void *weaponOnHand = GetWeaponOnHand(LocalPlayer);
if (weaponOnHand != nullptr)
{
//LOGI("weaponOnHand");
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized)
{
((void (*)(void *,void*))getRealOffset(0x1821DCC))
(weaponOnHand, *(void**)((uint64_t)LocalPlayer + 0x854));
((void* (*)(void *))getRealOffset(0x13AE504))(LocalPlayer);
s_Il2CppMethodIntialized = true;
}

void* targetEnemy = targetVivo;

if (targetEnemy != nullptr)
{
if ([Link] && targetEnemy != nullptr &&
LocalPlayer != nullptr) {
// Get transforms
void* enemyRoot = *(void**)((uintptr_t)targetEnemy +
0x3B8); // Root bone
if (!enemyRoot) return;

void* enemyTransform = *(void**)((uintptr_t)enemyRoot +


0x8); // TransformNode
if (!enemyTransform) return;

void* enemyTransformObj = *(void**)


((uintptr_t)enemyTransform + 0x8);
if (!enemyTransformObj) return;

void* enemyMatrix = *(void**)((uintptr_t)enemyTransformObj


+ 0x20);
if (!enemyMatrix) return;

void* playerRoot = *(void**)((uintptr_t)LocalPlayer +


0x380); // Local root bone
if (!playerRoot) return;

void* playerTransform = *(void**)((uintptr_t)playerRoot +


0x8);
if (!playerTransform) return;

void* playerTransformObj = *(void**)


((uintptr_t)playerTransform + 0x8);
if (!playerTransformObj) return;

void* playerMatrix = *(void**)


((uintptr_t)playerTransformObj + 0x20);
if (!playerMatrix) return;

Vector3 localPosition = *(Vector3*)((uintptr_t)playerMatrix


+ 0x80); // Get real root pos
Vector3 enemyPosition = *(Vector3*)((uintptr_t)enemyMatrix
+ 0x80);

float distance = Vector3Distance(enemyPosition,


localPosition);
if (distance <= 10.0f) {
*(Vector3*)((uintptr_t)enemyMatrix + 0x80) =
localPosition; // Teleport
}
//Speed Hack
/*void* timeService = *(void**)((uintptr_t)currentGame +
0x10); // GameTimer
if (!timeService) return;

// Set higher FixedDeltaTime (faster game)


*(float*)((uintptr_t)timeService + 0x24) = 0.065f; //
FixedDeltaTime
}

}
}
}
}

return;
}*/

void dwonplayerloop() {
static auto last = std::chrono::steady_clock::now();
auto now = std::chrono::steady_clock::now();

long long elapsed = std::chrono::duration_cast<std::chrono::milliseconds>(now -


last).count();
if (elapsed < 200) return; // Runs every 200ms (slower to reduce load)
last = now;

void* localPlayer = Current_Local_Player();


if (localPlayer == nullptr) return;

if (![Link]) return;

void *ClosestEnemy = GetClosestEnemy360();

// ⬇️ DOWNKILL - Moves enemy down by 3.75 units


if (ClosestEnemy != nullptr && (uintptr_t)ClosestEnemy > 0x1000) {
auto enemyTransform = Component_get_transform(ClosestEnemy);
if (enemyTransform != nullptr && (uintptr_t)enemyTransform > 0x1000) {
Vector3 centerPos = Transform_INTERNAL_GetPosition(enemyTransform);

Vector3 newPos;
newPos.X = centerPos.X; // Keep X
newPos.Z = centerPos.Z; // Keep Z
newPos.Y = centerPos.Y - 3.75f; // Move DOWN 3.75 units

Transform_set_position(enemyTransform, newPos);
}
}
}
/*
if ([Link] && localPlayer != nullptr) {
auto tf = Component_get_transform(localPlayer);
Vector3 currentPos = Transform_INTERNAL_GetPosition(tf);

currentPos.Y -= 1.35f; // ⬇️ Go down from current position


Transform_set_position(tf, currentPos);
}*/

std::chrono::steady_clock::time_point last_update_time =
std::chrono::steady_clock::now();

GCommon_AnimationRuntimeHandle_o *(*GetCurrentRunningHandler)
(GCommon_AnimationSystemComponent_o *Instance,int32_t layerIndex);
GCommon_AnimationRuntimeHandle_o
*_GetCurrentRunningHandler(GCommon_AnimationSystemComponent_o *Instance,int32_t
layerIndex)
{
if (Instance != nullptr) {
// Hide bullet tracking in POV when silent aim is active (bullets go
straight but no trail visible)
if ([Link]) {
void* localPlayer = Current_Local_Player();
if (localPlayer != nullptr) {
void* weaponOnHand = GetWeaponOnHand(localPlayer);
if (weaponOnHand != nullptr) {
void* weaponData = *(void**)((uint64_t)weaponOnHand +
[Link]);
if (weaponData != nullptr) {
// Disable ShowMyGunTraceEffect - hides bullet
trail/tracking line in POV
// Bullets still go straight but you won't see the tracking
line
*(bool*)((uint64_t)weaponData +
pAddress.WeaponEffectConfigData_ShowMyGunTraceEffect) = false;
}
}

// Also continuously write normalized direction to prevent any


spread
// This ensures bullets always go perfectly straight
uint64_t silentObj = *(uint64_t*)((uint64_t)localPlayer +
pAddress.sAim2);
if (silentObj != 0 && (uintptr_t)silentObj > 0x1000) {
// Read current direction and normalize it to prevent spread
Vector3 currentDir = *(Vector3*)((uint64_t)silentObj +
pAddress.sAim4);
float dirLength = sqrtf(currentDir.X * currentDir.X +
currentDir.Y * currentDir.Y + currentDir.Z * currentDir.Z);
if (dirLength > 0.0001f) {
// Normalize to eliminate any spread
currentDir.X /= dirLength;
currentDir.Y /= dirLength;
currentDir.Z /= dirLength;
*(Vector3*)((uint64_t)silentObj + pAddress.sAim4) =
currentDir;
}
}
}
}

// Apply Pull Enemy V2 if enabled


ApplyPullEnemyV2();

// Apply Pull Enemy V3[Visible] if enabled


ApplyPullEnemyV3Visible();

// Apply Bullet Teleportation if enabled (BEFORE Silent Aim to prevent


override)
ApplyBulletTeleport();

// Apply Silent Aim if enabled (only if Bullet Teleport is not active)


if (![Link])
{
ApplySilentAim();
}

// Apply UltraSwitch if enabled


if ([Link]) {

// Apply SpawnKill if enabled


if ([Link]) {
ApplySpawnKill();
}

// Apply TeleKill if enabled


if ([Link]) {
ApplyTeleKill();
}

// Apply RowdyKill if enabled (combines Silent Aim + Pull Enemy + Damage)


if ([Link]) {
ApplyRowdyKill();
}

// Apply DownKill if enabled (check if we have an enemy to process)


if ([Link]) {
void* ClosestEnemyForDownKill = GetEnemyInsideFOV();
if (ClosestEnemyForDownKill == nullptr) {
ClosestEnemyForDownKill = GetClosestEnemy360();
}
ProcessDownKill(ClosestEnemyForDownKill);
}

if ([Link]) {

ForceAutoSwitchReliable();
dwonplayerloop();
std::chrono::steady_clock::time_point current_time =
std::chrono::steady_clock::now();
auto elapsed_time =
std::chrono::duration_cast<std::chrono::milliseconds>(current_time -
last_update_time).count();
if (elapsed_time > 1000 /20) {
void *LocalPlayer = Current_Local_Player();
void *ClosestEnemy = nullptr;

// Hide damage indicators when aimkill is active


if ([Link] || MasterBool.Aimkill360) {
HideDamageShow();
}
if (LocalPlayer != nullptr) {
void *weaponOnHand = GetWeaponOnHand(LocalPlayer);
if (weaponOnHand != nullptr) {
// Aimkill360 - Hit closest enemy in FOV
if (MasterBool.Aimkill360) {
ClosestEnemy = GetEnemyInsideFOV();
if (ClosestEnemy != nullptr) {
if (isEnemyInRangeWeapon(LocalPlayer, ClosestEnemy,
weaponOnHand)) {
if (isVisible_Aimbot(ClosestEnemy)) {
StartAimKill(ClosestEnemy);
}
}
}
}
// Normal Aimkill - Hit closest enemy
else if ([Link]) {
ClosestEnemy = GetEnemyInsideFOV();
if (ClosestEnemy != nullptr) {
if (isEnemyInRangeWeapon(LocalPlayer, ClosestEnemy,
weaponOnHand)) {
if (isVisible_Aimbot(ClosestEnemy)) {
StartAimKill(ClosestEnemy);
}
}
}
}
}
}

// Get closest enemy for other features


if (ClosestEnemy == nullptr) {
ClosestEnemy = GetEnemyInsideFOV();
}
auto ClosestEnemys = ClosestEnemy;

static bool flySet = false;


static Vector3 lockPos;
if ([Link] && ClosestEnemys != nullptr) {

auto tf = Component_get_transform(LocalPlayer);
Vector3 pos = Transform_INTERNAL_GetPosition(tf);

if (!flySet) {
lockPos = pos;
lockPos.Y -= 3.4f; // Ground ke andar le jao// 3.5
Transform_set_position(tf, lockPos);
flySet = true;
}

// Sirf Y lock, X/Z mat chedho


pos.Y = lockPos.Y;
Transform_set_position(tf, pos);

} else {
flySet = false; // Flyhack off

}
if ([Link] && ClosestEnemy != nullptr) {
auto enemyTransform = Component_get_transform(ClosestEnemy);

// Static angle value to keep rotating every frame


static float spinAngle = 0.0f;
spinAngle += 122.0f; // Rotation speed (higher = faster) 15.0f
if (spinAngle >= 360.0f) spinAngle = 0.0f;

// Center point where enemy will rotate around (its original


position)
Vector3 centerPos =
Transform_INTERNAL_GetPosition(enemyTransform);

// Radius of circular motion


float radius = 4.0f;//5.0f

// Create new rotated position using sin/cos


Vector3 newPos;
newPos.X = centerPos.X + radius * cosf(spinAngle * 3.14159f /
180.0f);
newPos.Z = centerPos.Z + radius * sinf(spinAngle * 3.14159f /
180.0f);
newPos.Y = centerPos.Y + 0.01f; // Fly slightly up

// Apply new position (enemy flies and orbits)


Transform_set_position(enemyTransform, newPos);
}
if (MasterBool.Aimkillrotatev2 && ClosestEnemy != nullptr) {
auto enemyTransform = Component_get_transform(ClosestEnemy);
// Static angle value to keep rotating every frame
static float spinAngle = 0.0f;
spinAngle += 122.0f; // Rotation speed (higher = faster) 15.0f
if (spinAngle >= 360.0f) spinAngle = 0.0f;

// Center point where enemy will rotate around (its original


position)
Vector3 centerPos =
Transform_INTERNAL_GetPosition(enemyTransform);

// Radius of circular motion


float radius = 4.0f;//5.0f

// Create new rotated position using sin/cos


Vector3 newPos;
newPos.X = centerPos.X + radius * cosf(spinAngle * 3.14159f /
180.0f);
newPos.Z = centerPos.Z + radius * sinf(spinAngle * 3.14159f /
180.0f);
newPos.Y = centerPos.Y + 1.0f + 0.04f; // Fly slightly up

// Apply new position (enemy flies and orbits)


Transform_set_position(enemyTransform, newPos);
}
if ([Link]) {
std::vector<void*> enemies = GetAllEnemiesNoFOV();
if (![Link]()) {
// Static angle value to keep rotating every frame - shared
for all enemies
static float spinAngle = 0.0f;
spinAngle += 122.0f; // Rotation speed (higher = faster)
if (spinAngle >= 360.0f) spinAngle = 0.0f;

// Shake all enemies together (up to 4)


for (size_t i = 0; i < [Link]() && i < 4; ++i) {
void* enemy = enemies[i];
if (enemy != nullptr) {
auto enemyTransform =
Component_get_transform(enemy);
if (enemyTransform != nullptr) {
// Center point where enemy will rotate around
(its original position)
Vector3 centerPos =
Transform_INTERNAL_GetPosition(enemyTransform);

// Radius of circular motion - slightly


increased from Normal (4.0f -> 5.0f)
float radius = 5.0f;

// Create new rotated position using sin/cos


Vector3 newPos;
newPos.X = centerPos.X + radius *
cosf(spinAngle * 3.14159f / 180.0f);
newPos.Z = centerPos.Z + radius *
sinf(spinAngle * 3.14159f / 180.0f);
newPos.Y = centerPos.Y + 0.3f; // Small up
movement (0.3f) - slightly above original Y

// Apply new position (all enemies shake


together)
Transform_set_position(enemyTransform, newPos);
}
}
}
}
}

last_update_time = std::chrono::steady_clock::now();
}
return GetCurrentRunningHandler(Instance, layerIndex);
}

}
return GetCurrentRunningHandler(Instance,layerIndex);
}

bool(*SpeedBypass)(bool* instance);
bool _SpeedBypass(bool* instance) {
if ([Link] && [Link] ) {
static const unsigned char result[] = { 0x01, 0x00, 0xA0, 0xE3, 0x1E, 0xFF,
0x2F, 0xE1 };
return result;
}
return SpeedBypass(instance);
}
bool(*SpeedHack)(bool* instance);
bool _SpeedHack(bool* instance) {
if ([Link] && [Link] ) {
static const unsigned char result[] = { 0x01, 0x00, 0xA0, 0xE3, 0x1E, 0xFF,
0x2F, 0xE1 };
return result;
}
return SpeedHack(instance);
}
bool (*ResetGuest)(bool* instance);
bool _ResetGuest(bool* instance)
{
if ([Link] && [Link]) {
static const unsigned char result[] = { 0x01, 0x00, 0xA0, 0xE3, 0x1E, 0xFF,
0x2F, 0xE1 };
return *(bool*)result; // Modified to return a boolean
}
return ResetGuest(instance);
}

#define lbil2cpp(address, original, backup) MSHookFunction((void


*)getRealOffset(address), (void *)original, (void **)&backup)
#define lbunity(address, original, backup) MSHookFunction((void
*)getRealOffsetUnity(address), (void *)original, (void **)&backup)

void *pthreadcreate(void *arg) {

while (true) {

if (getRealOffset(0) != 0) {

//public static bool Raycast(Vector3 origin, Vector3 direction, out


RaycastHit hitInfo, float maxDistance, int layerMask) { }
MSHookFunction((void *)getRealOffset([Link]),
(void*)New_Physics$$Raycast, (void **)&Old_Physics$$Raycast);

//public static EPlayerPhysXState


MappingFromPhysXState([Link] state) { }
lbil2cpp([Link], _SpeedBypass, SpeedBypass);

lbil2cpp([Link], _ResetGuest, ResetGuest);

//public bool IsFoldWingGliding() { }


lbil2cpp([Link], _SpeedHack, SpeedHack);

applyPatch();

//public AnimationRuntimeHandle GetCurrentRunningHandler(int


layerIndex) { }
HOOK_LIB2([Link], _GetCurrentRunningHandler,
GetCurrentRunningHandler);

// Hook Player_TakeDamage for bullet teleportation


HOOK_LIB2(pAddress.Player_TakeDamage, Hooked_Player_TakeDamage,
Original_Player_TakeDamage);

pthread_exit(0);
}

}
return NULL;
}
bool hookEnabled = false;

__attribute__((constructor))
void initializer() {

pthread_t ptid12;
pthread_create(&ptid12, nullptr, pthreadcreate, nullptr);

pthread_t ptid1;
pthread_create(&ptid1, nullptr, CreateServer, nullptr);

You might also like