Advertisement
Guest User

aimware

a guest
May 30th, 2016
1,918
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 32.24 KB | None | 0 0
  1. print( "Aimware Has Loaded" )
  2. print( "Made By Jango" )
  3. print( "Get Cracked!!" )
  4.  
  5.  
  6. local type = type;
  7. local next = next;
  8.  
  9. local function Copy(tt, lt)
  10. local copy = {}
  11. if lt then
  12. if type(tt) == "table" then
  13. for k,v in next, tt do
  14. copy[k] = Copy(k, v)
  15. end
  16. else
  17. copy = lt
  18. end
  19. return copy
  20. end
  21. if type(tt) != "table" then
  22. copy = tt
  23. else
  24. for k,v in next, tt do
  25. copy[k] = Copy(k, v)
  26. end
  27. end
  28. return copy
  29. end
  30.  
  31. local surface = Copy(surface);
  32. local vgui = Copy(vgui);
  33. local input = Copy(input);
  34. local Color = Color;
  35. local ScrW, ScrH = ScrW, ScrH;
  36. local gui = Copy(gui);
  37. local math = Copy(math);
  38. local file = Copy(file);
  39. local util = Copy(util);
  40.  
  41. surface.CreateFont("Aimware", {
  42. font = "Console",
  43. size = 13,
  44. weight = 900,
  45. shadow = true,
  46. antialias = false,
  47. });
  48.  
  49. surface.CreateFont("Aimware2", {
  50. font = "Console",
  51. size = 13,
  52. weight = 900,
  53. shadow = false,
  54. antialias = false,
  55. });
  56.  
  57. local options = {
  58. ["Ragebot"] = {
  59. {
  60. {"Aimbot", 20, 20, 350, 240, 120},
  61. {"Enabled", "Checkbox", false, 0},
  62. {"Silent", "Checkbox", false, 0},
  63. {"Autofire", "Checkbox", false, 0},
  64. {"Autosnap", "Checkbox", false, 0},
  65. {"Auto Pistol", "Checkbox", false, 0},
  66. {"Non-Sticky", "Checkbox", false, 0},
  67. {"Bullettime", "Checkbox", false, 0},
  68. },
  69. {
  70. {"Target", 20, 280, 350, 180, 120},
  71. {"Selection", "Selection", "Distance", {"Distance", "Health", "Nextshot"}, 150 },
  72. {"Bodyaim", "Checkbox", false, 0},
  73. {"Ignore Bots", "Checkbox", false, 0},
  74. {"Ignore Team", "Checkbox", false, 0},
  75. {"Ignore Friends", "Checkbox", false, 0},
  76. {"Snapline", "Checkbox", false, 0},
  77. },
  78. {
  79. {"Accuracy", 380, 20, 350, 190, 120},
  80. {"Anti Spread", "Checkbox", false, 0},
  81. {"Anti Recoil", "Checkbox", false, 0},
  82. },
  83. {
  84. {"Anti-Aim", 380, 230, 350, 230, 140},
  85. {"Enabled", "Checkbox", false, 0},
  86. {"X", "Selection", "Emotion", {"Up", "Down", "Jitter", "Emotion"}, 150},
  87. {"Y", "Selection", "Emotion", {"Forward", "Backwards", "Jitter", "TJitter", "Sideways", "Emotion", "Static", "Towards Players"}, 150},
  88. {"Max Y", "Slider", 50, 360, 150},
  89. {"Min Y", "Slider", 0, 360, 150},
  90. {"Emotion Randomcoin X", "Slider", 50, 100, 150},
  91. {"Emotion Randomcoin Y", "Slider", 20, 100, 150},
  92. },
  93. },
  94. ["Visuals"] = {
  95. {
  96. {"ESP", 20, 20, 350, 240, 220},
  97. {"Enabled", "Checkbox", false, 54},
  98. {"Box", "Checkbox", false, 54},
  99. {"Box Type", "Selection", "2D Box", {"2D Box", "3D Box"}, 68},
  100. {"Name", "Checkbox", false, 54},
  101. {"Health", "Checkbox", false, 54},
  102. {"Weapon", "Checkbox", false, 54},
  103. {"XQZ", "Checkbox", false, 54},
  104. {"Chams", "Checkbox", false, 54},
  105. {"Skeleton", "Checkbox", false, 54},
  106. },
  107. {
  108. {"Filter", 20, 280, 350, 180, 220},
  109. {"Enemies only", "Checkbox", false, 54},
  110. {"Distance", "Checkbox", false, 54},
  111. {"Max Distance", "Slider", 0, 10000, 68},
  112. },
  113. {
  114. {"Misc", 380, 20, 350, 190, 220},
  115. {"Thirdperson", "Checkbox", false, 54},
  116. },
  117. },
  118. ["Colors"] = {
  119. {
  120. {"Box - Team", 20, 20, 250, 175, 130},
  121. {"R", "Slider", 255, 255, 88},
  122. {"G", "Slider", 255, 255, 88},
  123. {"B", "Slider", 0, 255, 88},
  124. },
  125. {
  126. {"Box - Enemy", 20, 205, 250, 175, 130},
  127. {"R", "Slider", 180, 255, 88},
  128. {"G", "Slider", 120, 255, 88},
  129. {"B", "Slider", 0, 255, 88},
  130. },
  131. {
  132. {"Chams - Team", 290, 20, 250, 175, 130},
  133. {"Visible R", "Slider", 0, 255, 88},
  134. {"Visible G", "Slider", 255, 255, 88},
  135. {"Visible B", "Slider", 0, 255, 88},
  136. {"Not Visible R", "Slider", 0, 255, 88},
  137. {"Not Visible G", "Slider", 0, 255, 88},
  138. {"Not Visible B", "Slider", 255, 255, 88},
  139. },
  140.  
  141. {
  142. {"Chams - Enemy", 290, 205, 250, 175, 130},
  143. {"Visible R", "Slider", 255, 255, 88},
  144. {"Visible G", "Slider", 0, 255, 88},
  145. {"Visible B", "Slider", 0, 255, 88},
  146. {"Not Visible R", "Slider", 180, 255, 88},
  147. {"Not Visible G", "Slider", 120, 255, 88},
  148. {"Not Visible B", "Slider", 0, 255, 88},
  149. },
  150. },
  151. };
  152.  
  153. local order = {
  154. "Ragebot",
  155. "Visuals",
  156. "Colors",
  157. };
  158.  
  159. local function updatevar( men, sub, lookup, new )
  160. for aa,aaa in next, options[men] do
  161. for key, val in next, aaa do
  162. if(aaa[1][1] != sub) then continue; end
  163. if(val[1] == lookup) then
  164. val[3] = new;
  165. end
  166. end
  167. end
  168. end
  169.  
  170. local function loadconfig()
  171. if(!file.Exists("Aimware.txt", "DATA")) then return; end
  172. local tab = util.JSONToTable( file.Read("Aimware.txt", "DATA") );
  173. local cursub;
  174. for k,v in next, tab do
  175. if(!options[k]) then continue; end
  176. for men, subtab in next, v do
  177. for key, val in next, subtab do
  178. if(key == 1) then cursub = val[1]; continue; end
  179. updatevar(k, cursub, val[1], val[3]);
  180. end
  181. end
  182. end
  183. end
  184.  
  185. local function gBool(men, sub, lookup)
  186. if(!options[men]) then return; end
  187. for aa,aaa in next, options[men] do
  188. for key, val in next, aaa do
  189. if(aaa[1][1] != sub) then continue; end
  190. if(val[1] == lookup) then
  191. return val[3];
  192. end
  193. end
  194. end
  195. end
  196.  
  197. local function gOption(men, sub, lookup)
  198. if(!options[men]) then return ""; end
  199. for aa,aaa in next, options[men] do
  200. for key, val in next, aaa do
  201. if(aaa[1][1] != sub) then continue; end
  202. if(val[1] == lookup) then
  203. return val[3];
  204. end
  205. end
  206. end
  207. return "";
  208. end
  209.  
  210. local function gInt(men, sub, lookup)
  211. if(!options[men]) then return 0; end
  212. for aa,aaa in next, options[men] do
  213. for key, val in next, aaa do
  214. if(aaa[1][1] != sub) then continue; end
  215. if(val[1] == lookup) then
  216. return val[3];
  217. end
  218. end
  219. end
  220. return 0;
  221. end
  222.  
  223. local function saveconfig()
  224. file.Write("Aimware.txt", util.TableToJSON(options));
  225. end
  226.  
  227. local mousedown;
  228. local candoslider;
  229. local drawlast;
  230.  
  231. local visible = {};
  232.  
  233. for k,v in next, order do
  234. visible[v] = false;
  235. end
  236.  
  237. local function DrawBackground(w, h)
  238. surface.SetDrawColor(255, 255, 255);
  239. surface.DrawRect(0, 0, w, h);
  240.  
  241. local curcol = Color(182, 0, 0);
  242.  
  243. for i = 0, 30 do
  244. surface.SetDrawColor(curcol);
  245. curcol.r = curcol.r - 1;
  246. surface.DrawLine(0, i, w, i);
  247. end
  248.  
  249. surface.SetDrawColor(curcol);
  250.  
  251. surface.SetFont("Aimware");
  252.  
  253. local tw, th = surface.GetTextSize("Aimware for Garry's Mod");
  254.  
  255. surface.SetTextPos(5, 15 - th / 2);
  256.  
  257. surface.SetTextColor(255, 255, 255);
  258.  
  259. surface.DrawText("Aimware for Garry's Mod");
  260.  
  261. surface.DrawRect(0, 31, 5, h - 31);
  262. surface.DrawRect(0, h - 5, w, h);
  263. surface.DrawRect(w - 5, 31, 5, h);
  264. end
  265.  
  266. local function MouseInArea(minx, miny, maxx, maxy)
  267. local mousex, mousey = gui.MousePos();
  268. return(mousex < maxx && mousex > minx && mousey < maxy && mousey > miny);
  269. end
  270.  
  271. local function DrawOptions(self, w, h)
  272. local mx, my = self:GetPos();
  273.  
  274. local sizeper = (w - 10) / #order;
  275.  
  276. local maxx = 0;
  277.  
  278. for k,v in next, order do
  279. local bMouse = MouseInArea(mx + 5 + maxx, my + 31, mx + 5 + maxx + sizeper, my + 31 + 30);
  280. if(visible[v]) then
  281. local curcol = Color(0, 0, 0);
  282. for i = 0, 30 do
  283. surface.SetDrawColor(curcol);
  284. curcol.r, curcol.g, curcol.b = curcol.r + 3, curcol.g + 3, curcol.b + 3;
  285. surface.DrawLine( 5 + maxx, 31 + i, 5 + maxx + sizeper, 31 + i);
  286. end
  287. elseif(bMouse) then
  288. local curcol = Color(124, 124, 124);
  289. for i = 0, 30 do
  290. surface.SetDrawColor(curcol);
  291. curcol.r, curcol.g, curcol.b = curcol.r - 1.7, curcol.g - 1.7, curcol.b - 1.7;
  292. surface.DrawLine( 5 + maxx, 31 + i, 5 + maxx + sizeper, 31 + i);
  293. end
  294. else
  295. local curcol = Color(51, 51, 51);
  296. for i = 0, 30 do
  297. surface.SetDrawColor(curcol);
  298. curcol.r, curcol.g, curcol.b = curcol.r - 1.7, curcol.g - 1.7, curcol.b - 1.7;
  299. surface.DrawLine( 5 + maxx, 31 + i, 5 + maxx + sizeper, 31 + i);
  300. end
  301. end
  302. if(bMouse && input.IsMouseDown(MOUSE_LEFT) && !mousedown && !visible[v]) then
  303. local nb = visible[v];
  304. for key,val in next, visible do
  305. visible[key] = false;
  306. end
  307. visible[v] = !nb;
  308. end
  309. surface.SetFont("Aimware2");
  310. surface.SetTextColor(255, 255, 255);
  311. local tw, th = surface.GetTextSize(v);
  312. surface.SetTextPos( 5 + maxx + sizeper / 2 - tw / 2, 31 + 15 - th / 2 );
  313. surface.DrawText(v);
  314. maxx = maxx + sizeper;
  315. end
  316. end
  317.  
  318. local function DrawCheckbox(self, w, h, var, maxy, posx, posy, dist)
  319. surface.SetFont("Aimware2");
  320. surface.SetTextColor(0, 0, 0);
  321. surface.SetTextPos( 5 + posx + 15 + 5, 61 + posy + maxy );
  322. local tw, th = surface.GetTextSize(var[1]);
  323. surface.DrawText(var[1]);
  324.  
  325. surface.SetDrawColor(163, 163, 163);
  326.  
  327. surface.DrawOutlinedRect( 5 + posx + 15 + 5 + dist + var[4], 61 + posy + maxy + 2, 14, 14);
  328.  
  329. local mx, my = self:GetPos();
  330.  
  331. 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);
  332.  
  333. if(bMouse) then
  334. surface.DrawRect( 5 + posx + 15 + 5 + dist + 2 + var[4], 61 + posy + maxy + 4, 10, 10);
  335. end
  336.  
  337. if(var[3]) then
  338. surface.SetDrawColor(184, 0, 0);
  339. surface.DrawRect( 5 + posx + 15 + 5 + dist + 2 + var[4], 61 + posy + maxy + 4, 10, 10);
  340. surface.SetDrawColor(93, 0, 0);
  341. surface.DrawOutlinedRect( 5 + posx + 15 + 5 + dist + 2 + var[4], 61 + posy + maxy + 4, 10, 10);
  342. end
  343.  
  344. if(bMouse && input.IsMouseDown(MOUSE_LEFT) && !mousedown && !drawlast) then
  345. var[3] = !var[3];
  346. end
  347. end
  348.  
  349. local function DrawSlider(self, w, h, var, maxy, posx, posy, dist)
  350. local curnum = var[3];
  351. local max = var[4];
  352. local size = var[5];
  353. surface.SetFont("Aimware2");
  354. surface.SetTextColor(0, 0, 0);
  355. surface.SetTextPos( 5 + posx + 15 + 5, 61 + posy + maxy );
  356. surface.DrawText(var[1]);
  357.  
  358. local tw, th = surface.GetTextSize(var[1]);
  359.  
  360. surface.SetDrawColor(163, 163, 163);
  361.  
  362. surface.DrawRect( 5 + posx + 15 + 5 + dist, 61 + posy + maxy + 9, size, 2);
  363.  
  364. local ww = math.ceil(curnum * size / max);
  365.  
  366. surface.SetDrawColor(184, 0, 0);
  367.  
  368. surface.DrawRect( 3 + posx + 15 + 5 + dist + ww, 61 + posy + maxy + 9 - 5, 4, 12);
  369.  
  370. surface.SetDrawColor(93, 0, 0);
  371.  
  372. local tw, th = surface.GetTextSize(curnum..".00");
  373.  
  374. surface.DrawOutlinedRect( 3 + posx + 15 + 5 + dist + ww, 61 + posy + maxy + 4, 4, 12);
  375.  
  376. surface.SetTextPos( 5 + posx + 15 + 5 + dist + (size / 2) - tw / 2, 61 + posy + maxy + 16);
  377.  
  378. surface.DrawText(curnum..".00");
  379.  
  380. local mx, my = self:GetPos();
  381.  
  382. 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);
  383.  
  384. if(bMouse && input.IsMouseDown(MOUSE_LEFT) && !drawlast && !candoslider) then
  385. local mw, mh = gui.MousePos();
  386.  
  387. local new = math.ceil( ((mw - (mx + posx + 25 + dist - size)) - (size + 1)) / (size - 2) * max);
  388. var[3] = new;
  389. end
  390. end
  391.  
  392. local notyetselected;
  393.  
  394. local function DrawSelect(self, w, h, var, maxy, posx, posy, dist)
  395.  
  396. local size = var[5];
  397. local curopt = var[3];
  398.  
  399. surface.SetFont("Aimware2");
  400. surface.SetTextColor(0, 0, 0);
  401. surface.SetTextPos( 5 + posx + 15 + 5, 61 + posy + maxy );
  402. local tw, th = surface.GetTextSize(var[1]);
  403. surface.DrawText(var[1]);
  404.  
  405. surface.SetDrawColor(163, 163, 163);
  406.  
  407. surface.DrawOutlinedRect( 25 + posx + dist, 61 + posy + maxy, size, 16);
  408.  
  409. local mx, my = self:GetPos();
  410.  
  411. local bMouse = MouseInArea( mx + 25 + posx + dist, my + 61 + posy + maxy, mx + 25 + posx + dist + size, my + 61 + posy + maxy + 16)
  412.  
  413. local check = dist..posy..posx..w..h..maxy;
  414.  
  415. if(bMouse || notyetselected == check) then
  416.  
  417. surface.DrawRect(25 + posx + dist + 2, 61 + posy + maxy + 2, size - 4, 12);
  418.  
  419. end
  420.  
  421. local tw, th = surface.GetTextSize(curopt);
  422.  
  423. surface.SetTextPos( 25 + posx + dist + 5, 61 + posy + maxy + 6 - th / 2 + 2);
  424.  
  425. surface.DrawText(curopt);
  426.  
  427. if(bMouse && input.IsMouseDown(MOUSE_LEFT) && !drawlast && !mousedown || notyetselected == check) then
  428. notyetselected = check;
  429. drawlast = function()
  430. local maxy2 = 16;
  431. for k,v in next, var[4] do
  432. surface.SetDrawColor(163, 163, 163);
  433. surface.DrawRect( 25 + posx + dist, 61 + posy + maxy + maxy2, size, 16);
  434. local bMouse2 = MouseInArea( mx + 25 + posx + dist, my + 61 + posy + maxy + maxy2, mx + 25 + posx + dist + size, my + 61 + posy + maxy + 16 + maxy2)
  435. if(bMouse2) then
  436. surface.SetDrawColor(200, 200, 200);
  437. surface.DrawRect( 25 + posx + dist, 61 + posy + maxy + maxy2, size, 16);
  438. end
  439. local tw, th = surface.GetTextSize(v);
  440. surface.SetTextPos( 25 + posx + dist + 5, 61 + posy + maxy + 6 - th / 2 + 2 + maxy2);
  441. surface.DrawText(v);
  442. maxy2 = maxy2 + 16;
  443. if(bMouse2 && input.IsMouseDown(MOUSE_LEFT) && !mousedown) then
  444. var[3] = v;
  445. notyetselected = nil;
  446. drawlast = nil;
  447. return;
  448. end
  449. end
  450. local bbMouse = MouseInArea( mx + 25 + posx + dist, my + 61 + posy + maxy, mx + 25 + posx + dist + size, my + 61 + posy + maxy + maxy2);
  451. if(!bbMouse && input.IsMouseDown(MOUSE_LEFT) && !mousedown) then
  452. notyetselected = nil;
  453. drawlast = nil;
  454. return;
  455. end
  456. end
  457. end
  458.  
  459.  
  460. end
  461.  
  462. local function DrawSubSub(self, w, h, k, var)
  463. 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];
  464.  
  465. surface.SetDrawColor(163, 163, 163);
  466.  
  467. local startpos = 61 + posy;
  468.  
  469. surface.SetTextColor(0, 0, 0);
  470.  
  471. surface.SetFont("Aimware2");
  472.  
  473. local tw, th = surface.GetTextSize(opt);
  474.  
  475. surface.DrawLine( 5 + posx, startpos, 5 + posx + 15, startpos);
  476.  
  477. surface.SetTextPos( 5 + posx + 15 + 5, startpos - th / 2 );
  478.  
  479. surface.DrawLine( 5 + posx + 15 + 5 + tw + 5, startpos, 5 + posx + sizex, startpos);
  480.  
  481. surface.DrawLine( 5 + posx, startpos, 5 + posx, startpos + sizey);
  482.  
  483. surface.DrawLine(5 + posx, startpos + sizey, 5 + posx + sizex, startpos + sizey );
  484.  
  485. surface.DrawLine( 5 + posx + sizex, startpos, 5 + posx + sizex, startpos + sizey);
  486.  
  487. surface.DrawText(opt);
  488.  
  489. local maxy = 15;
  490.  
  491. for k,v in next, var do
  492. if(k == 1) then continue; end
  493. if(v[2] == "Checkbox") then
  494. DrawCheckbox(self, w, h, v, maxy, posx, posy, dist);
  495. elseif(v[2] == "Slider") then
  496. DrawSlider(self, w, h, v, maxy, posx, posy, dist);
  497. elseif(v[2] == "Selection") then
  498. DrawSelect(self, w, h, v, maxy, posx, posy, dist);
  499. end
  500. maxy = maxy + 25;
  501. end
  502. end
  503.  
  504. local function DrawSub(self, w, h)
  505. for k, v in next, visible do
  506. if(!v) then continue; end
  507. for _, var in next, options[k] do
  508. DrawSubSub(self, w, h, k, var);
  509. end
  510. end
  511. end
  512.  
  513. local function DrawSaveButton(self, w, h)
  514. local curcol = Color(235, 235, 235);
  515. local mx, my = self:GetPos();
  516. local bMouse = MouseInArea(mx + 30, my + h - 50, mx + 30 + 200, my + h - 50 + 30);
  517. if(bMouse) then
  518. curcol = Color(200, 200, 200);
  519. end
  520. for i = 0, 30 do
  521. surface.SetDrawColor(curcol);
  522. surface.DrawLine( 30, h - 50 + i, 30 + 200, h - 50 + i );
  523. for k,v in next, curcol do
  524. curcol[k] = curcol[k] - 2;
  525. end
  526. end
  527. surface.SetFont("Aimware2");
  528. surface.SetTextColor(0, 0, 0);
  529. local tw, th = surface.GetTextSize("Save Configuration");
  530. surface.SetTextPos( 30 + 100 - tw / 2, h - 50 + 15 - th / 2 );
  531. surface.DrawText("Save Configuration");
  532. if(bMouse && input.IsMouseDown(MOUSE_LEFT)) then
  533. saveconfig();
  534. end
  535. end
  536.  
  537. local function DrawLoadButton(self, w, h)
  538. local curcol = Color(235, 235, 235);
  539. local mx, my = self:GetPos();
  540. local bMouse = MouseInArea(mx + 250, my + h - 50, mx + 250 + 200, my + h - 50 + 30);
  541. if(bMouse) then
  542. curcol = Color(200, 200, 200);
  543. end
  544. for i = 0, 30 do
  545. surface.SetDrawColor(curcol);
  546. surface.DrawLine( 250, h - 50 + i, 250 + 200, h - 50 + i );
  547. for k,v in next, curcol do
  548. curcol[k] = curcol[k] - 2;
  549. end
  550. end
  551. surface.SetFont("Aimware2");
  552. surface.SetTextColor(0, 0, 0);
  553. local tw, th = surface.GetTextSize("Load Configuration");
  554. surface.SetTextPos( 250 + 100 - tw / 2, h - 50 + 15 - th / 2 );
  555. surface.DrawText("Load Configuration");
  556. if(bMouse && input.IsMouseDown(MOUSE_LEFT)) then
  557. loadconfig();
  558. end
  559. end
  560.  
  561. loadconfig();
  562.  
  563. local insertdown2, insertdown, menuopen;
  564.  
  565. local function menu()
  566. local frame = vgui.Create("DFrame");
  567. frame:SetSize(800, 600);
  568. frame:Center();
  569. frame:SetTitle("");
  570. frame:MakePopup();
  571. frame:ShowCloseButton(false);
  572.  
  573. frame.Paint = function(self, w, h)
  574. if(candoslider && !mousedown && !drawlast && !input.IsMouseDown(MOUSE_LEFT)) then
  575. candoslider = false;
  576. end
  577. DrawBackground(w, h);
  578. DrawOptions(self, w, h);
  579. DrawSub(self, w, h);
  580. DrawSaveButton(self, w, h);
  581. DrawLoadButton(self, w, h);
  582. if(drawlast) then
  583. drawlast();
  584. candoslider = true;
  585. end
  586. mousedown = input.IsMouseDown(MOUSE_LEFT);
  587. end
  588.  
  589. frame.Think = function()
  590. if (input.IsKeyDown(KEY_INSERT) && !insertdown2) then
  591. frame:Remove();
  592. menuopen = false;
  593. candoslider = false;
  594. drawlast = nil;
  595. end
  596. end
  597. end
  598.  
  599. local function Think()
  600. if (input.IsKeyDown(KEY_INSERT) && !menuopen && !insertdown) then
  601. menuopen = true;
  602. insertdown = true;
  603. menu();
  604. elseif (!input.IsKeyDown(KEY_INSERT) && !menuopen) then
  605. insertdown = false;
  606. end
  607. if (input.IsKeyDown(KEY_INSERT) && insertdown && menuopen) then
  608. insertdown2 = true;
  609. else
  610. insertdown2 = false;
  611. end
  612. end
  613.  
  614. hook.Add("Think", "", Think);
  615.  
  616. --[[
  617. Actual codens
  618. ]]
  619.  
  620. local FindMetaTable = FindMetaTable;
  621.  
  622. local em = FindMetaTable"Entity";
  623. local pm = FindMetaTable"Player";
  624. local cm = FindMetaTable"CUserCmd";
  625. local wm = FindMetaTable"Weapon";
  626. local am = FindMetaTable"Angle";
  627. local vm = FindMetaTable"Vector";
  628.  
  629. local Vector = Vector;
  630. local player = Copy(player);
  631. local Angle = Angle;
  632. local me = LocalPlayer();
  633. local render = Copy(render);
  634. local cma = Copy(cam);
  635. local Material = Material;
  636. local CreateMaterial = CreateMaterial;
  637.  
  638. --[[
  639. esp
  640. ]]
  641.  
  642. local function Filter(v)
  643. local enemy = gBool("Visuals", "Filter", "Enemies only");
  644. local dist = gBool("Visuals", "Filter", "Distance")
  645. if(enemy) then
  646. if(pm.Team(v) == pm.Team(me)) then return false; end
  647. end
  648. if(dist) then
  649. local maxdist = gBool("Visuals", "Filter", "Max Distance");
  650. if( vm.Distance( em.GetPos(v), em.GetPos(me) ) > (maxdist * 5) ) then return false; end
  651. end
  652. return true;
  653. end
  654.  
  655.  
  656. local chamsmat = CreateMaterial("a", "VertexLitGeneric", {
  657. ["$ignorez"] = 1,
  658. ["$model"] = 1,
  659. ["$basetexture"] = "models/debug/debugwhite",
  660. });
  661.  
  662. local chamsmat2 = CreateMaterial("@", "vertexlitgeneric", {
  663. ["$ignorez"] = 0,
  664. ["$model"] = 1,
  665. ["$basetexture"] = "models/debug/debugwhite",
  666. });
  667.  
  668. local function GetChamsColor(v, vis)
  669. local pre = "Chams - Enemy";
  670. if(pm.Team(v) == pm.Team(me)) then
  671. pre = "Chams - Team";
  672. end
  673. if(vis) then
  674. local r = gInt("Colors", pre, "Visible R") / 255;
  675. local g = gInt("Colors", pre, "Visible G") / 255;
  676. local b = gInt("Colors", pre, "Visible B") / 255;
  677. return r,g,b;
  678. end
  679. local r = gInt("Colors", pre, "Not Visible R") / 255;
  680. local g = gInt("Colors", pre, "Not Visible G") / 255;
  681. local b = gInt("Colors", pre, "Not Visible B") / 255;
  682. return r,g,b;
  683. end
  684.  
  685. local function Chams(v)
  686. if(gBool("Visuals", "ESP", "XQZ")) then
  687. cam.Start3D();
  688. cam.IgnoreZ(true);
  689. em.DrawModel(v);
  690. cam.IgnoreZ(false);
  691. cam.End3D();
  692. end
  693. if(gBool("Visuals", "ESP", "Chams")) then
  694. cam.Start3D();
  695.  
  696. render.MaterialOverride(chamsmat);
  697. render.SetColorModulation(GetChamsColor(v));
  698.  
  699. em.DrawModel(v);
  700.  
  701. render.SetColorModulation(GetChamsColor(v, true));
  702. render.MaterialOverride(chamsmat2);
  703.  
  704. em.DrawModel(v);
  705.  
  706. cam.End3D();
  707. end
  708. end
  709.  
  710. local function GetColor(v)
  711. if(pm.Team(v) == pm.Team(me)) then
  712. local r = gInt("Colors", "Box - Team", "R");
  713. local g = gInt("Colors", "Box - Team", "G");
  714. local b = gInt("Colors", "Box - Team", "B");
  715. return(Color(r, g, b, 220));
  716. end
  717. local r = gInt("Colors", "Box - Enemy", "R");
  718. local g = gInt("Colors", "Box - Enemy", "G");
  719. local b = gInt("Colors", "Box - Enemy", "B");
  720. return(Color(r, g, b, 220));
  721. end
  722.  
  723. local function ESP(v)
  724. local pos = em.GetPos(v);
  725. local pos, pos2 = vm.ToScreen(pos - Vector(0, 0, 5)), vm.ToScreen( pos + Vector(0, 0, 70 ) );
  726. local h = pos.y - pos2.y;
  727. local w = h / 2.2;
  728. if(gBool("Visuals", "ESP", "Box") && gOption("Visuals", "ESP", "Box Type") == "2D Box") then
  729.  
  730. surface.SetDrawColor(GetColor(v));
  731. surface.DrawOutlinedRect( pos.x - w / 2, pos.y - h, w, h);
  732. surface.SetDrawColor(0, 0, 0, 220);
  733. surface.DrawOutlinedRect( pos.x - w / 2 - 1, pos.y - h - 1, w + 2, h + 2);
  734. surface.DrawOutlinedRect( pos.x - w / 2 + 1, pos.y - h + 1, w - 2, h - 2);
  735.  
  736. end
  737.  
  738. if(gBool("Visuals", "ESP", "Health")) then
  739. local hp = em.Health(v) * h / 100;
  740. if(hp > h) then hp = h; end
  741. local diff = h - hp;
  742. surface.SetDrawColor(0, 0, 0, 255);
  743. surface.DrawRect(pos.x - w / 2 - 5, pos.y - h - 1, 3, h + 2);
  744. surface.SetDrawColor( ( 100 - em.Health(v) ) * 2.55, em.Health(v) * 2.55, 0, 255);
  745. surface.DrawRect(pos.x - w / 2 - 4, pos.y - h + diff, 1, hp);
  746. end
  747.  
  748.  
  749. surface.SetFont("BudgetLabel");
  750.  
  751. surface.SetTextColor(255, 255, 255);
  752.  
  753. if(gBool("Visuals", "ESP", "Name")) then
  754.  
  755. local tw, th = surface.GetTextSize(pm.Name(v));
  756.  
  757. surface.SetTextPos( pos.x - tw / 2, pos.y - h + 2 - th );
  758.  
  759. surface.DrawText(pm.Name(v));
  760.  
  761. end
  762.  
  763. if(gBool("Visuals", "ESP", "Weapon")) then
  764.  
  765. local w = pm.GetActiveWeapon(v);
  766. if(w && em.IsValid(w)) then
  767. local tw, th = surface.GetTextSize(em.GetClass(w));
  768. surface.SetTextPos( pos.x - tw / 2, pos.y - th / 2 + 5 );
  769. surface.DrawText(em.GetClass(w));
  770. end
  771.  
  772. end
  773.  
  774. if(gBool("Visuals", "ESP", "Skeleton")) then
  775. local origin = em.GetPos(v);
  776. for i = 1, em.GetBoneCount(v) do
  777. local parent = em.GetBoneParent(v, i);
  778. if(!parent) then continue; end
  779. local bonepos, parentpos = em.GetBonePosition(v, i), em.GetBonePosition(v, parent);
  780. if(!bonepos || !parentpos || bonepos == origin) then continue; end
  781. local bs, ps = vm.ToScreen(bonepos), vm.ToScreen(parentpos);
  782. surface.SetDrawColor(255, 255, 255);
  783. surface.DrawLine(bs.x, bs.y, ps.x, ps.y);
  784. end
  785. end
  786.  
  787. end
  788.  
  789. local aimtarget;
  790.  
  791.  
  792. hook.Add("HUDPaint", "", function()
  793. if(aimtarget && gBool("Ragebot", "Target", "Snapline")) then
  794. local pos = vm.ToScreen(em.LocalToWorld(aimtarget, em.OBBCenter(aimtarget)));
  795. surface.SetDrawColor(255, 255, 255);
  796. surface.DrawLine(ScrW() / 2, ScrH() / 2, pos.x, pos.y);
  797. end
  798. if(!gBool("Visuals", "ESP", "Enabled")) then return; end
  799. for k,v in next, player.GetAll() do
  800. if(!em.IsValid(v) || em.Health(v) < 1 || v == me || em.IsDormant(v)) then continue; end
  801. if(!Filter(v)) then continue; end
  802. ESP(v);
  803. end
  804. end);
  805.  
  806. hook.Add("RenderScreenspaceEffects", "", function()
  807. if(!gBool("Visuals", "ESP", "Enabled")) then return; end
  808. for k,v in next, player.GetAll() do
  809. if(!em.IsValid(v) || em.Health(v) < 1 || v == me || em.IsDormant(v)) then continue; end
  810. if(!Filter(v)) then continue; end
  811. Chams(v);
  812. end
  813. end);
  814.  
  815. saveconfig();
  816.  
  817. --[[
  818. Aimware's
  819. ]]
  820.  
  821. local fa;
  822. local aa;
  823.  
  824. local function FixMovement(ucmd, aaaaa)
  825. --local move = Vector(cm.GetForwardMove(ucmd), cm.GetSideMove(ucmd), 0);
  826. --local move = am.Forward( vm.Angle(move) + ( cm.GetViewAngles(ucmd) - fa ) ) * vm.Length(move);
  827. local move = Vector(cm.GetForwardMove(ucmd), cm.GetSideMove(ucmd), cm.GetUpMove(ucmd));
  828. local speed = math.sqrt(move.x * move.x + move.y * move.y);
  829. local ang = vm.Angle(move);
  830. local yaw = math.rad(cm.GetViewAngles(ucmd).y - fa.y + ang.y);
  831. cm.SetForwardMove(ucmd, (math.cos(yaw) * speed) * ( aaaaa && -1 || 1 ));
  832. cm.SetSideMove(ucmd, math.sin(yaw) * speed);
  833. --cm.SetForwardMove(ucmd, move.x);
  834. --cm.SetSideMove(ucmd, (aaaaa && move.y * -1 || move.y));
  835. end
  836.  
  837. local function Clamp(val, min, max)
  838. if(val < min) then
  839. return min;
  840. elseif(val > max) then
  841. return max;
  842. end
  843. return val;
  844. end
  845.  
  846. local function NormalizeAngle(ang)
  847. ang.x = math.NormalizeAngle(ang.x);
  848. ang.p = math.Clamp(ang.p, -89, 89);
  849. end
  850.  
  851. --[[
  852. aimer
  853. ]]
  854.  
  855. local table = Copy(table);
  856. local dists = {};
  857.  
  858. local function GetPos(v)
  859.  
  860. if(gBool("Ragebot", "Target", "Bodyaim")) then return( em.LocalToWorld(v, em.OBBCenter(v)) ); end
  861.  
  862. local eyes = em.LookupAttachment(v, "eyes");
  863.  
  864. if(!eyes) then return( em.LocalToWorld(v, em.OBBCenter(v)) ); end
  865.  
  866. local pos = em.GetAttachment(v, eyes);
  867.  
  868. if(!pos) then return( em.LocalToWorld(v, em.OBBCenter(v)) ); end
  869.  
  870. return(pos.Pos);
  871. end
  872.  
  873. local aimignore;
  874.  
  875. local function Valid(v)
  876. if(!v || !em.IsValid(v) || v == me || em.Health(v) < 1 || em.IsDormant(v) || pm.Team(v) == 1002 || (v == aimignore && gOption("Ragebot", "Target", "Selection") == "Nextshot")) then return false; end
  877. if(gBool("Ragebot", "Target", "Ignore Bots")) then
  878. if(pm.IsBot(v)) then return false; end
  879. end
  880. if(gBool("Ragebot", "Target", "Ignore Team")) then
  881. if(pm.Team(v) == pm.Team(me)) then return false; end
  882. end
  883. if(gBool("Ragebot", "Target", "Ignore Friends")) then
  884. if(pm.GetFriendStatus(v) == "friend") then return false; end
  885. end
  886. local tr = {
  887. start = em.EyePos(me),
  888. endpos = GetPos(v),
  889. mask = MASK_SHOT,
  890. filter = {me, v},
  891. };
  892. return(util.TraceLine(tr).Fraction == 1);
  893. end
  894.  
  895. local function gettarget()
  896.  
  897. local opt = gOption("Ragebot", "Target", "Selection");
  898.  
  899. local sticky = gOption("Ragebot", "Aimbot", "Non-Sticky");
  900.  
  901. if(opt == "Distance") then
  902.  
  903. if( !sticky && Valid(aimtarget) ) then return; end
  904.  
  905. dists = {};
  906.  
  907. for k,v in next, player.GetAll() do
  908. if(!Valid(v)) then continue; end
  909. dists[#dists + 1] = { vm.Distance( em.GetPos(v), em.GetPos(me) ), v };
  910. end
  911.  
  912. table.sort(dists, function(a, b)
  913. return(a[1] < b[1]);
  914. end);
  915.  
  916. aimtarget = dists[1] && dists[1][2] || nil;
  917.  
  918. elseif(opt == "Health") then
  919.  
  920. if( !sticky && Valid(aimtarget) ) then return; end
  921.  
  922. dists = {};
  923.  
  924. for k,v in next, player.GetAll() do
  925. if(!Valid(v)) then continue; end
  926. dists[#dists + 1] = { em.Health(v), v };
  927. end
  928.  
  929. table.sort(dists, function(a, b)
  930. return(a[1] < b[1]);
  931. end);
  932.  
  933. aimtarget = dists[1] && dists[1][2] || nil;
  934.  
  935. elseif(opt == "Nextshot") then
  936. if( !sticky && Valid(aimtarget) ) then return; end
  937. aimtarget = nil;
  938. local allplys = player.GetAll();
  939. local avaib = {};
  940. for k,v in next,allplys do
  941. avaib[math.random(100)] = v;
  942. end
  943.  
  944. for k,v in next, avaib do
  945. if(Valid(v)) then
  946. aimtarget = v;
  947. end
  948. end
  949. end
  950.  
  951. end
  952.  
  953.  
  954. local cones = {};
  955.  
  956. local pcall = pcall;
  957. local require = require;
  958.  
  959. local nullvec = Vector() * -1;
  960.  
  961. local IsFirstTimePredicted = IsFirstTimePredicted;
  962. local CurTime = CurTime;
  963. local servertime=0;
  964. local bit = Copy(bit);
  965. pcall(require, "dickwrap");
  966.  
  967. hook.Add("Move", "", function()
  968. if(!IsFirstTimePredicted()) then return; end
  969. servertime = CurTime();
  970. end);
  971.  
  972.  
  973. GAMEMODE["EntityFireBullets"] = function(self, p, data)
  974. aimignore = aimtarget;
  975. local w = pm.GetActiveWeapon(me);
  976. local Spread = data.Spread * -1;
  977. if(!w || !em.IsValid(w) || cones[em.GetClass(w)] == Spread || Spread == nullvec) then return; end
  978. cones[em.GetClass(w)] = Spread;
  979. end
  980.  
  981. local function PredictSpread(ucmd, ang)
  982. local w = pm.GetActiveWeapon(me);
  983. if(!w || !em.IsValid(w) || !cones[em.GetClass(w)] || !gBool("Ragebot", "Accuracy", "Anti Spread")) then return am.Forward(ang); end
  984. return(dickwrap.Predict(ucmd, am.Forward(ang), cones[em.GetClass(w)]));
  985. end
  986.  
  987. local function Autofire(ucmd)
  988. if(pm.KeyDown(me, 1) && gBool("Ragebot", "Aimbot", "Auto Pistol")) then
  989. cm.SetButtons(ucmd, bit.band( cm.GetButtons(ucmd), bit.bnot( 1 ) ) );
  990. else
  991. cm.SetButtons(ucmd, bit.bor( cm.GetButtons(ucmd), 1 ) );
  992. end
  993. end
  994.  
  995. local function WeaponCanFire()
  996. local w = pm.GetActiveWeapon(me);
  997. if(!w || !em.IsValid(w) || !gBool("Ragebot", "Aimbot", "Bullettime")) then return true; end
  998. return( servertime >= wm.GetNextPrimaryFire(w) );
  999. end
  1000.  
  1001. local function WeaponShootable()
  1002. local wep = pm.GetActiveWeapon(me);
  1003. if( em.IsValid(wep) ) then // I would never get lazy..
  1004. local n = string.lower(wep:GetPrintName())
  1005. if( wep:Clip1() <= 0 ) then
  1006. return false;
  1007. end
  1008.  
  1009.  
  1010.  
  1011. 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
  1012. return false;
  1013. end
  1014.  
  1015.  
  1016. return true;
  1017. end
  1018. end
  1019.  
  1020. local function PredictPos(pos)
  1021. local myvel = LocalPlayer():GetVelocity()
  1022. local pos = pos - (myvel * engine.TickInterval());
  1023. return pos;
  1024. end
  1025.  
  1026.  
  1027. local function aimer(ucmd)
  1028. if(cm.CommandNumber(ucmd) == 0 || !gBool("Ragebot", "Aimbot", "Enabled")) then return; end
  1029. gettarget();
  1030. aa = false;
  1031. if(aimtarget && (input.IsKeyDown(KEY_LALT) || gBool("Ragebot", "Aimbot", "Autosnap")) && WeaponCanFire() && WeaponShootable() ) then
  1032. aa = true;
  1033. local pos = GetPos(aimtarget) - em.EyePos(me);
  1034. PredictPos(pos);
  1035. local ang = vm.Angle( PredictSpread(ucmd, vm.Angle(pos)));
  1036. NormalizeAngle(ang);
  1037. cm.SetViewAngles(ucmd, ang);
  1038. if(gBool("Ragebot", "Aimbot", "Autofire")) then
  1039. Autofire(ucmd);
  1040. end
  1041. if(gBool("Ragebot", "Aimbot", "Silent")) then
  1042. FixMovement(ucmd);
  1043. else
  1044. fa = ang;
  1045. end
  1046. end
  1047. end
  1048.  
  1049. --[[
  1050. antiaimer
  1051. ]]
  1052.  
  1053.  
  1054.  
  1055. local ox=-181;
  1056. local oy=0;
  1057.  
  1058. local function RandCoin()
  1059. local randcoin = math.random(0,1);
  1060. if(randcoin == 1) then return 1; else return -1; end
  1061. end
  1062.  
  1063. local function GetX()
  1064. local opt = gOption("Ragebot", "Anti-Aim", "X");
  1065. if(opt == "Emotion") then
  1066. local randcoin = gInt("Ragebot", "Anti-Aim", "Emotion Randomcoin X");
  1067. if( math.random(100) < randcoin ) then
  1068. ox = RandCoin() * 181;
  1069. end
  1070. elseif( opt == "Up" ) then
  1071. ox = -181;
  1072. elseif( opt == "Down" ) then
  1073. ox = 181;
  1074. elseif(opt == "Jitter") then
  1075. ox = ox * -1;
  1076. end
  1077. end
  1078.  
  1079. local function GetClosest()
  1080. local ddists = {};
  1081.  
  1082. local closest;
  1083.  
  1084. for k,v in next, player.GetAll() do
  1085. if(!Valid(v)) then continue; end
  1086. ddists[#ddists + 1] = { vm.Distance( em.GetPos(v), em.GetPos(me) ), v };
  1087. end
  1088.  
  1089. table.sort(ddists, function(a, b)
  1090. return(a[1] < b[1]);
  1091. end);
  1092.  
  1093. closest = ddists[1] && ddists[1][2] || nil;
  1094.  
  1095. if(!closest) then return fa.y; end
  1096.  
  1097. local pos = em.GetPos(closest);
  1098.  
  1099. local pos = vm.Angle(pos - em.EyePos(me));
  1100.  
  1101. return( pos.y );
  1102. end
  1103.  
  1104. local function GetY()
  1105. local opt = gOption("Ragebot", "Anti-Aim", "Y");
  1106. if(opt == "Emotion") then
  1107. local randcoin = gInt("Ragebot", "Anti-Aim", "Emotion Randomcoin Y");
  1108. if( math.random(100) < randcoin ) then
  1109. oy = fa.y + math.random(-180, 180);
  1110. end
  1111. elseif( opt == "Eye Angles" ) then
  1112. oy = fa.y;
  1113. elseif( opt == "Sideways" ) then
  1114. oy = fa.y - 90;
  1115. elseif(opt == "Jitter") then
  1116. oy = fa.y + math.random(-90, 90);
  1117. elseif(opt == "TJitter") then
  1118. oy = fa.y - 180 + math.random(-90, 90);
  1119. elseif(opt == "Static") then
  1120. oy = 0;
  1121. elseif(opt == "Forward") then
  1122. oy = fa.y;
  1123. elseif(opt == "Backwards") then
  1124. oy = fa.y - 180;
  1125. elseif(opt == "Towards Players") then
  1126. oy = GetClosest();
  1127. end
  1128. end
  1129.  
  1130. local function walldetect()
  1131. local eye = em.EyePos(me);
  1132. local tr = util.TraceLine({
  1133. start = eye,
  1134. endpos = (eye + (am.Forward(fa) * 10)),
  1135. mask = MASK_ALL,
  1136. });
  1137. if(tr.Hit) then
  1138. ox = -181;
  1139. oy = -90;
  1140. end
  1141. end
  1142.  
  1143. local function antiaimer(ucmd)
  1144. if( (cm.CommandNumber(ucmd) == 0 && !gBool("Visuals", "Misc", "Thirdperson")) || cm.KeyDown(ucmd, 1) || cm.KeyDown(ucmd, 32) || aa || !gBool("Ragebot", "Anti-Aim", "Enabled")) then return; end
  1145. GetX();
  1146. GetY();
  1147. walldetect();
  1148. local aaang = Angle(ox, oy, 0);
  1149. cm.SetViewAngles(ucmd, aaang);
  1150. FixMovement(ucmd, true);
  1151. end
  1152.  
  1153. local function GetAngle(ang)
  1154. if(!gBool("Ragebot", "Accuracy", "Anti Recoil")) then return ang + pm.GetPunchAngle(me); end
  1155. return ang;
  1156. end
  1157.  
  1158. local function rapidfire(ucmd)
  1159. if(pm.KeyDown(me, 1) && gBool("Ragebot", "Aimbot", "Auto Pistol")) then
  1160. cm.SetButtons(ucmd, bit.band( cm.GetButtons(ucmd), bit.bnot( 1 ) ) );
  1161. end
  1162. end
  1163.  
  1164. local function Aimware(ucmd)
  1165. if(!fa) then fa = cm.GetViewAngles(ucmd); end
  1166. fa = fa + Angle(cm.GetMouseY(ucmd) * .023, cm.GetMouseX(ucmd) * -.023, 0);
  1167. NormalizeAngle(fa);
  1168. if(cm.CommandNumber(ucmd) == 0) then
  1169. cm.SetViewAngles(ucmd, GetAngle(fa));
  1170. return;
  1171. end
  1172. if(cm.KeyDown(ucmd, 1)) then
  1173. local ang = GetAngle(vm.Angle( PredictSpread(ucmd, fa ) ) );
  1174. NormalizeAngle(ang);
  1175. cm.SetViewAngles(ucmd, ang);
  1176. end
  1177. if(cm.KeyDown(ucmd, 2) && !em.IsOnGround(me)) then
  1178. cm.SetButtons(ucmd, bit.band( cm.GetButtons(ucmd), bit.bnot( 2 ) ) );
  1179. end
  1180. end
  1181.  
  1182.  
  1183. hook.Add("CreateMove", "", function(ucmd)
  1184. Aimware(ucmd);
  1185. aimer(ucmd);
  1186. antiaimer(ucmd);
  1187. end);
  1188.  
  1189. hook.Add("CalcView", "", function(p, o, a, f)
  1190. return({
  1191. angles = GetAngle(fa),
  1192. origin = (gBool("Visuals", "Misc", "Thirdperson") && o + am.Forward(fa) * -150 || o),
  1193. fov = f,
  1194. });
  1195. end);
  1196.  
  1197. hook.Add("ShouldDrawLocalPlayer", "", function()
  1198. return(gBool("Visuals", "Misc", "Thirdperson"));
  1199. end);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement