Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <Windows.h>
- #include <iostream>
- #include "HackProcess.h"
- CHackProcess fProcess;
- using namespace std;
- bool b_ShotNow = false;
- bool b_bHop = false;
- int numOfPlayers = 32;
- const DWORD Player_Base = 0x53BFC8;
- const DWORD dw_jump = 0x569664;
- const DWORD m_Flags = 0x34C;
- const DWORD dw_teamOffset = 0x98;
- const DWORD dw_PlayerCountOff = 0x4EA580;
- const DWORD dw_crosshairOffset = 0x14DC;
- const DWORD dw_entityBase = 0x5495B4;
- const DWORD dw_EntityLoopDistance = 0x10;
- const DWORD dw_healthOff = 0x90;
- #define Fl_ONGROUND 257
- #define SPACE_BAR 0x20
- #define F6_Key 0x75
- bool b_true = true;
- bool b_false = false;
- bool bHopStatus = false;
- struct MyPlayer_t{
- DWORD CLocalPlayer;
- int m_fflags;
- int Team;
- int CrosshairEntityID;
- int m_iHealth;
- void ReadInformation(){
- ReadProcessMemory(fProcess.__HandleProcess, (PBYTE*)(fProcess.__dwordClient + Player_Base), &CLocalPlayer, sizeof(DWORD), 0);
- ReadProcessMemory(fProcess.__HandleProcess, (PBYTE*)(CLocalPlayer + m_Flags), &m_fflags, sizeof(int), 0);
- //TEAM
- ReadProcessMemory(fProcess.__HandleProcess, (PBYTE*)(CLocalPlayer + dw_teamOffset), &Team, sizeof(int), 0);
- //Whats under the crosshair?
- ReadProcessMemory(fProcess.__HandleProcess, (PBYTE*)(CLocalPlayer + dw_crosshairOffset), &CrosshairEntityID, sizeof(int), 0);
- //How many players are there?
- ReadProcessMemory(fProcess.__HandleProcess, (PBYTE*)(fProcess.__dwordServer + dw_PlayerCountOff), &numOfPlayers, sizeof(int), 0);
- //My Health
- ReadProcessMemory(fProcess.__HandleProcess, (PBYTE*)(CLocalPlayer + dw_healthOff), &m_iHealth, sizeof(int), 0);
- }
- }MyPlayer;
- struct PlayerList
- {
- DWORD CbaseEntity;
- int Team;
- void ReadInformation(int Player){
- //Entity Base
- ReadProcessMemory(fProcess.__HandleProcess, (PBYTE*)(fProcess.__dwordClient + dw_entityBase + (Player* dw_EntityLoopDistance)), &CbaseEntity, sizeof(DWORD), 0);
- //Team Number
- ReadProcessMemory(fProcess.__HandleProcess, (PBYTE*)(CbaseEntity + dw_teamOffset), &Team, sizeof(int), 0);
- }
- }PlayerList[32];
- void Shoot()
- {
- mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0);
- mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0);
- }
- void jump()
- {
- keybd_event(0x39, 0x39, 0, 0);
- Sleep(1);
- keybd_event(0x39, 0x39, KEYEVENTF_KEYUP, 0);
- Sleep(1);
- }
- void BunnyHop(){
- if (GetAsyncKeyState(VK_F5)){
- b_bHop = !b_bHop;
- Sleep(250);
- }
- if (!b_bHop)
- return;
- if (GetAsyncKeyState(SPACE_BAR)){
- bHopStatus = !bHopStatus;
- Sleep(250);
- }
- if (!bHopStatus)
- return;
- if (MyPlayer.m_fflags == (Fl_ONGROUND) || MyPlayer.m_fflags == 263)
- {
- jump();
- }
- }
- void TriggerBot(){
- if (!b_ShotNow)
- b_ShotNow = !b_ShotNow;
- if (MyPlayer.CrosshairEntityID == 0)
- return;
- if (MyPlayer.CrosshairEntityID > numOfPlayers)
- return;
- if (PlayerList[MyPlayer.CrosshairEntityID - 1].Team == MyPlayer.Team)
- return;
- if (b_ShotNow){
- Shoot();
- Sleep(1);
- b_ShotNow = !b_ShotNow;
- }
- }
- int main(){
- fProcess.RunProcess();
- cout << "Game Found! Running Multihack..." << endl;
- cout << "Coded by Snorflake" << endl;
- cout << endl;
- cout << endl;
- cout << "F6 - Close" << endl;
- cout << "F5 - Toggle Bunny hop" << endl;
- while (!GetAsyncKeyState(F6_Key)){
- MyPlayer.ReadInformation();
- for (int i = 0; i < numOfPlayers; i++){
- PlayerList[i].ReadInformation(i);
- }
- //if (MyPlayer.m_iHealth > 2){
- TriggerBot();
- BunnyHop();
- //}
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement