Advertisement
Guest User

Untitled

a guest
Feb 24th, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.84 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Diagnostics;
  4. using System.Linq;
  5. using System.Text;
  6. using System.Threading.Tasks;
  7. using System.Runtime.InteropServices;
  8. using System.Windows.Forms;
  9. using System.Threading;
  10.  
  11. namespace ConsoleApplication5
  12. {
  13. class Program
  14. {
  15. static Process myProcess = Process.GetProcessesByName("csgo").FirstOrDefault();
  16. static string process = "csgo";
  17. public static int LocalPlayer = 0x00AA00FC;
  18. public static int oHealth = 0xFC;
  19. public static int ajump = 0x4F1437C;
  20. public static int oTeam = 0xF0;
  21. public static int oGlow = 0xA310;
  22. public static int GlowObjectManager = 0x4F9A128;
  23. public static int oEntity = 0x4A7D0F4;
  24. public static int oAttack = 0x2EBF474;
  25. public static int oCrosshair = 0xB2A4;
  26. public static int oEntityLoopDistance = 0x10;
  27. public static int bClient;
  28. public static int oDormant = 0xE9; // might be wrong
  29. public static int index = 0;
  30. static int oScoped = 0x387E;
  31. static int f1jump;
  32. public static VAMemory vam = new VAMemory(process);
  33. public static bool trg = false;
  34. public static bool glw = false;
  35. public static bool bhop = false;
  36.  
  37. [DllImport("user32", CharSet = CharSet.Ansi, SetLastError = true)]
  38. public static extern int GetAsyncKeyState(int vKey);
  39.  
  40. static void Main(string[] args)
  41. {
  42. if (GetModuleAddy())
  43. f1jump = bClient + ajump;
  44. int fAttack = bClient + oAttack;
  45. index = inx();
  46.  
  47. while (true)
  48. {
  49. checkKeys();
  50. if (glw)
  51. ESP();
  52. int address = bClient + LocalPlayer;
  53. IntPtr localplayer = (IntPtr)vam.ReadInt32(myProcess.Modules[index].BaseAddress + LocalPlayer); // Might have to be ((IntPtr)address);
  54. int LocalPlayer2 = vam.ReadInt32((IntPtr)address);
  55. address = LocalPlayer2 + oTeam;
  56. int myTeam = vam.ReadInt32((IntPtr)address);
  57.  
  58. address = LocalPlayer2 + oCrosshair;
  59. int PlayerInCross = vam.ReadInt32((IntPtr)address);
  60.  
  61. int Health = vam.ReadInt32(localplayer + oHealth);
  62. int jump = vam.ReadInt32(localplayer + 0x100);
  63. int Scope = vam.ReadInt32(localplayer + oScoped);
  64. if (PlayerInCross > 0 && PlayerInCross < 65 && trg)
  65. {
  66. address = bClient + oEntity + (PlayerInCross - 1) * oEntityLoopDistance;
  67. int PtrToPIC = vam.ReadInt32((IntPtr)address);
  68.  
  69. address = PtrToPIC + oHealth;
  70. int PICHealth = vam.ReadInt32((IntPtr)address);
  71.  
  72. address = PtrToPIC + oTeam;
  73. int PICTeam = vam.ReadInt32((IntPtr)address);
  74.  
  75. if ((PICTeam != myTeam) && (PICTeam > 1) && (PICHealth > 0))
  76. {
  77. for (int f = 0; f < 1000; f++)
  78. {
  79. vam.WriteInt32((IntPtr)fAttack, 1);
  80. }
  81. //Thread.Sleep(1);
  82. vam.WriteInt32((IntPtr)fAttack, 0);
  83. }
  84. }
  85.  
  86.  
  87. while (CheckKeyDown(Keys.Space) && bhop)
  88. {
  89. jump = vam.ReadInt32(localplayer + 0x100);
  90. if (jump == 257)
  91. {
  92. vam.WriteInt32((IntPtr)f1jump, 5);
  93. Thread.Sleep(8);
  94. vam.WriteInt32((IntPtr)f1jump, 4);
  95. }
  96. }
  97. Console.Clear();
  98. if (!bhop && !trg && !glw)
  99. Console.Write("Deactivated", Console.ForegroundColor = ConsoleColor.Red);
  100. else
  101. Console.Write("Trigger: " + trg + " | " + "Bhop: " + bhop + " | " + "Glow: " + glw, Console.ForegroundColor = ConsoleColor.Green);
  102. // Console.WriteLine("Health = " + Health + " | " + "Jump status = " + (jump == 256 ? "Jumping" : "Standing") + " | " + " Scope status = " + isScoped(Scope), Console.ForegroundColor = ConsoleColor.Green);
  103. // Thread.Sleep(10);
  104. }
  105. }
  106.  
  107. public static String isScoped(int val)
  108. {
  109. String sc = "Not Scoped";
  110. if (val == 1)
  111. sc = "Scoped";
  112. else if (val == 65536)
  113. sc = "Cocking Bolt";
  114.  
  115. return sc;
  116.  
  117. }
  118.  
  119. static bool GetModuleAddy()
  120. {
  121. try
  122. {
  123. Process[] p = Process.GetProcessesByName(process);
  124.  
  125. if (p.Length > 0)
  126. {
  127. foreach (ProcessModule m in p[0].Modules)
  128. {
  129. if (m.ModuleName == "client.dll")
  130. {
  131. bClient = (int)m.BaseAddress;
  132. return true;
  133. }
  134. }
  135. return true;
  136. }
  137. else
  138. {
  139. return false;
  140. }
  141. }
  142. catch (Exception ex)
  143. {
  144. return false;
  145. }
  146. }
  147.  
  148. public static bool CheckKeyDown(System.Windows.Forms.Keys vKey)
  149. {
  150.  
  151. return 0 != ((Int64)GetAsyncKeyState((int)vKey) & 0x8000);
  152.  
  153. }
  154.  
  155. public static void checkKeys()
  156. {
  157. if (CheckKeyDown(Keys.F3))
  158. {
  159. trg = !trg;
  160. //Thread.Sleep(100);
  161. }
  162. if (CheckKeyDown(Keys.F4))
  163. {
  164. bhop = !bhop;
  165. // Thread.Sleep(100);
  166. }
  167. if (CheckKeyDown(Keys.F5))
  168. {
  169. glw = !glw;
  170. // Thread.Sleep(100);
  171. }
  172. }
  173.  
  174. public static int inx()
  175. {
  176. int k = 0;
  177. for (int i = 0; i < myProcess.Modules.Count; i++)
  178. {
  179. if (myProcess.Modules[i].ModuleName.Contains("client.dll"))
  180. {
  181. k = i;
  182. }
  183. }
  184. return k;
  185. }
  186.  
  187. public static void ESP()
  188. {
  189. GlowStruct Enemy = new GlowStruct()
  190. {
  191. r = 0,
  192. g = 2,
  193. b = 0,
  194. a = 1,
  195. rwo = true,
  196. rwuo = true
  197. };
  198. GlowStruct Friendly = new GlowStruct()
  199. {
  200. r = 0,
  201. g = 1,
  202. b = 0,
  203. a = 1,
  204. rwo = true,
  205. rwuo = true
  206. };
  207. int address2;
  208. int g = 1;
  209. do
  210. {
  211. address2 = bClient + LocalPlayer;
  212. int Player = vam.ReadInt32((IntPtr)address2);
  213.  
  214. address2 = Player + oTeam;
  215. int MyTeam = vam.ReadInt32((IntPtr)address2);
  216.  
  217. address2 = bClient + oEntity + (g - 1) * 0x10;
  218. int EntityList = vam.ReadInt32((IntPtr)address2);
  219.  
  220. address2 = EntityList + oTeam;
  221. int HisTeam = vam.ReadInt32((IntPtr)address2);
  222.  
  223. // address2 = EntityList + oDormant;
  224. address2 = EntityList;
  225. if (!vam.ReadBoolean((IntPtr)address2))
  226. {
  227. address2 = EntityList + oGlow;
  228. int GlowIndex = vam.ReadInt32((IntPtr)address2);
  229.  
  230. if (MyTeam == HisTeam)
  231. {
  232. address2 = bClient + GlowObjectManager;
  233. int GlowObject = vam.ReadInt32((IntPtr)address2);
  234. int calculation = GlowIndex * 0x38 + 0x4; // might be outdated
  235. int current = GlowObject + calculation;
  236. vam.WriteFloat((IntPtr)current, Friendly.r);
  237.  
  238. calculation = GlowIndex * 0x38 + 0x8;
  239. current = GlowObject + calculation;
  240. vam.WriteFloat((IntPtr)current, Friendly.g);
  241.  
  242. calculation = GlowIndex * 0x38 + 0xC;
  243. current = GlowObject + calculation;
  244. vam.WriteFloat((IntPtr)current, Friendly.b);
  245.  
  246. calculation = GlowIndex * 0x38 + 0x10;
  247. current = GlowObject + calculation;
  248. vam.WriteFloat((IntPtr)current, Friendly.a);
  249.  
  250. calculation = GlowIndex * 0x38 + 0x24;
  251. current = GlowObject + calculation;
  252. vam.WriteBoolean((IntPtr)current, Friendly.rwo);
  253.  
  254. calculation = GlowIndex * 0x38 + 0x25;
  255. current = GlowObject + calculation;
  256. vam.WriteBoolean((IntPtr)current, Friendly.rwuo);
  257. }
  258. else
  259. {
  260. address2 = bClient + GlowObjectManager;
  261. int GlowObject = vam.ReadInt32((IntPtr)address2);
  262. int calculation = GlowIndex * 0x38 + 0x4; // might be outdated
  263. int current = GlowObject + calculation;
  264. vam.WriteFloat((IntPtr)current, Enemy.r);
  265.  
  266. calculation = GlowIndex * 0x38 + 0x8;
  267. current = GlowObject + calculation;
  268. vam.WriteFloat((IntPtr)current, Enemy.g);
  269.  
  270. calculation = GlowIndex * 0x38 + 0xC;
  271. current = GlowObject + calculation;
  272. vam.WriteFloat((IntPtr)current, Enemy.b);
  273.  
  274. calculation = GlowIndex * 0x38 + 0x10;
  275. current = GlowObject + calculation;
  276. vam.WriteFloat((IntPtr)current, Enemy.a);
  277.  
  278. calculation = GlowIndex * 0x38 + 0x24;
  279. current = GlowObject + calculation;
  280. vam.WriteBoolean((IntPtr)current, Enemy.rwo);
  281.  
  282. calculation = GlowIndex * 0x38 + 0x25;
  283. current = GlowObject + calculation;
  284. vam.WriteBoolean((IntPtr)current, Enemy.rwuo);
  285. }
  286. }
  287. g++;
  288. }
  289. while (g < 65);
  290. //Thread.Sleep(10);
  291. }
  292.  
  293. public struct GlowStruct
  294. {
  295. public float r;
  296. public float g;
  297. public float b;
  298. public float a;
  299. public bool rwo;
  300. public bool rwuo;
  301. }
  302. }
  303. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement