Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "pch.h"
- #include "windows.h"
- #include <iostream>
- using namespace std;
- const int Spectator = 1;
- const int Terrorist = 2;
- const int CounterTerrorist = 3;
- uintptr_t dwLocalPlayer;
- uintptr_t dwGlowObjectManager;
- uintptr_t m_iTeamNum;
- uintptr_t dwEntityList;
- uintptr_t m_bDormant;
- uintptr_t m_iGlowIndex;
- DWORD WINAPI MainThread(HMODULE hModule)
- {
- DWORD modulebase = (DWORD)GetModuleHandle("client.dll");
- bool esp = false;
- while (true)
- {
- if (GetAsyncKeyState(VK_END) & 1)
- {
- esp = true;
- }
- if (GetAsyncKeyState(VK_DELETE) & 1)
- {
- esp = false;
- }
- if (esp) {
- DWORD LocalPlayer = *(DWORD*)(modulebase + dwLocalPlayer);
- DWORD GlowObjectManager = *(DWORD*)(modulebase + dwGlowObjectManager);
- DWORD EntityList = *(DWORD*)(modulebase + dwEntityList);
- int localTeam = *(int*)(LocalPlayer + m_iTeamNum);
- for (int i = 1; i < 32; i++)
- {
- DWORD entity = *(DWORD*)((modulebase + dwEntityList) + i * 0x10);
- if (entity == NULL) continue;
- int glowIndex = *(int*)(entity + m_iGlowIndex);
- int entityTeam = *(int*)(entity + m_iTeamNum);
- if (entityTeam == localTeam)
- {
- // SEU TIME
- *(float*)(GlowObjectManager + glowIndex * 0x38 + 0x8) = 0.f; //R
- *(float*)(GlowObjectManager + glowIndex * 0x38 + 0xC) = 1.f; //G
- *(float*)(GlowObjectManager + glowIndex * 0x38 + 0x10) = 0.f; //B
- *(float*)(GlowObjectManager + glowIndex * 0x38 + 0x14) = 1.7f; //A
- }
- else
- {
- // TIME INIMIGO
- *(float*)(GlowObjectManager + glowIndex * 0x38 + 0x8) = 1.f; //R
- *(float*)(GlowObjectManager + glowIndex * 0x38 + 0xC) = 0.f; //G
- *(float*)(GlowObjectManager + glowIndex * 0x38 + 0x10) = 0.f; //B
- *(float*)(GlowObjectManager + glowIndex * 0x38 + 0x14) = 1.7f; //A
- }
- *(bool*)((GlowObjectManager + glowIndex * 0x38 + 0x28)) = true;
- *(bool*)((GlowObjectManager + glowIndex * 0x38 + 0x29)) = false;
- }
- }
- }
- FreeLibraryAndExitThread(hModule, 0);
- return 0;
- }
- BOOL APIENTRY DllMain( HMODULE hModule,
- DWORD ul_reason_for_call,
- LPVOID lpReserved
- )
- {
- switch (ul_reason_for_call)
- {
- case DLL_PROCESS_ATTACH:
- CloseHandle(CreateThread(nullptr, 0, (LPTHREAD_START_ROUTINE)MainThread, hModule, 0, nullptr));
- case DLL_THREAD_ATTACH:
- case DLL_THREAD_DETACH:
- case DLL_PROCESS_DETACH:
- break;
- }
- return TRUE;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement