Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Diagnostics;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Runtime.InteropServices;
- using System.Windows.Forms;
- using System.Threading;
- namespace ConsoleApplication5
- {
- class Program
- {
- static Process myProcess = Process.GetProcessesByName("csgo").FirstOrDefault();
- static string process = "csgo";
- public static int LocalPlayer = 0x00AA00FC;
- public static int oHealth = 0xFC;
- public static int ajump = 0x4F1437C;
- public static int oTeam = 0xF0;
- public static int oGlow = 0xA310;
- public static int GlowObjectManager = 0x4F9A128;
- public static int oEntity = 0x4A7D0F4;
- public static int oAttack = 0x2EBF474;
- public static int oCrosshair = 0xB2A4;
- public static int oEntityLoopDistance = 0x10;
- public static int bClient;
- public static int oDormant = 0xE9; // might be wrong
- public static int index = 0;
- static int oScoped = 0x387E;
- static int f1jump;
- public static VAMemory vam = new VAMemory(process);
- public static bool trg = false;
- public static bool glw = false;
- public static bool bhop = false;
- [DllImport("user32", CharSet = CharSet.Ansi, SetLastError = true)]
- public static extern int GetAsyncKeyState(int vKey);
- static void Main(string[] args)
- {
- if (GetModuleAddy())
- f1jump = bClient + ajump;
- int fAttack = bClient + oAttack;
- index = inx();
- while (true)
- {
- checkKeys();
- if (glw)
- ESP();
- int address = bClient + LocalPlayer;
- IntPtr localplayer = (IntPtr)vam.ReadInt32(myProcess.Modules[index].BaseAddress + LocalPlayer); // Might have to be ((IntPtr)address);
- int LocalPlayer2 = vam.ReadInt32((IntPtr)address);
- address = LocalPlayer2 + oTeam;
- int myTeam = vam.ReadInt32((IntPtr)address);
- address = LocalPlayer2 + oCrosshair;
- int PlayerInCross = vam.ReadInt32((IntPtr)address);
- int Health = vam.ReadInt32(localplayer + oHealth);
- int jump = vam.ReadInt32(localplayer + 0x100);
- int Scope = vam.ReadInt32(localplayer + oScoped);
- if (PlayerInCross > 0 && PlayerInCross < 65 && trg)
- {
- address = bClient + oEntity + (PlayerInCross - 1) * oEntityLoopDistance;
- int PtrToPIC = vam.ReadInt32((IntPtr)address);
- address = PtrToPIC + oHealth;
- int PICHealth = vam.ReadInt32((IntPtr)address);
- address = PtrToPIC + oTeam;
- int PICTeam = vam.ReadInt32((IntPtr)address);
- if ((PICTeam != myTeam) && (PICTeam > 1) && (PICHealth > 0))
- {
- for (int f = 0; f < 1000; f++)
- {
- vam.WriteInt32((IntPtr)fAttack, 1);
- }
- //Thread.Sleep(1);
- vam.WriteInt32((IntPtr)fAttack, 0);
- }
- }
- while (CheckKeyDown(Keys.Space) && bhop)
- {
- jump = vam.ReadInt32(localplayer + 0x100);
- if (jump == 257)
- {
- vam.WriteInt32((IntPtr)f1jump, 5);
- Thread.Sleep(8);
- vam.WriteInt32((IntPtr)f1jump, 4);
- }
- }
- Console.Clear();
- if (!bhop && !trg && !glw)
- Console.Write("Deactivated", Console.ForegroundColor = ConsoleColor.Red);
- else
- Console.Write("Trigger: " + trg + " | " + "Bhop: " + bhop + " | " + "Glow: " + glw, Console.ForegroundColor = ConsoleColor.Green);
- // Console.WriteLine("Health = " + Health + " | " + "Jump status = " + (jump == 256 ? "Jumping" : "Standing") + " | " + " Scope status = " + isScoped(Scope), Console.ForegroundColor = ConsoleColor.Green);
- // Thread.Sleep(10);
- }
- }
- public static String isScoped(int val)
- {
- String sc = "Not Scoped";
- if (val == 1)
- sc = "Scoped";
- else if (val == 65536)
- sc = "Cocking Bolt";
- return sc;
- }
- static bool GetModuleAddy()
- {
- try
- {
- Process[] p = Process.GetProcessesByName(process);
- if (p.Length > 0)
- {
- foreach (ProcessModule m in p[0].Modules)
- {
- if (m.ModuleName == "client.dll")
- {
- bClient = (int)m.BaseAddress;
- return true;
- }
- }
- return true;
- }
- else
- {
- return false;
- }
- }
- catch (Exception ex)
- {
- return false;
- }
- }
- public static bool CheckKeyDown(System.Windows.Forms.Keys vKey)
- {
- return 0 != ((Int64)GetAsyncKeyState((int)vKey) & 0x8000);
- }
- public static void checkKeys()
- {
- if (CheckKeyDown(Keys.F3))
- {
- trg = !trg;
- //Thread.Sleep(100);
- }
- if (CheckKeyDown(Keys.F4))
- {
- bhop = !bhop;
- // Thread.Sleep(100);
- }
- if (CheckKeyDown(Keys.F5))
- {
- glw = !glw;
- // Thread.Sleep(100);
- }
- }
- public static int inx()
- {
- int k = 0;
- for (int i = 0; i < myProcess.Modules.Count; i++)
- {
- if (myProcess.Modules[i].ModuleName.Contains("client.dll"))
- {
- k = i;
- }
- }
- return k;
- }
- public static void ESP()
- {
- GlowStruct Enemy = new GlowStruct()
- {
- r = 0,
- g = 2,
- b = 0,
- a = 1,
- rwo = true,
- rwuo = true
- };
- GlowStruct Friendly = new GlowStruct()
- {
- r = 0,
- g = 1,
- b = 0,
- a = 1,
- rwo = true,
- rwuo = true
- };
- int address2;
- int g = 1;
- do
- {
- address2 = bClient + LocalPlayer;
- int Player = vam.ReadInt32((IntPtr)address2);
- address2 = Player + oTeam;
- int MyTeam = vam.ReadInt32((IntPtr)address2);
- address2 = bClient + oEntity + (g - 1) * 0x10;
- int EntityList = vam.ReadInt32((IntPtr)address2);
- address2 = EntityList + oTeam;
- int HisTeam = vam.ReadInt32((IntPtr)address2);
- // address2 = EntityList + oDormant;
- address2 = EntityList;
- if (!vam.ReadBoolean((IntPtr)address2))
- {
- address2 = EntityList + oGlow;
- int GlowIndex = vam.ReadInt32((IntPtr)address2);
- if (MyTeam == HisTeam)
- {
- address2 = bClient + GlowObjectManager;
- int GlowObject = vam.ReadInt32((IntPtr)address2);
- int calculation = GlowIndex * 0x38 + 0x4; // might be outdated
- int current = GlowObject + calculation;
- vam.WriteFloat((IntPtr)current, Friendly.r);
- calculation = GlowIndex * 0x38 + 0x8;
- current = GlowObject + calculation;
- vam.WriteFloat((IntPtr)current, Friendly.g);
- calculation = GlowIndex * 0x38 + 0xC;
- current = GlowObject + calculation;
- vam.WriteFloat((IntPtr)current, Friendly.b);
- calculation = GlowIndex * 0x38 + 0x10;
- current = GlowObject + calculation;
- vam.WriteFloat((IntPtr)current, Friendly.a);
- calculation = GlowIndex * 0x38 + 0x24;
- current = GlowObject + calculation;
- vam.WriteBoolean((IntPtr)current, Friendly.rwo);
- calculation = GlowIndex * 0x38 + 0x25;
- current = GlowObject + calculation;
- vam.WriteBoolean((IntPtr)current, Friendly.rwuo);
- }
- else
- {
- address2 = bClient + GlowObjectManager;
- int GlowObject = vam.ReadInt32((IntPtr)address2);
- int calculation = GlowIndex * 0x38 + 0x4; // might be outdated
- int current = GlowObject + calculation;
- vam.WriteFloat((IntPtr)current, Enemy.r);
- calculation = GlowIndex * 0x38 + 0x8;
- current = GlowObject + calculation;
- vam.WriteFloat((IntPtr)current, Enemy.g);
- calculation = GlowIndex * 0x38 + 0xC;
- current = GlowObject + calculation;
- vam.WriteFloat((IntPtr)current, Enemy.b);
- calculation = GlowIndex * 0x38 + 0x10;
- current = GlowObject + calculation;
- vam.WriteFloat((IntPtr)current, Enemy.a);
- calculation = GlowIndex * 0x38 + 0x24;
- current = GlowObject + calculation;
- vam.WriteBoolean((IntPtr)current, Enemy.rwo);
- calculation = GlowIndex * 0x38 + 0x25;
- current = GlowObject + calculation;
- vam.WriteBoolean((IntPtr)current, Enemy.rwuo);
- }
- }
- g++;
- }
- while (g < 65);
- //Thread.Sleep(10);
- }
- public struct GlowStruct
- {
- public float r;
- public float g;
- public float b;
- public float a;
- public bool rwo;
- public bool rwuo;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement