Advertisement
Guest User

b1g lua pack keynix

a guest
Jan 23rd, 2019
200
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 68.85 KB | None | 0 0
  1. local arrow_font1 = draw.CreateFont("Ultra Fresh - Demo", 18, 750)
  2. local Others_functions_WINDOW = gui.Window( "wnd_luatest", "others functions.", 5, 5, 875, 600 );
  3. local before_autobuy_group = gui.Groupbox( Others_functions_WINDOW, "fake lag extra.", 215+15, 15, 200, 150 );
  4. local before_autobuy_group2 = gui.Groupbox( Others_functions_WINDOW, "fake lag complete.", 215+15, 15+150+15, 200, 367 );
  5. local before_fake_lag_extra = gui.Groupbox( Others_functions_WINDOW, "other func.", 215+15+215 , 15, 200, 250 );
  6. local before_extra_func = gui.Groupbox( Others_functions_WINDOW, "manual func.", 215+15+215+215, 15, 200, 250 );
  7. local befor_Cheaking = gui.Groupbox( Others_functions_WINDOW, "other func.", 215+215+15+215, 15+16+250, 200, 265 );
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14. -----AUTO BUY------
  15. local M_Ref1 = gui.Reference("SETTINGS", "Miscellaneous")
  16. local Window_LUA = gui.Checkbox( M_Ref1, "window_auto_buy", "Auto buy window", 0 );
  17. local Autobuy_Groupbox = gui.Groupbox( Others_functions_WINDOW, "Auto-buy", 15, 15, 200, 367 );
  18. local Autobuy_Enable = gui.Checkbox( Autobuy_Groupbox, "lua_autobuy_enable", "Enable", 0 );
  19.  
  20. local Autobuy_PrimaryWeapon = gui.Combobox( Autobuy_Groupbox, "lua_autobuy_primaryweapon", "Primary Weapon", "Off", "Auto", "Scout", "AWP", "Rifle", "Famas | Galil", "AUG | SG 553", "MAC-10 | MP9", "MP7 | MP5-SD", "UMP-45", "P90", "PP-Bizon", "Nova", "XM1014", "Sawed-Off | MAG-7", "M249", "Negev" );
  21. local Autobuy_SecondaryWeapon = gui.Combobox( Autobuy_Groupbox, "lua_autobuy_secondaryweapon", "Secondary Weapon", "Off", "Dual Berettas", "P250", "CZ75-Auto | Tec-9 | Five-Seven", "Desert Eagle | R8 Revolver" );
  22.  
  23. local Autobuy_Armor = gui.Combobox( Autobuy_Groupbox, "lua_autobuy_armor", "Armor", "Off", "Kevlar", "Kevlar + Helmet" );
  24. local Autobuy_Defuser = gui.Checkbox( Autobuy_Groupbox, "lua_autobuy_defuser", "Defuser", 0 );
  25. local Autobuy_Taser = gui.Checkbox( Autobuy_Groupbox, "lua_autobuy_taser", "Taser", 0 );
  26.  
  27. local Autobuy_HEGrenade = gui.Checkbox( Autobuy_Groupbox, "lua_autobuy_hegrenade", "HE Grenade", 0 );
  28. local Autobuy_Smoke = gui.Checkbox( Autobuy_Groupbox, "lua_autobuy_smoke", "Smoke", 0 );
  29. local Autobuy_Molotov = gui.Checkbox( Autobuy_Groupbox, "lua_autobuy_molotov", "Molotov", 0 );
  30. local Autobuy_Flashbang = gui.Checkbox( Autobuy_Groupbox, "lua_autobuy_flashbang", "Flashbang", 0 );
  31. local Autobuy_Decoy = gui.Checkbox( Autobuy_Groupbox, "lua_autobuy_decoy", "Decoy", 0 );
  32.  
  33. local Money = 0
  34.  
  35. local function LocalPlayerMoney()
  36. if Autobuy_Enable:GetValue() then
  37.  
  38. if entities.GetLocalPlayer() ~= nil then
  39. Money = entities.GetLocalPlayer():GetProp( "m_iAccount" )
  40. end
  41. end
  42. end
  43.  
  44. local function Autobuy( Event )
  45.  
  46. local PrimaryWeapon = Autobuy_PrimaryWeapon:GetValue()
  47. local SecondaryWeapon = Autobuy_SecondaryWeapon:GetValue()
  48. local Armor = Autobuy_Armor:GetValue()
  49.  
  50. if Autobuy_Enable:GetValue() then
  51.  
  52. if Event:GetName() ~= "player_spawn" then
  53. return;
  54. end
  55.  
  56. local INT_UID = Event:GetInt( "userid" );
  57. local PlayerIndex = client.GetPlayerIndexByUserID( INT_UID );
  58.  
  59. if client.GetLocalPlayerIndex() == PlayerIndex then
  60. ME = true
  61. else
  62. ME = false
  63. end
  64.  
  65. if ME and Money == 0 then
  66. -- Primary Weapon
  67. if PrimaryWeapon == 1 then client.Command( "buy scar20", true ); -- Auto
  68. elseif PrimaryWeapon == 2 then client.Command( "buy ssg08", true ); -- Scout
  69. elseif PrimaryWeapon == 3 then client.Command( "buy awp", true ); -- AWP
  70. elseif PrimaryWeapon == 4 then client.Command( "buy ak47", true ); -- Rifle
  71. elseif PrimaryWeapon == 5 then client.Command( "buy famas", true ); -- Famas | Galil
  72. elseif PrimaryWeapon == 6 then client.Command( "buy aug", true ); -- AUG | SG 553
  73. elseif PrimaryWeapon == 7 then client.Command( "buy mac10", true ); -- MAC-10 | MP9
  74. elseif PrimaryWeapon == 8 then client.Command( "buy mp7", true ); -- MP7 | MP5-SD
  75. elseif PrimaryWeapon == 9 then client.Command( "buy ump45", true ); -- UMP-45
  76. elseif PrimaryWeapon == 10 then client.Command( "buy p90", true ); -- P90
  77. elseif PrimaryWeapon == 11 then client.Command( "buy bizon", true ); -- PP-Bizon
  78. elseif PrimaryWeapon == 12 then client.Command( "buy nova", true ); -- Nova
  79. elseif PrimaryWeapon == 13 then client.Command( "buy xm1014", true ); -- XM1014
  80. elseif PrimaryWeapon == 14 then client.Command( "buy mag7", true ); -- Sawed-Off | MAG-7
  81. elseif PrimaryWeapon == 15 then client.Command( "buy m249", true ); -- M249
  82. elseif PrimaryWeapon == 16 then client.Command( "buy negev", true ); -- Negev
  83. end
  84. -- Secondary Weapon
  85. if SecondaryWeapon == 1 then client.Command( "buy elite", true ); -- Dual Berettas
  86. elseif SecondaryWeapon == 2 then client.Command( "buy p250", true ); -- P250
  87. elseif SecondaryWeapon == 3 then client.Command( "buy tec9", true ); -- CZ75-Auto | Tec-9 | Five-Seven
  88. elseif SecondaryWeapon == 4 then client.Command( "buy deagle", true ); -- Desert Eagle | R8 Revolver
  89. end
  90. -- Taser
  91. if Autobuy_Taser:GetValue() then
  92. client.Command( "buy taser", true );
  93. end
  94. elseif ME and Money <= 800 then
  95. -- Taser
  96. if Autobuy_Taser:GetValue() then
  97. client.Command( "buy taser", true );
  98. end
  99. -- Secondary Weapon
  100. if SecondaryWeapon == 1 then client.Command( "buy elite", true ); -- Dual Berettas
  101. elseif SecondaryWeapon == 2 then client.Command( "buy p250", true ); -- P250
  102. elseif SecondaryWeapon == 3 then client.Command( "buy tec9", true ); -- CZ75-Auto | Tec-9 | Five-Seven
  103. elseif SecondaryWeapon == 4 then client.Command( "buy deagle", true ); -- Desert Eagle | R8 Revolver
  104. end
  105. elseif ME and Money > 800 then
  106. -- Primary Weapon
  107. if PrimaryWeapon == 1 then client.Command( "buy scar20", true ); -- Auto
  108. elseif PrimaryWeapon == 2 then client.Command( "buy ssg08", true ); -- Scout
  109. elseif PrimaryWeapon == 3 then client.Command( "buy awp", true ); -- AWP
  110. elseif PrimaryWeapon == 4 then client.Command( "buy ak47", true ); -- Rifle
  111. elseif PrimaryWeapon == 5 then client.Command( "buy famas", true ); -- Famas | Galil
  112. elseif PrimaryWeapon == 6 then client.Command( "buy aug", true ); -- AUG | SG 553
  113. elseif PrimaryWeapon == 7 then client.Command( "buy mac10", true ); -- MAC-10 | MP9
  114. elseif PrimaryWeapon == 8 then client.Command( "buy mp7", true ); -- MP7 | MP5-SD
  115. elseif PrimaryWeapon == 9 then client.Command( "buy ump45", true ); -- UMP-45
  116. elseif PrimaryWeapon == 10 then client.Command( "buy p90", true ); -- P90
  117. elseif PrimaryWeapon == 11 then client.Command( "buy bizon", true ); -- PP-Bizon
  118. elseif PrimaryWeapon == 12 then client.Command( "buy nova", true ); -- Nova
  119. elseif PrimaryWeapon == 13 then client.Command( "buy xm1014", true ); -- XM1014
  120. elseif PrimaryWeapon == 14 then client.Command( "buy mag7", true ); -- Sawed-Off | MAG-7
  121. elseif PrimaryWeapon == 15 then client.Command( "buy m249", true ); -- M249
  122. elseif PrimaryWeapon == 16 then client.Command( "buy negev", true ); -- Negev
  123. end
  124. -- Secondary Weapon
  125. if SecondaryWeapon == 1 then client.Command( "buy elite", true ); -- Dual Berettas
  126. elseif SecondaryWeapon == 2 then client.Command( "buy p250", true ); -- P250
  127. elseif SecondaryWeapon == 3 then client.Command( "buy tec9", true ); -- CZ75-Auto | Tec-9 | Five-Seven
  128. elseif SecondaryWeapon == 4 then client.Command( "buy deagle", true ); -- Desert Eagle | R8 Revolver
  129. end
  130.  
  131. -- Armor
  132. if Armor == 1 then
  133. client.Command( "buy vest", true );
  134. elseif Armor == 2 then
  135. client.Command( "buy vesthelm", true );
  136. end
  137. -- Defuser
  138. if Autobuy_Defuser:GetValue() then
  139. client.Command( "buy defuser", true );
  140. end
  141. -- Taser
  142. if Autobuy_Taser:GetValue() then
  143. client.Command( "buy taser", true );
  144. end
  145.  
  146. -- HE Grenade
  147. if Autobuy_HEGrenade:GetValue() then
  148. client.Command( "buy hegrenade", true );
  149. end
  150. -- Smoke
  151. if Autobuy_Smoke:GetValue() then
  152. client.Command( "buy smokegrenade", true );
  153. end
  154. -- Molotov
  155. if Autobuy_Molotov:GetValue() then
  156. client.Command( "buy molotov", true );
  157. end
  158. -- Flashbang
  159. if Autobuy_Flashbang:GetValue() then
  160. client.Command( "buy flashbang", true );
  161. end
  162. -- Decoy
  163. if Autobuy_Decoy:GetValue() then
  164. client.Command( "buy decoy", true );
  165. end
  166. end
  167.  
  168. end
  169.  
  170. end
  171.  
  172. local function ShowWindow()
  173.  
  174. if Window_LUA:GetValue() then Others_functions_WINDOW:SetActive(1); else Others_functions_WINDOW:SetActive(0); end
  175. end
  176.  
  177. client.AllowListener( "player_spawn" )
  178. callbacks.Register( "Draw", "Show Window", ShowWindow )
  179. callbacks.Register( "Draw", "Local Player Money", LocalPlayerMoney )
  180. callbacks.Register( "FireGameEvent", "Autobuy", Autobuy )
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192. -- Backtrack Lines!--
  193.  
  194. local external_func_pod_autobuy = gui.Groupbox( Others_functions_WINDOW, "external func.", 15, 15+16+367, 200, 150 );
  195. local BacktrackLinesEnable = gui.Checkbox( external_func_pod_autobuy, "backtrack_lines", "Backtrack lines", 0 );
  196. -- Configuration --
  197. local RainbowTrail = true; -- If this is set to false, "clr_chams_historyticks" will be used instead
  198. local ExpiredTick_Color = {100, 100, 100, 255}; -- The color of the ticks that aren't valid anymore
  199. local Legitbot_ThroughWalls = false; -- By default the line isn't visible through walls when using the Legitbot backtrack
  200. local DrawDots = 0; -- Using a value greater than 0 will draw boxes instead of lines
  201. -------------------
  202.  
  203. local Players = {};
  204. local lastPos = {nil, nil};
  205.  
  206. RunScript("Helper_For_Backtrack_Lines.lua");
  207.  
  208. local function EventBackTrackLines(GameEvent)
  209. if GameEvent:GetName() == "round_start" or GameEvent:GetName() == "round_prestart" then
  210. Players = {};
  211. end
  212. end
  213.  
  214. local function DrawingBackTrackLines()
  215.  
  216. LocalPlayer = entities.GetLocalPlayer();
  217. if BacktrackLinesEnable:GetValue() then
  218. for index, Player in pairs(entities.FindByClass("CCSPlayer")) do
  219.  
  220. -- Don't mess with these unless you know what you're doing
  221. local Backtrack = false;
  222. local FriendlyFire = false;
  223. local FakeLatency = 0;
  224. local Legitbot = false;
  225.  
  226. if gui.GetValue("rbot_positionadjustment") and gui.GetValue("rbot_active") then
  227. Backtrack = true;
  228. elseif gui.GetValue("lbot_positionadjustment") and gui.GetValue("lbot_active") then
  229. Backtrack = true;
  230. Legitbot = true;
  231. end
  232.  
  233. if Backtrack then
  234.  
  235. if (gui.GetValue("rbot_team") and gui.GetValue("rbot_active")) or
  236. (gui.GetValue("lbot_team") and gui.GetValue("lbot_active")) then
  237. FriendlyFire = true;
  238. end
  239.  
  240. if gui.GetValue("msc_active") and gui.GetValue("msc_fakelatency_enable") then
  241. FakeLatency = gui.GetValue("msc_fakelatency_amount");
  242. end
  243.  
  244. if Player:GetIndex() ~= LocalPlayer:GetIndex() and
  245. (LocalPlayer:GetTeamNumber() ~= Player:GetTeamNumber() or FriendlyFire) and
  246. Player:IsAlive() then
  247.  
  248. lastTick = {nil, nil};
  249.  
  250. if Players[Player:GetIndex()] == nil then
  251. Players[Player:GetIndex()] = {};
  252. end
  253.  
  254. table.insert(Players[Player:GetIndex()], {{Player:GetHitboxPosition("HITGROUP_HEAD")}, globals.RealTime()});
  255.  
  256. for indexHistory, valueHistory in pairs(Players[Player:GetIndex()]) do
  257.  
  258. if valueHistory[2] + 0.2 + FakeLatency < globals.RealTime() then
  259. table.remove(Players[Player:GetIndex()], indexHistory);
  260. else
  261.  
  262. local VisibilityBlock = false;
  263. local TickX, TickY = client.WorldToScreen(valueHistory[1][1], valueHistory[1][2], valueHistory[1][3]);
  264.  
  265. local LocalPlayerHead = {LocalPlayer:GetHitboxPosition("HITGROUP_HEAD")};
  266.  
  267. if Legitbot and Legitbot_ThroughWalls == false then
  268. if engine.TraceLine( valueHistory[1][1], valueHistory[1][2], valueHistory[1][3],
  269. LocalPlayerHead[1], LocalPlayerHead[2], LocalPlayerHead[3], 1) == 1 then
  270. VisibilityBlock = true;
  271. end
  272. end
  273.  
  274. if TickX ~= nil and TickY ~= nil and not VisibilityBlock then
  275. local TickColor = {};
  276. if valueHistory[2] - 0.2 <= globals.RealTime() - FakeLatency then
  277. if RainbowTrail then
  278. TickColor = EssentialsNP.Drawing.Hue(valueHistory[2]);
  279. TickColor[4] = 255;
  280. else
  281. TickColor = {gui.GetValue("clr_chams_historyticks")};
  282. end
  283. else
  284. TickColor = ExpiredTick_Color;
  285. end
  286.  
  287. draw.Color(TickColor[1], TickColor[2], TickColor[3], TickColor[4]);
  288.  
  289. if DrawDots >= 1 then
  290. draw.FilledRect(TickX - DrawDots, TickY - DrawDots, TickX + DrawDots, TickY + DrawDots);
  291. else
  292. if lastTick[1] ~= nil and lastTick[2] ~= nil then
  293. draw.Line(TickX, TickY, lastTick[1], lastTick[2]);
  294. end
  295.  
  296. lastTick = {TickX, TickY};
  297. end
  298. end
  299. end
  300. end
  301. end
  302. end
  303. end
  304. end
  305. end
  306.  
  307. -- Backtrack Lines by Nyanpasu!
  308.  
  309. client.AllowListener("round_start");
  310. client.AllowListener("round_prestart");
  311. callbacks.Register("Draw", "backtrackable_line_draw", DrawingBackTrackLines);
  312. callbacks.Register("FireGameEvent", "backtrackable_line_event", EventBackTrackLines);
  313.  
  314.  
  315.  
  316.  
  317.  
  318.  
  319.  
  320.  
  321.  
  322. --ChickenDeathSay
  323. local Chicken_DeathSay = gui.Checkbox( external_func_pod_autobuy, "lua_chicken_deathsay", "Chicken Death Say", 0 );
  324.  
  325. local function ChickenDeathSay( Event, Entity )
  326.  
  327. if Chicken_DeathSay:GetValue() then
  328.  
  329. if Event:GetName() ~= nil then
  330.  
  331. local UID = Event:GetInt( "userid" );
  332.  
  333. local Killer_INT = Event:GetInt( "attacker" );
  334. local Killer_Name = client.GetPlayerNameByUserID( Killer_INT );
  335.  
  336. local Weapon = Event:GetString( "weapon" );
  337. local Locate = entities.FindByClass( "CBasePlayer" );
  338.  
  339. for i = 1, #Locate do
  340. local Location = Locate[i]:GetPropString( "m_szLastPlaceName" );
  341.  
  342. if Location == nil then
  343. Location = "Unknown";
  344. end
  345.  
  346. chatsay = string.format( "%s murdered a chicken with the %s at %s!", Killer_Name, Weapon, Location )
  347.  
  348. if ( Event:GetName() == "other_death" ) then
  349. client.ChatSay(chatsay)
  350. end
  351. end
  352. end
  353. end
  354.  
  355. end
  356.  
  357. client.AllowListener( "other_death" )
  358. callbacks.Register( "FireGameEvent", "Chicken Death Say", ChickenDeathSay )
  359.  
  360.  
  361.  
  362.  
  363.  
  364.  
  365.  
  366.  
  367.  
  368.  
  369.  
  370.  
  371.  
  372. --rofl_Cheaking
  373. local rofl_Cheaking = gui.Groupbox( Others_functions_WINDOW, "Chicken func.", 215+15+215, 15+16+250, 200, 265 );
  374. local lua_EnableChicken = gui.Checkbox( rofl_Cheaking, "lua_EnableChicken", "Enable", 1 );
  375. local lua_ChickenScale = gui.Slider( rofl_Cheaking, "lua_ChickenScale", "Chicken Scale", 1.0, 0.25, 4.0 );
  376. local lua_ChickenModel = gui.Combobox( rofl_Cheaking, "lua_ChickenModel", "Holiday Theme","Default Chicken", "Party Chicken","Ghost Chicken","Festive Chicken","Easter Chicken","Jack-o-Chicken");
  377. local lua_ChickenSkin = gui.Combobox( rofl_Cheaking, "lua_ChickenSkin", "Chicken Skin","Default", "Other");
  378. local lua_EnableParty = gui.Checkbox( rofl_Cheaking, "lua_EnableParty", "sv_partymode 1", 0 );
  379. local lua_ChickenAA = gui.Checkbox( rofl_Cheaking, "lua_ChickenAA", "ChickenAA", 0 );
  380.  
  381. local function ChickenShit()
  382. chickens = entities.FindByClass("CChicken")
  383.  
  384. if lua_EnableChicken:GetValue() then
  385.  
  386. if lua_ChickenModel:GetValue() == 0 then
  387. for i=1, #chickens do
  388. local chicken = chickens[i]
  389. if chicken:GetProp("m_nBody") ~= 0 then
  390. chicken:SetProp("m_nBody", 0);
  391. else
  392. end
  393. end
  394. elseif lua_ChickenModel:GetValue() == 1 then
  395. for i=1, #chickens do
  396. local chicken = chickens[i]
  397. if chicken:GetProp("m_nBody") ~= 1 then
  398. chicken:SetProp("m_nBody", 1);
  399. else
  400. end
  401. end
  402. elseif lua_ChickenModel:GetValue() == 2 then
  403. for i=1, #chickens do
  404. local chicken = chickens[i]
  405. if chicken:GetProp("m_nBody") ~= 2 then
  406. chicken:SetProp("m_nBody", 2);
  407. else
  408. end
  409. end
  410. elseif lua_ChickenModel:GetValue() == 3 then
  411. for i=1, #chickens do
  412. local chicken = chickens[i]
  413. if chicken:GetProp("m_nBody") ~= 3 then
  414. chicken:SetProp("m_nBody", 3);
  415. else
  416. end
  417. end
  418. elseif lua_ChickenModel:GetValue() == 4 then
  419. for i=1, #chickens do
  420. local chicken = chickens[i]
  421. if chicken:GetProp("m_nBody") ~= 4 then
  422. chicken:SetProp("m_nBody", 4);
  423. else
  424. end
  425. end
  426. elseif lua_ChickenModel:GetValue() == 5 then
  427. for i=1, #chickens do
  428. local chicken = chickens[i]
  429. if chicken:GetProp("m_nBody") ~= 5 then
  430. chicken:SetProp("m_nBody", 5);
  431. else
  432. end
  433. end
  434. else
  435. end
  436.  
  437. if lua_ChickenSkin:GetValue() == 0 then
  438. for i=1, #chickens do
  439. local chicken = chickens[i]
  440. if chicken:GetProp("m_nSkin") ~= 0 then
  441. chicken:SetProp("m_nSkin", 0);
  442. else
  443. end
  444. end
  445. elseif lua_ChickenSkin:GetValue() == 1 then
  446. for i=1, #chickens do
  447. local chicken = chickens[i]
  448. if chicken:GetProp("m_nSkin") ~= 1 then
  449. chicken:SetProp("m_nSkin", 1);
  450. else
  451. end
  452. end
  453. else
  454. end
  455.  
  456.  
  457. for i=1, #chickens do
  458. local chicken = chickens[i]
  459. if chicken:GetProp("m_flModelScale") ~= lua_ChickenScale:GetValue() then
  460. chicken:SetProp("m_flModelScale", lua_ChickenScale:GetValue());
  461. else
  462. end
  463. end
  464.  
  465. else
  466.  
  467. for i=1, #chickens do
  468. local chicken = chickens[i]
  469. if chicken:GetProp("m_nBody") ~= 0 then
  470. chicken:SetProp("m_nBody", 0);
  471. else
  472. end
  473. if chicken:GetProp("m_flModelScale") ~= 1.0 then
  474. chicken:SetProp("m_flModelScale", 1.0);
  475. else
  476. end
  477. if chicken:GetProp("m_nSkin") ~= 0 then
  478. chicken:SetProp("m_nSkin", 0);
  479. else
  480. end
  481. end
  482. end
  483.  
  484. if lua_EnableParty:GetValue() then
  485. if client.GetConVar("sv_party_mode") ~= 1 then
  486. client.SetConVar("sv_party_mode", 1, true)
  487. else
  488. end
  489. else
  490. if client.GetConVar("sv_party_mode") ~= 0 then
  491. client.SetConVar("sv_party_mode", 0, true)
  492. else
  493. end
  494. end
  495.  
  496. if lua_ChickenAA:GetValue() then
  497. for i=1, #chickens do
  498. local chicken = chickens[i]
  499. chicken:SetProp("m_nSequence", -509);
  500. end
  501. else
  502. end
  503. end
  504. callbacks.Register( "Draw", "ChickenShit", ChickenShit );
  505.  
  506.  
  507.  
  508.  
  509.  
  510.  
  511.  
  512.  
  513.  
  514.  
  515.  
  516.  
  517.  
  518.  
  519.  
  520.  
  521.  
  522. --damag say
  523.  
  524. local DamageSay = gui.Checkbox( external_func_pod_autobuy, "lua_damagesay", "Damage Say", 0 );
  525.  
  526. hitPlayerName = "";
  527. hitDmg = "";
  528. hitSpot = "";
  529. hitHealthRemaining = "";
  530.  
  531. local hurt_time = 0;
  532. local alpha = 0;
  533.  
  534. local eventArray = {};
  535. eventMsg = "";
  536.  
  537. local function HitGroup( INT_HITGROUP )
  538. if INT_HITGROUP == 0 then
  539. return "body";
  540. elseif INT_HITGROUP == 1 then
  541. return "head";
  542. elseif INT_HITGROUP == 2 then
  543. return "chest";
  544. elseif INT_HITGROUP == 3 then
  545. return "stomach";
  546. elseif INT_HITGROUP == 4 then
  547. return "left arm";
  548. elseif INT_HITGROUP == 5 then
  549. return "right arm";
  550. elseif INT_HITGROUP == 6 then
  551. return "left leg";
  552. elseif INT_HITGROUP == 7 then
  553. return "right leg";
  554. elseif INT_HITGROUP == 10 then
  555. return "body";
  556. end
  557. end
  558.  
  559. local function EventLogger( Event, Entity )
  560.  
  561. if DamageSay:GetValue() then
  562.  
  563. if ( Event:GetName() == 'player_hurt' ) then
  564. local ME = client.GetLocalPlayerIndex();
  565.  
  566. local INT_UID = Event:GetInt( 'userid' );
  567. local INT_ATTACKER = Event:GetInt( 'attacker' );
  568. local INT_DMG = Event:GetString( 'dmg_health' );
  569. local INT_HEALTH = Event:GetString( 'health' );
  570. local INT_HITGROUP = Event:GetInt( 'hitgroup' );
  571.  
  572. local INDEX_ATTACKER = client.GetPlayerIndexByUserID( INT_ATTACKER );
  573. local INDEX_VICTIM = client.GetPlayerIndexByUserID( INT_UID );
  574. local NAME_Victim = client.GetPlayerNameByUserID( INT_UID );
  575.  
  576. if ( INDEX_ATTACKER == ME and INDEX_Victim ~= ME ) then
  577. hitPlayerName = NAME_Victim;
  578. hitDmg = INT_DMG;
  579. hitSpot = INT_HITGROUP;
  580. hitHealthRemaining = INT_HEALTH;
  581.  
  582. hurt_time = globals.RealTime();
  583.  
  584. eventMsg = string.format( "Hit %s in the %s for %s damage (%s health remaining)\n", hitPlayerName, HitGroup(hitSpot), hitDmg, hitHealthRemaining);
  585. print(eventMsg)
  586. table.insert(eventArray, eventMsg);
  587. end
  588.  
  589. end
  590.  
  591. end
  592.  
  593. end
  594.  
  595. local function DrawLogs()
  596.  
  597. if DamageSay:GetValue() then
  598.  
  599. local screenCenterX, screenCenterY = draw.GetScreenSize();
  600.  
  601. local step = 255 / 4.0 * globals.FrameTime()
  602.  
  603. if hurt_time + 5.0 > globals.RealTime() then
  604. alpha = 255
  605. else
  606. alpha = alpha - step
  607. end
  608.  
  609. local myfragcounter = 0;
  610.  
  611. for i,y in ipairs(eventArray) do
  612. if y ~= nil then
  613. draw.Color( 255, 255, 255, alpha)
  614. if (alpha > 0 ) then
  615. draw.Text( 5, 5 + myfragcounter * 10, y );
  616. myfragcounter = myfragcounter + 1;
  617. end
  618. end
  619. end
  620.  
  621. if ( alpha < 0 ) then
  622. table.remove( eventArray, i );
  623. end
  624.  
  625. end
  626.  
  627. end
  628.  
  629. client.AllowListener( 'player_hurt' );
  630. callbacks.Register( 'Draw', 'DrawLogs', DrawLogs );
  631. callbacks.Register( 'FireGameEvent', 'EventsLogger', EventLogger );
  632.  
  633.  
  634.  
  635.  
  636.  
  637.  
  638.  
  639.  
  640.  
  641.  
  642.  
  643.  
  644.  
  645.  
  646.  
  647.  
  648.  
  649.  
  650.  
  651.  
  652. --DEAGLE FLIP
  653. --[[
  654. deagle flip
  655. purpose: to look like trailer-park cheat
  656. ]]
  657.  
  658. -- general script utilities
  659. local Deagle_flip = gui.Checkbox( external_func_pod_autobuy, "lua_deagle_flip", "Deagle flip", 0 );
  660. local uid_to_idx = client.GetPlayerIndexByUserID;
  661. local get_local_player = client.GetLocalPlayerIndex;
  662.  
  663. -- global variables
  664. local in_action;
  665. local equipped;
  666.  
  667. -- weapon_fire event listener
  668. local function on_weapon_fire( _event )
  669.  
  670.  
  671. if ( _event:GetName( ) ~= 'weapon_fire' ) then
  672. return;
  673. end
  674.  
  675. if (gui.GetValue("msc_fakelatency_enable")) then
  676. return;
  677. end
  678.  
  679. local _local = get_local_player( );
  680. local _id = _event:GetInt('userid');
  681.  
  682. if ( _local == uid_to_idx( _id ) ) then
  683. local _weapon = _event:GetString( 'weapon' );
  684.  
  685. if ( _weapon == 'weapon_deagle' ) then
  686. client.Command( 'slot3', true )
  687. flip = true;
  688. end
  689. end
  690. end
  691.  
  692. client.AllowListener( 'weapon_fire' );
  693. callbacks.Register( 'FireGameEvent', 'on_weapon_fire', on_weapon_fire );
  694.  
  695. local function on_item_equip( _event )
  696. if ( _event:GetName( ) ~= 'item_equip' ) then
  697. return;
  698. end
  699.  
  700. local _local = get_local_player( );
  701. local _id = _event:GetInt( 'userid' );
  702. local _item = _event:GetString( 'item' );
  703.  
  704. if ( _local == uid_to_idx( _id ) ) then
  705. equipped = _item;
  706. end
  707. end
  708.  
  709. callbacks.Register( 'FireGameEvent', 'on_item_equip', on_item_equip );
  710.  
  711. -- ghetto function for createmove because using client.Command twice in a listener is a no-no apparently
  712. function reset_tick( _cmd )
  713. if Deagle_flip:GetValue() then
  714. if ( flip ) then
  715. if ( equipped ~= 'deagle' ) then
  716. client.Command( "slot2", true )
  717. flip = false;
  718. end
  719. end
  720. end
  721. end
  722.  
  723. callbacks.Register( 'CreateMove', 'reset_tick', reset_tick );
  724.  
  725.  
  726.  
  727.  
  728.  
  729.  
  730.  
  731.  
  732.  
  733.  
  734.  
  735.  
  736.  
  737.  
  738.  
  739.  
  740. --FakelagOnKnife
  741. local SetValue = gui.SetValue;
  742.  
  743.  
  744. local FAKELAG_ON_KNIFE = gui.Checkbox( external_func_pod_autobuy, "lua_fakelagonknife", "Disable Fakelag On Knife", 0 );
  745.  
  746. local function FakelagOnKnife( Event )
  747.  
  748. if FAKELAG_ON_KNIFE:GetValue() then
  749.  
  750. if ( Event:GetName() ~= "item_equip" ) then
  751. return;
  752. end
  753.  
  754. local ME = client.GetLocalPlayerIndex();
  755. local INT_UID = Event:GetInt( "userid" );
  756. local PlayerIndex = client.GetPlayerIndexByUserID( INT_UID );
  757. local WepType = Event:GetInt( "weptype" );
  758. local Item = Event:GetString( "item" );
  759.  
  760. if ( ME == PlayerIndex ) then
  761.  
  762. if ( WepType == 0 ) then
  763. SetValue( "msc_fakelag_enable", false );
  764. else
  765. SetValue( "msc_fakelag_enable", true );
  766. end
  767.  
  768. end
  769.  
  770. end
  771.  
  772. end
  773.  
  774. callbacks.Register( "FireGameEvent", "Disable Fakelag On Knife", FakelagOnKnife );
  775.  
  776.  
  777.  
  778. local DisablePostProcessing = gui.Checkbox( before_fake_lag_extra, "lua_disable_mat_postprocess", "Remove post process", 0 );
  779. local c_reg = callbacks.Register
  780. local c_var = client.SetConVar
  781.  
  782. function PostProcess()
  783.  
  784. if DisablePostProcessing:GetValue() then
  785. client.SetConVar( "mat_postprocess_enable", 0, true );
  786. else
  787. client.SetConVar( "mat_postprocess_enable", 1, true );
  788. end
  789. end
  790.  
  791. c_reg("Draw", "PostProcess", PostProcess)
  792.  
  793.  
  794.  
  795.  
  796.  
  797.  
  798. local ping_spike_color_indicators = gui.Checkbox( before_fake_lag_extra, "lua_ping_spike_color_indicators", "Ping spike indicators", 0 );
  799. local function DrawPING()
  800.  
  801. local w, h = draw.GetScreenSize();
  802.  
  803. if entities.GetPlayerResources() ~= nil then
  804.  
  805. PING = entities.GetPlayerResources():GetPropInt( "m_iPing", client.GetLocalPlayerIndex() );
  806.  
  807. DrawPingColor();
  808. draw.Text( 30, h - 443, PING );
  809.  
  810. else
  811.  
  812. -- draw.Color( 255, 255, 255, 255 );
  813. --draw.Text( 30, h - 443, "0" );
  814.  
  815. end
  816.  
  817. if gui.GetValue("msc_fakelatency_enable") then
  818. draw.Color( 0, 255, 0, 255 );
  819. else
  820. draw.Color( 255, 255, 255, 255 );
  821. end
  822.  
  823. if ping_spike_color_indicators:GetValue() then
  824. draw.SetFont(arrow_font)
  825. draw.Text( 2, h - 443, "PING" )
  826. end
  827. end
  828.  
  829. function DrawPingColor()
  830.  
  831. if ( PING <= 50 ) then
  832. draw.Color(0, 255, 0, 255); -- Green
  833. elseif ( PING <= 100 ) then
  834. draw.Color( 50, 255, 0, 255 );
  835. elseif ( PING <= 200 ) then
  836. draw.Color( 100, 255, 0, 255 );
  837. elseif ( PING <= 300 ) then
  838. draw.Color( 150, 255, 0, 255 );
  839. elseif ( PING <= 400 ) then
  840. draw.Color( 200, 255, 0, 255 );
  841. elseif ( PING <= 500 ) then
  842. draw.Color( 255, 255, 0, 255 ); -- Orange
  843. elseif ( PING <= 600 ) then
  844. draw.Color( 255, 200, 0, 255 );
  845. elseif ( PING <= 700 ) then
  846. draw.Color( 255, 150, 0, 255 );
  847. elseif ( PING <= 800 ) then
  848. draw.Color( 255, 100, 0, 255 );
  849. elseif ( PING <= 900 ) then
  850. draw.Color( 255, 50, 0, 255 );
  851. else
  852. draw.Color( 255, 0, 0, 255 ); -- Red
  853. end
  854.  
  855. end
  856.  
  857. callbacks.Register( "Draw", "DrawPING", DrawPING )
  858.  
  859.  
  860.  
  861.  
  862.  
  863.  
  864.  
  865.  
  866.  
  867.  
  868.  
  869. local drawin_enigame_radar = gui.Checkbox( before_fake_lag_extra, "lua_drawin_enigame_radar", "Enigame radar", 0 );
  870. local function drawing_enigame_radar()
  871. for index, Player in pairs(entities.FindByClass("CCSPlayer")) do
  872. if drawin_enigame_radar:GetValue() then
  873. Player:SetProp("m_bSpotted", 1);
  874. end
  875. end
  876. end
  877.  
  878. -- Engine Radar by Nyanpasu!
  879.  
  880. callbacks.Register("Draw", "engine_radar_draw", drawing_enigame_radar);
  881.  
  882. local FAKELAG_EXTRA = gui.Checkbox( before_autobuy_group, "lua_fakelag_extra_enable", "Enable", 0 );
  883. local FAKELAG_ON_KNIFE = gui.Checkbox( before_autobuy_group, "lua_fakelag_knife", "Disable On Knife", 0 );
  884. local FAKELAG_ON_TASER = gui.Checkbox( before_autobuy_group, "lua_fakelag_taser", "Disable On Taser", 0 );
  885. local FAKELAG_ON_GRENADE = gui.Checkbox( before_autobuy_group, "lua_fakelag_grenade", "Disable On Grenade", 0 );
  886. local FAKELAG_ON_PISTOL = gui.Checkbox( before_autobuy_group, "lua_fakelag_pistol", "Disable On Pistol", 0 );
  887. local FAKELAG_ON_REVOLVER = gui.Checkbox( before_autobuy_group, "lua_fakelag_revolver", "Disable On R8/Deagle", 0 );
  888.  
  889. local FAKELAG_ON_PING = gui.Checkbox( before_autobuy_group, "lua_fakelag_ping", "Disable Fakelag On Ping", 0 )
  890. local FAKELAG_ON_PING_AMOUNT = gui.Slider( before_autobuy_group, "lua_fakelag_ping_amount", "Amount", 120, 0, 1000 )
  891.  
  892. local FAKELAG_SMART_MODE = gui.Checkbox( before_autobuy_group2, "lua_fakelag_smartmode_enable", "Enable", 0 );
  893. local FAKELAG_SMART_MODE_FACTOR = gui.Checkbox( before_autobuy_group2, "lua_fakelag_value", "Smart Mode Factor", 0 );
  894. local FAKELAG_SMART_MODE_STANDING = gui.Combobox( before_autobuy_group2, "lua_fakelag_standing", "While Standing", "Off", "Factor", "Switch", "Adaptive", "Random", "Rapid Peek" );
  895. local FAKELAG_SMART_MODE_STANDING_FACTOR = gui.Slider( before_autobuy_group2, "lua_fakelag_standing_factor", "Factor", 15, 1, 15 );
  896. local FAKELAG_SMART_MODE_MOVING = gui.Combobox( before_autobuy_group2, "lua_fakelag_moving", "While Moving", "Off", "Factor", "Switch", "Adaptive", "Random", "Peek", "Rapid Peek" );
  897. local FAKELAG_SMART_MODE_MOVING_FACTOR = gui.Slider( before_autobuy_group2, "lua_fakelag_moving_factor", "Factor", 15, 1, 15 );
  898. local FAKELAG_SMART_MODE_INAIR = gui.Combobox( before_autobuy_group2, "lua_fakelag_inair", "While In Air", "Off", "Factor", "Switch", "Adaptive", "Random", "Peek", "Rapid Peek" );
  899. local FAKELAG_SMART_MODE_INAIR_FACTOR = gui.Slider( before_autobuy_group2, "lua_fakelag_inair_factor", "Factor", 15, 1, 15 );
  900.  
  901. local Ping = 0
  902.  
  903. local function FakelagExtra( Event )
  904.  
  905. if FAKELAG_EXTRA:GetValue() then
  906.  
  907. if ( Event:GetName() ~= "item_equip" ) then
  908. return;
  909. end
  910.  
  911. local ME = client.GetLocalPlayerIndex();
  912. local INT_UID = Event:GetInt( "userid" );
  913. local PlayerIndex = client.GetPlayerIndexByUserID( INT_UID );
  914.  
  915. local WepType = Event:GetInt( "weptype" );
  916. local ITEM = Event:GetString( "item" );
  917.  
  918. if ME == PlayerIndex then
  919. if WepType == 0 then
  920. Knife = true
  921. else
  922. Knife = false
  923. end
  924. if WepType == 1 then
  925. Pistol = true
  926. else
  927. Pistol = false
  928. end
  929. if WepType == 8 then
  930. Taser = true
  931. else
  932. Taser = false
  933. end
  934. if WepType == 9 then
  935. Grenade = true
  936. else
  937. Grenade = false
  938. end
  939. if ITEM == "deagle" then
  940. Revolver = true
  941. else
  942. Revolver = false
  943. end
  944. end
  945.  
  946. if ( FAKELAG_ON_KNIFE:GetValue() and Knife ) or -- On Knife
  947. ( FAKELAG_ON_TASER:GetValue() and Taser ) or -- On Taser
  948. ( FAKELAG_ON_GRENADE:GetValue() and Grenade ) or -- On Grenade
  949. ( FAKELAG_ON_PISTOL:GetValue() and Pistol ) or -- On Pistol
  950. ( FAKELAG_ON_REVOLVER:GetValue() and Revolver ) then -- On Revolver
  951. SetValue( "msc_fakelag_enable", 0 );
  952. else
  953. SetValue( "msc_fakelag_enable", 1 );
  954. end
  955.  
  956. end
  957.  
  958. end
  959.  
  960. local function FakelagOnPing()
  961.  
  962. if FAKELAG_EXTRA:GetValue() then
  963. if FAKELAG_ON_PING:GetValue() then
  964.  
  965. if entities.GetPlayerResources() ~= nil then
  966. Ping = entities.GetPlayerResources():GetPropInt( "m_iPing", client.GetLocalPlayerIndex() );
  967. end
  968. FakelagOnPingAmount = math.floor( FAKELAG_ON_PING_AMOUNT:GetValue() )
  969.  
  970. if Ping >= FakelagOnPingAmount then
  971. SetValue( "msc_fakelag_enable", 0 );
  972. else
  973. SetValue( "msc_fakelag_enable", 1 );
  974. end
  975.  
  976. end
  977. end
  978.  
  979. end
  980.  
  981. local function FakelagSmartMode()
  982.  
  983. if FAKELAG_SMART_MODE:GetValue() then
  984.  
  985. local FAKELAG_STANDING = FAKELAG_SMART_MODE_STANDING:GetValue();
  986. local FAKELAG_MOVING = FAKELAG_SMART_MODE_MOVING:GetValue();
  987. local FAKELAG_INAIR = FAKELAG_SMART_MODE_INAIR:GetValue();
  988.  
  989. local FAKELAG_STANDING_FACTOR = math.floor( FAKELAG_SMART_MODE_STANDING_FACTOR:GetValue() )
  990. local FAKELAG_MOVING_FACTOR = math.floor( FAKELAG_SMART_MODE_MOVING_FACTOR:GetValue() )
  991. local FAKELAG_INAIR_FACTOR = math.floor( FAKELAG_SMART_MODE_INAIR_FACTOR:GetValue() )
  992.  
  993. if entities.GetLocalPlayer() ~= nil then
  994.  
  995. local LocalPlayerEntity = entities.GetLocalPlayer();
  996. local fFlags = LocalPlayerEntity:GetProp( "m_fFlags" );
  997.  
  998. local VelocityX = LocalPlayerEntity:GetPropFloat( "localdata", "m_vecVelocity[0]" );
  999. local VelocityY = LocalPlayerEntity:GetPropFloat( "localdata", "m_vecVelocity[1]" );
  1000.  
  1001. local Velocity = math.sqrt( VelocityX^2 + VelocityY^2 );
  1002.  
  1003. -- Standing
  1004. if ( Velocity == 0 and fFlags == 257 ) then
  1005. Standing = true
  1006. else
  1007. Standing = false
  1008. end
  1009.  
  1010. -- Moving
  1011. if ( Velocity > 0 and fFlags == 257 ) then
  1012. Moving = true
  1013. else
  1014. Moving = false
  1015. end
  1016.  
  1017. -- In Air
  1018. if fFlags == 256 then
  1019. InAir = true
  1020. else
  1021. InAir = false
  1022. end
  1023. end
  1024.  
  1025. if Standing then
  1026. if FAKELAG_STANDING == 0 or
  1027. ( FAKELAG_ON_KNIFE:GetValue() and Knife ) or
  1028. ( FAKELAG_ON_TASER:GetValue() and Taser ) or
  1029. ( FAKELAG_ON_GRENADE:GetValue() and Grenade ) or
  1030. ( FAKELAG_ON_PISTOL:GetValue() and Pistol ) or
  1031. ( FAKELAG_ON_REVOLVER:GetValue() and Revolver ) or
  1032. ( FAKELAG_ON_PING:GetValue() and Ping >= FakelagOnPingAmount ) then
  1033. SetValue( "msc_fakelag_enable", 0 );
  1034. else
  1035. SetValue( "msc_fakelag_enable", 1 );
  1036. end
  1037.  
  1038. if FAKELAG_STANDING == 1 then
  1039. STANDING_MODE = 0
  1040. elseif FAKELAG_STANDING == 2 then
  1041. STANDING_MODE = 1
  1042. elseif FAKELAG_STANDING == 3 then
  1043. STANDING_MODE = 2
  1044. elseif FAKELAG_STANDING == 4 then
  1045. STANDING_MODE = 3
  1046. elseif FAKELAG_STANDING == 5 then
  1047. STANDING_MODE = 5
  1048. end
  1049.  
  1050. SetValue( "msc_fakelag_mode", STANDING_MODE );
  1051. end
  1052.  
  1053. if Moving then
  1054. if FAKELAG_MOVING == 0 or
  1055. ( FAKELAG_ON_KNIFE:GetValue() and Knife ) or
  1056. ( FAKELAG_ON_TASER:GetValue() and Taser ) or
  1057. ( FAKELAG_ON_GRENADE:GetValue() and Grenade ) or
  1058. ( FAKELAG_ON_PISTOL:GetValue() and Pistol ) or
  1059. ( FAKELAG_ON_REVOLVER:GetValue() and Revolver ) or
  1060. ( FAKELAG_ON_PING:GetValue() and Ping >= FakelagOnPingAmount ) then
  1061. SetValue( "msc_fakelag_enable", 0 );
  1062. else
  1063. SetValue( "msc_fakelag_enable", 1 );
  1064. end
  1065.  
  1066. if FAKELAG_MOVING == 1 then
  1067. MOVING_MODE = 0
  1068. elseif FAKELAG_MOVING == 2 then
  1069. MOVING_MODE = 1
  1070. elseif FAKELAG_MOVING == 3 then
  1071. MOVING_MODE = 2
  1072. elseif FAKELAG_MOVING == 4 then
  1073. MOVING_MODE = 3
  1074. elseif FAKELAG_MOVING == 5 then
  1075. MOVING_MODE = 4
  1076. elseif FAKELAG_MOVING == 6 then
  1077. MOVING_MODE = 5
  1078. end
  1079.  
  1080. SetValue( "msc_fakelag_mode", MOVING_MODE );
  1081. end
  1082.  
  1083. if InAir then
  1084. if FAKELAG_INAIR == 0 or
  1085. ( FAKELAG_ON_KNIFE:GetValue() and Knife ) or
  1086. ( FAKELAG_ON_TASER:GetValue() and Taser ) or
  1087. ( FAKELAG_ON_GRENADE:GetValue() and Grenade ) or
  1088. ( FAKELAG_ON_PISTOL:GetValue() and Pistol ) or
  1089. ( FAKELAG_ON_REVOLVER:GetValue() and Revolver ) or
  1090. ( FAKELAG_ON_PING:GetValue() and Ping >= FakelagOnPingAmount ) then
  1091. SetValue( "msc_fakelag_enable", 0 );
  1092. else
  1093. SetValue( "msc_fakelag_enable", 1 );
  1094. end
  1095.  
  1096. if FAKELAG_INAIR == 1 then
  1097. INAIR_MODE = 0
  1098. elseif FAKELAG_INAIR == 2 then
  1099. INAIR_MODE = 1
  1100. elseif FAKELAG_INAIR == 3 then
  1101. INAIR_MODE = 2
  1102. elseif FAKELAG_INAIR == 4 then
  1103. INAIR_MODE = 3
  1104. elseif FAKELAG_INAIR == 5 then
  1105. INAIR_MODE = 4
  1106. elseif FAKELAG_INAIR == 6 then
  1107. INAIR_MODE = 6
  1108. end
  1109.  
  1110. SetValue( "msc_fakelag_mode", INAIR_MODE );
  1111. end
  1112.  
  1113. if FAKELAG_SMART_MODE_FACTOR:GetValue() then
  1114.  
  1115. if Standing then
  1116. SetValue( "msc_fakelag_value", FAKELAG_STANDING_FACTOR );
  1117. end
  1118.  
  1119. if Moving then
  1120. SetValue( "msc_fakelag_value", FAKELAG_MOVING_FACTOR );
  1121. end
  1122.  
  1123. if InAir then
  1124. SetValue( "msc_fakelag_value", FAKELAG_INAIR_FACTOR );
  1125. end
  1126.  
  1127. end
  1128.  
  1129. end
  1130. end
  1131.  
  1132. client.AllowListener( "item_equip" )
  1133. callbacks.Register( "FireGameEvent", "Extra Fakelag Options", FakelagExtra )
  1134. callbacks.Register( "Draw", "Fakelag On Ping", FakelagOnPing )
  1135. callbacks.Register( "Draw", "Fakelag Smart Mode", FakelagSmartMode )
  1136.  
  1137.  
  1138.  
  1139.  
  1140.  
  1141. local GetValue = gui.GetValue;
  1142.  
  1143.  
  1144. local UserViewFov = GetValue( "vis_view_fov" );
  1145. local ZooomFov = gui.Checkbox( before_fake_lag_extra, "lua_zoom_fov", "Zoom fov", 0 );
  1146. local function ZoomFOV()
  1147.  
  1148. if ZooomFov:GetValue()then
  1149. if ( UserViewFov > 0 ) then
  1150.  
  1151. if entities.GetLocalPlayer() ~= nil then
  1152.  
  1153. local LocalPlayer = entities.GetLocalPlayer();
  1154. local isScoped = LocalPlayer:GetProp( "m_bIsScoped" );
  1155.  
  1156. if isScoped == 1 or isScoped == 257 then
  1157. SetValue( "vis_view_fov", 0 );
  1158. else
  1159. SetValue( "vis_view_fov", UserViewFov );
  1160. end
  1161.  
  1162. end
  1163.  
  1164. end
  1165. end
  1166. end
  1167.  
  1168. callbacks.Register( "Draw", "ZoomFOV", ZoomFOV);
  1169.  
  1170.  
  1171.  
  1172. local FullbrightCheckbox = gui.Checkbox( before_fake_lag_extra, "lua_fullbright", "Full Bright", 0 );
  1173.  
  1174. local function Fullbright()
  1175.  
  1176. if FullbrightCheckbox:GetValue() then
  1177. client.SetConVar( "mat_fullbright", 1, true )
  1178. else
  1179. client.SetConVar( "mat_fullbright", 0, true )
  1180. end
  1181.  
  1182. end
  1183.  
  1184. callbacks.Register( "Draw", "FullBrightness", Fullbright )
  1185.  
  1186.  
  1187. local Galaxy_Sky = gui.Checkbox( before_fake_lag_extra, "lua_skydescent", "Galaxy Sky", 0 );
  1188. function SkyBox()
  1189. if Galaxy_Sky:GetValue()then
  1190. if (client.GetConVar("sv_skyname") ~= "sky_descent" and gui.GetValue("msc_restrict") ~= 1) then
  1191. client.SetConVar("sv_skyname", "sky_descent")
  1192. end
  1193. end
  1194. end
  1195.  
  1196. callbacks.Register("Draw", "SkyBox", SkyBox)
  1197.  
  1198.  
  1199.  
  1200.  
  1201. local FPS = 0.0
  1202. local fakeWalking = 0
  1203.  
  1204. local gui_set = gui.SetValue;
  1205. local gui_get = gui.GetValue;
  1206. local LeftKey = 0;
  1207. local BackKey = 0;
  1208. local RightKey = 0;
  1209.  
  1210. local colro_lG,color_lB,color_lR,colro_rG,color_rB,color_rR,colro_bG,color_bB,color_bR;
  1211.  
  1212. local check_indicator = gui.Checkbox(before_extra_func, "Enable", "Enable", false)
  1213. local AntiAimleft = gui.Keybox(before_extra_func, "Anti-Aim_left", "Manual AA left", 0);
  1214. local AntiAimRight = gui.Keybox(before_extra_func, "Anti-Aim_Right", "Manual AA Right", 0);
  1215. local AntiAimBack = gui.Keybox(before_extra_func, "Anti-Aim_Back", "Manual AA Back", 0);
  1216.  
  1217. --local rifk7_font = draw.CreateFont("Arial", 15, 700)
  1218. local rifk7_font = draw.CreateFont("Ultra Fresh - Demo", 20, 700)
  1219. local arrow_font = draw.CreateFont("Arial", 30, 1000)
  1220. local normal = draw.CreateFont("Arial")
  1221.  
  1222.  
  1223. local ActiveManualAA = gui.Checkbox(before_extra_func, 'Manual_AA', "Manaul AA", false)
  1224. local ActiveIndicators = gui.Checkbox(before_extra_func, 'Manaul_AA_Indicators', "Manaul AA Indicators", false)
  1225.  
  1226.  
  1227.  
  1228. local function main()
  1229.  
  1230.  
  1231. if AntiAimleft:GetValue() ~= 0 then
  1232. if input.IsButtonPressed(AntiAimleft:GetValue()) then
  1233. LeftKey = LeftKey + 1;
  1234. BackKey = 0;
  1235. RightKey = 0;
  1236. end
  1237. end
  1238. if AntiAimBack:GetValue() ~= 0 then
  1239. if input.IsButtonPressed(AntiAimBack:GetValue()) then
  1240. BackKey = BackKey + 1;
  1241. LeftKey = 0;
  1242. RightKey = 0;
  1243. end
  1244. end
  1245. if AntiAimRight:GetValue() ~= 0 then
  1246. if input.IsButtonPressed(AntiAimRight:GetValue()) then
  1247. RightKey = RightKey + 1;
  1248. LeftKey = 0;
  1249. BackKey = 0;
  1250. end
  1251. end
  1252. end
  1253.  
  1254.  
  1255. function CountCheck()
  1256. if (LeftKey == 1) then
  1257. BackKey = 0;
  1258. RightKey = 0;
  1259. elseif (BackKey == 1) then
  1260. LeftKey = 0;
  1261. RightKey = 0;
  1262. elseif (RightKey == 1) then
  1263. LeftKey = 0;
  1264. BackKey = 0;
  1265. elseif (LeftKey == 2) then
  1266. LeftKey = 0;
  1267. BackKey = 0;
  1268. RightKey = 0;
  1269. elseif (BackKey == 2) then
  1270. LeftKey = 0;
  1271. BackKey = 0;
  1272. RightKey = 0;
  1273. elseif (RightKey == 2) then
  1274. LeftKey = 0;
  1275. BackKey = 0;
  1276. RightKey = 0;
  1277. end
  1278. end
  1279.  
  1280.  
  1281.  
  1282. function SetLeft()
  1283. gui_set("rbot_antiaim_stand_real_add", -90);
  1284. gui_set("rbot_antiaim_move_real_add", -90);
  1285.  
  1286. gui_set("rbot_antiaim_autodir", false);
  1287. end
  1288.  
  1289. function SetBackWard()
  1290. gui_set("rbot_antiaim_stand_real_add", 0);
  1291. gui_set("rbot_antiaim_move_real_add", 0);
  1292.  
  1293. gui_set("rbot_antiaim_autodir", false);
  1294. end
  1295.  
  1296. function SetRight()
  1297. gui_set("rbot_antiaim_stand_real_add", 90);
  1298. gui_set("rbot_antiaim_move_real_add", 90);
  1299.  
  1300. gui_set("rbot_antiaim_autodir", false);
  1301. end
  1302.  
  1303. function SetAuto()
  1304. gui_set("rbot_antiaim_stand_real_add", 0);
  1305. gui_set("rbot_antiaim_move_real_add", 0);
  1306.  
  1307. gui_set("rbot_antiaim_autodir", 1);
  1308. end
  1309.  
  1310.  
  1311.  
  1312. function draw_indicator()
  1313.  
  1314. local active = check_indicator:GetValue()
  1315. local active_ind = ActiveIndicators:GetValue()
  1316. local active_aa = ActiveManualAA:GetValue()
  1317.  
  1318.  
  1319. if active and active_ind and active_aa then
  1320.  
  1321.  
  1322. local w, h = draw.GetScreenSize();
  1323. if (LeftKey == 1) then
  1324. SetLeft();
  1325. a1, a2, a3 = 200, 0, 200
  1326. arrow = "LEFT"
  1327. colro_lG,color_lB,color_lR= 200, 0, 200
  1328. colro_rG,color_rB,color_rR= 255,255,255
  1329. colro_bG,color_bB,color_bR= 255,255,255
  1330. --draw.Color ( 255, 0, 255, 255 )
  1331. -- draw.Text(w / 2 - 100, h / 2 - 14, "<");
  1332. -- draw.TextShadow(w / 2 - 100, h / 2 - 14, "<");
  1333. elseif (BackKey == 1) then
  1334. SetBackWard();
  1335. a1, a2, a3 = 200, 0, 200
  1336. arrow = "BACK"
  1337. colro_lG,color_lB,color_lR= 255,255,255
  1338. colro_rG,color_rB,color_rR= 255,255,255
  1339. colro_bG,color_bB,color_bR= 200, 0, 200
  1340. -- draw.Color ( 255, 0, 255, 255 )
  1341. -- draw.Text(w / 2 - 8, h / 2 - 80, "^");
  1342. -- draw.TextShadow(w / 2 - 8, h / 2 - 80, "^");
  1343. elseif (RightKey == 1) then
  1344. SetRight();
  1345. a1, a2, a3 = 200, 0, 200
  1346. arrow = "RIGHT"
  1347. colro_lG,color_lB,color_lR= 255,255,255
  1348. colro_rG,color_rB,color_rR= 200, 0, 200
  1349. colro_bG,color_bB,color_bR= 255,255,255
  1350. -- draw.Color ( 255, 0, 255, 255 )
  1351. -- draw.Text(w / 2 + 85, h / 2 - 14, ">");
  1352. -- draw.TextShadow(w / 2 + 85, h / 2 - 14, ">");
  1353. elseif ((LeftKey == 0) and (BackKey == 0) and (RightKey == 0)) then
  1354. SetAuto();
  1355. a1, a2, a3 = 17, 200, 20, 255
  1356. colro_lG,color_lB,color_lR= 255,255,255
  1357. colro_rG,color_rB,color_rR= 255,255,255
  1358. colro_bG,color_bB,color_bR= 255,255,255
  1359. arrow = "AUTO"
  1360. end
  1361. draw.SetFont(arrow_font)
  1362. draw.Color (colro_rG,color_rB,color_rR, 255 )
  1363. draw.Text(w / 2 + 100, h / 2 , ">");
  1364. draw.TextShadow(w / 2 + 100, h / 2, ">");
  1365. draw.Color (colro_bG,color_bB,color_bR, 255 )
  1366. draw.Text(w / 2 , h / 2 + 80, "V");
  1367. draw.TextShadow(w / 2, h / 2 + 80, "V");
  1368. draw.Color (colro_lG,color_lB,color_lR, 255 )
  1369. draw.Text(w / 2 - 100, h / 2 , "<");
  1370. draw.TextShadow(w / 2 - 100, h / 2 , "<");
  1371. draw.SetFont(arrow_font)
  1372. TextAdd(arrow, a1, a2, a3, 255)
  1373. end
  1374. end
  1375.  
  1376.  
  1377.  
  1378.  
  1379. local function GameFPS()
  1380. FPS = 0.9 * FPS + (1.0 - 0.9) * globals.AbsoluteFrameTime();
  1381. return math.floor((1.0 / FPS) + 0.5);
  1382. end
  1383.  
  1384.  
  1385. local function fakewalk_key_finder()
  1386.  
  1387. local Entity = entities.GetLocalPlayer();
  1388. local Alive = false
  1389. local checkrage = gui.GetValue("rbot_active")
  1390. local rageaa = gui.GetValue("rbot_antiaim_enable")
  1391. if Entity ~= nil then
  1392. Alive = Entity:IsAlive();
  1393. end
  1394. local fakewalk_key = gui.GetValue("rbot_antiaim_fakewalk") --getting the value of the key, use https://www.cambiaresearch.com/articles/15/javascript-char-codes-key-codes to find the key you need
  1395. if fakewalk_key ~= 0 and checkrage and rageaa then
  1396. if (Alive == true) then
  1397. -- you have to check if it's 0 cause if it's 0 and you use it for something the script will crash
  1398.  
  1399. if input.IsButtonDown(fakewalk_key) then
  1400. w1, w2, w3 = 17, 200, 20
  1401. else
  1402. w1, w2, w3 = 150, 71, 71
  1403. end
  1404. else
  1405. w1, w2, w3 = 150, 71, 71
  1406. end
  1407. else
  1408. w1, w2, w3 = 150, 71, 71
  1409. end
  1410.  
  1411. return w1, w2, w3
  1412. end
  1413.  
  1414.  
  1415. function DrawPingColor()
  1416.  
  1417. local ping_value = ping_slider:GetValue()
  1418. local fakelag_enable = gui.GetValue("msc_fakelag_enable")
  1419. local ping = 0
  1420.  
  1421. if entities.GetPlayerResources() ~= nil then
  1422. ping = entities.GetPlayerResources():GetPropInt("m_iPing", client.GetLocalPlayerIndex())
  1423. end
  1424.  
  1425. if (fakelatency_enable) then
  1426. fakelatency = math.ceil(fakelatency_value * 1000)
  1427. fakea = 255
  1428. if ping > (fakelatency * 0.75) then
  1429. p, i, n = 126, 183, 50
  1430.  
  1431. elseif ping < (fakelatency * 0.75) and ping > (fakelatency * 0.5) then
  1432. fakea = 255
  1433. p, i, n = 255, 165, 0
  1434. elseif ping < (fakelatency * 0.5) and ping > (fakelatency * 0.25) then
  1435. p, i, n = 255, 69, 0
  1436. elseif ping < (fakelatency * 0.25) then
  1437. p, i, n = 255, 0, 0
  1438. end
  1439. end
  1440.  
  1441. if fakelatency_enable ~= true then
  1442. if ping > ping_value then
  1443. p, i, n = 255, 0, 0
  1444. elseif ping < ping_value * 0.85 and ping > ping_value * 0.75 then
  1445. p, i, n = 255, 165, 0
  1446. elseif ping < ping_value * 0.75 then
  1447. p, i, n = 126, 183, 50
  1448. end
  1449. end
  1450. return p, i, n
  1451. end
  1452.  
  1453. function DrawFPSColor()
  1454.  
  1455. local fps_value = fps_slider:GetValue()
  1456.  
  1457. if GameFPS() > fps_value then
  1458. p1, p2, p3 = 126, 183, 50
  1459. end
  1460.  
  1461. if GameFPS() < fps_value * 0.9 and GameFPS() > (fps_value * 0.8) then
  1462. p1, p2, p3 = 255, 165, 0
  1463. end
  1464.  
  1465. if GameFPS() < (fps_value * 0.8) then
  1466. p1, p2, p3 = 255, 0, 0
  1467. end
  1468.  
  1469. return p1, p2, p3
  1470. end
  1471.  
  1472. local function DrawPING()
  1473.  
  1474. local w, h = draw.GetScreenSize();
  1475. local local_player = entities.GetLocalPlayer();
  1476. local lowerbody = 0
  1477. local velocity = 0
  1478. local FinalVelocity = 0
  1479. local Alive = false
  1480. if local_player ~= nil then
  1481. lowerbody = local_player:GetProp('m_flLowerBodyYawTarget');
  1482. end
  1483. local active = check_indicator:GetValue()
  1484. local Entity = entities.GetLocalPlayer();
  1485. local active_lby = ActiveDisplayLBY:GetValue()
  1486. local active_ping = ActiveDisplayPING:GetValue()
  1487. local active_fps = ActiveDisplayFPS:GetValue()
  1488. local active_fakewalk = ActivateFakeWalkIndicator:GetValue()
  1489. local active_standing = ActivateStandingIndicator:GetValue()
  1490. local active_override = ActivateOverrideIndicator:GetValue()
  1491.  
  1492. local PING = 0
  1493.  
  1494. if Entity ~= nil then
  1495. Alive = Entity:IsAlive();
  1496.  
  1497. local velocityX = Entity:GetPropFloat("localdata", "m_vecVelocity[0]");
  1498. local velocityY = Entity:GetPropFloat("localdata", "m_vecVelocity[1]");
  1499.  
  1500. velocity = math.sqrt(velocityX ^ 2 + velocityY ^ 2);
  1501. FinalVelocity = math.min(9999, velocity) + 0.2;
  1502. end
  1503.  
  1504.  
  1505. if active then
  1506.  
  1507. draw.SetFont(rifk7_font)
  1508.  
  1509. if gui.GetValue("msc_fakelatency_enable") then
  1510. r1, g1, b1 = 17, 200, 20
  1511. else
  1512. r1, g1, b1 = 150, 71, 71
  1513. end
  1514.  
  1515.  
  1516.  
  1517.  
  1518. p1, p2, p3 = DrawPingColor();
  1519.  
  1520. if entities.GetPlayerResources() ~= nil then
  1521. PING = entities.GetPlayerResources():GetPropInt("m_iPing", client.GetLocalPlayerIndex())
  1522. end
  1523.  
  1524. if active_ping then
  1525. TextAdd("PING " .. PING, p1, p2, p3, 255)
  1526. end
  1527.  
  1528. -- if gui.GetValue("msc_fakelatency_enable") then
  1529. -- draw.Color(17, 200, 20, 255);
  1530. -- else
  1531. -- draw.Color(150, 71, 71, 255);
  1532. -- end
  1533.  
  1534. local fakelag = gui.GetValue("msc_fakelag_value");
  1535. if Entity ~= nil then
  1536. local alive = Entity:IsAlive();
  1537. local health = Entity:GetHealth();
  1538. if (alive == true and health > 0) then
  1539. if fakelag> math.max(5,7) then
  1540.  
  1541. r, g, b =71, 255, 71
  1542. else
  1543. r, g, b =255, 71, 71
  1544. end
  1545. end
  1546. TextAdd("LC ", r, g, b, 255)
  1547. end
  1548. end
  1549.  
  1550.  
  1551. if active_fps then
  1552. p, i, n = DrawFPSColor()
  1553. TextAdd("FPS " .. GameFPS(), p, i, n, 255)
  1554. end
  1555.  
  1556. if active_fakewalk then
  1557. w1, w2, w3 = fakewalk_key_finder()
  1558. TextAdd("FAKEWALK ", w1, w2, w3, 255)
  1559. end
  1560.  
  1561. if entities.GetLocalPlayer() ~= nil then
  1562.  
  1563. draw.Color(255, 255, 255, 255);
  1564.  
  1565. if (Alive) then
  1566. if (math.floor(FinalVelocity) > 0) then
  1567. v1, v2, v3, v4 = 150, 71, 71, 255
  1568. else
  1569. v1, v2, v3, v4 = 17, 200, 20, 255
  1570. end
  1571. else
  1572. v1, v2, v3, v4 = 150, 71, 71, 255
  1573. end
  1574. end
  1575.  
  1576. if active_standing and Alive then
  1577. TextAdd("LBY", v1, v2, v3, v4)
  1578. end
  1579. local override_key = gui.GetValue("rbot_resolver_override")
  1580.  
  1581. if override_key ~= 0 then
  1582.  
  1583. if input.IsButtonDown(override_key) then
  1584. do1, o2, o3 = 17, 200, 20
  1585. else
  1586. o1, o2, o3 = 150, 71, 71
  1587. end
  1588. else
  1589. o1, o2, o3 = 150, 71, 71
  1590. end
  1591. if active_override then
  1592. TextAdd("OVERRIDE ", o1, o2, o3, 255)
  1593. end
  1594. TextDrawing()
  1595. end
  1596.  
  1597.  
  1598. local text_tabl = { {} };
  1599.  
  1600.  
  1601. function TextAdd(text, r, g, b, a)
  1602. text_tabl[#text_tabl + 1] = { text, r, g, b, a };
  1603. end
  1604.  
  1605. function TextDrawing()
  1606.  
  1607. local a_gap = active_gap:GetValue()
  1608. local a_x = active_x:GetValue()
  1609. local a_y = active_y:GetValue()
  1610. local posh = 45
  1611. local posw = 30
  1612. local gap = 15
  1613. local shadow = shadowcheck:GetValue()
  1614. if a_y then
  1615. posh = (high_slider:GetValue())
  1616. end
  1617. if a_x then
  1618. posw = (wight_slider:GetValue())
  1619. end
  1620. if a_gap then
  1621. gap = dis_slider:GetValue()
  1622. end
  1623.  
  1624. sw, sh = draw.GetScreenSize();
  1625. draw.SetFont(normal);
  1626. --draw.Text(sw/sw+10,sh/sh+10,"rifk v0.8 by dummy and dat is klar")
  1627. top_text = sh - (gap * #text_tabl) - posh;
  1628. for i = 1, #text_tabl do
  1629. draw.SetFont(rifk7_font);
  1630. draw.Color(text_tabl[i][2], text_tabl[i][3], text_tabl[i][4], text_tabl[i][5])
  1631. draw.Text(posw, top_text + gap * i, text_tabl[i][1]);
  1632. if shadow then
  1633. draw.TextShadow(posw, top_text + gap * i, text_tabl[i][1])
  1634. end
  1635. draw.SetFont(normal);
  1636. end;
  1637. text_tabl = {}
  1638. end
  1639.  
  1640.  
  1641. callbacks.Register("Draw", "main", main);
  1642. callbacks.Register("Draw", "CountCheck", CountCheck);
  1643. callbacks.Register("Draw", "SetLeft", SetLeft);
  1644. callbacks.Register("Draw", "SetBackWard", SetBackWard);
  1645. callbacks.Register("Draw", "SetRight", SetRight);
  1646. callbacks.Register("Draw", "SetAuto", SetAuto);
  1647. callbacks.Register("Draw", "draw_indicator", draw_indicator);
  1648. callbacks.Register("Draw", "DrawPING", DrawPING)
  1649.  
  1650.  
  1651.  
  1652.  
  1653.  
  1654. ---------------------- Info bar
  1655. local frame_rate = 0.0
  1656. --local rifk7_font = draw.CreateFont("Arial", 15, 700)
  1657. local rifk7_font = draw.CreateFont("Ultra Fresh - Demo", 20, 200)
  1658. local arrow_font = draw.CreateFont("Ultra Fresh - Demo", 18, 750)
  1659. local normal = draw.CreateFont("Arial")
  1660. local get_abs_fps = function()
  1661. frame_rate = 0.9 * frame_rate + (1.0 - 0.9) * globals.AbsoluteFrameTime()
  1662. return math.floor((1.0 / frame_rate) + 0.5)
  1663. end
  1664. local function setMath(int, max, declspec)
  1665. local int = (int > max and max or int)
  1666.  
  1667. local tmp = max / int;
  1668. local i = (declspec / tmp)
  1669. i = (i >= 0 and math.floor(i + 0.5) or math.ceil(i - 0.5))
  1670.  
  1671. return i
  1672. end
  1673. function gradient(x1, y1, x2, y2, left)
  1674. local w = x2 - x1
  1675. local h = y2 - y1
  1676.  
  1677. for i = 0, w do
  1678. local a = (i / w) * 200
  1679.  
  1680. draw.Color(0, 0, 0, a)
  1681. if left then
  1682. draw.FilledRect(x1 + i, y1, x1 + i + 1, y1 + h)
  1683. else
  1684. draw.FilledRect(x1 + w - i, y1, x1 + w - i + 1, y1 + h)
  1685. end
  1686. end
  1687. end
  1688. local function getColor(number, max)
  1689. local r, g, b
  1690. i = setMath(number, max, 9)
  1691.  
  1692. if i <= 1 then r, g, b = 255, 0, 0
  1693. elseif i == 2 then r, g, b = 237, 27, 3
  1694. elseif i == 3 then r, g, b = 235, 63, 6
  1695. elseif i == 4 then r, g, b = 229, 104, 8
  1696. elseif i == 5 then r, g, b = 228, 126, 10
  1697. elseif i == 6 then r, g, b = 220, 169, 16
  1698. elseif i == 7 then r, g, b = 213, 201, 19
  1699. elseif i == 8 then r, g, b = 176, 205, 10
  1700. elseif i == 9 then r, g, b = 124, 195, 13
  1701. end
  1702.  
  1703. return r, g, b
  1704. end
  1705. local speed =0
  1706.  
  1707. local info_bur = gui.Checkbox(before_fake_lag_extra, "lua_info_bur", "Info bar", false)
  1708. function paint_traverse()
  1709. draw.SetFont(arrow_font)
  1710. local x, y = draw.GetScreenSize()
  1711. local centerX = x / 2
  1712. local latency=0;
  1713. if entities.FindByClass( "CBasePlayer" )[1] ~= nil then
  1714. latency=entities.GetPlayerResources():GetPropInt( "m_iPing", client.GetLocalPlayerIndex() )
  1715. end;
  1716. local rw,rh
  1717.  
  1718. if info_bur:GetValue() then
  1719. gradient(centerX - 200, y - 30, centerX - 51, y, 0, true)
  1720. gradient(centerX - 200, y - 30, centerX - 51, y - 29, true)
  1721. draw.Color(0, 0, 0, 200)
  1722. draw.FilledRect(centerX - 50, y - 30, centerX + 70, y)
  1723. draw.Color(0, 0, 0, 255)
  1724. draw.FilledRect(centerX - 50, y - 30, centerX + 70, y - 29)
  1725. gradient(centerX + 70, y - 30, centerX + 200, y, false)
  1726. gradient(centerX + 70, y - 30, centerX + 200, y - 29, false)
  1727. local r, g, b = getColor(get_abs_fps(), 100)
  1728. draw.Color(r, g, b, 255)
  1729. rw,rh =draw.GetTextSize(get_abs_fps())
  1730. draw.Text(centerX - 1 -(rw/2), y - 20, get_abs_fps())
  1731. draw.Text(centerX + 1+ (rw/2), y - 20, "fps")
  1732. r,g,b=getColor(latency,700)
  1733. draw.Color(r, g, b, 255)
  1734. rw,rh =draw.GetTextSize(latency)
  1735. draw.Text(centerX - 80-(rw/2), y - 20, latency)
  1736. draw.Text(centerX - 78+(rw/2), y - 20, "ping")
  1737. draw.Color(255, 255, 255, 255)
  1738. if entities.GetLocalPlayer() ~= nil then
  1739.  
  1740. local Entity = entities.GetLocalPlayer();
  1741. local Alive = Entity:IsAlive();
  1742. local velocityX = Entity:GetPropFloat( "localdata", "m_vecVelocity[0]" );
  1743. local velocityY = Entity:GetPropFloat( "localdata", "m_vecVelocity[1]" );
  1744. local velocity = math.sqrt( velocityX^2 + velocityY^2 );
  1745. local FinalVelocity = math.min( 9999, velocity ) + 0.2;
  1746. draw.Color( 255, 255, 255, 255 );
  1747. if ( Alive == true ) then
  1748. speed= math.floor(FinalVelocity) ;
  1749. else
  1750. speed=0;
  1751. end
  1752. end
  1753. rw,rh =draw.GetTextSize(speed)
  1754. draw.Text(centerX + 73-(rw/2), y - 20, speed)
  1755. draw.Text(centerX + 75+(rw/2), y - 20, "speed")
  1756.  
  1757. end
  1758. end
  1759.  
  1760. callbacks.Register("Draw", "paint_traverse", paint_traverse)
  1761.  
  1762.  
  1763.  
  1764. local knife_right_hand = gui.Checkbox(before_fake_lag_extra, "lua_knife_right_hand", "Knife right hand", false)
  1765. function on_knife_righthand(Event)
  1766. if (Event:GetName() ~= 'item_equip') then
  1767. return;
  1768. end
  1769. if knife_right_hand:GetValue()then
  1770. if (client.GetLocalPlayerIndex() == client.GetPlayerIndexByUserID(Event:GetInt('userid'))) then
  1771. if Event:GetString('item') == "knife" then
  1772. client.Command( "cl_righthand 0", true );
  1773. else
  1774. client.Command( "cl_righthand 1", true );
  1775. end
  1776. end
  1777. end
  1778. end
  1779.  
  1780. client.AllowListener('item_equip');
  1781. callbacks.Register("FireGameEvent", "on_knife_righthand", on_knife_righthand);
  1782.  
  1783.  
  1784. local OwnCrosshair = gui.Checkbox(before_fake_lag_extra, "vis_sniper_own_crosshair", "Engine Crosshair", false)
  1785. local drawCrosshair = false;
  1786. function on_sniper(Event)
  1787. if (Event:GetName() ~= 'item_equip') then return; end
  1788. if (client.GetLocalPlayerIndex() == client.GetPlayerIndexByUserID(Event:GetInt('userid'))) then
  1789. if Event:GetString('item') == "awp" or Event:GetString('item') == "ssg08" or Event:GetString('item') == "scar20" or Event:GetString('item') == "g3sg1" then drawCrosshair = true;
  1790. elseif Event:GetString('item') ~= "awp" and Event:GetString('item') ~= "ssg08" and Event:GetString('item') ~= "scar20" and Event:GetString('item') ~= "g3sg1" then drawCrosshair = false; return; end end end
  1791.  
  1792. function ifCrosshair()
  1793. if not OwnCrosshair:GetValue() then client.GetConVar("weapon_debug_spread_show", 0, true); end
  1794. local screenCenterX, screenY = draw.GetScreenSize(); scX = screenCenterX / 2; scY = screenY / 2;
  1795. if drawCrosshair == true and s_cross:GetValue() and not OwnCrosshair:GetValue() then gui.SetValue('esp_crosshair', false); client.GetConVar("weapon_debug_spread_show", 0, true); draw_Color(255,255,255,255);
  1796. draw_Line(scX, scY - 8, scX, scY + 8); --line down
  1797. draw_Line(scX - 8, scY, scX + 8, scY); --line across
  1798. elseif drawCrosshair == true and not s_cross:GetValue() and OwnCrosshair:GetValue() then
  1799. client.GetConVar("weapon_debug_spread_show", 3, true);
  1800. elseif drawCrosshair == false then return; end end
  1801.  
  1802. callbacks.Register("FireGameEvent", "on_sniper", on_sniper);
  1803. callbacks.Register("Draw", "ifCrosshair", ifCrosshair)
  1804.  
  1805.  
  1806.  
  1807.  
  1808.  
  1809.  
  1810. local AWMetallicHitsound = gui.Checkbox( befor_Cheaking, "lua_metallichitsound", "Metallic Hitsound", 0 );
  1811.  
  1812. local function MetallicHitsound( Event )
  1813.  
  1814. if AWMetallicHitsound:GetValue() then
  1815.  
  1816. if gui.GetValue( "msc_hitmarker_enable" ) then
  1817. gui.SetValue( "msc_hitmarker_volume", 0 );
  1818. end
  1819.  
  1820. if ( Event:GetName() == "player_hurt" ) then
  1821.  
  1822. local ME = client.GetLocalPlayerIndex();
  1823.  
  1824. local INT_UID = Event:GetInt( "userid" );
  1825. local INT_ATTACKER = Event:GetInt( "attacker" );
  1826.  
  1827. local NAME_Victim = client.GetPlayerNameByUserID( INT_UID );
  1828. local INDEX_Victim = client.GetPlayerIndexByUserID( INT_UID );
  1829.  
  1830. local NAME_Attacker = client.GetPlayerNameByUserID( INT_ATTACKER );
  1831. local INDEX_Attacker = client.GetPlayerIndexByUserID( INT_ATTACKER );
  1832.  
  1833. if ( INDEX_Attacker == ME and INDEX_Victim ~= ME ) then
  1834. client.Command( "play buttons\\arena_switch_press_02.wav", true );
  1835. end
  1836.  
  1837. end
  1838.  
  1839. end
  1840.  
  1841. end
  1842.  
  1843. client.AllowListener( "player_hurt" );
  1844.  
  1845. callbacks.Register( "FireGameEvent", "Metallic Hitsound", MetallicHitsound)
  1846.  
  1847.  
  1848. local rainbow_menu = gui.Checkbox( befor_Cheaking, "lua_rainbow_menu", "Rainbow menu", 0 );
  1849. function rainbowmenu()
  1850. if rainbow_menu:GetValue()then
  1851. local speed = 3
  1852. local r = math.floor(math.sin(globals.RealTime() * speed) * 127 + 128)
  1853. local g = math.floor(math.sin(globals.RealTime() * speed + 2) * 127 + 128)
  1854. local b = math.floor(math.sin(globals.RealTime() * speed + 4) * 127 + 128)
  1855. local a = 255
  1856.  
  1857. for k,v in pairs({ "clr_gui_window_logo1",
  1858. "clr_gui_window_footer_text",
  1859. "clr_gui_checkbox_on",
  1860. "clr_gui_checkbox_on_hover",
  1861. "clr_gui_tablist4",
  1862. "clr_gui_tablist1",
  1863. "clr_gui_slider_button",
  1864. "clr_gui_window_header_tab2"}) do
  1865.  
  1866. gui.SetValue(v, r,g,b,a)
  1867.  
  1868. end
  1869. end
  1870. end
  1871. callbacks.Register( "Draw", "rainbowmenu", rainbowmenu);
  1872.  
  1873.  
  1874.  
  1875. frequency = 0.5 -- range: [0, oo) | lower is slower
  1876. intensity = 255 -- range: [0, 255] | lower is darker
  1877. saturation = 1 -- range: [0.00, 1.00] | lower is less saturated
  1878.  
  1879. function hsvToR(h, s, v)
  1880. local r, g, b
  1881.  
  1882. local i = math.floor(h * 6);
  1883. local f = h * 6 - i;
  1884. local p = v * (1 - s);
  1885. local q = v * (1 - f * s);
  1886. local t = v * (1 - (1 - f) * s);
  1887.  
  1888. i = i % 6
  1889.  
  1890. if i == 0 then r, g, b = v, t, p
  1891. elseif i == 1 then r, g, b = q, v, p
  1892. elseif i == 2 then r, g, b = p, v, t
  1893. elseif i == 3 then r, g, b = p, q, v
  1894. elseif i == 4 then r, g, b = t, p, v
  1895. elseif i == 5 then r, g, b = v, p, q
  1896. end
  1897.  
  1898. return r * intensity
  1899. end
  1900.  
  1901. function hsvToG(h, s, v)
  1902. local r, g, b
  1903.  
  1904. local i = math.floor(h * 6);
  1905. local f = h * 6 - i;
  1906. local p = v * (1 - s);
  1907. local q = v * (1 - f * s);
  1908. local t = v * (1 - (1 - f) * s);
  1909.  
  1910. i = i % 6
  1911.  
  1912. if i == 0 then r, g, b = v, t, p
  1913. elseif i == 1 then r, g, b = q, v, p
  1914. elseif i == 2 then r, g, b = p, v, t
  1915. elseif i == 3 then r, g, b = p, q, v
  1916. elseif i == 4 then r, g, b = t, p, v
  1917. elseif i == 5 then r, g, b = v, p, q
  1918. end
  1919.  
  1920. return g * intensity
  1921. end
  1922.  
  1923. function hsvToB(h, s, v)
  1924. local r, g, b
  1925.  
  1926. local i = math.floor(h * 6);
  1927. local f = h * 6 - i;
  1928. local p = v * (1 - s);
  1929. local q = v * (1 - f * s);
  1930. local t = v * (1 - (1 - f) * s);
  1931.  
  1932. i = i % 6
  1933.  
  1934. if i == 0 then r, g, b = v, t, p
  1935. elseif i == 1 then r, g, b = q, v, p
  1936. elseif i == 2 then r, g, b = p, v, t
  1937. elseif i == 3 then r, g, b = p, q, v
  1938. elseif i == 4 then r, g, b = t, p, v
  1939. elseif i == 5 then r, g, b = v, p, q
  1940. end
  1941.  
  1942. return b * intensity
  1943. end
  1944. local rainbow_esp = gui.Checkbox( befor_Cheaking, "lua_rainbow_esp", "Rainbow esp", 0 );
  1945. function rainbowesp()
  1946. if rainbow_esp:GetValue()then
  1947. local R = hsvToR((globals.RealTime() * frequency) % 1, saturation, 1)
  1948. local G = hsvToG((globals.RealTime() * frequency) % 1, saturation, 1)
  1949. local B = hsvToB((globals.RealTime() * frequency) % 1, saturation, 1)
  1950. gui.SetValue( "clr_chams_ct_invis", math.floor(R), math.floor(G), math.floor(B), 255)
  1951. gui.SetValue( "clr_chams_ct_vis", math.floor(R), math.floor(G), math.floor(B), 255)
  1952. gui.SetValue( "clr_chams_weapon_primary", math.floor(R), math.floor(G), math.floor(B), 255)
  1953. gui.SetValue( "clr_chams_weapon_secondary", math.floor(R), math.floor(G), math.floor(B), 255)
  1954. gui.SetValue( "clr_esp_bar_ammo1", math.floor(R), math.floor(G), math.floor(B), 255)
  1955. gui.SetValue( "clr_esp_bar_ammo2", math.floor(R), math.floor(G), math.floor(B), 255)
  1956. gui.SetValue( "clr_esp_bar_armor1", math.floor(R), math.floor(G), math.floor(B), 255)
  1957. gui.SetValue( "clr_esp_bar_armor2", math.floor(R), math.floor(G), math.floor(B), 255)
  1958. gui.SetValue( "clr_esp_bar_health1", math.floor(R), math.floor(G), math.floor(B), 255)
  1959. gui.SetValue( "clr_esp_bar_health2", math.floor(R), math.floor(G), math.floor(B), 255)
  1960. gui.SetValue( "clr_esp_bar_lbytimer1", math.floor(R), math.floor(G), math.floor(B), 255)
  1961. gui.SetValue( "clr_esp_bar_lbytimer2", math.floor(R), math.floor(G), math.floor(B), 255)
  1962. gui.SetValue( "clr_esp_box_ct_invis", math.floor(R), math.floor(G), math.floor(B), 255)
  1963. gui.SetValue( "clr_chams_hands_primary", math.floor(R), math.floor(G), math.floor(B), 255)
  1964. gui.SetValue( "clr_chams_hands_secondary", math.floor(R), math.floor(G), math.floor(B), 255)
  1965. gui.SetValue( "clr_chams_historyticks", math.floor(R), math.floor(G), math.floor(B), 255)
  1966. gui.SetValue( "clr_chams_other_invis", math.floor(R), math.floor(G), math.floor(B), 255)
  1967. gui.SetValue( "clr_chams_other_vis", math.floor(R), math.floor(G), math.floor(B), 255)
  1968. gui.SetValue( "clr_chams_t_invis", math.floor(R), math.floor(G), math.floor(B), 255)
  1969. gui.SetValue( "clr_chams_t_vis", math.floor(R), math.floor(G), math.floor(B), 255)
  1970. gui.SetValue( "clr_esp_box_ct_vis", math.floor(R), math.floor(G), math.floor(B), 255)
  1971. gui.SetValue( "clr_esp_box_other_invis", math.floor(R), math.floor(G), math.floor(B), 255)
  1972. gui.SetValue( "clr_esp_box_other_vis", math.floor(R), math.floor(G), math.floor(B), 255)
  1973. gui.SetValue( "clr_esp_box_t_invis", math.floor(R), math.floor(G), math.floor(B), 255)
  1974. gui.SetValue( "clr_esp_box_t_vis", math.floor(R), math.floor(G), math.floor(B), 255)
  1975. gui.SetValue( "clr_esp_outofview", math.floor(R), math.floor(G), math.floor(B), 255)
  1976. gui.SetValue( "clr_esp_crosshair", math.floor(R), math.floor(G), math.floor(B), 255)
  1977. gui.SetValue( "clr_esp_crosshair_recoil", math.floor(R), math.floor(G), math.floor(B), 255)
  1978. gui.SetValue( "clr_misc_hitmarker", math.floor(R), math.floor(G), math.floor(B), 255)
  1979. end
  1980. end
  1981. callbacks.Register( "Draw", "rainbowesp", rainbowesp);
  1982.  
  1983.  
  1984.  
  1985.  
  1986.  
  1987.  
  1988.  
  1989. local smoke_grenade_enable = gui.Checkbox( befor_Cheaking, "lua_smoke_grenade_enable", "Smokegrenade timer", 0 );
  1990. local entity_get = entities.FindByClass
  1991. local tickcount = globals.TickCount
  1992. local tickinterval = globals.TickInterval
  1993. local w2s = client.WorldToScreen
  1994. local duration = 18
  1995.  
  1996. local function SmokeTimer()
  1997.  
  1998. local smoke_grenades = entity_get("CSmokeGrenadeProjectile")
  1999. local tick_current = tickcount()
  2000. local seconds_per_tick = tickinterval()
  2001.  
  2002. for i=1, #smoke_grenades do
  2003. local smoke_grenade = smoke_grenades[i]
  2004.  
  2005. if smoke_grenade:GetProp("m_bDidSmokeEffect") then
  2006. local ticks = smoke_grenade:GetProp("m_nSmokeEffectTickBegin")
  2007. local time_since_explosion = seconds_per_tick * (tick_current - ticks)
  2008. if time_since_explosion > 0 and time_since_explosion < duration +1 then
  2009. local x, y, z = smoke_grenade:GetProp("m_vecOrigin")
  2010. local worldX, worldY = w2s(x, y, z)
  2011. if worldX ~= nil then
  2012. local progress = 1 - time_since_explosion / duration
  2013. if smoke_grenade_enable:GetValue()then
  2014. draw.Color(255,20 + progress * 235,20 + progress * 235,255)
  2015. message = string.format("%.1f s", duration-time_since_explosion)
  2016. draw.TextShadow(worldX, worldY, message)
  2017.  
  2018. end
  2019. end
  2020. end
  2021. end
  2022. end
  2023. end
  2024. callbacks.Register( "Draw", "SmokeTimer", SmokeTimer );
  2025.  
  2026.  
  2027.  
  2028. local killsays = {
  2029. [1] = "The only thing lower than your k/d ratio is your I.Q.",
  2030. [2] = "Your aim is so poor that people held a fundraiser for it",
  2031. [3] = "The only thing more unreliable than you is the condom your dad used.",
  2032. [4] = "Calling you a retard is a compliment in comparison to how stupid you actually are.",
  2033. [5] = "I didnt know dying was a special ability.",
  2034. [6] = "How many tries did it take for you to click the install button?",
  2035. [7] = "If I jumped from your ego to your intelligence, Id die of starvation half-way down.",
  2036. [8] = "When I die I want you to to lower me in my grave so you can let me down one more time.",
  2037. [9] = "I would kill myself to get away from you, but you would probably follow me.",
  2038. [10] = "Studies show that aiming gives you better chances of hitting your target.",
  2039. [11] = "You should let your chair play, at least it knows how to support.",
  2040. [12] = "There are about 37 trillion cells working together in your body right now, and you are disappointing every single one of them",
  2041. [13] = "Id call you a tool, but that would imply you were useful in at least one way.",
  2042. [14] = "Youre the human equivalent of a participation award.",
  2043. [15] = "Id love to see things from your perspective, but I dont think I could shove my head that far up my ass.",
  2044. [16] = "Im not trash talking, Im talking to trash",
  2045. [17] = "Stephen Hawking has better hand-eye coordination than you.",
  2046. [18] = "Legend has it that the number 0 was first invented after scientists calculated your chance of doing something useful.",
  2047. [19] = "Youre the type of player to get 3rd place in a 1v1 match",
  2048. [20] = "Im not saying I hate you, but I would unplug your life support to charge my phone.",
  2049. [21] = "Youre an inspiration for birth control.",
  2050. [51] = "Who set the bots to passive?",
  2051. [52] = "Youre the reason abortion was legalized",
  2052.  
  2053. }
  2054. local CHAT_KillSay_enable = gui.Checkbox( befor_Cheaking, "lua_CHAT_KillSay", "Trashtollker uff ya", 0 );
  2055. function CHAT_KillSay( Event )
  2056.  
  2057. if ( Event:GetName() == 'player_death' ) then
  2058.  
  2059. if CHAT_KillSay_enable:GetValue() then
  2060. local ME = client.GetLocalPlayerIndex();
  2061.  
  2062. local INT_UID = Event:GetInt( 'userid' );
  2063. local INT_ATTACKER = Event:GetInt( 'attacker' );
  2064.  
  2065. local NAME_Victim = client.GetPlayerNameByUserID( INT_UID );
  2066. local INDEX_Victim = client.GetPlayerIndexByUserID( INT_UID );
  2067.  
  2068. local NAME_Attacker = client.GetPlayerNameByUserID( INT_ATTACKER );
  2069. local INDEX_Attacker = client.GetPlayerIndexByUserID( INT_ATTACKER );
  2070.  
  2071. if ( INDEX_Attacker == ME and INDEX_Victim ~= ME ) then
  2072.  
  2073. local response = tostring(killsays[math.random(#killsays)]);
  2074. response = response:gsub("_name_", NAME_Victim);
  2075. client.ChatSay( ' ' .. response );
  2076. end
  2077.  
  2078. end
  2079.  
  2080. end
  2081.  
  2082. end
  2083.  
  2084. client.AllowListener( 'player_death' );
  2085.  
  2086. callbacks.Register( 'FireGameEvent', 'AWKS', CHAT_KillSay );
  2087.  
  2088.  
  2089.  
  2090. function gradient(x1, y1, x2, y2, left)
  2091. local w = x2 - x1
  2092. local h = y2 - y1
  2093.  
  2094. for i = 0, w do
  2095. local a = (i / w) * 200
  2096.  
  2097. draw.Color(0, 0, 0, a)
  2098. if left then
  2099. draw.FilledRect(x1 + i, y1, x1 + i + 1, y1 + h)
  2100. else
  2101. draw.FilledRect(x1 + w - i, y1, x1 + w - i + 1, y1 + h)
  2102. end
  2103. end
  2104. end
  2105.  
  2106. --stolen from other thread
  2107. --credits: senator
  2108. local frame_rate = 0.0
  2109. local get_abs_fps = function()
  2110. frame_rate = 0.9 * frame_rate + (1.0 - 0.9) * globals.AbsoluteFrameTime()
  2111. return math.floor((1.0 / frame_rate) + 0.5)
  2112. end
  2113.  
  2114.  
  2115. local kills = 0
  2116. local deaths = 0
  2117.  
  2118. --the gay method from some guy i think you can get the stats
  2119. --thru local player but im just too lazy
  2120. function events(event)
  2121. if event:GetName() == "player_death" then
  2122. local local_player = client.GetLocalPlayerIndex()
  2123. local attacker = client.GetPlayerIndexByUserID(event:GetInt("attacker"))
  2124. local victim = client.GetPlayerIndexByUserID(event:GetInt("userid"))
  2125.  
  2126. if attacker == local_player then
  2127. kills = kills + 1
  2128. end
  2129. if (victim == local_player) then
  2130. deaths = deaths + 1
  2131. end
  2132. end
  2133. end
  2134.  
  2135. local skeet_info_bar = gui.Checkbox( befor_Cheaking, "lua_skeet_info_bar", "Skeet info bar", 0 );
  2136. function paint_traverse()
  2137.  
  2138. if skeet_info_bar:GetValue() then
  2139. local x, y = draw.GetScreenSize()
  2140. local centerX = x / 2
  2141.  
  2142. --the bar idk lol
  2143.  
  2144. --left
  2145. gradient(centerX - 200, y - 20, centerX - 51, y, 0, true)
  2146. gradient(centerX - 200, y - 20, centerX - 51, y - 19, true)
  2147.  
  2148. --middle
  2149. draw.Color(0, 0, 0, 200)
  2150. draw.FilledRect(centerX - 50, y - 20, centerX + 50, y)
  2151.  
  2152. draw.Color(0, 0, 0, 255)
  2153. draw.FilledRect(centerX - 50, y - 20, centerX + 50, y - 19)
  2154.  
  2155. --right
  2156. gradient(centerX + 50, y - 20, centerX + 200, y, false)
  2157. gradient(centerX + 50, y - 20, centerX + 200, y - 19, false)
  2158.  
  2159. --fps
  2160. draw.Color(255, 255, 255, 255)
  2161. draw.Text(centerX - 10, y - 15, get_abs_fps())
  2162.  
  2163. draw.Color(200, 255, 0, 255)
  2164. draw.Text(centerX + 10, y - 15, "fps")
  2165.  
  2166. --kills
  2167. draw.Color(255, 255, 255, 255)
  2168. draw.Text(centerX - 70, y - 15, kills)
  2169.  
  2170. draw.Color(255, 100, 0, 255)
  2171. draw.Text(centerX - 55, y - 15, "kills")
  2172.  
  2173. --deaths
  2174. draw.Color(255, 255, 255, 255)
  2175. draw.Text(centerX + 50, y - 15, deaths)
  2176.  
  2177. draw.Color(255, 50, 50, 255)
  2178. draw.Text(centerX + 65, y - 15, "deaths")
  2179. end
  2180. end
  2181. callbacks.Register("Draw", "paint_traverse", paint_traverse)
  2182. callbacks.Register("FireGameEvent", "events", events)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement