Advertisement
Guest User

xd

a guest
Feb 26th, 2017
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 49.04 KB | None | 0 0
  1. chat.AddText(Color(35,125,255), "Cloud.Hack", Color( 255,255,255 ), " LOADED!")
  2. chat.AddText(Color(255,255,255), "I love the clouds", Color( 35,125,255 )," Coded By NEX")
  3.  
  4. MsgC( Color( 0,125,255 ), [[
  5. _____ _ _ _____ _
  6. / __ \ | | | / ___| | |
  7. | / \/ | ___ _ _ __| | \ `--. __ _ _ _ __ _ __| |
  8. | | | |/ _ \| | | |/ _` | `--. \/ _` | | | |/ _` |/ _` |
  9. | \__/\ | (_) | |_| | (_| |_/\__/ / (_| | |_| | (_| | (_| |
  10. \____/_|\___/ \__,_|\__,_(_)____/ \__, |\__,_|\__,_|\__,_|
  11. | |
  12. Made by NEX |_|
  13. ------------------------------------------------------------
  14.  
  15. ]])
  16.  
  17. -- Everything Works Btw (: --
  18. MsgC( Color( 0,125,255 ), [[
  19. Changelog/Updates
  20. - Added a shit ton of angles - NEX
  21. - Added AAA - NEX
  22. - Added More angles - NEX
  23. - New Bhop and Autostrafe - NEX
  24. - Added more to aaa - NEX
  25. - Added Fake Lag - NEX
  26. - Added Fake Lag Prediction - NEX
  27. - Added Prediction - NEX
  28. - Added T Finder - NEX
  29. - Minor Menu changes - NEX
  30. - Huge Menu changes - NEX
  31. - Added WireFrame Viewmodel - NEX
  32. - Minor Menu changes - NEX
  33. - Added Crosshair - NEX
  34. - Added Watermark - NEX
  35. - Added "p100 Prediction" - NEX
  36. - Nice Menu fix's - NEX
  37. -
  38. --] ^ All Updates ^ [--
  39.  
  40. ]])
  41.  
  42.  
  43. --] Changelog/Updates [--
  44. -- Added a shit ton of angles - NEX
  45. -- Added AAA - NEX
  46. -- Added More angles - NEX
  47. -- New Bhop and Autostrafe - NEX
  48. -- Added more to aaa - NEX
  49. -- Added Fake Lag - NEX
  50. -- Added Fake Lag Prediction - NEX
  51. -- Added Prediction - NEX
  52. -- Added T Finder - NEX
  53. -- Minor Menu changes - NEX
  54. -- Huge Menu changes - NEX
  55. -- Added WireFrame Viewmodel - NEX
  56. -- Menu Changes - NEX
  57. -- Added Crosshair - NEX
  58. -- Added Watermark - NEX
  59. -- Menu Fix's - NEX
  60. --] Updates are nice [--
  61.  
  62. --] To do list ]--
  63. -- No Visual Recoil
  64. -- No Hands
  65. -- Viewmodel Chams
  66. -- A Better Prediction
  67. -- Upgrading AAA
  68. -- Better Fakelag Prediction
  69. -- Improving Aimbot
  70. --
  71. --
  72. --
  73. --
  74. --
  75. --
  76. --
  77. --
  78. --] Everything I wanted done is done! ]--
  79.  
  80. MsgC(Color(200,200,200), "Cloud.Hack", Color( 255, 255, 255), " Loaded")
  81. MsgN("")
  82.  
  83.  
  84. local type = type;
  85. local next = next;
  86.  
  87. local function Copy(tt, lt)
  88. local copy = {}
  89. if lt then
  90. if type(tt) == "table" then
  91. for k,v in next, tt do
  92. copy[k] = Copy(k, v)
  93. end
  94. else
  95. copy = lt
  96. end
  97. return copy
  98. end
  99. if type(tt) != "table" then
  100. copy = tt
  101. else
  102. for k,v in next, tt do
  103. copy[k] = Copy(k, v)
  104. end
  105. end
  106. return copy
  107. end
  108.  
  109. local surface = Copy(surface);
  110. local vgui = Copy(vgui);
  111. local input = Copy(input);
  112. local Color = Color;
  113. local ScrW, ScrH = ScrW, ScrH;
  114. local gui = Copy(gui);
  115. local math = Copy(math);
  116. local file = Copy(file);
  117. local util = Copy(util);
  118.  
  119. surface.CreateFont("WATERMARK", {font = "Trebuchet", size = 25, weight = 550})
  120. surface.CreateFont("WATERMARK2", {font = "Trebuchet", size = 25, weight = 550})
  121. surface.CreateFont("WATERMARK3", {font = "Razer Regular", size = 25, weight = 550})
  122.  
  123. surface.CreateFont("Cloudyou", {
  124. font = "Console",
  125. size = 13,
  126. weight = 900,
  127. shadow = true,
  128. antialias = false,
  129. });
  130.  
  131. surface.CreateFont("Cloudyou2", {
  132. font = "Console",
  133. size = 13,
  134. weight = 900,
  135. shadow = false,
  136. antialias = false,
  137. });
  138.  
  139. local options = {
  140. ["HVH"] = {
  141. {
  142. {"Aimbot", 20, 20, 350, 270, 200},
  143. {"Enabled", "Checkbox", false, 0},
  144. {"Silent", "Checkbox", false, 0},
  145. {"Autofire", "Checkbox", false, 0},
  146. {"Autosnap", "Checkbox", false, 0},
  147. {"AutoPistol", "Checkbox", false, 0},
  148. {"Non-Sticky", "Checkbox", false, 0},
  149. {"Bullettime", "Checkbox", false, 0},
  150. {"AutoWall", "Checkbox", false, 0},
  151. {"Fakelag Prediction", "Checkbox", false, 0},
  152. {"AAA", "Checkbox", false, 0},
  153. },
  154. {
  155. {"Target", 20, 300, 350, 180, 210},
  156. {"Selection", "Selection", "Distance", {"Distance", "Health", "Nextshot"}, 100 },
  157. {"Bodyaim", "Checkbox", false, 0},
  158. {"Ignore Bots", "Checkbox", false, 0},
  159. {"Ignore Team", "Checkbox", false, 0},
  160. {"Ignore Friends", "Checkbox", false, 0},
  161. {"Snapline", "Checkbox", false, 0},
  162. },
  163. {
  164. {"Accuracy", 380, 310, 350, 170, 200},
  165. {"Ignore Cloud.Hack", "Checkbox", false, 0},
  166. {"Anti Spread", "Checkbox", false, 0},
  167. {"Anti Recoil", "Checkbox", false, 0},
  168. },
  169. {
  170. {"Anti-Aim", 380, 20, 350, 280, 140},
  171. {"Enabled", "Checkbox", false, 0},
  172. {"X", "Selection", "Emotion", {"Not", "Slick", "NEX", "Demolisher", "Anti p$ilent", "Aftermath", "Cloud", "Squad", "Dank", "Up", "Down", "Jitter", "Emotion"}, 150},
  173. {"Y", "Selection", "Emotion", {"Not", "Sly", "NEX", "Aftermath", "God", "Anti Spine", "Rand0m", "Forward", "Backwards", "Jitter", "TJitter", "Sideways", "Emotion", "Static", "Towards Players"}, 150},
  174. {"Max Y", "Slider", 50, 360, 150},
  175. {"Min Y", "Slider", 0, 360, 150},
  176. {"Emotion Randomcoin X", "Slider", 50, 100, 150},
  177. {"Emotion Randomcoin Y", "Slider", 20, 100, 150},
  178. {"FakeLag", "Checkbox", false, 0},
  179. {"FakeLag Choke", "Slider", 0, 14, 150},
  180. {"FakeLag Send", "Slider", 0, 14, 150},
  181. },
  182. },
  183. ["Visuals"] = {
  184. {
  185. {"ESP", 20, 20, 350, 240, 220},
  186. {"Enabled", "Checkbox", false, 54},
  187. {"Box", "Checkbox", false, 54},
  188. {"Box Type", "Selection", "2D Box", {"2D Box", "3D Box"}, 68},
  189. {"Name", "Checkbox", false, 54},
  190. {"Health", "Checkbox", false, 54},
  191. {"Weapon", "Checkbox", false, 54},
  192. {"XQZ", "Checkbox", false, 54},
  193. {"Chams", "Checkbox", false, 54},
  194. {"Skeleton", "Checkbox", false, 54},
  195. },
  196. {
  197. {"Filter", 20, 280, 350, 180, 220},
  198. {"Enemies only", "Checkbox", false, 54},
  199. {"Distance", "Checkbox", false, 54},
  200. {"Max Distance", "Slider", 0, 10000, 68},
  201. },
  202. {
  203. {"Misc", 380, 20, 350, 190, 220},
  204. {"Thirdperson", "Checkbox", false, 54},
  205. {"Watermark", "Checkbox", false, 54},
  206. {"Crosshair", "Checkbox", false, 54},
  207. },
  208. },
  209. ["Misc"] = {
  210. {
  211. {"Misc", 10, 20, 350, 190, 220},
  212. {"Bunnyhop", "Checkbox", false, 54},
  213. {"Autostrafe", "Checkbox", false, 54},
  214. {"Kill Spam", "Checkbox", false, 54},
  215. {"DisconnectSpam", "Checkbox", false, 54},
  216. {"Wireframe Viewmodel", "Checkbox", false, 54},
  217.  
  218.  
  219. },
  220. {
  221. {"TTT", 10, 219, 350, 190, 220},
  222. {"T Finder", "Checkbox", false, 54},
  223.  
  224.  
  225. },
  226. },
  227. ["Colors"] = {
  228. {
  229. {"Box - Team", 20, 20, 250, 175, 130},
  230. {"R", "Slider", 255, 255, 88},
  231. {"G", "Slider", 255, 255, 88},
  232. {"B", "Slider", 0, 255, 88},
  233. },
  234. {
  235. {"Box - Enemy", 20, 205, 250, 175, 130},
  236. {"R", "Slider", 180, 255, 88},
  237. {"G", "Slider", 200, 255, 88},
  238. {"B", "Slider", 0, 255, 88},
  239. },
  240. {
  241. {"Chams - Team", 290, 20, 250, 175, 130},
  242. {"Visible R", "Slider", 0, 255, 88},
  243. {"Visible G", "Slider", 255, 255, 88},
  244. {"Visible B", "Slider", 0, 255, 88},
  245. {"Not Visible R", "Slider", 0, 255, 88},
  246. {"Not Visible G", "Slider", 0, 255, 88},
  247. {"Not Visible B", "Slider", 255, 255, 88},
  248. },
  249.  
  250. {
  251. {"Chams - Enemy", 290, 205, 250, 175, 130},
  252. {"Visible R", "Slider", 255, 255, 88},
  253. {"Visible G", "Slider", 0, 255, 88},
  254. {"Visible B", "Slider", 0, 255, 88},
  255. {"Not Visible R", "Slider", 180, 255, 88},
  256. {"Not Visible G", "Slider", 200, 255, 88},
  257. {"Not Visible B", "Slider", 0, 255, 88},
  258. },
  259. },
  260. };
  261.  
  262. local order = {
  263. "HVH",
  264. "Visuals",
  265. "Misc",
  266. "Colors",
  267. };
  268.  
  269. local function updatevar( men, sub, lookup, new )
  270. for aa,aaa in next, options[men] do
  271. for key, val in next, aaa do
  272. if(aaa[1][1] != sub) then continue; end
  273. if(val[1] == lookup) then
  274. val[3] = new;
  275. end
  276. end
  277. end
  278. end
  279.  
  280. local function loadconfig()
  281. if(!file.Exists("Cloud.Hack.txt", "DATA")) then return; end
  282. local tab = util.JSONToTable( file.Read("Cloud.Hack.txt", "DATA") );
  283. local cursub;
  284. for k,v in next, tab do
  285. if(!options[k]) then continue; end
  286. for men, subtab in next, v do
  287. for key, val in next, subtab do
  288. if(key == 1) then cursub = val[1]; continue; end
  289. updatevar(k, cursub, val[1], val[3]);
  290. end
  291. end
  292. end
  293. end
  294.  
  295. local function gBool(men, sub, lookup)
  296. if(!options[men]) then return; end
  297. for aa,aaa in next, options[men] do
  298. for key, val in next, aaa do
  299. if(aaa[1][1] != sub) then continue; end
  300. if(val[1] == lookup) then
  301. return val[3];
  302. end
  303. end
  304. end
  305. end
  306.  
  307. local function gOption(men, sub, lookup)
  308. if(!options[men]) then return ""; end
  309. for aa,aaa in next, options[men] do
  310. for key, val in next, aaa do
  311. if(aaa[1][1] != sub) then continue; end
  312. if(val[1] == lookup) then
  313. return val[3];
  314. end
  315. end
  316. end
  317. return "";
  318. end
  319.  
  320. local function gInt(men, sub, lookup)
  321. if(!options[men]) then return 0; end
  322. for aa,aaa in next, options[men] do
  323. for key, val in next, aaa do
  324. if(aaa[1][1] != sub) then continue; end
  325. if(val[1] == lookup) then
  326. return val[3];
  327. end
  328. end
  329. end
  330. return 0;
  331. end
  332.  
  333. local function saveconfig()
  334. file.Write("Cloud.Hack.txt", util.TableToJSON(options));
  335. end
  336.  
  337. local mousedown;
  338. local candoslider;
  339. local drawlast;
  340.  
  341. local visible = {};
  342.  
  343. for k,v in next, order do
  344. visible[v] = false;
  345. end
  346.  
  347. local function DrawBackground(w, h)
  348. surface.SetDrawColor(0, 0, 0, 90);
  349. surface.DrawRect(0, 0, w, h);
  350.  
  351. local curcol = Color(35,125,255);
  352.  
  353. for i = 0, 30 do
  354. surface.SetDrawColor(curcol);
  355. curcol.r = curcol.r - 1;
  356. surface.DrawLine(0, i, w, i);
  357. end
  358.  
  359. surface.SetDrawColor(curcol);
  360.  
  361. surface.SetFont("Cloudyou");
  362.  
  363. local tw, th = surface.GetTextSize("Cloud.Hack for Garry's Mod");
  364.  
  365. surface.SetTextPos(5, 15 - th / 2);
  366.  
  367. surface.SetTextColor(255, 255, 255);
  368.  
  369. surface.DrawText("Cloud.Hack for Garry's Mod");
  370.  
  371. surface.DrawRect(0, 31, 5, h - 31);
  372. surface.DrawRect(0, h - 5, w, h);
  373. surface.DrawRect(w - 5, 31, 5, h);
  374. end
  375.  
  376. local function MouseInArea(minx, miny, maxx, maxy)
  377. local mousex, mousey = gui.MousePos();
  378. return(mousex < maxx && mousex > minx && mousey < maxy && mousey > miny);
  379. end
  380.  
  381. local function DrawOptions(self, w, h)
  382. local mx, my = self:GetPos();
  383.  
  384. local sizeper = (w - 10) / #order;
  385.  
  386. local maxx = 0;
  387.  
  388. for k,v in next, order do
  389. local bMouse = MouseInArea(mx + 5 + maxx, my + 31, mx + 5 + maxx + sizeper, my + 31 + 30);
  390. if(visible[v]) then
  391. local curcol = Color(255, 255, 255, 90);
  392. for i = 0, 30 do
  393. surface.SetDrawColor(curcol);
  394. curcol.r, curcol.g, curcol.b = curcol.r + 3, curcol.g + 3, curcol.b + 3;
  395. surface.DrawLine( 5 + maxx, 31 + i, 5 + maxx + sizeper, 31 + i);
  396. end
  397. elseif(bMouse) then
  398. local curcol = Color(255, 255, 255, 90);
  399. for i = 0, 30 do
  400. surface.SetDrawColor(curcol);
  401. curcol.r, curcol.g, curcol.b = curcol.r - 1.7, curcol.g - 1.7, curcol.b - 1.7;
  402. surface.DrawLine( 5 + maxx, 31 + i, 5 + maxx + sizeper, 31 + i);
  403. end
  404. else
  405. local curcol = Color(235, 235, 235);
  406. for i = 0, 30 do
  407. surface.SetDrawColor(curcol);
  408. curcol.r, curcol.g, curcol.b = curcol.r - 1.7, curcol.g - 1.7, curcol.b - 1.7;
  409. surface.DrawLine( 5 + maxx, 31 + i, 5 + maxx + sizeper, 31 + i);
  410. end
  411. end
  412. if(bMouse && input.IsMouseDown(MOUSE_LEFT) && !mousedown && !visible[v]) then
  413. local nb = visible[v];
  414. for key,val in next, visible do
  415. visible[key] = false;
  416. end
  417. visible[v] = !nb;
  418. end
  419. surface.SetFont("Cloudyou2");
  420. surface.SetTextColor(255, 255, 255);
  421. local tw, th = surface.GetTextSize(v);
  422. surface.SetTextPos( 5 + maxx + sizeper / 2 - tw / 2, 31 + 15 - th / 2 );
  423. surface.DrawText(v);
  424. maxx = maxx + sizeper;
  425. end
  426. end
  427.  
  428. local function DrawCheckbox(self, w, h, var, maxy, posx, posy, dist)
  429. surface.SetFont("Cloudyou2");
  430. surface.SetTextColor(255, 255, 255);
  431. surface.SetTextPos( 5 + posx + 15 + 5, 61 + posy + maxy );
  432. local tw, th = surface.GetTextSize(var[1]);
  433. surface.DrawText(var[1]);
  434.  
  435. surface.SetDrawColor(255, 255, 255);
  436.  
  437. surface.DrawOutlinedRect( 5 + posx + 15 + 5 + dist + var[4], 61 + posy + maxy + 2, 14, 14);
  438.  
  439. local mx, my = self:GetPos();
  440.  
  441. local bMouse = MouseInArea(mx + 5 + posx + 15 + 5, my + 61 + posy + maxy, mx + 5 + posx + 15 + 5 + dist + 14 + var[4], my + 61 + posy + maxy + 16);
  442.  
  443. if(bMouse) then
  444. surface.DrawRect( 5 + posx + 15 + 5 + dist + 2 + var[4], 61 + posy + maxy + 4, 10, 10);
  445. end
  446.  
  447. if(var[3]) then
  448. surface.SetDrawColor(200, 200, 200);
  449. surface.DrawRect( 5 + posx + 15 + 5 + dist + 2 + var[4], 61 + posy + maxy + 4, 10, 10);
  450. surface.SetDrawColor(93, 0, 0);
  451. surface.DrawOutlinedRect( 5 + posx + 15 + 5 + dist + 2 + var[4], 61 + posy + maxy + 4, 10, 10);
  452. end
  453.  
  454. if(bMouse && input.IsMouseDown(MOUSE_LEFT) && !mousedown && !drawlast) then
  455. var[3] = !var[3];
  456. end
  457. end
  458.  
  459. local function DrawSlider(self, w, h, var, maxy, posx, posy, dist)
  460. local curnum = var[3];
  461. local max = var[4];
  462. local size = var[5];
  463. surface.SetFont("Cloudyou2");
  464. surface.SetTextColor(255, 255, 255);
  465. surface.SetTextPos( 5 + posx + 15 + 5, 61 + posy + maxy );
  466. surface.DrawText(var[1]);
  467.  
  468. local tw, th = surface.GetTextSize(var[1]);
  469.  
  470. surface.SetDrawColor(255, 255, 255);
  471.  
  472. surface.DrawRect( 5 + posx + 15 + 5 + dist, 61 + posy + maxy + 9, size, 2);
  473.  
  474. local ww = math.ceil(curnum * size / max);
  475.  
  476. surface.SetDrawColor(255, 255, 255);
  477.  
  478. surface.DrawRect( 3 + posx + 15 + 5 + dist + ww, 61 + posy + maxy + 9 - 5, 4, 12);
  479.  
  480. surface.SetDrawColor(0, 0, 0);
  481.  
  482. local tw, th = surface.GetTextSize(curnum..".00");
  483.  
  484. surface.DrawOutlinedRect( 3 + posx + 15 + 5 + dist + ww, 61 + posy + maxy + 4, 4, 12);
  485.  
  486. surface.SetTextPos( 5 + posx + 15 + 5 + dist + (size / 2) - tw / 2, 61 + posy + maxy + 16);
  487.  
  488. surface.DrawText(curnum..".00");
  489.  
  490. local mx, my = self:GetPos();
  491.  
  492. local bMouse = MouseInArea(5 + posx + 15 + 5 + dist + mx, 61 + posy + maxy + 9 - 5 + my, 5 + posx + 15 + 5 + dist + mx + size, 61 + posy + maxy + 9 - 5 + my + 12);
  493.  
  494. if(bMouse && input.IsMouseDown(MOUSE_LEFT) && !drawlast && !candoslider) then
  495. local mw, mh = gui.MousePos();
  496.  
  497. local new = math.ceil( ((mw - (mx + posx + 25 + dist - size)) - (size + 1)) / (size - 2) * max);
  498. var[3] = new;
  499. end
  500. end
  501.  
  502. local notyetselected;
  503.  
  504. local function DrawSelect(self, w, h, var, maxy, posx, posy, dist)
  505.  
  506. local size = var[5];
  507. local curopt = var[3];
  508.  
  509. surface.SetFont("Cloudyou2");
  510. surface.SetTextColor(255, 255, 255);
  511. surface.SetTextPos( 5 + posx + 15 + 5, 61 + posy + maxy );
  512. local tw, th = surface.GetTextSize(var[1]);
  513. surface.DrawText(var[1]);
  514.  
  515. surface.SetDrawColor(163, 163, 163);
  516.  
  517. surface.DrawOutlinedRect( 25 + posx + dist, 61 + posy + maxy, size, 16);
  518.  
  519. local mx, my = self:GetPos();
  520.  
  521. local bMouse = MouseInArea( mx + 25 + posx + dist, my + 61 + posy + maxy, mx + 25 + posx + dist + size, my + 61 + posy + maxy + 16)
  522.  
  523. local check = dist..posy..posx..w..h..maxy;
  524.  
  525. if(bMouse || notyetselected == check) then
  526.  
  527. surface.DrawRect(25 + posx + dist + 2, 61 + posy + maxy + 2, size - 4, 12);
  528.  
  529. end
  530.  
  531. local tw, th = surface.GetTextSize(curopt);
  532.  
  533. surface.SetTextPos( 25 + posx + dist + 5, 61 + posy + maxy + 6 - th / 2 + 2);
  534.  
  535. surface.DrawText(curopt);
  536.  
  537. if(bMouse && input.IsMouseDown(MOUSE_LEFT) && !drawlast && !mousedown || notyetselected == check) then
  538. notyetselected = check;
  539. drawlast = function()
  540. local maxy2 = 16;
  541. for k,v in next, var[4] do
  542. surface.SetDrawColor(163, 163, 163);
  543. surface.DrawRect( 25 + posx + dist, 61 + posy + maxy + maxy2, size, 16);
  544. local bMouse2 = MouseInArea( mx + 25 + posx + dist, my + 61 + posy + maxy + maxy2, mx + 25 + posx + dist + size, my + 61 + posy + maxy + 16 + maxy2)
  545. if(bMouse2) then
  546. surface.SetDrawColor(255, 255,255);
  547. surface.DrawRect( 25 + posx + dist, 61 + posy + maxy + maxy2, size, 16);
  548. end
  549. local tw, th = surface.GetTextSize(v);
  550. surface.SetTextPos( 25 + posx + dist + 5, 61 + posy + maxy + 6 - th / 2 + 2 + maxy2);
  551. surface.DrawText(v);
  552. maxy2 = maxy2 + 16;
  553. if(bMouse2 && input.IsMouseDown(MOUSE_LEFT) && !mousedown) then
  554. var[3] = v;
  555. notyetselected = nil;
  556. drawlast = nil;
  557. return;
  558. end
  559. end
  560. local bbMouse = MouseInArea( mx + 25 + posx + dist, my + 61 + posy + maxy, mx + 25 + posx + dist + size, my + 61 + posy + maxy + maxy2);
  561. if(!bbMouse && input.IsMouseDown(MOUSE_LEFT) && !mousedown) then
  562. notyetselected = nil;
  563. drawlast = nil;
  564. return;
  565. end
  566. end
  567. end
  568.  
  569.  
  570. end
  571.  
  572. local function DrawSubSub(self, w, h, k, var)
  573. local opt, posx, posy, sizex, sizey, dist = var[1][1], var[1][2], var[1][3], var[1][4], var[1][5], var[1][6];
  574.  
  575. surface.SetDrawColor(163, 163, 163);
  576.  
  577. local startpos = 61 + posy;
  578.  
  579. surface.SetTextColor(255, 255,255);
  580.  
  581. surface.SetFont("Cloudyou2");
  582.  
  583. local tw, th = surface.GetTextSize(opt);
  584.  
  585. surface.DrawLine( 5 + posx, startpos, 5 + posx + 15, startpos);
  586.  
  587. surface.SetTextPos( 5 + posx + 15 + 5, startpos - th / 2 );
  588.  
  589. surface.DrawLine( 5 + posx + 15 + 5 + tw + 5, startpos, 5 + posx + sizex, startpos);
  590.  
  591. surface.DrawLine( 5 + posx, startpos, 5 + posx, startpos + sizey);
  592.  
  593. surface.DrawLine(5 + posx, startpos + sizey, 5 + posx + sizex, startpos + sizey );
  594.  
  595. surface.DrawLine( 5 + posx + sizex, startpos, 5 + posx + sizex, startpos + sizey);
  596.  
  597. surface.DrawText(opt);
  598.  
  599. local maxy = 15;
  600.  
  601. for k,v in next, var do
  602. if(k == 1) then continue; end
  603. if(v[2] == "Checkbox") then
  604. DrawCheckbox(self, w, h, v, maxy, posx, posy, dist);
  605. elseif(v[2] == "Slider") then
  606. DrawSlider(self, w, h, v, maxy, posx, posy, dist);
  607. elseif(v[2] == "Selection") then
  608. DrawSelect(self, w, h, v, maxy, posx, posy, dist);
  609. end
  610. maxy = maxy + 25;
  611. end
  612. end
  613.  
  614. local function DrawSub(self, w, h)
  615. for k, v in next, visible do
  616. if(!v) then continue; end
  617. for _, var in next, options[k] do
  618. DrawSubSub(self, w, h, k, var);
  619. end
  620. end
  621. end
  622.  
  623. local function DrawSaveButton(self, w, h)
  624. local curcol = Color(235, 235, 235);
  625. local mx, my = self:GetPos();
  626. local bMouse = MouseInArea(mx + 30, my + h - 50, mx + 30 + 200, my + h - 50 + 30);
  627. if(bMouse) then
  628. curcol = Color(255, 255,255);
  629. end
  630. for i = 0, 30 do
  631. surface.SetDrawColor(curcol);
  632. surface.DrawLine( 30, h - 50 + i, 30 + 200, h - 50 + i );
  633. for k,v in next, curcol do
  634. curcol[k] = curcol[k] - 2;
  635. end
  636. end
  637. surface.SetFont("Cloudyou2");
  638. surface.SetTextColor(255, 255, 255);
  639. local tw, th = surface.GetTextSize("Save Configuration");
  640. surface.SetTextPos( 30 + 100 - tw / 2, h - 50 + 15 - th / 2 );
  641. surface.DrawText("Save Configuration");
  642. if(bMouse && input.IsMouseDown(MOUSE_LEFT)) then
  643. saveconfig();
  644. end
  645. end
  646.  
  647. local function DrawLoadButton(self, w, h)
  648. local curcol = Color(235, 235, 235);
  649. local mx, my = self:GetPos();
  650. local bMouse = MouseInArea(mx + 250, my + h - 50, mx + 250 + 200, my + h - 50 + 30);
  651. if(bMouse) then
  652. curcol = Color(200,200,200);
  653. end
  654. for i = 0, 30 do
  655. surface.SetDrawColor(curcol);
  656. surface.DrawLine( 250, h - 50 + i, 250 + 200, h - 50 + i );
  657. for k,v in next, curcol do
  658. curcol[k] = curcol[k] - 2;
  659. end
  660. end
  661. surface.SetFont("Cloudyou2");
  662. surface.SetTextColor(255, 255, 255);
  663. local tw, th = surface.GetTextSize("Load Configuration");
  664. surface.SetTextPos( 300 + 50 - tw / 2, h - 50 + 15 - th / 2 );
  665. surface.DrawText("Load Configuration");
  666. if(bMouse && input.IsMouseDown(MOUSE_LEFT)) then
  667. loadconfig();
  668. end
  669. end
  670.  
  671. loadconfig();
  672.  
  673. local insertdown2, insertdown, menuopen;
  674.  
  675. local function menu()
  676. local frame = vgui.Create("DFrame");
  677. frame:SetSize(900, 600);
  678. frame:Center();
  679. frame:SetTitle("");
  680. frame:MakePopup();
  681. frame:ShowCloseButton(false);
  682.  
  683. frame.Paint = function(self, w, h)
  684. if(candoslider && !mousedown && !drawlast && !input.IsMouseDown(MOUSE_LEFT)) then
  685. candoslider = false;
  686. end
  687. DrawBackground(w, h);
  688. DrawOptions(self, w, h);
  689. DrawSub(self, w, h);
  690. DrawSaveButton(self, w, h);
  691. DrawLoadButton(self, w, h);
  692. if(drawlast) then
  693. drawlast();
  694. candoslider = true;
  695. end
  696. mousedown = input.IsMouseDown(MOUSE_LEFT);
  697. end
  698.  
  699. frame.Think = function()
  700. if (input.IsKeyDown(KEY_INSERT) && !insertdown2) then
  701. frame:Remove();
  702. menuopen = false;
  703. candoslider = false;
  704. drawlast = nil;
  705. end
  706. end
  707. end
  708.  
  709. local function Think()
  710. if (input.IsKeyDown(KEY_INSERT) && !menuopen && !insertdown) then
  711. menuopen = true;
  712. insertdown = true;
  713. menu();
  714. elseif (!input.IsKeyDown(KEY_INSERT) && !menuopen) then
  715. insertdown = false;
  716. end
  717. if (input.IsKeyDown(KEY_INSERT) && insertdown && menuopen) then
  718. insertdown2 = true;
  719. else
  720. insertdown2 = false;
  721. end
  722. end
  723.  
  724. hook.Add("Think", "", Think);
  725.  
  726. --[[
  727. Actual codens
  728. ]]
  729.  
  730. local FindMetaTable = FindMetaTable;
  731.  
  732. local em = FindMetaTable"Entity";
  733. local pm = FindMetaTable"Player";
  734. local cm = FindMetaTable"CUserCmd";
  735. local wm = FindMetaTable"Weapon";
  736. local am = FindMetaTable"Angle";
  737. local vm = FindMetaTable"Vector";
  738.  
  739. local Vector = Vector;
  740. local player = Copy(player);
  741. local Angle = Angle;
  742. local me = LocalPlayer();
  743. local render = Copy(render);
  744. local cma = Copy(cam);
  745. local Material = Material;
  746. local CreateMaterial = CreateMaterial;
  747.  
  748. --[[
  749. esp
  750. ]]
  751.  
  752. local function Filter(v)
  753. local enemy = gBool("Visuals", "Filter", "Enemies only");
  754. local dist = gBool("Visuals", "Filter", "Distance")
  755. if(enemy) then
  756. if(pm.Team(v) == pm.Team(me)) then return false; end
  757. end
  758. if(dist) then
  759. local maxdist = gBool("Visuals", "Filter", "Max Distance");
  760. if( vm.Distance( em.GetPos(v), em.GetPos(me) ) > (maxdist * 5) ) then return false; end
  761. end
  762. return true;
  763. end
  764.  
  765.  
  766. local chamsmat = CreateMaterial("a", "VertexLitGeneric", {
  767. ["$ignorez"] = 1,
  768. ["$model"] = 1,
  769. ["$basetexture"] = "models/debug/debugwhite",
  770. });
  771.  
  772. local chamsmat2 = CreateMaterial("@", "vertexlitgeneric", {
  773. ["$ignorez"] = 0,
  774. ["$model"] = 1,
  775. ["$basetexture"] = "models/debug/debugwhite",
  776. });
  777.  
  778. local function GetChamsColor(v, vis)
  779. local pre = "Chams - Enemy";
  780. if(pm.Team(v) == pm.Team(me)) then
  781. pre = "Chams - Team";
  782. end
  783. if(vis) then
  784. local r = gInt("Colors", pre, "Visible R") / 255;
  785. local g = gInt("Colors", pre, "Visible G") / 255;
  786. local b = gInt("Colors", pre, "Visible B") / 255;
  787. return r,g,b;
  788. end
  789. local r = gInt("Colors", pre, "Not Visible R") / 255;
  790. local g = gInt("Colors", pre, "Not Visible G") / 255;
  791. local b = gInt("Colors", pre, "Not Visible B") / 255;
  792. return r,g,b;
  793. end
  794.  
  795. local function Chams(v)
  796. if(gBool("Visuals", "ESP", "XQZ")) then
  797. cam.Start3D();
  798. cam.IgnoreZ(true);
  799. em.DrawModel(v);
  800. cam.IgnoreZ(false);
  801. cam.End3D();
  802. end
  803. if(gBool("Visuals", "ESP", "Chams")) then
  804. cam.Start3D();
  805.  
  806. render.MaterialOverride(chamsmat);
  807. render.SetColorModulation(GetChamsColor(v));
  808.  
  809. em.DrawModel(v);
  810.  
  811. render.SetColorModulation(GetChamsColor(v, true));
  812. render.MaterialOverride(chamsmat2);
  813.  
  814. em.DrawModel(v);
  815.  
  816. cam.End3D();
  817. end
  818. end
  819.  
  820. local function GetColor(v)
  821. if(pm.Team(v) == pm.Team(me)) then
  822. local r = gInt("Colors", "Box - Team", "R");
  823. local g = gInt("Colors", "Box - Team", "G");
  824. local b = gInt("Colors", "Box - Team", "B");
  825. return(Color(r, g, b, 220));
  826. end
  827. local r = gInt("Colors", "Box - Enemy", "R");
  828. local g = gInt("Colors", "Box - Enemy", "G");
  829. local b = gInt("Colors", "Box - Enemy", "B");
  830. return(Color(r, g, b, 220));
  831. end
  832.  
  833. local function ESP(v)
  834. local pos = em.GetPos(v);
  835. local pos, pos2 = vm.ToScreen(pos - Vector(0, 0, 5)), vm.ToScreen( pos + Vector(0, 0, 70 ) );
  836. local h = pos.y - pos2.y;
  837. local w = h / 2.2;
  838. if(gBool("Visuals", "ESP", "Box") && gOption("Visuals", "ESP", "Box Type") == "2D Box") then
  839.  
  840. surface.SetDrawColor(GetColor(v));
  841. surface.DrawOutlinedRect( pos.x - w / 2, pos.y - h, w, h);
  842. surface.SetDrawColor(0, 0, 0, 220);
  843. surface.DrawOutlinedRect( pos.x - w / 2 - 1, pos.y - h - 1, w + 2, h + 2);
  844. surface.DrawOutlinedRect( pos.x - w / 2 + 1, pos.y - h + 1, w - 2, h - 2);
  845.  
  846. end
  847.  
  848. if(gBool("Visuals", "ESP", "Health")) then
  849. local hp = em.Health(v) * h / 100;
  850. if(hp > h) then hp = h; end
  851. local diff = h - hp;
  852. surface.SetDrawColor(0, 0, 0, 255);
  853. surface.DrawRect(pos.x - w / 2 - 5, pos.y - h - 1, 3, h + 2);
  854. surface.SetDrawColor( ( 100 - em.Health(v) ) * 2.55, em.Health(v) * 2.55, 0, 255);
  855. surface.DrawRect(pos.x - w / 2 - 4, pos.y - h + diff, 1, hp);
  856. end
  857.  
  858.  
  859.  
  860. surface.SetFont("BudgetLabel");
  861.  
  862. surface.SetTextColor(39,214,65, 200);
  863.  
  864. if(gBool("Visuals", "ESP", "Name")) then
  865.  
  866. local tw, th = surface.GetTextSize(pm.Name(v));
  867.  
  868. surface.SetTextPos( pos.x - tw / 2, pos.y - h + 2 - th );
  869.  
  870. surface.DrawText(pm.Name(v));
  871.  
  872. end
  873.  
  874. if(gBool("Visuals", "ESP", "Weapon")) then
  875.  
  876. local w = pm.GetActiveWeapon(v);
  877. if(w && em.IsValid(w)) then
  878. local tw, th = surface.GetTextSize(em.GetClass(w));
  879. surface.SetTextPos( pos.x - tw / 2, pos.y - th / 2 + 5 );
  880. surface.DrawText(em.GetClass(w));
  881. end
  882.  
  883. end
  884.  
  885. if(gBool("Visuals", "ESP", "Skeleton")) then
  886. local origin = em.GetPos(v);
  887. for i = 1, em.GetBoneCount(v) do
  888. local parent = em.GetBoneParent(v, i);
  889. if(!parent) then continue; end
  890. local bonepos, parentpos = em.GetBonePosition(v, i), em.GetBonePosition(v, parent);
  891. if(!bonepos || !parentpos || bonepos == origin) then continue; end
  892. local bs, ps = vm.ToScreen(bonepos), vm.ToScreen(parentpos);
  893. surface.SetDrawColor(0,0,0,150);
  894. surface.DrawLine(bs.x, bs.y, ps.x, ps.y);
  895. end
  896. end
  897.  
  898. end
  899.  
  900. local aimtarget;
  901.  
  902.  
  903. hook.Add("HUDPaint", "", function()
  904. if(aimtarget && gBool("HVH", "Target", "Snapline")) then
  905. local pos = vm.ToScreen(em.LocalToWorld(aimtarget, em.OBBCenter(aimtarget)));
  906. surface.SetDrawColor(0,0,0,150);
  907. surface.DrawLine(ScrW() / 2, ScrH() / 2, pos.x, pos.y);
  908. end
  909. if(!gBool("Visuals", "ESP", "Enabled")) then return; end
  910. for k,v in next, player.GetAll() do
  911. if(!em.IsValid(v) || em.Health(v) < 1 || v == me || em.IsDormant(v)) then continue; end
  912. if(!Filter(v)) then continue; end
  913. ESP(v);
  914. end
  915. end);
  916.  
  917. hook.Add("RenderScreenspaceEffects", "", function()
  918. if(!gBool("Visuals", "ESP", "Enabled")) then return; end
  919. for k,v in next, player.GetAll() do
  920. if(!em.IsValid(v) || em.Health(v) < 1 || v == me || em.IsDormant(v)) then continue; end
  921. if(!Filter(v)) then continue; end
  922. Chams(v);
  923. end
  924. end);
  925.  
  926. saveconfig();
  927.  
  928. --[[
  929. Clouds
  930. ]]
  931.  
  932. local fa;
  933. local aa;
  934.  
  935. local function FixMovement(ucmd, aaaaa)
  936. --local move = Vector(cm.GetForwardMove(ucmd), cm.GetSideMove(ucmd), 0);
  937. --local move = am.Forward( vm.Angle(move) + ( cm.GetViewAngles(ucmd) - fa ) ) * vm.Length(move);
  938. local move = Vector(cm.GetForwardMove(ucmd), cm.GetSideMove(ucmd), cm.GetUpMove(ucmd));
  939. local speed = math.sqrt(move.x * move.x + move.y * move.y);
  940. local ang = vm.Angle(move);
  941. local yaw = math.rad(cm.GetViewAngles(ucmd).y - fa.y + ang.y);
  942. cm.SetForwardMove(ucmd, (math.cos(yaw) * speed) * ( aaaaa && -1 || 1 ));
  943. cm.SetSideMove(ucmd, math.sin(yaw) * speed);
  944. --cm.SetForwardMove(ucmd, move.x);
  945. --cm.SetSideMove(ucmd, (aaaaa && move.y * -1 || move.y));
  946. end
  947.  
  948. local function Clamp(val, min, max)
  949. if(val < min) then
  950. return min;
  951. elseif(val > max) then
  952. return max;
  953. end
  954. return val;
  955. end
  956.  
  957. local function NormalizeAngle(ang)
  958. ang.x = math.NormalizeAngle(ang.x);
  959. ang.p = math.Clamp(ang.p, -89, 89);
  960. end
  961.  
  962. --[[
  963. aimer
  964. ]]
  965.  
  966. local table = Copy(table);
  967. local dists = {};
  968.  
  969. local function GetPos(v)
  970.  
  971. if(gBool("HVH", "Target", "Bodyaim")) then return( em.LocalToWorld(v, em.OBBCenter(v)) ); end
  972.  
  973. local eyes = em.LookupAttachment(v, "eyes");
  974.  
  975. if(!eyes) then return( em.LocalToWorld(v, em.OBBCenter(v)) ); end
  976.  
  977. local pos = em.GetAttachment(v, eyes);
  978.  
  979. if(!pos) then return( em.LocalToWorld(v, em.OBBCenter(v)) ); end
  980.  
  981. return(pos.Pos);
  982. end
  983.  
  984. local aimignore;
  985.  
  986. local function Valid(v)
  987. if(!v || !em.IsValid(v) || v == me || em.Health(v) < 1 || em.IsDormant(v) || pm.Team(v) == 1002 || (v == aimignore && gOption("HVH", "Target", "Selection") == "Nextshot")) then return false; end
  988. if(gBool("HVH", "Target", "Ignore Bots")) then
  989. if(pm.IsBot(v)) then return false; end
  990. end
  991. if(gBool("HVH", "Target", "Ignore Team")) then
  992. if(pm.Team(v) == pm.Team(me)) then return false; end
  993. end
  994. if(gBool("HVH", "Target", "Ignore Friends")) then
  995. if(pm.GetFriendStatus(v) == "friend") then return false; end
  996. end
  997. local tr = {
  998. start = em.EyePos(me),
  999. endpos = GetPos(v),
  1000. mask = MASK_SHOT,
  1001. filter = {me, v},
  1002. };
  1003. return(util.TraceLine(tr).Fraction == 1);
  1004. end
  1005.  
  1006. local function fakelagPredict(v)
  1007. if(!gBool("HvH", "Fakelag Prediction")) then return; end
  1008. if(!fakelagBucket[v]) then
  1009. fakelagBucket[v] = {
  1010. EntM.GetVelocity(v),
  1011. EntM.GetPos(v),
  1012. 0,
  1013. };
  1014. end
  1015.  
  1016. local oldVel = fakelagBucket[v][1];
  1017. local oldPos = fakelagBucket[v][2];
  1018.  
  1019. fakelagBucket[v][1] = EntM.GetVelocity(v);
  1020. fakelagBucket[v][2] = EntM.GetPos(v);
  1021.  
  1022. if(oldVel == nullVel) then
  1023. fakelagBucket[v][3] = 0;
  1024. return;
  1025. end
  1026.  
  1027. if(fakelagBucket[v][1] == oldVel && oldPos == fakelagBucket[v][2]) then
  1028. fakelagBucket[v][3] = fakelagBucket[v][3] + 1;
  1029.  
  1030. return(oldVel + (oldVel * (engine.TickInterval() * fakelagBucket[v][3])));
  1031. else
  1032. fakelagBucket[v][3] = 0;
  1033. end
  1034. end
  1035.  
  1036. local fakeLag_Tbl = {};
  1037. local FakeLagPrediction = function(v,vec)
  1038.  
  1039. local newVec = vec;
  1040.  
  1041. if(!fakeLag_Tbl[v:SteamID()]) then
  1042. fakeLag_Tbl[v:SteamID()] = {};
  1043. fakeLag_Tbl[v:SteamID()]["pos"] = v:GetPos();
  1044. fakeLag_Tbl[v:SteamID()]["opos"] = v:GetPos();
  1045. fakeLag_Tbl[v:SteamID()]["correct"] = 0;
  1046. else
  1047. fakeLag_Tbl[v:SteamID()]["opos"] = fakeLag_Tbl[v:SteamID()]["pos"];
  1048. fakeLag_Tbl[v:SteamID()]["pos"] = v:GetPos();
  1049. end
  1050.  
  1051. if( v:GetVelocity()[1] != 0 && fakeLag_Tbl[v:SteamID()]["opos"][1] == fakeLag_Tbl[v:SteamID()]["pos"][1]) then
  1052. fakeLag_Tbl[v:SteamID()]["correct"] = fakeLag_Tbl[v:SteamID()]["correct"] + 1 + engine.TickInterval();
  1053. newVec.x = newVec.x + fakeLag_Tbl[v:SteamID()]["correct"];
  1054. notification.AddLegacy( "Fakelag Corrected", NOTIFY_GENERIC , 0.7 )
  1055. return newVec;
  1056. else
  1057. fakeLag_Tbl[v:SteamID()]["correct"] = 0;
  1058. end
  1059. return vec;
  1060. end
  1061.  
  1062. function predict(cmd,target, predPos)
  1063. predPos = predPos + (ply:GetVelocity() * engine.TickInterval() * RealFrameTime() ) - (me:GetVelocity(me) * engine.TickInterval() * RealFrameTime() )
  1064. return predPos
  1065. end
  1066.  
  1067. local function gettarget()
  1068.  
  1069. local opt = gOption("HVH", "Target", "Selection");
  1070.  
  1071. local sticky = gOption("HVH", "Aimbot", "Non-Sticky");
  1072.  
  1073. if(opt == "Distance") then
  1074.  
  1075. if( !sticky && Valid(aimtarget) ) then return; end
  1076.  
  1077. dists = {};
  1078.  
  1079. for k,v in next, player.GetAll() do
  1080. if(!Valid(v)) then continue; end
  1081. dists[#dists + 1] = { vm.Distance( em.GetPos(v), em.GetPos(me) ), v };
  1082. end
  1083.  
  1084. table.sort(dists, function(a, b)
  1085. return(a[1] < b[1]);
  1086. end);
  1087.  
  1088. aimtarget = dists[1] && dists[1][2] || nil;
  1089.  
  1090. elseif(opt == "Health") then
  1091.  
  1092. if( !sticky && Valid(aimtarget) ) then return; end
  1093.  
  1094. dists = {};
  1095.  
  1096. for k,v in next, player.GetAll() do
  1097. if(!Valid(v)) then continue; end
  1098. dists[#dists + 1] = { em.Health(v), v };
  1099. end
  1100.  
  1101. table.sort(dists, function(a, b)
  1102. return(a[1] < b[1]);
  1103. end);
  1104.  
  1105. aimtarget = dists[1] && dists[1][2] || nil;
  1106.  
  1107. elseif(opt == "Nextshot") then
  1108. if( !sticky && Valid(aimtarget) ) then return; end
  1109. aimtarget = nil;
  1110. local allplys = player.GetAll();
  1111. local avaib = {};
  1112. for k,v in next,allplys do
  1113. avaib[math.random(100)] = v;
  1114. end
  1115.  
  1116. for k,v in next, avaib do
  1117. if(Valid(v)) then
  1118. aimtarget = v;
  1119. end
  1120. end
  1121. end
  1122.  
  1123. end
  1124.  
  1125.  
  1126. local cones = {};
  1127.  
  1128. local pcall = pcall;
  1129. local require = require;
  1130.  
  1131. local nullvec = Vector() * -1;
  1132.  
  1133. local IsFirstTimePredicted = IsFirstTimePredicted;
  1134. local CurTime = CurTime;
  1135. local servertime=0;
  1136. local bit = Copy(bit);
  1137. pcall(require, "dickwrap");
  1138. pcall(require, "aaa");
  1139. pcall(require, "name_enabler" );
  1140. pcall(require, "bsendpacket" );
  1141.  
  1142. hook.Add("Move", "", function()
  1143. if(!IsFirstTimePredicted()) then return; end
  1144. servertime = CurTime();
  1145. end);
  1146.  
  1147.  
  1148. GAMEMODE["EntityFireBullets"] = function(self, p, data)
  1149. aimignore = aimtarget;
  1150. local w = pm.GetActiveWeapon(me);
  1151. local Spread = data.Spread * -1;
  1152. if(!w || !em.IsValid(w) || cones[em.GetClass(w)] == Spread || Spread == nullvec) then return; end
  1153. cones[em.GetClass(w)] = Spread;
  1154. end
  1155.  
  1156. local function PredictSpread(ucmd, ang)
  1157. local w = pm.GetActiveWeapon(me);
  1158. if(!w || !em.IsValid(w) || !cones[em.GetClass(w)] || !gBool("HVH", "Accuracy", "Anti Spread")) then return am.Forward(ang); end
  1159. return(dickwrap.Predict(ucmd, am.Forward(ang), cones[em.GetClass(w)]));
  1160. end
  1161.  
  1162. local function Autofire(ucmd)
  1163. if(pm.KeyDown(me, 1) && gBool("HVH", "Aimbot", "AutoPistol")) then
  1164. cm.SetButtons(ucmd, bit.band( cm.GetButtons(ucmd), bit.bnot( 1 ) ) );
  1165. else
  1166. cm.SetButtons(ucmd, bit.bor( cm.GetButtons(ucmd), 1 ) );
  1167. end
  1168. end
  1169.  
  1170. local function fasAutowall(wep, startPos, aimPos, ply)
  1171. if(!autowall:GetBool()) then return false; end
  1172. local traces = {};
  1173. local me = me;
  1174. local traceResults = {};
  1175. local dir = (aimPos - startPos):GetNormalized();
  1176. traces[1] = { start = startPos, filter = me, mask = trace_normal, endpos = aimPos, };
  1177. traceResults[1] = util.TraceLine(traces[1]);
  1178. if(NoPenetration[traceResults[1].MatType]) then return false; end
  1179. if((-dir):DotProduct(traceResults[1].HitNormal) <= .26) then return false; end
  1180. traces[2] = { start = traceResults[1].HitPos, endpos = traceResults[1].HitPos + dir * wep.PenStr * (PenMod[traceResults[1].MatType] || 1) * wep.PenMod, filter = me, mask = trace_walls, };
  1181. traceResults[2] = util.TraceLine(traces[2]);
  1182. traces[3] = { start = traceResults[2].HitPos, endpos = traceResults[2].HitPos + dir * .1, filter = me, mask = trace_normal, };
  1183. traceResults [3] = util.TraceLine(traces[3]);
  1184. traces[4] = { start = traceResults[2].HitPos, endpos = aimPos, filter = me, mask = MASK_SHOT, };
  1185. traceResults[4] = util.TraceLine(traces[4]);
  1186. if(traceResults[4].Entity != ply) then return false; end
  1187. return(!traceResults[3].Hit);
  1188. end
  1189.  
  1190. local function IsVisible(ply, pos)
  1191. local trace = {
  1192. start = me:EyePos(),
  1193. endpos = pos,
  1194. filter = {ply, me},
  1195. mask = MASK_SHOT,
  1196. };
  1197.  
  1198. if (util.TraceLine(trace).Fraction == 1 ) then
  1199. return true;
  1200. else
  1201. local wep = me:GetActiveWeapon();
  1202. if(wep && wep:IsValid() && wep.PenStr) then
  1203. return fasAutowall(wep, trace.start, trace.endpos, ply);
  1204. end
  1205. end
  1206.  
  1207. return false;
  1208. end
  1209.  
  1210.  
  1211. /* AAA */
  1212. local function AAA()
  1213. for k,v in next, player.GetAll() do
  1214. if(v == me) then continue; end
  1215. local correctedpitch = v:EyeAngles().x;
  1216. local correctedyaw = v:EyeAngles().y;
  1217.  
  1218. local sid = v:SteamID();
  1219. if(!aaaTable[sid]) then
  1220. aaaTable[sid] = {["friend"] = false, ["pitch"] = 0, ["yaw"] = 0};
  1221. end
  1222.  
  1223. local tab = aaaTable[sid];
  1224.  
  1225. if(tab["pitch"] == 0) then //auto
  1226. if(correctedpitch >= 89 && correctedpitch < 180) then
  1227. correctedpitch = 89;
  1228. elseif(correctedpitch >= 180 && correctedpitch < 290) then
  1229. correctedpitch = -89;
  1230. end
  1231. elseif(tab["pitch"] == 1) then //down
  1232. correctedpitch = 89;
  1233. elseif(tab["pitch"] == -22.001) then //Aden
  1234. correctedpitch = 180;
  1235. elseif(tab["pitch"] == -541) then //AntiKaliCheat
  1236. if(correctedpitch >= 360 && correctedpitch < 180 && correctedpitch != 181 && correctedpitch ) then
  1237. correctedpitch = 89;
  1238. elseif(correctedpitch >= 181) then
  1239. correctedpitch = -89;
  1240. end
  1241. elseif(tab["pitch"] == -629) then //AntiKaliCheat2
  1242. if(correctedpitch >= 360 && correctedpitch < 180 && correctedpitch != 181 && correctedpitch ) then
  1243. correctedpitch = 89;
  1244. elseif(correctedpitch >= 181) then
  1245. correctedpitch = -89;
  1246. end
  1247. elseif(tab["pitch"] == -541) then //Dank Angle -- FUCKED RED take it up the ass
  1248. correctedpitch = 360;
  1249. elseif(tab["pitch"] == 629) then //SS/Aftermat
  1250. if(correctedpitch >= 360 && correctedpitch < -360 && correctedpitch != 360 && correctedpitch ) then
  1251. correctedpitch = -360;
  1252. correctedpitch = -360;
  1253. end
  1254. elseif(tab["pitch"] == 6) then // up
  1255. correctedpitch = -89;
  1256. end
  1257.  
  1258. if(tab["yaw"] == 0) then //auto
  1259. elseif(tab["yaw"] == -541) then -- idk
  1260. correctedyaw = correctedyaw - 90;
  1261. elseif(tab["yaw"] == -333.0001) then -- lol
  1262. correctedyaw = correctedyaw - 90;
  1263. elseif(tab["yaw"] == -23.001) then -- kek ily Not
  1264. correctedyaw = -correctedyaw - 90;
  1265. elseif(tab["yaw"] == -630) then -- Rip Older Aftermath
  1266. correctedyaw = correctedyaw - 90;
  1267. elseif(tab["yaw"] == -540) then -- Rip Red
  1268. correctedyaw = correctedyaw - 90;
  1269. elseif(tab["yaw"] == 373) then -- Seems like a good yaw
  1270. correctedyaw = correctedyaw - 90;
  1271. elseif(tab["yaw"] == 180) then
  1272. correctedyaw = correctedyaw + 90;
  1273. else
  1274. correctedyaw = correctedyaw - 180;
  1275. end
  1276.  
  1277. pitcharray[v:EntIndex()] = correctedpitch;
  1278.  
  1279. v:SetPoseParameter("aim_pitch", correctedpitch);
  1280. v:SetPoseParameter("body_yaw", 0);
  1281. v:SetPoseParameter("aim_yaw", 0);
  1282. v:InvalidateBoneCache();
  1283. v:SetRenderAngles(Angle(0, math.NormalizeAngle(correctedyaw), 0));
  1284. end
  1285. end
  1286.  
  1287. local function WeaponCanFire()
  1288. local w = pm.GetActiveWeapon(me);
  1289. if(!w || !em.IsValid(w) || !gBool("HVH", "Aimbot", "Bullettime")) then return true; end
  1290. return( servertime >= wm.GetNextPrimaryFire(w) );
  1291. end
  1292.  
  1293.  
  1294. local function bunnyHop(cmd)
  1295. if(!gBool("Misc", "Bunnyhop")) then return; end
  1296. if(CmdM.KeyDown(cmd, 2) && !EntM.IsOnGround(me)) then
  1297. CmdM.RemoveKey(cmd, 2);
  1298. end
  1299. end
  1300.  
  1301. local fakeLagSwitch;
  1302. local sendCount, chokeCount = 0, 0;
  1303.  
  1304. local function fakelag()
  1305. if(!gBool("HvH", "Fakelag")) then
  1306. sendCount = 0;
  1307. chokeCount = 0;
  1308. fakeLagSwitch = false;
  1309. return;
  1310. end
  1311.  
  1312. local send = gBool("HvH", "Fakelag Send");
  1313. local choke = gBool("HvH", "Fakelag Choke");
  1314.  
  1315. if(fakeLagSwitch) then
  1316. if(sendCount >= send) then
  1317. fakeLagSwitch = false;
  1318. sendCount = 0;
  1319. chokeCount = 0;
  1320. else
  1321. sendCount = sendCount + 1;
  1322. end
  1323. else
  1324. if(chokeCount >= choke) then
  1325. fakeLagSwitch = true;
  1326. sendCount = 0;
  1327. chokeCount = 0;
  1328. else
  1329. bSendPacket = false;
  1330. chokeCount = chokeCount + 1;
  1331. end
  1332. end
  1333. end
  1334.  
  1335. local matOverlay = Material( "sprites/glow08" )
  1336. local matTraitor = Material( "sprites/dot" )
  1337. local twep = { "weapon_ttt_c4", "weapon_ttt_knife", "weapon_ttt_phammer", "weapon_ttt_sipistol", "weapon_ttt_flaregun", "weapon_ttt_push", "weapon_ttt_radio", "weapon_ttt_teleport", "(Disguise)" ,"spiderman's_swep", "weapon_ttt_trait_defilibrator", "weapon_ttt_xbow", "weapon_ttt_dhook", "weapon_awp", "weapon_jihadbomb", "weapon_ttt_knife", "weapon_ttt_c4", "weapon_ttt_decoy", "weapon_ttt_flaregun", "weapon_ttt_phammer", "weapon_ttt_push", "weapon_ttt_radio", "weapon_ttt_sipistol", "weapon_ttt_teleport", "weapon_ttt_awp", "weapon_ttt_silencedsniper", "weapon_ttt_turtlenade", "weapon_ttt_death_station", "weapon_ttt_sg552", "weapon_ttt_tripmine"}
  1338.  
  1339. for _,v in pairs(player.GetAll()) do
  1340. v.HatTraitor = nil
  1341. end
  1342. for _,v in pairs(ents.GetAll()) do
  1343. v.HatESPTracked = nil
  1344. end
  1345.  
  1346. hook.Add("PostDrawOpaqueRenderables", "wire_animations_idle", function()
  1347. if GAMEMODE.round_state != ROUND_ACTIVE then
  1348. for _,v in pairs(player.GetAll()) do
  1349. v.HatTraitor = nil
  1350. end
  1351. for _,v in pairs(ents.GetAll()) do
  1352. v.HatESPTracked = nil
  1353. end
  1354. return
  1355. end
  1356. for _,v in pairs( ents.GetAll() ) do
  1357. if v and IsValid(v) and (table.HasValue(twep, v:GetClass()) and !v.HatESPTracked) then
  1358. local pl = v.Owner
  1359. if pl and IsValid(pl) and pl:IsTerror() then
  1360. if pl:IsDetective() then
  1361. v.HatESPTracked = true
  1362. else
  1363. v.HatESPTracked = true
  1364. pl.HatTraitor = true
  1365. chat.AddText( pl, Color(220,35,35), " is a ",Color(220,35,35), "TRAITOR",Color(220,35,35), " with a ",Color(255,0,0),v:GetClass().."!")
  1366. end
  1367. end
  1368. end
  1369. end
  1370.  
  1371.  
  1372.  
  1373. end)
  1374.  
  1375. local duckTime = 0
  1376. local function Bunnyhop(ucmd)
  1377. local duckEstimate = math.Round(58 + 1 / engine.TickInterval())
  1378. if(not gBool( "Misc", "Bunnyhop") or em.GetMoveType(me) == MOVETYPE_NOCLIP or me:Health() < 1) then return end
  1379. if(not me:IsOnGround()) then
  1380. ucmd:RemoveKey(2)
  1381. duckTime = duckTime + 1
  1382. if(ucmd:GetMouseX() > 1 or ucmd:GetMouseX() < -1) then
  1383. if(ucmd:GetMouseX() < 0) then
  1384. ucmd:SetSideMove(-400)
  1385. else
  1386. ucmd:SetSideMove(400)
  1387. end
  1388. else
  1389. ucmd:SetForwardMove(5850 / me:GetVelocity():Length2D())
  1390. ucmd:SetSideMove((ucmd:CommandNumber() % 2) == 0 and -400 or 400)
  1391. end
  1392. else
  1393. if(ucmd:KeyDown(2)) then
  1394. ucmd:SetForwardMove(400)
  1395. end
  1396. if(ucmd:KeyDown(IN_JUMP)) then
  1397. ucmd:SetForwardMove(10000)
  1398. end
  1399. end
  1400. end
  1401.  
  1402. local function Autostrafe(ucmd)
  1403. if (!LocalPlayer():IsTyping() && !LocalPlayer():IsOnGround() && LocalPlayer():Alive()) then
  1404. ucmd:RemoveKey(2)
  1405. if (ucmd:GetMouseX() < 0) then
  1406. ucmd:SetSideMove(-31 ^ 2 + 39) // extra memey take that ari
  1407. elseif(ucmd:GetMouseX() > 0) then
  1408. ucmd:SetSideMove(31 ^ 2 + 39)
  1409. end
  1410. end
  1411. end
  1412. hook.Add('CreateMove','',pBhoop)
  1413.  
  1414.  
  1415. local function WeaponShootable()
  1416. local wep = pm.GetActiveWeapon(me);
  1417. if( em.IsValid(wep) ) then // I would never get lazy..
  1418. local n = string.lower(wep:GetPrintName())
  1419. if( wep:Clip1() <= 0 ) then
  1420. return false;
  1421. end
  1422.  
  1423.  
  1424.  
  1425. if( string.find(n,"knife") or string.find(n,"grenade") or string.find(n,"sword") or string.find(n,"bomb") or string.find(n,"ied") or string.find(n,"c4") or string.find(n,"slam") or string.find(n,"climb") or string.find(n,"hand") or string.find(n,"fist") ) then
  1426. return false;
  1427. end
  1428.  
  1429.  
  1430. return true;
  1431. end
  1432. end
  1433.  
  1434. local function PredictPos(pos)
  1435. local myvel = LocalPlayer():GetVelocity()
  1436. local pos = pos - (myvel * engine.TickInterval());
  1437. return pos;
  1438. end
  1439.  
  1440. local function aimer(ucmd)
  1441. if(cm.CommandNumber(ucmd) == 0 || !gBool("HVH", "Aimbot", "Enabled")) then return; end
  1442. gettarget();
  1443. aa = false;
  1444. if(aimtarget && (input.IsKeyDown(KEY_LALT) || gBool("HVH", "Aimbot", "Autosnap")) && WeaponCanFire() && WeaponShootable() ) then
  1445. aa = true;
  1446. local pos = GetPos(aimtarget) - em.EyePos(me);
  1447. PredictPos(pos);
  1448. local ang = vm.Angle( PredictSpread(ucmd, vm.Angle(pos)));
  1449. NormalizeAngle(ang);
  1450. cm.SetViewAngles(ucmd, ang);
  1451. if(gBool("HVH", "Aimbot", "Autofire")) then
  1452. Autofire(ucmd);
  1453. end
  1454. if(gBool("HVH", "Aimbot", "Silent")) then
  1455. FixMovement(ucmd);
  1456. else
  1457. fa = ang;
  1458. end
  1459. end
  1460. end
  1461.  
  1462. --[[
  1463. antiaimer
  1464. ]]
  1465.  
  1466.  
  1467.  
  1468. local ox=-181;
  1469. local oy=0;
  1470.  
  1471. local function RandCoin()
  1472. local randcoin = math.random(0,1);
  1473. if(randcoin == 1) then return 1; else return -1; end
  1474. end
  1475.  
  1476. local function GetX()
  1477. local opt = gOption("HVH", "Anti-Aim", "X");
  1478. if(opt == "Emotion") then
  1479. local randcoin = gInt("HVH", "Anti-Aim", "Emotion Randomcoin X");
  1480. if( math.random(100) < randcoin ) then
  1481. ox = RandCoin() * 181;
  1482. end
  1483. elseif( opt == "Demolisher" ) then
  1484. ox = -629;
  1485. elseif( opt == "Anti p$ilent" ) then
  1486. ox = -142 + 85.001;
  1487. elseif( opt == "NEX" ) then
  1488. ox = -617;
  1489. elseif( opt == "Aftermath" ) then
  1490. ox = -629;
  1491. elseif( opt == "Slick" ) then
  1492. ox = -181.000005;
  1493. elseif( opt == "Cloud" ) then
  1494. ox = -630;
  1495. elseif( opt == "Squad" ) then
  1496. ox = 531;
  1497. elseif( opt == "Dank" ) then
  1498. ox = -541;
  1499. elseif( opt == "Up" ) then
  1500. ox = -181;
  1501. elseif( opt == "Down" ) then
  1502. ox = 181;
  1503. elseif(opt == "Jitter") then
  1504. ox = ox * -1;
  1505. elseif(opt == "Not") then
  1506. ox = -518
  1507. end
  1508. end
  1509.  
  1510. local function GetClosest()
  1511. local ddists = {};
  1512.  
  1513. local closest;
  1514.  
  1515. for k,v in next, player.GetAll() do
  1516. if(!Valid(v)) then continue; end
  1517. ddists[#ddists + 1] = { vm.Distance( em.GetPos(v), em.GetPos(me) ), v };
  1518. end
  1519.  
  1520. table.sort(ddists, function(a, b)
  1521. return(a[1] < b[1]);
  1522. end);
  1523.  
  1524. closest = ddists[1] && ddists[1][2] || nil;
  1525.  
  1526. if(!closest) then return fa.y; end
  1527.  
  1528. local pos = em.GetPos(closest);
  1529.  
  1530. local pos = vm.Angle(pos - em.EyePos(me));
  1531.  
  1532. return( pos.y );
  1533. end
  1534.  
  1535. local function GetY()
  1536. local opt = gOption("HVH", "Anti-Aim", "Y");
  1537. if(opt == "Emotion") then
  1538. local randcoin = gInt("HVH", "Anti-Aim", "Emotion Randomcoin Y");
  1539. if( math.random(100) < randcoin ) then
  1540. oy = fa.y + math.random(-180, 180);
  1541. end
  1542. elseif( opt == "Eye Angles" ) then
  1543. oy = fa.y;
  1544. elseif( opt == "NEX" ) then
  1545. oy = fa.y -541 + math.random(-540, -629);
  1546. elseif( opt == "Random" ) then
  1547. oy = fa.y + math.random(0, 10);
  1548. elseif( opt == "Aftermath" ) then
  1549. oy = fa.y -630;
  1550. elseif( opt == "Sly" ) then
  1551. oy = fa.y -180;
  1552. elseif( opt == "Not" ) then
  1553. oy = fa.y -56.002;
  1554. elseif( opt == "God" ) then
  1555. oy = fa.y -232.1230 - 631.220000 - 24 + -631.210000;
  1556. elseif( opt == "Anti Spine" ) then
  1557. oy = fa.y - 360 + math.random(-180, -205);
  1558. elseif( opt == "Sideways" ) then
  1559. oy = fa.y - 90;
  1560. elseif(opt == "Jitter") then
  1561. oy = fa.y + math.random(-90, 90);
  1562. elseif(opt == "TJitter") then
  1563. oy = fa.y - 180 + math.random(-90, 90);
  1564. elseif(opt == "Static") then
  1565. oy = 0;
  1566. elseif(opt == "Forward") then
  1567. oy = fa.y;
  1568. elseif(opt == "Backwards") then
  1569. oy = fa.y - 180;
  1570. elseif(opt == "Towards Players") then
  1571. oy = GetClosest();
  1572. end
  1573. end
  1574.  
  1575. local function walldetect()
  1576. local eye = em.EyePos(me);
  1577. local tr = util.TraceLine({
  1578. start = eye,
  1579. endpos = (eye + (am.Forward(fa) * 10)),
  1580. mask = MASK_ALL,
  1581. });
  1582. if(tr.Hit) then
  1583. ox = -181;
  1584. oy = -90;
  1585. end
  1586. end
  1587.  
  1588. local function antiaimer(ucmd)
  1589. if( (cm.CommandNumber(ucmd) == 0 && !gBool("Visuals", "Misc", "Thirdperson")) || cm.KeyDown(ucmd, 1) || cm.KeyDown(ucmd, 32) || aa || !gBool("HVH", "Anti-Aim", "Enabled")) then return; end
  1590. GetX();
  1591. GetY();
  1592. walldetect();
  1593. local aaang = Angle(ox, oy, 0);
  1594. cm.SetViewAngles(ucmd, aaang);
  1595. FixMovement(ucmd, true);
  1596. end
  1597.  
  1598. local function GetAngle(ang)
  1599. if(!gBool("HVH", "Accuracy", "Anti Recoil")) then return ang + pm.GetPunchAngle(me); end
  1600. return ang;
  1601. end
  1602.  
  1603. local function AutoPistol(cmd)
  1604. if(!gBool("HVH", "Aimbot", "AutoPistol")) then return; end
  1605. if(PlyM.KeyDown(me, 1)) then
  1606. CmdM.RemoveKey(cmd, 1);
  1607. end
  1608. end
  1609.  
  1610. local function Cloud(ucmd)
  1611. if(!fa) then fa = cm.GetViewAngles(ucmd); end
  1612. fa = fa + Angle(cm.GetMouseY(ucmd) * .023, cm.GetMouseX(ucmd) * -.023, 0);
  1613. NormalizeAngle(fa);
  1614. if(cm.CommandNumber(ucmd) == 0) then
  1615. cm.SetViewAngles(ucmd, GetAngle(fa));
  1616. return;
  1617. end
  1618. if(cm.KeyDown(ucmd, 1)) then
  1619. local ang = GetAngle(vm.Angle( PredictSpread(ucmd, fa ) ) );
  1620. NormalizeAngle(ang);
  1621. cm.SetViewAngles(ucmd, ang);
  1622. end
  1623. if(cm.KeyDown(ucmd, 2) && !em.IsOnGround(me)) then
  1624. cm.SetButtons(ucmd, bit.band( cm.GetButtons(ucmd), bit.bnot( 2 ) ) );
  1625. end
  1626. end
  1627.  
  1628. hook.Add("CreateMove", "", function(ucmd)
  1629. Autostrafe(ucmd)
  1630. bunnyHop(ucmd)
  1631. Cloud(ucmd);
  1632. aimer(ucmd);
  1633. antiaimer(ucmd);
  1634. end);
  1635.  
  1636. hook.Add( "HUDPaint", "Watermark", function()
  1637. if(!gBool("Visuals", "Misc", "Watermark")) then return; end
  1638. rainbow = {}
  1639. rainbow.R = math.sin(CurTime() * 4) * 127 + 128
  1640. rainbow.G = math.sin(CurTime() * 4 + 2) * 127 + 128
  1641. rainbow.B = math.sin(CurTime() * 4 + 4) * 127 + 128
  1642.  
  1643. local h = ScrH() / 1
  1644. local w = ScrW() / 5
  1645. draw.SimpleText("Cloud.", "WATERMARK", 10, 25, Color(255, 255, 255), TEXT_ALIGN_LEFT, TEXT_ALIGN_BOTTOM)
  1646. draw.SimpleText("Hack", "WATERMARK", 70, 25, Color(35,125,255), TEXT_ALIGN_LEFT, TEXT_ALIGN_BOTTOM)
  1647. draw.SimpleText(1, "WATERMARK", 10, 44, Color(35,125,255), TEXT_ALIGN_LEFT, TEXT_ALIGN_BOTTOM)
  1648. draw.SimpleText(".", "WATERMARK", 21, 44, Color(255,255,255), TEXT_ALIGN_LEFT, TEXT_ALIGN_BOTTOM)
  1649. draw.SimpleText(5, "WATERMARK", 27, 44, Color(255,255,255), TEXT_ALIGN_LEFT, TEXT_ALIGN_BOTTOM)
  1650. end)
  1651.  
  1652. local function HideThings( name )
  1653. if(!gBool("Visuals", "Misc", "Crosshair")) then return; end
  1654. if(name == "CHudCrosshair") then
  1655. return false
  1656. end
  1657. -- We don't return anything here otherwise it will overwrite all other
  1658. -- HUDShouldDraw hooks.
  1659. end
  1660. hook.Add( "HUDShouldDraw", "HideThings", HideThings )
  1661.  
  1662. hook.Add( "HUDPaint", "Crosshair", function() -- Taken from death.bot thanks i guess. probs taken from like luabot :)
  1663. blue = {}
  1664. blue.R = math.sin(CurTime() * 2) * 120 + 420
  1665. blue.G = math.sin(CurTime() * 2 + 4) * 127 + 128
  1666. blue.B = math.sin(CurTime() * 2 + 4) * 127 + 128
  1667. if(!gBool("Visuals", "Misc", "Crosshair")) then return; end
  1668. surface.SetDrawColor(255,255,255) -- rainbow.R, rainbow.G, rainbow.B
  1669. local x = ScrW() * 0.5
  1670. local y = ScrH() * 0.5
  1671. surface.DrawLine( x + 12, y, x - 12, y )
  1672. surface.DrawLine( x, y + 12, x, y - 12 )
  1673. surface.SetDrawColor( 35,125,255 ) -- rainbow.R, rainbow.G, rainbow.B
  1674. local x = ScrW() * 0.5
  1675. local y = ScrH() * 0.5
  1676. surface.DrawLine( x + 10, y, x - 10, y )
  1677. surface.DrawLine( x, y + 10, x, y - 10 )
  1678. end)
  1679.  
  1680. local wireframeMat = Material("models/wireframe");
  1681.  
  1682. hook.Add("PreDrawViewModel", "", function()
  1683. if(!gBool("Misc", "Misc", "Wireframe Viewmodel")) then return; end
  1684. render.MaterialOverride(wireframeMat);
  1685. render.SetColorModulation(0,0,0);
  1686. end);
  1687.  
  1688. hook.Add("CalcView", "", function(p, o, a, f)
  1689. return({
  1690. angles = GetAngle(fa),
  1691. origin = (gBool("Visuals", "Misc", "Thirdperson") && o + am.Forward(fa) * -150 || o),
  1692. fov = f,
  1693. });
  1694. end);
  1695.  
  1696. hook.Add("ShouldDrawLocalPlayer", "", function()
  1697. return(gBool("Visuals", "Misc", "Thirdperson"));
  1698. end);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement