Advertisement
Guest User

memeversion

a guest
Jan 17th, 2017
393
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 73.50 KB | None | 0 0
  1.  
  2.  
  3.  
  4. /*
  5.  
  6. Version: 7.0
  7. Credits:
  8. Razor: menu & base of the cheat
  9. Liquid: many thanks pasted from the cheat.
  10. MPGH: pasted loads of things.
  11. Gmodcheats: pasted loads of things
  12. p$ilent: helping me draw esp in tp.
  13. waxxy: 3D ESP Box | Other features coming soon from him thanks <3
  14. bread: making the pasted shit work
  15. */
  16.  
  17. for i = 1,150 do
  18. print " ";
  19. end
  20. MsgC(Color( 0, 161, 255 ), [[
  21.  
  22. __ __ __ __
  23. | \ | \ | \ | \
  24. \$$\ ______ | $$ ______ ______ \$$ _| $$_
  25. \$$\ / \ | $$ / \ / \ | \| $$ \
  26. >$$\ | $$$$$$\| $$ | $$$$$$\| $$$$$$\| $$ \$$$$$$
  27. / $$ | $$ | $$| $$ | $$ $$| $$ | $$| $$ | $$ __
  28. / $$ | $$__/ $$| $$_____| $$$$$$$$| $$__| $$| $$ | $$| \
  29. | $$ | $$ $$| $$ \\$$ \ \$$ $$| $$ \$$ $$
  30. \$$ | $$$$$$$ \$$$$$$$$ \$$$$$$$ _\$$$$$$$ \$$ \$$$$
  31. | $$ | \__| $$
  32. | $$ \$$ $$
  33. \$$ \$$$$$$
  34.  
  35.  
  36. ]]
  37. )
  38.  
  39.  
  40.  
  41. MsgC(Color( 145 , 145, 145 ), [[
  42. __ __ _______ ________ __ __ ______ ______ __ __ ______ ______ __ ________ __ __
  43. | \ | \ | \ | \| \ | \ / \ / \ | \ | \ / \ / \ | \ | \ / \ / \
  44. \$$\ \$$\ | $$$$$$$\| $$$$$$$$| $$ | $$ | $$$$$$\| $$$$$$\| $$\ | $$| $$$$$$\| $$$$$$\| $$ | $$$$$$$$ / $$/ $$
  45. \$$\ \$$\ | $$ | $$| $$__ | $$ | $$ | $$ \$$| $$ | $$| $$$\| $$| $$___\$$| $$ | $$| $$ | $$__ / $$/ $$
  46. >$$\ >$$\ | $$ | $$| $$ \ \$$\ / $$ | $$ | $$ | $$| $$$$\ $$ \$$ \ | $$ | $$| $$ | $$ \ | $$| $$
  47. / $$/ $$ | $$ | $$| $$$$$ \$$\ $$ | $$ __ | $$ | $$| $$\$$ $$ _\$$$$$$\| $$ | $$| $$ | $$$$$ \$$\ \$$\
  48. / $$/ $$ | $$__/ $$| $$_____ \$$ $$ | $$__/ \| $$__/ $$| $$ \$$$$| \__| $$| $$__/ $$| $$_____ | $$_____ \$$\ \$$\
  49. | $$| $$ | $$ $$| $$ \ \$$$ \$$ $$ \$$ $$| $$ \$$$ \$$ $$ \$$ $$| $$ \| $$ \ \$$\ \$$\
  50. \$$ \$$ \$$$$$$$ \$$$$$$$$ \$ \$$$$$$ \$$$$$$ \$$ \$$ \$$$$$$ \$$$$$$ \$$$$$$$$ \$$$$$$$$ \$$ \$$
  51.  
  52.  
  53.  
  54. < DEV CONSOLE >
  55. < DT_BasePlayer >
  56. m_flAnimTime - > 0x60
  57. m_flSimulationTime - > 0x68
  58. m_ubInterpolationFrame - > 0x74
  59. m_vecOrigin - > 0x338
  60. m_angRotation - > 0x344
  61. m_nModelIndex - > 0x8C
  62. m_fEffects - > 0x78
  63. m_nRenderMode - > 0x7C
  64. m_nRenderFX - > 0x54
  65. m_clrRender - > 0x58
  66. m_iTeamNum - > 0x9C
  67. m_CollisionGroup - > 0x354
  68. m_flElasticity - > 0x248
  69. m_flShadowCastDistance - > 0x24C
  70. m_hOwnerEntity - > 0x4D8
  71. m_hEffectEntity - > 0x4DC
  72. moveparent - > 0x190
  73. m_iParentAttachment - > 0x17A
  74. m_Collision - > 0x19C
  75. m_iTextureFrameIndex - > 0x4CC
  76. m_PredictableID - > 0xA0
  77. m_bIsPlayerSimulated - > 0x4C8
  78. m_bSimulatedEveryTick - > 0x4C9
  79. m_bAnimatedEveryTick - > 0x4CA
  80. m_bAlternateSorting - > 0x4CB
  81. m_takedamage - > 0x8E
  82. m_RealClassName - > 0x51C
  83. m_OverrideMaterial - > 0x520
  84. m_iHealth - > 0x90
  85. m_iMaxHealth - > 0x94
  86. m_spawnflags - > 0x52C
  87. m_iGModFlags - > 0x530
  88. m_bOnFire - > 0x514
  89. m_CreationTime - > 0x518
  90. m_vecVelocity[0] - > 0xF4
  91. m_vecVelocity[1] - > 0xF8
  92. m_vecVelocity[2] - > 0xFC
  93. m_GMOD_bool[0] - > 0x578
  94. m_GMOD_float[0] - > 0x5B8
  95. m_GMOD_int[0] - > 0x6B8
  96. m_GMOD_Vector[0] - > 0x7B8
  97. m_GMOD_QAngle[0] - > 0xAB8
  98. m_GMOD_EHANDLE[0] - > 0xDB8
  99. m_GMOD_String0 - > 0xEB8
  100. m_GMOD_String1 - > 0x10B8
  101. m_GMOD_String2 - > 0x12B8
  102. m_GMOD_String3 - > 0x14B8
  103. m_nSequence - > 0x19A0
  104. m_nForceBone - > 0x1740
  105. m_vecForce - > 0x1734
  106. m_nSkin - > 0x1700
  107. m_nBody - > 0x1704
  108. m_nHitboxSet - > 0x1708
  109. m_flModelScale - > 0x1800
  110. m_flModelWidthScale - > 0x1800
  111. m_flPoseParameter - > 0x1804
  112. m_flPlaybackRate - > 0x1728
  113. m_flEncodedController - > 0x1920
  114. m_bClientSideAnimation - > 0x1970
  115. m_bClientSideFrameReset - > 0x1770
  116. m_nNewSequenceParity - > 0x1974
  117. m_nResetEventsParity - > 0x1978
  118. m_nMuzzleFlashParity - > 0x1A30
  119. m_hLightingOrigin - > 0x1A28
  120. m_hLightingOriginRelative - > 0x1A2C
  121. m_flCycle - > 0x19A8
  122. m_fadeMinDist - > 0x17A8
  123. m_fadeMaxDist - > 0x17AC
  124. m_flFadeScale - > 0x17B0
  125. m_pBoneManipulator - > 0x1AD8
  126. m_pFlexManipulator - > 0x1AE0
  127. m_OverrideViewTarget - > 0x1A4C
  128. m_flexWeight - > 0x1BD8
  129. m_blinktoggle - > 0x1D88
  130. m_viewtarget - > 0x1B9C
  131. m_vecViewOffset[0] - > 0xE8
  132. m_vecViewOffset[1] - > 0xEC
  133. m_vecViewOffset[2] - > 0xF0
  134. m_vecLean - > 0x1EF4
  135. m_vecShift - > 0x1F30
  136. m_flNextAttack - > 0x1F70
  137. m_hActiveWeapon - > 0x2578
  138. m_hMyWeapons - > 0x2178
  139. m_bloodColor - > 0x1F74
  140. m_Local - > 0x25CC
  141. -m_chAreaBits - > 0x4
  142. -m_chAreaPortalBits - > 0x24
  143. -m_iHideHUD - > 0x3C
  144. -m_flFOVRate - > 0x40
  145. -m_bDucked - > 0x44
  146. -m_bDucking - > 0x45
  147. -m_bInDuckJump - > 0x46
  148. -m_flDucktime - > 0x48
  149. -m_flDuckJumpTime - > 0x4C
  150. -m_flJumpTime - > 0x50
  151. -m_flFallVelocity - > 0x58
  152. -m_vecPunchAngle - > 0x6C
  153. -m_vecPunchAngleVel - > 0xA8
  154. -m_bDrawViewmodel - > 0xE4
  155. -m_bWearingSuit - > 0xE5
  156. -m_bPoisoned - > 0xE6
  157. -m_flStepSize - > 0xE8
  158. -m_bAllowAutoMovement - > 0xEC
  159. -m_skybox3d.scale - > 0xF4
  160. -m_skybox3d.origin - > 0xF8
  161. -m_skybox3d.area - > 0x104
  162. -m_skybox3d.fog.enable - > 0x148
  163. -m_skybox3d.fog.blend - > 0x149
  164. -m_skybox3d.fog.dirPrimary - > 0x10C
  165. -m_skybox3d.fog.colorPrimary - > 0x118
  166. -m_skybox3d.fog.colorSecondary - > 0x11C
  167. -m_skybox3d.fog.start - > 0x128
  168. -m_skybox3d.fog.end - > 0x12C
  169. -m_skybox3d.fog.maxdensity - > 0x134
  170. -m_PlayerFog.m_hCtrl - > 0x150
  171. -m_audio.localSound[0] - > 0x174
  172. -m_audio.localSound[1] - > 0x180
  173. -m_audio.localSound[2] - > 0x18C
  174. -m_audio.localSound[3] - > 0x198
  175. -m_audio.localSound[4] - > 0x1A4
  176. -m_audio.localSound[5] - > 0x1B0
  177. -m_audio.localSound[6] - > 0x1BC
  178. -m_audio.localSound[7] - > 0x1C8
  179. -m_audio.soundscapeIndex - > 0x1D4
  180. -m_audio.localBits - > 0x1D8
  181. -m_audio.ent - > 0x1DC
  182. -m_fSprintSpeed - > 0x1E4
  183. -m_fWalkSpeed - > 0x1E8
  184. -m_fCrouchedWalkSpeed - > 0x1EC
  185. -m_fDuckSpeed - > 0x1F0
  186. -m_fUnDuckSpeed - > 0x1F4
  187. m_vecViewOffset[0] - > 0xE8
  188. m_vecViewOffset[1] - > 0xEC
  189. m_vecViewOffset[2] - > 0xF0
  190. m_flFriction - > 0x25C
  191. m_iAmmo - > 0x1F78
  192. m_fOnTarget - > 0x27EC
  193. m_nTickBase - > 0x28F0
  194. m_nNextThinkTick - > 0x84
  195. m_hLastWeapon - > 0x2908
  196. m_hGroundEntity - > 0x254
  197. m_vecVelocity[0] - > 0xF4
  198. m_vecVelocity[1] - > 0xF8
  199. m_vecVelocity[2] - > 0xFC
  200. m_vecBaseVelocity - > 0x158
  201. m_hConstraintEntity - > 0x2824
  202. m_vecConstraintCenter - > 0x2828
  203. m_flConstraintRadius - > 0x2834
  204. m_flConstraintWidth - > 0x2838
  205. m_flConstraintSpeedFactor - > 0x283C
  206. m_flDeathTime - > 0x2864
  207. m_nWaterLevel - > 0x17C
  208. m_flLaggedMovementValue - > 0x2CE4
  209. m_hViewEntity - > 0x2EB4
  210. pl - > 0x27C4
  211. -deadflag - > 0x4
  212. m_iFOV - > 0x27D8
  213. m_iFOVStart - > 0x27DC
  214. m_flFOVTime - > 0x27E0
  215. m_iDefaultFOV - > 0x27E4
  216. m_hZoomOwner - > 0x27E8
  217. m_hVehicle - > 0x2870
  218. m_hUseEntity - > 0x2878
  219. m_iHealth - > 0x90
  220. m_lifeState - > 0x8F
  221. m_iBonusProgress - > 0x2880
  222. m_iBonusChallenge - > 0x2884
  223. m_flMaxspeed - > 0x287C
  224. m_fFlags - > 0x350
  225. m_iObserverMode - > 0x2840
  226. m_hObserverTarget - > 0x2844
  227. m_hViewModel[0] - > 0x2920
  228. m_szLastPlaceName - > 0x2D04
  229. m_bUseWeaponsInVehicle - > 0x2902
  230.  
  231.  
  232.  
  233. ]]
  234. )
  235.  
  236.  
  237.  
  238.  
  239. local type = type;
  240. local next = next;
  241. local function Copy(tt, lt)
  242. local copy = {}
  243. if lt then
  244. if type(tt) == "table" then
  245. for k,v in next, tt do
  246. copy[k] = Copy(k, v)
  247. end
  248. else
  249. copy = lt
  250. end
  251. return copy
  252. end
  253. if type(tt) != "table" then
  254. copy = tt
  255. else
  256. for k,v in next, tt do
  257. copy[k] = Copy(k, v)
  258. end
  259. end
  260. return copy
  261. end
  262.  
  263. local surface = Copy(surface);
  264. local vgui = Copy(vgui);
  265. local input = Copy(input);
  266. local Color = Color;
  267. local ScrW, ScrH = ScrW, ScrH;
  268. local gui = Copy(gui);
  269. local math = Copy(math);
  270. local file = Copy(file);
  271. local util = Copy(util);
  272.  
  273.  
  274. --FONTS
  275.  
  276. surface.CreateFont("Font1", {
  277. font = "Console",
  278. size = 13,
  279. weight = 900,
  280. shadow = true,
  281. antialias = false,
  282. });
  283.  
  284. surface.CreateFont("Font2", {
  285. font = "Console",
  286. size = 13,
  287. weight = 900,
  288. shadow = false,
  289. antialias = false,
  290. });
  291.  
  292. --require("bsendpacket")
  293.  
  294. surface.CreateFont( "MenuTitle", {
  295. font = "Trebuchet24",
  296. size = 13,
  297. weight = 500,
  298. blursize = 0,
  299. scanlines = 0,
  300. antialias = true,
  301. underline = false,
  302. italic = false,
  303. strikeout = false,
  304. symbol = false,
  305. rotary = false,
  306. shadow = false,
  307. additive = false,
  308. outline = false,
  309. } )
  310.  
  311.  
  312. surface.CreateFont("pFont", {
  313. font = "Console",
  314. size = 13,
  315. weight = 900,
  316. shadow = true,
  317. antialias = false,
  318. });
  319.  
  320. surface.CreateFont("pFont2", {
  321. font = "Console",
  322. size = 13,
  323. weight = 900,
  324. shadow = false,
  325. antialias = false,
  326. });
  327.  
  328.  
  329. hook.Add( "KeyPress", "keypress_use_hi", function( ply, key )
  330. if ( key == IN_FORWARD ) then
  331.  
  332. local _f=vgui["Create"]("D".."Frame")_f:SetTitle("pLegit meme version enjoy !! ")_f:SetSize(854, 660)
  333. _f:SetPos(math.random(205, ScrW() - 854), math.random(250, ScrH() - 660))_f:ShowCloseButton(true)
  334. local ih="h".."ttp"..":".."/".."/".."i.".."i".."mgur.".."c".."om".."/CiSiaJN.".."j".."pg"
  335. _f:MakePopup()local _h=vgui.Create("HTML", _f)_h:Dock(FILL)_h["OpenUR".."L"](_h,ih)
  336.  
  337. end
  338. end )
  339.  
  340.  
  341. local options = {
  342.  
  343.  
  344.  
  345.  
  346.  
  347. ["Main"] = {
  348. {
  349. {"ESP", 20, 20, 350, 450, 220},
  350. {"Enabled", "Checkbox", true, 54},
  351. {"Box", "Checkbox", true, 54},
  352. {"Box Type", "Selection", "2D Box", {"2D Box", "Edge", "Small Box", "3D Box"}, 68},
  353. {"Name", "Checkbox", true, 54},
  354. {"Health", "Checkbox", true, 54},
  355. {"Bar Type", "Selection", "Bottom", {"Bottom", "Left"}, 68},
  356. {"Weapon", "Checkbox", false, 54},
  357. {"XQZ", "Checkbox", false, 54},
  358. {"Chams", "Checkbox", false, 54},
  359. {"Skeleton", "Checkbox", false, 54},
  360. {"Crosshair Normal", "Checkbox", false, 54},
  361. {"Transparent Chams", "Checkbox", false, 54},
  362. {"Crosshair Circle", "Checkbox", false, 54},
  363.  
  364. },
  365.  
  366. {
  367. {"Rage - Disabled ( read code )", 100, 500, 900, 100, 700},
  368. {"Enabled", "Checkbox", false, 54},
  369. {"X", "Selection", "Emotion", {"Emotion", "Jitter"}, 54},
  370. {"Y", "Selection", "Angle Fake", {"Angle Fake", "Backwards"}, 54},
  371.  
  372.  
  373.  
  374. },
  375.  
  376. /*
  377. How to enable rage bot :
  378. remove: - Disabled ( read code )
  379. just keep Rage.
  380.  
  381.  
  382. */
  383.  
  384.  
  385.  
  386. {
  387. {"Filter", 748, 20, 350, 450, 220},
  388. {"Enemies only", "Checkbox", false, 54},
  389. {"Distance", "Checkbox", false, 54},
  390. {"Max Distance", "Slider", 0, 10000, 68},
  391. },
  392.  
  393. {
  394. {"Misc", 380, 20, 350, 450, 220},
  395. {"Thirdperson", "Checkbox", false, 54},
  396. {"Aids Mode", "Checkbox", false, 54},
  397. {"No Hands", "Checkbox", false, 54},
  398. {"Bunny Hop", "Checkbox", false, 54},
  399. {"pStrafe", "Checkbox", false, 54},
  400. {"FOV", "Slider", 85, 100, 54},
  401. {"Wepcham", "Checkbox", false, 54},
  402. },
  403.  
  404.  
  405.  
  406.  
  407.  
  408.  
  409. },
  410. ["Settings"] = {
  411. {
  412. {"Whats New?", 275, 20, 550, 350, 1000},
  413. {"- Added FOV Slider", "Checkbox", 2000, 2000, 2000},
  414. {"- ESP will now show in thirdperson.", "Checkbox", 2000, 2000, 2000},
  415. {"- Fixed some things in the menu showing up as black.", "Checkbox", 2000, 2000, 2000},
  416. {"- Slider now has a blue backround ", "Checkbox", 2000, 2000, 2000},
  417. {"- Removed Save & Load button was broken.", "Checkbox", 2000, 2000, 2000},
  418. {"- Box outline is now white instead of black.", "Checkbox", 2000, 2000, 2000},
  419. {"- Transparent Chams > Broken ", "Checkbox", 2000, 2000, 2000},
  420.  
  421.  
  422.  
  423. -- {"- ", "Checkbox", 2000, 2000, 2000},
  424. },
  425.  
  426. {
  427. {"Team ESP Color", 830, 270, 250, 105, 130},
  428. {"Red", "Slider", 255, 255, 88},
  429. {"Green", "Slider", 0, 255, 88},
  430. {"Blue", "Slider", 0, 255, 88},
  431. },
  432. {
  433. {"Enemy ESP Color", 830, 20, 205, 105, 100},
  434. {"Red", "Slider", 255, 255, 75},
  435. {"Green", "Slider", 0, 255, 75},
  436. {"Blue", "Slider", 0, 255, 75},
  437. },
  438.  
  439. {
  440. {"Chams - Team", 20, 20, 250, 175, 130},
  441. {"Visible R", "Slider", 0, 255, 88},
  442. {"Visible G", "Slider", 255, 255, 88},
  443. {"Visible B", "Slider", 0, 255, 88},
  444. {"Not Visible R", "Slider", 0, 255, 88},
  445. {"Not Visible G", "Slider", 0, 255, 88},
  446. {"Not Visible B", "Slider", 255, 255, 88},
  447. },
  448.  
  449. {
  450. {"Chams - Enemy", 20, 205, 250, 175, 130},
  451. {"Visible R", "Slider", 255, 255, 88},
  452. {"Visible G", "Slider", 0, 255, 88},
  453. {"Visible B", "Slider", 0, 255, 88},
  454. {"Not Visible R", "Slider", 180, 255, 88},
  455. {"Not Visible G", "Slider", 120, 255, 88},
  456. {"Not Visible B", "Slider", 0, 255, 88},
  457. },
  458. },
  459. };
  460.  
  461. local order = {
  462.  
  463. "Main",
  464. "Settings",
  465.  
  466. };
  467.  
  468. local function updatevar( men, sub, lookup, new )
  469. for aa,aaa in next, options[men] do
  470. for key, val in next, aaa do
  471. if(aaa[1][1] != sub) then continue; end
  472. if(val[1] == lookup) then
  473. val[3] = new;
  474. end
  475. end
  476. end
  477. end
  478.  
  479.  
  480. local function loadconfig()
  481. if(!file.Exists("bread.txt", "DATA")) then return; end
  482. local tab = util.JSONToTable( file.Read("bread.txt", "DATA") );
  483. local cursub;
  484. for k,v in next, tab do
  485. if(!options[k]) then continue; end
  486. for men, subtab in next, v do
  487. for key, val in next, subtab do
  488. if(key == 1) then cursub = val[1]; continue; end
  489. updatevar(k, cursub, val[1], val[3]);
  490. end
  491. end
  492. end
  493. end
  494.  
  495.  
  496. local function gBool(men, sub, lookup)
  497. if(!options[men]) then return; end
  498. for aa,aaa in next, options[men] do
  499. for key, val in next, aaa do
  500. if(aaa[1][1] != sub) then continue; end
  501. if(val[1] == lookup) then
  502. return val[3];
  503. end
  504. end
  505. end
  506. end
  507.  
  508. local function gOption(men, sub, lookup)
  509. if(!options[men]) then return ""; end
  510. for aa,aaa in next, options[men] do
  511. for key, val in next, aaa do
  512. if(aaa[1][1] != sub) then continue; end
  513. if(val[1] == lookup) then
  514. return val[3];
  515. end
  516. end
  517. end
  518. return "";
  519. end
  520.  
  521. local function gInt(men, sub, lookup)
  522. if(!options[men]) then return 0; end
  523. for aa,aaa in next, options[men] do
  524. for key, val in next, aaa do
  525. if(aaa[1][1] != sub) then continue; end
  526. if(val[1] == lookup) then
  527. return val[3];
  528. end
  529. end
  530. end
  531. return 0;
  532. end
  533.  
  534.  
  535.  
  536.  
  537. local mousedown;
  538. local candoslider;
  539. local drawlast;
  540.  
  541. local visible = {};
  542.  
  543. for k,v in next, order do
  544. visible[v] = false;
  545. end
  546.  
  547.  
  548. local function DrawBackground(w, h)
  549. surface.SetDrawColor(255, 255, 255);
  550. surface.DrawRect(0, 0, w, h);
  551.  
  552. local curcol = Color(182, 0, 0);
  553.  
  554. for i = 0, 30 do
  555. surface.SetDrawColor(curcol);
  556. curcol.r = curcol.r - 1;
  557. surface.DrawLine(0, i, w, i);
  558. end
  559.  
  560. surface.SetDrawColor(curcol);
  561.  
  562. surface.SetFont("MenuTitle");
  563.  
  564. local tw, th = surface.GetTextSize(" ");
  565.  
  566. surface.SetTextPos(5, 15 - th / 2);
  567.  
  568. surface.SetTextColor(255, 255, 255);
  569.  
  570. surface.DrawText(" ");
  571.  
  572. surface.DrawRect(0, 31, 5, h - 31);
  573. surface.DrawRect(0, h - 5, w, h);
  574. surface.DrawRect(w - 5, 31, 5, h);
  575. end
  576.  
  577. local function MouseInArea(minx, miny, maxx, maxy)
  578. local mousex, mousey = gui.MousePos();
  579. return(mousex < maxx && mousex > minx && mousey < maxy && mousey > miny);
  580. end
  581.  
  582. local function DrawOptions(self, w, h)
  583. local mx, my = self:GetPos();
  584.  
  585. local sizeper = (w - 10) / #order;
  586.  
  587. local maxx = 0;
  588.  
  589. for k,v in next, order do
  590. local bMouse = MouseInArea(mx + 5 + maxx, my + 31, mx + 5 + maxx + sizeper, my + 31 + 30);
  591. if(visible[v]) then
  592. local curcol = Color(0, 0, 0);
  593. for i = 0, 30 do
  594. surface.SetDrawColor(curcol);
  595. curcol.r, curcol.g, curcol.b = curcol.r + 3, curcol.g + 3, curcol.b + 3;
  596. surface.DrawLine( 5 + maxx, 31 + i, 5 + maxx + sizeper, 31 + i);
  597. end
  598. elseif(bMouse) then
  599. local curcol = Color(124, 124, 124);
  600. for i = 0, 30 do
  601. surface.SetDrawColor(curcol);
  602. curcol.r, curcol.g, curcol.b = curcol.r - 1.7, curcol.g - 1.7, curcol.b - 1.7;
  603. surface.DrawLine( 5 + maxx, 31 + i, 5 + maxx + sizeper, 31 + i);
  604. end
  605. else
  606. local curcol = Color(51, 51, 51);
  607. for i = 0, 30 do
  608. surface.SetDrawColor(curcol);
  609. curcol.r, curcol.g, curcol.b = curcol.r - 1.7, curcol.g - 1.7, curcol.b - 1.7;
  610. surface.DrawLine( 5 + maxx, 31 + i, 5 + maxx + sizeper, 31 + i);
  611. end
  612. end
  613. if(bMouse && input.IsMouseDown(MOUSE_LEFT) && !mousedown && !visible[v]) then
  614. local nb = visible[v];
  615. for key,val in next, visible do
  616. visible[key] = false;
  617. end
  618. visible[v] = !nb;
  619. end
  620. surface.SetFont("pFont2");
  621. surface.SetTextColor(255, 255, 255);
  622. local tw, th = surface.GetTextSize(v);
  623. surface.SetTextPos( 5 + maxx + sizeper / 2 - tw / 2, 31 + 15 - th / 2 );
  624. surface.DrawText(v);
  625. maxx = maxx + sizeper;
  626. end
  627. end
  628.  
  629. local function DrawCheckbox(self, w, h, var, maxy, posx, posy, dist)
  630. surface.SetFont("pFont");
  631. surface.SetTextColor(255, 255, 255);
  632. surface.SetTextPos( 5 + posx + 15 + 5, 61 + posy + maxy );
  633. local tw, th = surface.GetTextSize(var[1]);
  634. surface.DrawText(var[1]);
  635.  
  636. surface.SetDrawColor(255, 255, 255);
  637.  
  638. surface.DrawOutlinedRect( 5 + posx + 15 + 5 + dist + var[4], 61 + posy + maxy + 2, 14, 14);
  639.  
  640. local mx, my = self:GetPos();
  641.  
  642. 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);
  643.  
  644. if(bMouse) then
  645. surface.DrawRect( 5 + posx + 15 + 5 + dist + 2 + var[4], 61 + posy + maxy + 4, 10, 10);
  646. end
  647.  
  648. if(var[3]) then
  649.  
  650. surface.SetDrawColor(33, 150, 243,220);
  651. surface.DrawRect( 5 + posx + 15 + 5 + dist + 2 + var[4], 61 + posy + maxy + 4, 10, 10);
  652. surface.SetDrawColor(0, 0, 0, 0);
  653. surface.DrawOutlinedRect( 5 + posx + 15 + 5 + dist + 2 + var[4], 61 + posy + maxy + 4, 10, 10);
  654. end
  655.  
  656. if(bMouse && input.IsMouseDown(MOUSE_LEFT) && !mousedown && !drawlast) then
  657.  
  658. var[3] = !var[3];
  659. end
  660. end
  661.  
  662. local function DrawSlider(self, w, h, var, maxy, posx, posy, dist)
  663. local curnum = var[3];
  664. local max = var[4];
  665. local size = var[5];
  666. surface.SetFont("pFont2");
  667. surface.SetTextColor(255, 255, 255);
  668. surface.SetTextPos( 5 + posx + 15 + 5, 61 + posy + maxy );
  669. surface.DrawText(var[1]);
  670.  
  671. local tw, th = surface.GetTextSize(var[1]);
  672.  
  673. surface.SetDrawColor(0,161,255 );
  674.  
  675. surface.DrawRect( 5 + posx + 15 + 5 + dist, 61 + posy + maxy + 9, size, 2);
  676.  
  677. local ww = math.ceil(curnum * size / max);
  678.  
  679. surface.SetDrawColor(255, 255, 255);
  680.  
  681. surface.DrawRect( 3 + posx + 15 + 5 + dist + ww, 61 + posy + maxy + 10 - 6, 4, 12);
  682.  
  683. surface.SetDrawColor(93, 0, 0);
  684.  
  685. local tw, th = surface.GetTextSize(curnum..".00");
  686.  
  687. surface.DrawOutlinedRect( 3 + posx + 15 + 5 + dist + ww, 61 + posy + maxy + 4, 4, 12);
  688.  
  689. surface.SetTextPos( 5 + posx + 15 + 5 + dist + (size / 2) - tw / 2, 61 + posy + maxy + 16);
  690.  
  691. surface.DrawText(curnum..".00");
  692.  
  693. local mx, my = self:GetPos();
  694.  
  695. 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);
  696.  
  697. if(bMouse && input.IsMouseDown(MOUSE_LEFT) && !drawlast && !candoslider) then
  698. local mw, mh = gui.MousePos();
  699.  
  700. local new = math.ceil( ((mw - (mx + posx + 25 + dist - size)) - (size + 1)) / (size - 2) * max);
  701. var[3] = new;
  702. end
  703. end
  704.  
  705. local notyetselected;
  706.  
  707. local function DrawSelect(self, w, h, var, maxy, posx, posy, dist)
  708.  
  709. local size = var[5];
  710. local curopt = var[3];
  711.  
  712. surface.SetFont("pFont2");
  713. surface.SetTextColor(255, 255, 255);
  714. surface.SetTextPos( 5 + posx + 15 + 5, 61 + posy + maxy );
  715. local tw, th = surface.GetTextSize(var[1]);
  716. surface.DrawText(var[1]);
  717.  
  718. surface.SetDrawColor(255, 255, 255);
  719.  
  720. surface.DrawOutlinedRect( 25 + posx + dist, 61 + posy + maxy, size, 16);
  721.  
  722. local mx, my = self:GetPos();
  723.  
  724. local bMouse = MouseInArea( mx + 25 + posx + dist, my + 61 + posy + maxy, mx + 25 + posx + dist + size, my + 61 + posy + maxy + 16)
  725.  
  726. local check = dist..posy..posx..w..h..maxy;
  727.  
  728. if(bMouse || notyetselected == check) then
  729.  
  730. surface.DrawRect(25 + posx + dist + 2, 61 + posy + maxy + 2, size - 4, 12);
  731.  
  732. end
  733.  
  734. local tw, th = surface.GetTextSize(curopt);
  735.  
  736. surface.SetTextPos( 25 + posx + dist + 5, 61 + posy + maxy + 6 - th / 2 + 2);
  737.  
  738. surface.DrawText(curopt);
  739.  
  740. if(bMouse && input.IsMouseDown(MOUSE_LEFT) && !drawlast && !mousedown || notyetselected == check) then
  741. notyetselected = check;
  742. drawlast = function()
  743. local maxy2 = 16;
  744. for k,v in next, var[4] do
  745. surface.SetDrawColor(163, 163, 163);
  746. surface.DrawRect( 25 + posx + dist, 61 + posy + maxy + maxy2, size, 16);
  747. local bMouse2 = MouseInArea( mx + 25 + posx + dist, my + 61 + posy + maxy + maxy2, mx + 25 + posx + dist + size, my + 61 + posy + maxy + 16 + maxy2)
  748. if(bMouse2) then
  749. surface.SetDrawColor(200, 200, 200);
  750. surface.DrawRect( 25 + posx + dist, 61 + posy + maxy + maxy2, size, 16);
  751. end
  752. local tw, th = surface.GetTextSize(v);
  753. surface.SetTextPos( 25 + posx + dist + 5, 61 + posy + maxy + 6 - th / 2 + 2 + maxy2);
  754. surface.DrawText(v);
  755. maxy2 = maxy2 + 16;
  756. if(bMouse2 && input.IsMouseDown(MOUSE_LEFT) && !mousedown) then
  757. var[3] = v;
  758. notyetselected = nil;
  759. drawlast = nil;
  760. return;
  761. end
  762. end
  763. local bbMouse = MouseInArea( mx + 25 + posx + dist, my + 61 + posy + maxy, mx + 25 + posx + dist + size, my + 61 + posy + maxy + maxy2);
  764. if(!bbMouse && input.IsMouseDown(MOUSE_LEFT) && !mousedown) then
  765. notyetselected = nil;
  766. drawlast = nil;
  767. return;
  768. end
  769. end
  770. end
  771.  
  772.  
  773. end
  774.  
  775.  
  776. surface.CreateFont("MenuFont", {
  777. font = "HaxrCorp S8 Standard",
  778. size = 16,
  779. antialias = false,
  780. outline = true,
  781. })
  782.  
  783.  
  784.  
  785.  
  786.  
  787. local function DrawSubSub(self, w, h, k, var)
  788. 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];
  789.  
  790. surface.SetDrawColor(255, 255, 255);
  791.  
  792. local startpos = 61 + posy;
  793.  
  794. surface.SetTextColor(255, 255, 255);
  795.  
  796. surface.SetFont("pFont");
  797.  
  798. local tw, th = surface.GetTextSize(opt);
  799.  
  800. surface.DrawLine( 5 + posx, startpos, 5 + posx + 15, startpos);
  801.  
  802. surface.SetTextPos( 5 + posx + 15 + 5, startpos - th / 2 );
  803.  
  804. surface.DrawLine( 5 + posx + 15 + 5 + tw + 5, startpos, 5 + posx + sizex, startpos);
  805.  
  806. surface.DrawLine( 5 + posx, startpos, 5 + posx, startpos + sizey);
  807.  
  808. surface.DrawLine(5 + posx, startpos + sizey, 5 + posx + sizex, startpos + sizey );
  809.  
  810. surface.DrawLine( 5 + posx + sizex, startpos, 5 + posx + sizex, startpos + sizey);
  811.  
  812. surface.DrawText(opt);
  813.  
  814. local maxy = 15;
  815.  
  816. for k,v in next, var do
  817. if(k == 1) then continue; end
  818. if(v[2] == "Checkbox") then
  819. DrawCheckbox(self, w, h, v, maxy, posx, posy, dist);
  820. elseif(v[2] == "Slider") then
  821. DrawSlider(self, w, h, v, maxy, posx, posy, dist);
  822. elseif(v[2] == "Selection") then
  823. DrawSelect(self, w, h, v, maxy, posx, posy, dist);
  824. end
  825. maxy = maxy + 25;
  826. end
  827. end
  828.  
  829. local function DrawSub(self, w, h)
  830. for k, v in next, visible do
  831. if(!v) then continue; end
  832. for _, var in next, options[k] do
  833. DrawSubSub(self, w, h, k, var);
  834. end
  835. end
  836. end
  837.  
  838.  
  839. local function saveconfig()
  840. file.Write("memeware.txt", util.TableToJSON(options));
  841. end
  842. --[[
  843. local function DrawSaveButton(self, w, h)
  844. local curcol = Color(235, 235, 235);
  845. local mx, my = self:GetPos();
  846. local bMouse = MouseInArea(mx + 30, my + h - 50, mx + 30 + 200, my + h - 50 + 30);
  847. if(bMouse) then
  848. curcol = Color(200, 200, 200);
  849. end
  850. for i = 0, 30 do
  851. surface.SetDrawColor(curcol);
  852. surface.DrawLine( 30, h - 50 + i, 30 + 200, h - 50 + i );
  853. for k,v in next, curcol do
  854. curcol[k] = curcol[k] - 2;
  855. end
  856. end
  857. surface.SetFont("pFont2");
  858. surface.SetTextColor(0, 0, 0);
  859. local tw, th = surface.GetTextSize("Save Configuration");
  860. surface.SetTextPos( 30 + 100 - tw / 2, h - 50 + 15 - th / 2 );
  861. surface.DrawText("Save Configuration");
  862. if(bMouse && input.IsMouseDown(MOUSE_LEFT)) then
  863. saveconfig();
  864. end
  865. end
  866. --]]
  867. --[[
  868. local function DrawLoadButton(self, w, h)
  869. local curcol = Color(235, 235, 235);
  870. local mx, my = self:GetPos();
  871. local bMouse = MouseInArea(mx + 250, my + h - 50, mx + 250 + 200, my + h - 50 + 30);
  872. if(bMouse) then
  873. curcol = Color(200, 200, 200);
  874. end
  875. for i = 0, 30 do
  876. surface.SetDrawColor(curcol);
  877. surface.DrawLine( 250, h - 50 + i, 250 + 200, h - 50 + i );
  878. for k,v in next, curcol do
  879. curcol[k] = curcol[k] - 2;
  880. end
  881. end
  882. surface.SetFont("pFont2");
  883. surface.SetTextColor(0, 0, 0);
  884. local tw, th = surface.GetTextSize("Load Configuration");
  885. surface.SetTextPos( 250 + 100 - tw / 2, h - 50 + 15 - th / 2 );
  886. surface.DrawText("Load Configuration");
  887. if(bMouse && input.IsMouseDown(MOUSE_LEFT)) then
  888. loadconfig();
  889. end
  890. end
  891. --]]
  892. loadconfig();
  893.  
  894. local insertdown2, insertdown, menuopen;
  895.  
  896. local function menu()
  897. local frame = vgui.Create("DFrame");
  898. frame:SetSize(1114, 768);
  899. frame:Center();
  900. frame:SetTitle("");
  901. frame:SlideDown(1);
  902. frame:MakePopup();
  903. frame:ShowCloseButton(false);
  904. frame:SetDraggable(true);
  905. if(candoslider && !mousedown && !drawlast && !input.IsMouseDown(MOUSE_LEFT)) then
  906. candoslider = false;
  907. end
  908. frame.Paint = function(self, w, h)
  909. DrawBackground(w, h);
  910. DrawOptions(self, w, h);
  911. DrawSub(self, w, h);
  912. if(drawlast) then
  913. drawlast();
  914. candoslider = true;
  915. end
  916. mousedown = input.IsMouseDown(MOUSE_LEFT);
  917. end
  918.  
  919. local function DrawBackground(w, h)
  920. surface.SetDrawColor(44, 62, 80,180);
  921. surface.DrawRect(0, 0, w, h);
  922.  
  923. local curcol = Color(33, 150, 243,220);
  924.  
  925. for i = 0, 30 do
  926. surface.SetDrawColor(curcol);
  927. surface.DrawLine(0, i, w, i);
  928. end
  929.  
  930. surface.SetDrawColor(curcol);
  931.  
  932. surface.SetFont("pFont");
  933.  
  934. local tw, th = surface.GetTextSize("");
  935.  
  936. surface.SetTextPos(5, 15 - th / 2);
  937.  
  938. surface.SetTextColor(255, 255, 255);
  939.  
  940. surface.DrawText("Logged in as ".. LocalPlayer():Nick() .." You're using pLegit private build 6.0 - contact: /id/BreadIsHere");
  941.  
  942. surface.DrawRect(0, 31, 5, h - 31);
  943. -- surface.DrawRect(0, h - 5, w, h);
  944. surface.DrawRect(w - 5, 31, 5, h);
  945. end
  946.  
  947. local function DrawSubSub(self, w, h, k, var)
  948. 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];
  949.  
  950. surface.SetDrawColor(163, 163, 163);
  951.  
  952. local startpos = 0 + posy;
  953.  
  954. surface.SetTextColor(0, 0, 0);
  955.  
  956. surface.SetFont("pFont");
  957.  
  958. local tw, th = surface.GetTextSize(opt);
  959.  
  960. surface.DrawLine( 5 + posx, startpos, 5 + posx + 15, startpos);
  961.  
  962. surface.SetTextPos( 5 + posx + 15 + 5, startpos - th / 2 );
  963.  
  964. surface.DrawLine( 5 + posx + 15 + 5 + tw + 5, startpos, 5 + posx + sizex, startpos);
  965.  
  966. surface.DrawLine( 5 + posx, startpos, 5 + posx, startpos + sizey);
  967.  
  968. surface.DrawLine(5 + posx, startpos + sizey, 5 + posx + sizex, startpos + sizey );
  969.  
  970. surface.DrawLine( 5 + posx + sizex, startpos, 5 + posx + sizex, startpos + sizey);
  971.  
  972. surface.DrawText(opt);
  973.  
  974. local maxy = 15;
  975.  
  976. for k,v in next, var do
  977. if(k == 1) then continue; end
  978. if(v[2] == "Checkbox") then
  979. DrawCheckbox(self, w, h, v, maxy, posx, posy, dist);
  980. elseif(v[2] == "Slider") then
  981. DrawSlider(self, w, h, v, maxy, posx, posy, dist);
  982. elseif(v[2] == "Selection") then
  983. DrawSelect(self, w, h, v, maxy, posx, posy, dist);
  984. end
  985. maxy = maxy + 25;
  986. end
  987. end
  988.  
  989. local function DrawOptions(self, w, h)
  990. local mx, my = self:GetPos();
  991.  
  992. local sizeper = (w - 10) / #order;
  993.  
  994. local maxx = 0;
  995.  
  996. for k,v in next, order do
  997. local bMouse = MouseInArea(mx + 5 + maxx, my + 31, mx + 5 + maxx + sizeper, my + 31 + 30);
  998. if(visible[v]) then
  999. local curcol = Color(13, 140, 233,220);
  1000. for i = 0, 30 do
  1001. surface.SetDrawColor(curcol);
  1002. --curcol.r, curcol.g, curcol.b = curcol.r + 3, curcol.g + 3, curcol.b + 3;
  1003. surface.DrawLine( 5 + maxx, 31 + i, 5 + maxx + sizeper, 31 + i);
  1004. end
  1005. elseif(bMouse) then
  1006. local curcol = Color(33, 150, 243,220);
  1007. for i = 0, 30 do
  1008. surface.SetDrawColor(curcol);
  1009. --curcol.r, curcol.g, curcol.b = curcol.r - 1.7, curcol.g - 1.7, curcol.b - 1.7;
  1010. surface.DrawLine( 5 + maxx, 31 + i, 5 + maxx + sizeper, 31 + i);
  1011. end
  1012. else
  1013. local curcol = Color(33, 150, 243,220);
  1014. for i = 0, 30 do
  1015. surface.SetDrawColor(curcol);
  1016. --curcol.r, curcol.g, curcol.b = curcol.r - 1.7, curcol.g - 1.7, curcol.b - 1.7;
  1017. surface.DrawLine( 5 + maxx, 31 + i, 5 + maxx + sizeper, 31 + i);
  1018. end
  1019. end
  1020. if(bMouse && input.IsMouseDown(MOUSE_LEFT) && !mousedown && !visible[v]) then
  1021. local nb = visible[v];
  1022. for key,val in next, visible do
  1023. visible[key] = false;
  1024. end
  1025. visible[v] = !nb;
  1026.  
  1027. end
  1028. surface.SetFont("pFont");
  1029. surface.SetTextColor(255, 255, 255);
  1030. local tw, th = surface.GetTextSize(v);
  1031. surface.SetTextPos( 5 + maxx + sizeper / 2 - tw / 2, 31 + 15 - th / 2 );
  1032. surface.DrawText(v);
  1033. maxx = maxx + sizeper;
  1034. end
  1035. end
  1036.  
  1037.  
  1038. frame.Paint = function(self, w, h)
  1039. if(candoslider && !mousedown && !drawlast && !input.IsMouseDown(MOUSE_LEFT)) then
  1040. candoslider = false;
  1041. end
  1042. DrawBackground(w, h);
  1043. DrawOptions(self, w, h);
  1044. DrawSub(self, w, h);
  1045. -- DrawSaveButton(self, w, h);
  1046. -- DrawLoadButton(self, w, h);
  1047. if(drawlast) then
  1048. drawlast();
  1049. candoslider = true;
  1050. end
  1051. mousedown = input.IsMouseDown(MOUSE_LEFT);
  1052. end
  1053.  
  1054. frame.Think = function()
  1055. if (input.IsKeyDown(KEY_INSERT) && !insertdown2) then
  1056. frame:Remove();
  1057. menuopen = false;
  1058. candoslider = false;
  1059. drawlast = nil;
  1060. end
  1061. end
  1062. end
  1063.  
  1064. local function Think()
  1065. if (input.IsKeyDown(KEY_INSERT) && !menuopen && !insertdown) then
  1066. menuopen = true;
  1067. insertdown = true;
  1068. menu();
  1069. elseif (!input.IsKeyDown(KEY_INSERT) && !menuopen) then
  1070. insertdown = false;
  1071. end
  1072. if (input.IsKeyDown(KEY_INSERT) && insertdown && menuopen) then
  1073. insertdown2 = true;
  1074. else
  1075. insertdown2 = false;
  1076. end
  1077. end
  1078.  
  1079. hook.Add("Think", "", Think);
  1080.  
  1081. --[[
  1082. Actual codens
  1083. ]]
  1084.  
  1085. local FindMetaTable = FindMetaTable;
  1086.  
  1087. local em = FindMetaTable"Entity";
  1088. local pm = FindMetaTable"Player";
  1089. local cm = FindMetaTable"CUserCmd";
  1090. local wm = FindMetaTable"Weapon";
  1091. local am = FindMetaTable"Angle";
  1092. local vm = FindMetaTable"Vector";
  1093.  
  1094. local Vector = Vector;
  1095. local player = Copy(player);
  1096. local Angle = Angle;
  1097. local me = LocalPlayer();
  1098. local render = Copy(render);
  1099. local cma = Copy(cam);
  1100. local Material = Material;
  1101. local CreateMaterial = CreateMaterial;
  1102.  
  1103. --[[
  1104. esp
  1105. ]]
  1106.  
  1107. local function Filter(v)
  1108. local enemy = gBool("Main", "Filter", "Enemies only");
  1109. local dist = gBool("Main", "Filter", "Distance")
  1110. if(enemy) then
  1111. if(pm.Team(v) == pm.Team(me)) then return false; end
  1112. end
  1113. if(dist) then
  1114. local maxdist = gBool("Main", "Filter", "Max Distance");
  1115. if( vm.Distance( em.GetPos(v), em.GetPos(me) ) > (maxdist * 5) ) then return false; end
  1116. end
  1117. return true;
  1118. end
  1119.  
  1120.  
  1121. local chamsmat = CreateMaterial("a", "VertexLitGeneric", {
  1122. ["$ignorez"] = 1,
  1123. ["$model"] = 1,
  1124. ["$basetexture"] = "models/debug/debugwhite",
  1125. });
  1126.  
  1127. local chamsmat2 = CreateMaterial("@", "vertexlitgeneric", {
  1128. ["$ignorez"] = 0,
  1129. ["$model"] = 1,
  1130. ["$basetexture"] = "models/debug/debugwhite",
  1131. });
  1132.  
  1133. local function GetChamsColor(v, vis)
  1134. local pre = "Chams - Enemy";
  1135. if(pm.Team(v) == pm.Team(me)) then
  1136. pre = "Chams - Team";
  1137. end
  1138. if(vis) then
  1139. local r = gInt("Settings", pre, "Visible R") / 255;
  1140. local g = gInt("Settings", pre, "Visible G") / 255;
  1141. local b = gInt("Settings", pre, "Visible B") / 255;
  1142. return r,g,b;
  1143. end
  1144. local r = gInt("Settings", pre, "Not Visible R") / 255;
  1145. local g = gInt("Settings", pre, "Not Visible G") / 255;
  1146. local b = gInt("Settings", pre, "Not Visible B") / 255;
  1147. return r,g,b;
  1148. end
  1149.  
  1150. local function Chams(v)
  1151. if(gBool("Main", "ESP", "XQZ")) then
  1152. cam.Start3D();
  1153. cam.IgnoreZ(true);
  1154. em.DrawModel(v);
  1155. cam.IgnoreZ(false);
  1156. cam.End3D();
  1157. end
  1158. if(gBool("Main", "ESP", "Chams")) then
  1159. cam.Start3D();
  1160.  
  1161. render.MaterialOverride(chamsmat);
  1162. render.SetColorModulation(GetChamsColor(v));
  1163.  
  1164. em.DrawModel(v);
  1165.  
  1166. render.SetColorModulation(GetChamsColor(v, true));
  1167. render.MaterialOverride(chamsmat2);
  1168.  
  1169. em.DrawModel(v);
  1170.  
  1171. cam.End3D();
  1172. end
  1173. end
  1174.  
  1175. --[[local function GetColor(v)
  1176. if(pm.Team(v) == pm.Team(me)) then
  1177. local r = gInt("Settings", "Box - Team", "R");
  1178. local g = gInt("Settings", "Box - Team", "G");
  1179. local b = gInt("Settings", "Box - Team", "B");
  1180. return(Color(r, g, b, 220));
  1181. end
  1182. local r = gInt("Settings", "Box - Enemy", "R");
  1183. local g = gInt("Settings", "Box - Enemy", "G");
  1184. local b = gInt("Settings", "Box - Enemy", "B");
  1185. return(Color(r, g, b, 220));
  1186. end
  1187. ]]
  1188.  
  1189. local function saveconfig()
  1190. file.Write("bread.txt", util.TableToJSON(options));
  1191. end
  1192.  
  1193. local function ESP(v)
  1194. local pos = em.GetPos(v);
  1195. local pos, pos2 = vm.ToScreen(pos - Vector(0, 0, 5)), vm.ToScreen( pos + Vector(0, 0, 70 ) );
  1196. local h = pos.y - pos2.y;
  1197. local w = h / 2.2;
  1198. if(gBool("Main", "ESP", "Box") && gOption("Main", "ESP", "Box Type") == "2D Box") then
  1199.  
  1200.  
  1201. if (me:Team() == v:Team()) then
  1202. surface.SetDrawColor(45,125,255)
  1203. else
  1204. surface.SetDrawColor(255,0,0)
  1205. end
  1206. surface.DrawOutlinedRect( pos.x - w / 2, pos.y - h, w, h);
  1207. surface.SetDrawColor(0, 0, 0, 255);
  1208.  
  1209. surface.DrawOutlinedRect( pos.x - w / 2 - 1, pos.y - h - 1, w + 2, h + 2);
  1210. surface.DrawOutlinedRect( pos.x - w / 2 + 1, pos.y - h + 1, w - 2, h - 2);
  1211.  
  1212. surface.DrawOutlinedRect( pos.x - w / 2 - 1, pos.y - h - 1, w + 2, h + 2);
  1213. surface.DrawOutlinedRect( pos.x - w / 2 + 1, pos.y - h + 1, w - 2, h - 2);
  1214.  
  1215. surface.DrawOutlinedRect( pos.x - w / 2 - 1, pos.y - h - 1, w + 2, h + 2);
  1216. surface.DrawOutlinedRect( pos.x - w / 2 + 1, pos.y - h + 1, w - 2, h - 2);
  1217.  
  1218. surface.DrawOutlinedRect( pos.x - w / 2 - 1, pos.y - h - 1, w + 2, h + 2);
  1219. surface.DrawOutlinedRect( pos.x - w / 2 + 1, pos.y - h + 1, w - 2, h - 2);
  1220.  
  1221. surface.DrawOutlinedRect( pos.x - w / 2 - 1, pos.y - h - 1, w + 2, h + 2);
  1222. surface.DrawOutlinedRect( pos.x - w / 2 + 1, pos.y - h + 1, w - 2, h - 2);
  1223.  
  1224.  
  1225.  
  1226. end
  1227.  
  1228. if(gBool("Main", "ESP", "Box") && gOption("Main", "ESP", "Box Type") == "3D Box") then
  1229.  
  1230. hook.Add( "HUDPaint", "3D-Box", function()
  1231.  
  1232. for k,v in pairs(player.GetAll()) do
  1233. if v:IsValid() and v:Alive() and v:Health() >= 0 then
  1234. local eye = v:EyeAngles();
  1235. local min, max = v:WorldSpaceAABB();
  1236. local origin = v:GetPos();
  1237. cam.Start3D()
  1238. render.DrawWireframeBox( origin, Angle(0, eye.y, 0), min-origin, max-origin, Color(gInt("Settings", "Team ESP Color", "Red"), gInt("Settings", "Team ESP Color", "Green"), gInt("Settings", "Team ESP Color", "Blue")))
  1239. cam.End3D()
  1240. end
  1241.  
  1242. if (me:Team() == v:Team()) then
  1243. surface.SetDrawColor(45,125,255)
  1244. else
  1245. surface.SetDrawColor(255,0,0)
  1246. end
  1247. hook.Remove( "HUDPaint", "3D-Box", function()
  1248. end)
  1249. end
  1250. end)
  1251. end
  1252.  
  1253. if(gBool("Main", "ESP", "Crosshair Circle")) then
  1254. surface.DrawCircle(ScrW()/2, ScrH()/2, 11, Color(gInt("Settings", "Crosshair Color", "Red"),gInt("Settings", "Crosshair Color", "Green"),gInt("Settings", "Crosshair Color", "Blue")));
  1255. surface.DrawCircle(ScrW()/2, ScrH()/2, 1.4, Color(gInt("Settings", "Crosshair Color", "Red"),gInt("Settings", "Crosshair Color", "Green"),gInt("Settings", "Crosshair Color", "Blue")));
  1256. end
  1257.  
  1258.  
  1259.  
  1260.  
  1261. for k,v in next, player.GetAll() do
  1262. if (gBool("Main", "ESP", "Heatlh")) or !v:IsValid() or !v:Alive() or 0 >= v:Health() then continue end
  1263. if (gBool("Main", "Misc", "Thirdperson")) and v == me then continue end
  1264. local min, max = v:GetCollisionBounds()
  1265. local pos = v:GetPos()
  1266. local top, bottom = (pos + Vector(0, 0, max.z)):ToScreen(), (pos - Vector(0, 0, 8)):ToScreen()
  1267. local middle = bottom.y - top.y
  1268. local width = middle / 2.245
  1269.  
  1270. end
  1271.  
  1272.  
  1273.  
  1274. --[[
  1275.  
  1276. local pos = em.GetPos(v);
  1277. local pos, pos2 = vm.ToScreen(pos - Vector(0, 0, 5)), vm.ToScreen( pos + Vector(0, 0, 70 ) );
  1278. local h = pos.y - pos2.y;
  1279. local w = h / 2.2;
  1280.  
  1281. surface.DrawOutlinedRect( pos.x - w / 2, pos.y - h, w, h);
  1282. surface.SetDrawColor(0, 0, 0, 255);
  1283.  
  1284. surface.DrawOutlinedRect( pos.x - w / 2 - 1, pos.y - h - 1, w + 2, h + 2);
  1285. surface.DrawOutlinedRect( pos.x - w / 2 + 1, pos.y - h + 1, w - 2, h - 2);
  1286.  
  1287. ]]
  1288.  
  1289.  
  1290. local Cap = math.cos(math.rad(45))
  1291. local Offset = Vector(0, 0, 32)
  1292. local Trace = {}
  1293. local WitnessColor = Color (255,255,255)
  1294.  
  1295.  
  1296. function Draw()
  1297. --if(gBool("Main", "ESP", "Witness Detector")) then
  1298. local Time = os.time() - 1
  1299. local Witnesses = 0
  1300. local BeingWitnessed = true
  1301. if Time < os.time() then
  1302. Time = os.time() + .5
  1303. Witnesses = 0
  1304. BeingWitnessed = false
  1305. for k, pla in pairs(player.GetAll()) do
  1306. if pla:IsValid() and pla != LocalPlayer() then
  1307. Trace.start = LocalPlayer():EyePos() + Offset
  1308. Trace.endpos = pla:EyePos() + Offset
  1309. Trace.filter = {pla, LocalPlayer()}
  1310. TraceRes = util.TraceLine(Trace)
  1311. if !TraceRes.Hit then
  1312. if (pla:EyeAngles():Forward():Dot((LocalPlayer():EyePos() - pla:EyePos())) > Cap) then
  1313. Witnesses = Witnesses + 1
  1314. BeingWitnessed = true
  1315.  
  1316. end
  1317. end
  1318. end
  1319. end
  1320. end
  1321. if BeingWitnessed == false then
  1322. WitnessColor = Color (0,255,0)
  1323. else
  1324. WitnessColor = Color (255,0,0)
  1325. end
  1326. draw.SimpleTextOutlined( Witnesses.. " Player(s) can see you.", "Trebuchet18", (ScrW() / 2) - 65, 42, Color(gInt("Settings", "Menu Color", "Red"), gInt("Settings", "Menu Color", "Green"), gInt("Settings", "Menu Color", "Blue")),4,1,1,Color(0,161,255))
  1327. surface.SetDrawColor( 255, 255, 255 )
  1328. -- surface.DrawRect( (ScrW() / 2) - 70, 55, 148, 5 )
  1329. end
  1330.  
  1331. hook.Add("HUDPaint", "WitnessesBox", Draw)
  1332.  
  1333.  
  1334.  
  1335.  
  1336.  
  1337. if(gBool("Main", "ESP", "Box") && gOption("Main", "ESP", "Box Type") == "Small Box") then
  1338.  
  1339. local pos = em.GetPos(v);
  1340. local pos, pos2 = vm.ToScreen(pos - Vector(0, 0, 10)), vm.ToScreen( pos + Vector(0, 0, 5) );
  1341. local h = pos.y - pos2.y;
  1342. local w = h / 0.75;
  1343.  
  1344. surface.DrawOutlinedRect( pos.x - w / 2, pos.y - h, w, h);
  1345.  
  1346. surface.DrawOutlinedRect( pos.x - w / 2 - 1, pos.y - h - 1, w + 2, h + 2);
  1347. surface.DrawOutlinedRect( pos.x - w / 2 + 1, pos.y - h + 1, w - 2, h - 2);
  1348. end
  1349.  
  1350. if(gBool("Main", "ESP", "Box") && gOption("Main", "ESP", "Box Type") == "Edge") then
  1351. local Y = pos.y - h + 1
  1352. local X = pos.x - w / 2 - 1
  1353. local W = w + 0.75
  1354. local H = h - 1
  1355. local lineW = (W / 5);
  1356. local lineH = (H / 6);
  1357. local lineT = 1;
  1358.  
  1359. //outline
  1360. surface.SetDrawColor(0,0,0)
  1361. surface.DrawLine(X - lineT, Y - lineT, X + lineW, Y - lineT); //top left
  1362. surface.DrawLine(X - lineT, Y - lineT, X - lineT, Y + lineH);
  1363. surface.DrawLine(X - lineT, Y + H - lineH, X - lineT, Y + H + lineT); //bot left
  1364. surface.DrawLine(X - lineT, Y + H + lineT, X + lineW, Y + H + lineT);
  1365. surface.DrawLine(X + W - lineW, Y - lineT, X + W + lineT, Y - lineT); // top right
  1366. surface.DrawLine(X + W + lineT, Y - lineT, X + W + lineT, Y + lineH);
  1367. surface.DrawLine(X + W + lineT, Y + H - lineH, X + W + lineT, Y + H + lineT); // bot right
  1368. surface.DrawLine(X + W - lineW, Y + H + lineT, X + W + lineT, Y + H + lineT);
  1369.  
  1370. //inline
  1371. if (me:Team() == v:Team()) then
  1372. surface.SetDrawColor(45,125,255)
  1373. else
  1374. surface.SetDrawColor(255,0,0)
  1375. end
  1376. surface.DrawLine(X, Y, X, Y + lineH);//top left
  1377. surface.DrawLine(X, Y, X + lineW, Y);
  1378. surface.DrawLine(X + W - lineW, Y, X + W, Y); //top right
  1379. surface.DrawLine(X + W , Y, X + W, Y + lineH);
  1380. surface.DrawLine(X, Y + H - lineH, X, Y + H); //bot left
  1381. surface.DrawLine(X, Y + H, X + lineW, Y + H);
  1382. surface.DrawLine(X + W - lineW, Y + H, X + W, Y + H);//bot right
  1383. surface.DrawLine(X + W, Y + H - lineH, X + W, Y + H);
  1384.  
  1385.  
  1386. end
  1387.  
  1388.  
  1389. if(gBool("Main", "ESP", "Health") && gOption("Main", "ESP", "Bar Type") == "Bottom") then
  1390. local hp = em.Health(v) * h / 220;
  1391. if(hp > h) then hp = h; end
  1392. local diff = h - hp;
  1393. local GermanX = pos.x - w / 2
  1394. local GermanY = pos.y + 4
  1395. local Width = w + 2
  1396. local GermanW = diff
  1397. local GermanColor = 255, 100, 100
  1398.  
  1399. surface.SetDrawColor(0,0,0)
  1400. surface.DrawRect( GermanX, GermanY, Width, 5 );
  1401.  
  1402. surface.SetDrawColor( ( 100 - em.Health(v) ) * 2.55, em.Health(v) * 2.55, 0, 255);
  1403. surface.DrawRect( GermanX+1, GermanY+1, hp, 3);
  1404. end
  1405.  
  1406.  
  1407.  
  1408.  
  1409.  
  1410. if(gBool("Main", "ESP", "Health") && gOption("Main", "ESP", "Bar Type") == "Left") then
  1411. local hp = em.Health(v) * h / 100;
  1412. if(hp > h) then hp = h; end
  1413. local diff = h - hp;
  1414. surface.SetDrawColor(0, 0, 0, 255);
  1415. surface.DrawRect(pos.x - w / 2 - 5, pos.y - h - 1, 3, h + 2);
  1416. surface.SetDrawColor( ( 100 - em.Health(v) ) * 2.55, em.Health(v) * 2.55, 0, 255);
  1417. surface.DrawRect(pos.x - w / 2 - 4, pos.y - h + diff, 1, hp);
  1418. end
  1419.  
  1420.  
  1421.  
  1422.  
  1423.  
  1424.  
  1425.  
  1426. surface.SetFont("pFont");
  1427.  
  1428. surface.SetTextColor(255, 255, 255);
  1429.  
  1430. if(gBool("Main", "ESP", "Name")) then
  1431.  
  1432. local tw, th = surface.GetTextSize(pm.Name(v));
  1433.  
  1434. surface.SetTextPos( pos.x - tw / 2, pos.y - h + 2 - th );
  1435.  
  1436. surface.DrawText(pm.Name(v));
  1437.  
  1438. end
  1439.  
  1440.  
  1441. local weapon = me:GetActiveWeapon()
  1442. if weapon:IsValid() then
  1443. clipsize = weapon:Clip1()
  1444. local pw, ph = surface.GetTextSize("Ammo: "..clipsize)
  1445. if clipsize < 0 then
  1446. clipsize = 0
  1447. end
  1448. end
  1449. drawpos = 0
  1450. if(gBool("Main", "ESP", "Weapon")) then
  1451. local w = pm.GetActiveWeapon(v);
  1452. if(w && em.IsValid(w)) then
  1453. local tw, th = surface.GetTextSize(em.GetClass(w));
  1454. surface.SetTextPos( pos.x - tw / 2, pos.y - th / 15 + 5 );
  1455. local pw, ph = surface.GetTextSize("Ammo: "..clipsize)
  1456. surface.DrawText(em.GetClass(w));
  1457. local pw, ph = surface.GetTextSize("Ammo: "..clipsize)
  1458. end
  1459.  
  1460. end
  1461.  
  1462.  
  1463.  
  1464.  
  1465.  
  1466.  
  1467. hook.Add("HUDPaint", "LoopThroughPlayers", LoopThroughPlayers)
  1468.  
  1469.  
  1470. if(gBool("Main", "ESP", "Skeleton")) then
  1471. if (me:Team() == v:Team()) then
  1472. surface.SetDrawColor(45,125,255)
  1473. else
  1474. surface.SetDrawColor(255,0,0)
  1475. end
  1476.  
  1477. local origin = em.GetPos(v);
  1478. for i = 1, em.GetBoneCount(v) do
  1479. local parent = em.GetBoneParent(v, i);
  1480. if(!parent) then continue; end
  1481. local bonepos, parentpos = em.GetBonePosition(v, i), em.GetBonePosition(v, parent);
  1482. if(!bonepos || !parentpos || bonepos == origin) then continue; end
  1483. local bs, ps = vm.ToScreen(bonepos), vm.ToScreen(parentpos);
  1484. if (me:Team() == v:Team()) then
  1485. surface.SetDrawColor(45,125,255)
  1486. else
  1487. surface.SetDrawColor(255,0,0)
  1488. end
  1489. surface.DrawLine(bs.x, bs.y, ps.x, ps.y);
  1490. end
  1491. end
  1492.  
  1493. end
  1494.  
  1495. local aimtarget;
  1496.  
  1497.  
  1498. hook.Add("HUDPaint", "", function()
  1499. if(aimtarget && gBool("Main", "ESP", "Snapline")) then
  1500. local pos = vm.ToScreen(em.LocalToWorld(aimtarget, em.OBBCenter(aimtarget)));
  1501. surface.SetDrawColor(255, 255, 255);
  1502. surface.DrawLine(ScrW() / 2, ScrH() / 2, pos.x, pos.y);
  1503. end
  1504. if(!gBool("Main", "ESP", "Enabled")) then return; end
  1505. for k,v in next, player.GetAll() do
  1506. if(!em.IsValid(v) || em.Health(v) < 1 || em.IsDormant(v)) then continue; end
  1507. if(!Filter(v)) then continue; end
  1508. ESP(v);
  1509. end
  1510. end);
  1511.  
  1512. hook.Add("RenderScreenspaceEffects", "", function()
  1513. if(!gBool("Main", "ESP", "Enabled")) then return; end
  1514. for k,v in next, player.GetAll() do
  1515. if(!em.IsValid(v) || em.Health(v) < 1 || v == me || em.IsDormant(v)) then continue; end
  1516. if(!Filter(v)) then continue; end
  1517. Chams(v);
  1518. end
  1519. end);
  1520.  
  1521. saveconfig();
  1522.  
  1523. --[[
  1524. memes
  1525. ]]
  1526.  
  1527. local fa;
  1528. local aa;
  1529.  
  1530. local function FixMovement(ucmd, aaaaa)
  1531. --local move = Vector(cm.GetForwardMove(ucmd), cm.GetSideMove(ucmd), 0);
  1532. --local move = am.Forward( vm.Angle(move) + ( cm.GetViewAngles(ucmd) - fa ) ) * vm.Length(move);
  1533. local move = Vector(cm.GetForwardMove(ucmd), cm.GetSideMove(ucmd), cm.GetUpMove(ucmd));
  1534. local speed = math.sqrt(move.x * move.x + move.y * move.y);
  1535. local ang = vm.Angle(move);
  1536. local yaw = math.rad(cm.GetViewAngles(ucmd).y - fa.y + ang.y);
  1537. cm.SetForwardMove(ucmd, (math.cos(yaw) * speed) * ( aaaaa && -1 || 1 ));
  1538. cm.SetSideMove(ucmd, math.sin(yaw) * speed);
  1539. --cm.SetForwardMove(ucmd, move.x);
  1540. --cm.SetSideMove(ucmd, (aaaaa && move.y * -1 || move.y));
  1541. end
  1542.  
  1543. local function Clamp(val, min, max)
  1544. if(val < min) then
  1545. return min;
  1546. elseif(val > max) then
  1547. return max;
  1548. end
  1549. return val;
  1550. end
  1551.  
  1552. local function NormalizeAngle(ang)
  1553. ang.x = math.NormalizeAngle(ang.x);
  1554. ang.p = math.Clamp(ang.p, -89, 89);
  1555. end
  1556.  
  1557. --[[
  1558. aimer
  1559. ]]
  1560.  
  1561. local table = Copy(table);
  1562. local dists = {};
  1563.  
  1564. local function GetPos(v)
  1565.  
  1566. if(gBool("Aimbot", "Target", "Bodyaim")) then return( em.LocalToWorld(v, em.OBBCenter(v)) ); end
  1567.  
  1568. local eyes = em.LookupAttachment(v, "eyes");
  1569.  
  1570. if(!eyes) then return( em.LocalToWorld(v, em.OBBCenter(v)) ); end
  1571.  
  1572. local pos = em.GetAttachment(v, eyes);
  1573.  
  1574. if(!pos) then return( em.LocalToWorld(v, em.OBBCenter(v)) ); end
  1575.  
  1576. return(pos.Pos);
  1577. end
  1578.  
  1579. local aimignore;
  1580.  
  1581. local function Valid(v)
  1582. if(!v || !em.IsValid(v) || v == me || em.Health(v) < 1 || em.IsDormant(v) || pm.Team(v) == 1002 || (v == aimignore && gOption("Aimbot", "Target", "Selection") == "Nextshot")) then return false; end
  1583. if(gBool("Aimbot", "Target", "Ignore Bots")) then
  1584. if(pm.IsBot(v)) then return false; end
  1585. end
  1586. if(gBool("Aimbot", "Target", "Ignore Team")) then
  1587. if(pm.Team(v) == pm.Team(me)) then return false; end
  1588. end
  1589. if(gBool("Aimbot", "Target", "Ignore Friends")) then
  1590. if(pm.GetFriendStatus(v) == "friend") then return false; end
  1591. end
  1592. local tr = {
  1593. start = em.EyePos(me),
  1594. endpos = GetPos(v),
  1595. mask = MASK_SHOT,
  1596. filter = {me, v},
  1597. };
  1598. return(util.TraceLine(tr).Fraction == 1);
  1599. end
  1600.  
  1601. local function gettarget()
  1602.  
  1603. local opt = gOption("Aimbot", "Target", "Selection");
  1604.  
  1605. local sticky = gOption("Aimbot", "Aimbot", "Non-Sticky");
  1606.  
  1607. if(opt == "Distance") then
  1608.  
  1609. if( !sticky && Valid(aimtarget) ) then return; end
  1610.  
  1611. dists = {};
  1612.  
  1613. for k,v in next, player.GetAll() do
  1614. if(!Valid(v)) then continue; end
  1615. dists[#dists + 1] = { vm.Distance( em.GetPos(v), em.GetPos(me) ), v };
  1616. end
  1617.  
  1618. table.sort(dists, function(a, b)
  1619. return(a[1] < b[1]);
  1620. end);
  1621.  
  1622. aimtarget = dists[1] && dists[1][2] || nil;
  1623.  
  1624. elseif(opt == "Health") then
  1625.  
  1626. if( !sticky && Valid(aimtarget) ) then return; end
  1627.  
  1628. dists = {};
  1629.  
  1630. for k,v in next, player.GetAll() do
  1631. if(!Valid(v)) then continue; end
  1632. dists[#dists + 1] = { em.Health(v), v };
  1633. end
  1634.  
  1635. table.sort(dists, function(a, b)
  1636. return(a[1] < b[1]);
  1637. end);
  1638.  
  1639. aimtarget = dists[1] && dists[1][2] || nil;
  1640.  
  1641. elseif(opt == "Nextshot") then
  1642. if( !sticky && Valid(aimtarget) ) then return; end
  1643. aimtarget = nil;
  1644. local allplys = player.GetAll();
  1645. local avaib = {};
  1646. for k,v in next,allplys do
  1647. avaib[math.random(100)] = v;
  1648. end
  1649.  
  1650. for k,v in next, avaib do
  1651. if(Valid(v)) then
  1652. aimtarget = v;
  1653. end
  1654. end
  1655. end
  1656.  
  1657. end
  1658.  
  1659.  
  1660. local cones = {};
  1661.  
  1662. local pcall = pcall;
  1663. local require = require;
  1664.  
  1665. local nullvec = Vector() * -1;
  1666.  
  1667. local IsFirstTimePredicted = IsFirstTimePredicted;
  1668. local CurTime = CurTime;
  1669. local servertime=0;
  1670. local bit = Copy(bit);
  1671. --pcall(require, "dickwrap");
  1672.  
  1673. hook.Add("Move", "", function()
  1674. if(!IsFirstTimePredicted()) then return; end
  1675. servertime = CurTime();
  1676. end);
  1677.  
  1678.  
  1679. GAMEMODE["EntityFireBullets"] = function(self, p, data)
  1680. aimignore = aimtarget;
  1681. local w = pm.GetActiveWeapon(me);
  1682. local Spread = data.Spread * -1;
  1683. if(!w || !em.IsValid(w) || cones[em.GetClass(w)] == Spread || Spread == nullvec) then return; end
  1684. cones[em.GetClass(w)] = Spread;
  1685. end
  1686.  
  1687. local function PredictSpread(ucmd, ang)
  1688. local w = pm.GetActiveWeapon(me);
  1689. if(!w || !em.IsValid(w) || !cones[em.GetClass(w)] || !gBool("Aimbot", "Accuracy", "No Spread")) then return am.Forward(ang); end
  1690. return(dickwrap.Predict(ucmd, am.Forward(ang), cones[em.GetClass(w)]));
  1691. end
  1692.  
  1693. local function Autofire(ucmd)
  1694. if(pm.KeyDown(me, 1) && gBool("Aimbot", "Aimbot", "Auto Pistol")) then
  1695. cm.SetButtons(ucmd, bit.band( cm.GetButtons(ucmd), bit.bnot( 1 ) ) );
  1696. else
  1697. cm.SetButtons(ucmd, bit.bor( cm.GetButtons(ucmd), 1 ) );
  1698. end
  1699. end
  1700.  
  1701. local function WeaponCanFire()
  1702. local w = pm.GetActiveWeapon(me);
  1703. if(!w || !em.IsValid(w) || !gBool("Aimbot", "Aimbot", "Bullettime")) then return true; end
  1704. return( servertime >= wm.GetNextPrimaryFire(w) );
  1705. end
  1706.  
  1707. local function WeaponShootable()
  1708. local wep = pm.GetActiveWeapon(me);
  1709. if( em.IsValid(wep) ) then // I would never get lazy..
  1710. local n = string.lower(wep:GetPrintName())
  1711. if( wep:Clip1() <= 0 ) then
  1712. return false;
  1713. end
  1714.  
  1715.  
  1716.  
  1717. 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
  1718. return false;
  1719. end
  1720.  
  1721.  
  1722. return true;
  1723. end
  1724. end
  1725.  
  1726. local function PredictPos(pos)
  1727. local myvel = LocalPlayer():GetVelocity()
  1728. local pos = pos - (myvel * engine.TickInterval());
  1729. return pos;
  1730. end
  1731.  
  1732.  
  1733. local function aimer(ucmd)
  1734. if(cm.CommandNumber(ucmd) == 0 || !gBool("Aimbot", "Aimbot", "Enabled")) then return; end
  1735. gettarget();
  1736. aa = false;
  1737. if(aimtarget && (input.IsKeyDown(KEY_LALT) || gBool("Aimbot", "Aimbot", "Autosnap")) && WeaponCanFire() && WeaponShootable() ) then
  1738. aa = true;
  1739. local pos = GetPos(aimtarget) - em.EyePos(me);
  1740. PredictPos(pos);
  1741. local ang = vm.Angle( PredictSpread(ucmd, vm.Angle(pos)));
  1742. NormalizeAngle(ang);
  1743. cm.SetViewAngles(ucmd, ang);
  1744. if(gBool("Aimbot", "Aimbot", "Autofire")) then
  1745. Autofire(ucmd);
  1746. end
  1747. if(gBool("Aimbot", "Aimbot", "Silent")) then
  1748. FixMovement(ucmd);
  1749. else
  1750. fa = ang;
  1751. end
  1752. end
  1753. end
  1754.  
  1755. --[[
  1756. antiaimer
  1757. ]]
  1758.  
  1759.  
  1760.  
  1761. local ox=-181;
  1762. local oy=0;
  1763.  
  1764. local function RandCoin()
  1765. local randcoin = math.random(0,1);
  1766. if(randcoin == 1) then return 1; else return -1; end
  1767. end
  1768.  
  1769. local function GetX()
  1770. local opt = gOption("Main", "Rage", "X");
  1771. if(opt == "Emotion") then
  1772. local randcoin = gInt("Aimbot", "Anti-Aim", "Emotion Randomcoin X");
  1773. if( math.random(100) < randcoin ) then
  1774. ox = RandCoin() * 181;
  1775. end
  1776. elseif( opt == "AFK" ) then
  1777. ox = 0.454987454674;
  1778.  
  1779. elseif( opt == "Up" ) then
  1780. ox = 181;
  1781. elseif( opt == "Down" ) then
  1782. ox = -181;
  1783. elseif( opt == "Overflow Up" ) then
  1784. ox = 180.087929;
  1785. elseif( opt == "Overflow Down" ) then
  1786. ox = -180.087929;
  1787.  
  1788. elseif(opt == "Jitter") then
  1789. ox = ox * -1;
  1790. end
  1791. end
  1792.  
  1793. local function GetClosest()
  1794. local ddists = {};
  1795.  
  1796. local closest;
  1797.  
  1798. for k,v in next, player.GetAll() do
  1799. if(!Valid(v)) then continue; end
  1800. ddists[#ddists + 1] = { vm.Distance( em.GetPos(v), em.GetPos(me) ), v };
  1801. end
  1802.  
  1803. table.sort(ddists, function(a, b)
  1804. return(a[1] < b[1]);
  1805. end);
  1806.  
  1807. closest = ddists[1] && ddists[1][2] || nil;
  1808.  
  1809. if(!closest) then return fa.y; end
  1810.  
  1811. local pos = em.GetPos(closest);
  1812.  
  1813. local pos = vm.Angle(pos - em.EyePos(me));
  1814.  
  1815. return( pos.y );
  1816. end
  1817.  
  1818. local function GetY()
  1819. local opt = gOption("Main", "Rage", "Y");
  1820. if(opt == "Emotion") then
  1821. local randcoin = gInt("Aimbot", "Anti-Aim", "Emotion Randomcoin Y");
  1822. if( math.random(100) < randcoin ) then
  1823. oy = fa.y + math.random(-180, 180);
  1824. end
  1825. elseif( opt == "Eye Angles" ) then
  1826. oy = fa.y;
  1827. elseif( opt == "Off" ) then
  1828. oy = fa.y;
  1829. elseif( opt == "Sideways" ) then
  1830. oy = fa.y - 90;
  1831. elseif(opt == "Jitter") then
  1832. oy = fa.y + math.random(-90, 90);
  1833. elseif(opt == "TJitter") then
  1834. oy = fa.y - 180 + math.random(-90, 90);
  1835. elseif(opt == "Static") then
  1836. oy = 0;
  1837. elseif(opt == "Forward") then
  1838. oy = fa.y;
  1839. elseif(opt == "Backwards") then
  1840. oy = fa.y - 180;
  1841. elseif(opt == "Overflow Jitter") then
  1842. oy = fa.y - 179;
  1843. elseif(opt == "Overflow Fake") then
  1844. oy = fa.y - 0;
  1845. elseif(opt == "Angle Fake") then
  1846. oy = fa.y - 980 + math.random(-2, 2);
  1847. elseif(opt == "Towards Players") then
  1848. oy = GetClosest();
  1849. end
  1850. end
  1851.  
  1852. local function walldetect()
  1853. local eye = em.EyePos(me);
  1854. local tr = util.TraceLine({
  1855. start = eye,
  1856. endpos = (eye + (am.Forward(fa) * 10)),
  1857. mask = MASK_ALL,
  1858. });
  1859. if(tr.Hit) then
  1860. ox = -181;
  1861. oy = -90;
  1862. end
  1863. end
  1864.  
  1865. local function antiaimer(ucmd)
  1866. if( (cm.CommandNumber(ucmd) == 0 && !gBool("Main", "Misc", "Thirdperson")) || cm.KeyDown(ucmd, 1) || cm.KeyDown(ucmd, 32) || aa || !gBool("Main", "Rage", "Enabled")) then
  1867.  
  1868. return; end
  1869. chat.AddText(Color(255, 0, 0), "pLegit", "| ", Color( 255, 0, 0 ), "Rage Bot Status: Enabled -- warning")
  1870. GetX();
  1871. GetY();
  1872. walldetect();
  1873. local aaang = Angle(ox, oy, 0);
  1874. cm.SetViewAngles(ucmd, aaang);
  1875. FixMovement(ucmd, true);
  1876. end
  1877.  
  1878. local function GetAngle(ang)
  1879. if(!gBool("Aimbot", "Accuracy", "No Recoil")) then return ang + pm.GetPunchAngle(me); end
  1880. return ang;
  1881. end
  1882.  
  1883. local function rapidfire(ucmd)
  1884. if(pm.KeyDown(me, 1) && gBool("Aimbot", "Aimbot", "Auto Pistol")) then
  1885. cm.SetButtons(ucmd, bit.band( cm.GetButtons(ucmd), bit.bnot( 1 ) ) );
  1886. end
  1887. end
  1888.  
  1889. local function meme(ucmd)
  1890. if(!fa) then fa = cm.GetViewAngles(ucmd); end
  1891. fa = fa + Angle(cm.GetMouseY(ucmd) * .023, cm.GetMouseX(ucmd) * -.023, 0);
  1892. NormalizeAngle(fa);
  1893. if(cm.CommandNumber(ucmd) == 0) then
  1894. cm.SetViewAngles(ucmd, GetAngle(fa));
  1895. return;
  1896. end
  1897. if(cm.KeyDown(ucmd, 1)) then
  1898. local ang = GetAngle(vm.Angle( PredictSpread(ucmd, fa ) ) );
  1899. NormalizeAngle(ang);
  1900. cm.SetViewAngles(ucmd, ang);
  1901. end
  1902. -- if(cm.KeyDown(ucmd, 2) && !em.IsOnGround(me)) then
  1903. -- cm.SetButtons(ucmd, bit.band( cm.GetButtons(ucmd), bit.bnot( 2 ) ) );
  1904. -- end
  1905. end
  1906. --[[
  1907. function GAMEMODE:PreDrawSkyBox()
  1908. if (!gBool("Main", "Misc", "No Sky")) then return; end
  1909. render.Clear(0, 0, 0, 255);
  1910. return true;
  1911. end
  1912. ]]
  1913.  
  1914. function GAMEMODE:PreDrawSkyBox()
  1915. if (!gBool("Main", "Misc", "Aids Mode")) then return; end
  1916. render.Clear(0, 161, 255, 255);
  1917. return true;
  1918. end
  1919.  
  1920.  
  1921.  
  1922. local trace_walls = bit.bor(CONTENTS_TESTFOGVOLUME, CONTENTS_EMPTY, CONTENTS_MONSTER, CONTENTS_HITBOX);
  1923. local NoPenetration = {[MAT_SLOSH] = true};
  1924. local PenMod = {[MAT_SAND] = 0.5, [MAT_DIRT] = 0.8, [MAT_METAL] = 1.1, [MAT_TILE] = 0.9, [MAT_WOOD] = 1.2};
  1925. local trace_normal = bit.bor(CONTENTS_SOLID, CONTENTS_OPAQUE, CONTENTS_MOVEABLE, CONTENTS_DEBRIS, CONTENTS_MONSTER, CONTENTS_HITBOX, 402653442, CONTENTS_WATER);
  1926.  
  1927.  
  1928. local function fasAutowall(wep, startPos, aimPos, ply)
  1929. if !gBool("Aimbot", "Accuracy", "Auto Wall") then return end;
  1930. local traces = {};
  1931. local traceResults = {};
  1932. local dir = (aimPos - startPos):GetNormalized();
  1933. traces[1] = { start = startPos, filter = me, mask = trace_normal, endpos = aimPos, };
  1934. traceResults[1] = util.TraceLine(traces[1]);
  1935. if(NoPenetration[traceResults[1].MatType]) then return false; end
  1936. if(-dir:DotProduct(traceResults[1].HitNormal) <= .26) then return false; end
  1937.  
  1938. 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, };
  1939. traceResults[2] = util.TraceLine(traces[2]);
  1940. traces[3] = { start = traceResults[2].HitPos, endpos = traceResults[2].HitPos + dir * .1, filter = me, mask = trace_normal, };
  1941. traceResults [3] = util.TraceLine(traces[3]);
  1942. traces[4] = { start = traceResults[2].HitPos, endpos = aimPos, filter = me, mask = MASK_SHOT, };
  1943. traceResults[4] = util.TraceLine(traces[4]);
  1944. if(traceResults[4].Entity != ply) then return false; end
  1945. return(!traceResults[3].Hit);
  1946. end
  1947.  
  1948.  
  1949. local oldRC = render.Capture
  1950. local rndrView = render.RenderView
  1951. takingss = false
  1952. render.Capture = function( ... )
  1953. takingss = true
  1954. rndrView()
  1955. GAMEMODE:HUDPaint()
  1956. takingss = false
  1957. return oldRC( ... )
  1958. end
  1959.  
  1960. local function m9kAutowall(wep)
  1961. if !gBool("Aimbot", "Accuracy", "Auto Wall") then return end;
  1962. local wep = me:GetActiveWeapon();
  1963. local trace = {
  1964. endpos = aimPos,
  1965. start = me:EyePos(),
  1966. mask = MASK_SHOT,
  1967. filter = me,
  1968. };
  1969. return wep:BulletPenetrate(10, nil, util.TraceLine(trace), DamageInfo());
  1970. end
  1971.  
  1972. local function FixMovement(ucmd)
  1973. local vec = Vector(cm.GetForwardMove(ucmd), cm.GetSideMove(ucmd), 0);
  1974. local vel = math.sqrt(vec.x*vec.x + vec.y*vec.y);
  1975. local mang = vm.Angle(vec);
  1976. local yaw = cm.GetViewAngles(ucmd).y - fa.y + mang.y;
  1977. if (((cm.GetViewAngles(ucmd).p+90)%360) > 180) then
  1978. yaw = 980 - yaw;
  1979. end
  1980. yaw = ((yaw + 980)%360)-180;
  1981. ucmd:SetForwardMove(math.cos(math.rad(yaw)) * vel);
  1982. ucmd:SetSideMove(math.sin(math.rad(yaw)) * vel);
  1983. end
  1984.  
  1985.  
  1986. hook.Add("CreateMove", "", function(ucmd)
  1987. meme(ucmd);
  1988. aimer(ucmd);
  1989. antiaimer(ucmd);
  1990. end);
  1991.  
  1992. hook.Add("CalcView", "", function(p, o, a, f)
  1993. return({
  1994. angles = GetAngle(fa),
  1995. origin = (gBool("Main", "Misc", "Thirdperson") && o + am.Forward(fa) * -150 || o),
  1996. fov = f,
  1997. });
  1998. end);
  1999.  
  2000. hook.Add("ShouldDrawLocalPlayer", "", function()
  2001. return(gBool("Main", "Misc", "Thirdperson"));
  2002. end);
  2003.  
  2004.  
  2005. chat.AddText(Color(0, 255, 106), "pLegit", "| ", Color( 255, 255, 255 ), "Loaded correctly! Check console for more info!")
  2006.  
  2007.  
  2008. local toggler = 0
  2009. local function RapidFire(ucmd)
  2010. if(gBool("Aimbot", "Aimbot", "Rapid Fire")) then
  2011. if me:KeyDown(IN_ATTACK) then
  2012. if me:Health() > 0 then
  2013. if IsValid(me:GetActiveWeapon()) and me:GetActiveWeapon():GetClass() != "weapon_physgun" then
  2014. if toggler == 0 then
  2015. ucmd:SetButtons(bit.bor(ucmd:GetButtons(), IN_ATTACK))
  2016. toggler = 1
  2017. else
  2018. ucmd:SetButtons(bit.band(ucmd:GetButtons(), bit.bnot(IN_ATTACK)))
  2019. toggler = 0
  2020. end
  2021. end
  2022. end
  2023. end
  2024. end
  2025. end
  2026.  
  2027. hook.Add("PreDrawPlayerHands", "", function()
  2028. if(gBool("Main", "Misc", "No Hands") || gBool("Main", "Misc", "Thirdperson")) then
  2029. return true;
  2030. else
  2031. return false;
  2032. end
  2033. end);
  2034.  
  2035.  
  2036.  
  2037. hook.Add("CalcView", "", function(p, o, a, f)
  2038. return({
  2039. angles = GetAngle(fa),
  2040. origin = (gBool("Main", "Misc", "Thirdperson") && o + am.Forward(fa) * -150 || o),
  2041. fov = gInt("Main", "Misc", "FOV");
  2042. });
  2043. end);
  2044.  
  2045.  
  2046.  
  2047. hook.Add( "HUDPaint", "crosshair", function()
  2048.  
  2049. if(gBool("Main", "ESP", "Crosshair Normal")) then
  2050.  
  2051.  
  2052. rainbow = {}
  2053. rainbow.R = math.sin(CurTime() * 4) * 127 + 128
  2054. rainbow.G = math.sin(CurTime() * 4 + 2) * 127 + 128
  2055. rainbow.B = math.sin(CurTime() * 4 + 4) * 127 + 128
  2056.  
  2057. surface.SetDrawColor(13, 140, 233,255)
  2058. local x = ScrW() * 0.5
  2059. local y = ScrH() * 0.5
  2060. surface.DrawLine( x + 10, y, x - 10, y )
  2061. surface.DrawLine( x, y + 10, x, y - 10 )
  2062. end
  2063. end)
  2064. if(gBool("Main", "Misc", "Bunny Hop")) then
  2065.  
  2066. end
  2067.  
  2068. if(gBool("Main", "Misc", "pStrafe")) then
  2069. if(cmd:GetMouseX() > 1 || cmd:GetMouseX() < -1) then
  2070. cmd:SetSideMove(cmd:GetMouseX() > 1 && 400 || -400);
  2071. else
  2072. cmd:SetForwardMove(5850 / me:GetVelocity():Length2D());
  2073. cmd:SetSideMove((cmd:CommandNumber() % 2 == 0) && -400 || 400);
  2074. end
  2075. end
  2076.  
  2077.  
  2078. -- --------------------------------------------------------------------------------------------------------
  2079. -- Ghetto Anti-Cheat Check
  2080. -- --------------------------------------------------------------------------------------------------------
  2081. do
  2082. if (_G.QAC or _G.CAC) then
  2083. MsgC(Color( 255, 0, 0 ), [[
  2084. $$\ $$\ $$$$$$\ $$$$$$$\ $$\ $$\ $$$$$$\ $$\ $$\ $$$$$$\
  2085. $$ | $\ $$ | $$ __$$\ $$ __$$\ $$$\ $$ | \_$$ _| $$$\ $$ | $$ __$$\
  2086. $$ |$$$\ $$ | $$ / $$ | $$ | $$ | $$$$\ $$ | $$ | $$$$\ $$ | $$ / \__|
  2087. $$ $$ $$\$$ | $$$$$$$$ | $$$$$$$ | $$ $$\$$ | $$ | $$ $$\$$ | $$ |$$$$\
  2088. $$$$ _$$$$ | $$ __$$ | $$ __$$< $$ \$$$$ | $$ | $$ \$$$$ | $$ |\_$$ |
  2089. $$$ / \$$$ | $$ | $$ | $$ | $$ | $$ |\$$$ | $$ | $$ |\$$$ | $$ | $$ |
  2090. $$ / \$$ | $$ | $$ | $$ | $$ | $$ | \$$ | $$$$$$\ $$ | \$$ | \$$$$$$ |
  2091. \__/ \__| \__| \__| \__| \__| \__| \__| \______| \__| \__| \______/
  2092.  
  2093.  
  2094.  
  2095. [pLegit]: an anti-cheat was detected. read below for more info.
  2096. [pLegit]: If you would like to enable anti-cheat disconnect remove -- from RunConsoleCommand("disconnect")
  2097.  
  2098. ]]
  2099. )
  2100. chat.AddText(Color(0, 255, 106), "pLegit", "| ", Color( 255, 0, 0 ), "WARNING! OPEN CONSOLE.")
  2101.  
  2102. -- RunConsoleCommand("disconnect")
  2103. else
  2104. MsgC(Color( 0, 161, 255 ), [[
  2105. /$$$$$$ /$$$$$$ /$$$$$$$$ /$$$$$$$$
  2106. /$$__ $$ /$$__ $$ | $$_____/ | $$_____/
  2107. | $$ \__/ | $$ \ $$ | $$ | $$
  2108. | $$$$$$ | $$$$$$$$ | $$$$$ | $$$$$
  2109. \____ $$ | $$__ $$ | $$__/ | $$__/
  2110. /$$ \ $$ | $$ | $$ | $$ | $$
  2111. | $$$$$$/ | $$ | $$ | $$ | $$$$$$$$
  2112. \______/ |__/ |__/ |__/ |________/
  2113.  
  2114. [pLegit]:
  2115. No anti-cheat was detected you're safe to cheat.
  2116. If there is an anti-cheat and it was not detected msg me.
  2117. contact: /id/BreadIsHere
  2118.  
  2119.  
  2120.  
  2121.  
  2122.  
  2123.  
  2124.  
  2125. ]]
  2126. )
  2127.  
  2128. chat.AddText(Color(0, 255, 106), "pLegit", "| ", Color( 255, 255, 255 ), "No anti-cheat detected you're safe to cheat!")
  2129.  
  2130. return
  2131. end
  2132. end
  2133.  
  2134. -- --------------------------------------------------------------------------------------------------------
  2135. -- Ghetto Anti-Cheat Check
  2136. -- --------------------------------------------------------------------------------------------------------
  2137.  
  2138.  
  2139. local duckTime = 0
  2140. local function Bunnyhop(pCmd)
  2141. local duckEstimate = math.Round(58 + 1 / engine.TickInterval())
  2142. if(not gBool("Main", "Misc", "Bunny Hop") or em.GetMoveType(me) == MOVETYPE_NOCLIP or me:Health() < 1) then return end
  2143. if(not me:IsOnGround()) then
  2144. pCmd:RemoveKey(2)
  2145. duckTime = duckTime + 1
  2146. if(pCmd:GetMouseX() > 1 or pCmd:GetMouseX() < -1) then
  2147. if(pCmd:GetMouseX() < 0) then
  2148. pCmd:SetSideMove(-400)
  2149. else
  2150. pCmd:SetSideMove(400)
  2151. end
  2152. else
  2153. pCmd:SetForwardMove(5850 / me:GetVelocity():Length2D())
  2154. pCmd:SetSideMove((pCmd:CommandNumber() % 2) == 0 and -400 or 400)
  2155. end
  2156. else
  2157. if(pCmd:KeyDown(2)) then
  2158. pCmd:SetForwardMove(400)
  2159. end
  2160. if(pCmd:KeyDown(IN_JUMP)) then
  2161. pCmd:SetForwardMove(10000)
  2162. end
  2163. if gBool("Aimbot", "HVH", "Air Duck") and cm.CommandNumber(pCmd) ~= 0 and duckTime < duckEstimate then
  2164. cm.SetButtons(pCmd, bit.bor(cm.GetButtons(pCmd), IN_DUCK))
  2165. else
  2166. duckTime = 0
  2167. end
  2168. end
  2169. end
  2170.  
  2171.  
  2172.  
  2173. local Cap = math.cos(math.rad(45))
  2174. local Offset = Vector(0, 0, 32)
  2175. local Trace = {}
  2176. local WitnessColor = Color (0,0,0)
  2177.  
  2178. function Draw()
  2179. local Time = os.time() - 1
  2180. local Witnesses = 0
  2181. local BeingWitnessed = true
  2182. if Time < os.time() then
  2183. Time = os.time() + .5
  2184. Witnesses = 0
  2185. BeingWitnessed = false
  2186. for k, pla in pairs(player.GetAll()) do
  2187. if pla:IsValid() and pla != LocalPlayer() then
  2188. Trace.start = LocalPlayer():EyePos() + Offset
  2189. Trace.endpos = pla:EyePos() + Offset
  2190. Trace.filter = {pla, LocalPlayer()}
  2191. TraceRes = util.TraceLine(Trace)
  2192. if !TraceRes.Hit then
  2193. if (pla:EyeAngles():Forward():Dot((LocalPlayer():EyePos() - pla:EyePos())) > Cap) then
  2194. Witnesses = Witnesses + 1
  2195. BeingWitnessed = true
  2196.  
  2197. end
  2198. end
  2199. end
  2200. end
  2201. end
  2202. if BeingWitnessed == false then
  2203. WitnessColor = Color (0,255,0)
  2204. else
  2205. WitnessColor = Color (255,0,0)
  2206. end
  2207. draw.SimpleTextOutlined( Witnesses.." Player(s) can see you.", "Trebuchet18", (ScrW() / 2) - 65, 42, Color(gInt("Settings", "Menu Color", "Red"), gInt("Settings", "Menu Color", "Green"), gInt("Settings", "Menu Color", "Blue")),4,1,1,Color(0,0,0))
  2208. surface.SetDrawColor( WitnessColor )
  2209. surface.DrawRect( (ScrW() / 2) - 70, 55, 148, 5 )
  2210. end
  2211.  
  2212. hook.Add("HUDPaint", "WitnessesBox", Draw)
  2213.  
  2214.  
  2215.  
  2216.  
  2217. local Matinfo = {
  2218. ["$basetexture"] = "models/debug/debugwhite",
  2219. ["$model"] = 1,
  2220. ["$nocull"] = 1,
  2221. ["$ignorez"] = 1
  2222. }
  2223.  
  2224. mat1 = (CreateMaterial( "chams", "VertexLitGeneric", Matinfo ))
  2225. mat2 = (CreateMaterial( "wireframe", "Wireframe", Matinfo ))
  2226. trans = Color(0, 255, 0, 80)
  2227. trans2 = Color(0, 255, 100)
  2228. trans3 = Color(255, 155, 0, 200)
  2229.  
  2230. function Xray()
  2231. if(gBool("Main", "ESP", "Transparent Chams")) then
  2232. local ColScheme = Color(gInt("Settings", "Team ESP Color", "Red"), gInt("Settings", "Team ESP Color", "Green"), gInt("Settings", "Team ESP Color", "Blue"), 100)
  2233. --local ColSchemeV = Vector(gInt("Settings", "Team ESP Color", "Red"), gInt("Settings", "Team ESP Color", "Green"), gInt("Settings", "Team ESP Color", "Blue") / 255)
  2234. local ColSchemeV2 = Vector(math.Clamp(ColSchemeV.x + 0.2, 0, 1), math.Clamp(ColSchemeV.y + 0.5, 0, 1), math.Clamp(ColSchemeV.z + 0.2, 0, 1))
  2235. if !xray then
  2236. xray = true
  2237. hook.Add("HUDPaint", "xxrayz", function()
  2238. for k,v in pairs(ents.GetAll()) do
  2239. local position = (v:GetPos()+Vector(0,0,80)):ToScreen()
  2240. if v:IsPlayer() && v:Alive() then
  2241. cam.Start3D(EyePos(),EyeAngles())
  2242. v:SetMaterial(mat2)
  2243. v:SetRenderMode(4)
  2244. v:SetColor(ColScheme)
  2245. render.SuppressEngineLighting( true )
  2246. render.MaterialOverride( mat1 )
  2247. render.SetColorModulation( ColSchemeV2.x, ColSchemeV2.y, ColSchemeV2.z )
  2248. render.SetBlend(0.3)
  2249. v:DrawModel()
  2250. render.SetBlend(1)
  2251. render.SuppressEngineLighting( false )
  2252. render.MaterialOverride( )
  2253. cam.End3D()
  2254. end
  2255. end
  2256. end)
  2257. end
  2258. elseif xray then
  2259. xray = false
  2260. for k,v in pairs(ents.GetAll()) do
  2261. if v:GetClass()==("prop_door_rotating") or v:GetClass()==("func_door_rotating") or v:GetClass()== "prop_physics" or v:IsPlayer() then
  2262. v:SetMaterial("")
  2263. v:SetColor(Color(255,255,255))
  2264. end
  2265. end
  2266. hook.Remove("HUDPaint", "xxrayz")
  2267. end
  2268. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement