Advertisement
The_Belch

Aimware Essentials

Oct 12th, 2019
3,642
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 42.28 KB | None | 0 0
  1. -- Essentials Lua By The_Belch
  2.  
  3. -- dependencies
  4.  
  5. print("Successfully Loaded Aimware Essentials Lua")
  6.  
  7. local menuloc = gui.Reference("SETTINGS", "MISCELLANEOUS");
  8.  
  9. local draw_Line, draw_TextShadow, draw_Color, draw_Text, draw_FilledRect, client_WorldToScreen, draw_GetScreenSize, client_GetConVar, client_SetConVar, client_exec, PlayerNameByUserID, PlayerIndexByUserID, GetLocalPlayer, gui_SetValue, gui_GetValue, LocalPlayerIndex, c_AllowListener, cb_Register, g_tickcount, g_realtime, g_curtime, math_floor, math_sqrt, GetPlayerResources, entities_FindByClass, GetPlayerResources = draw.Line, draw.TextShadow, draw.Color, draw.Text, draw.FilledRect, client.WorldToScreen, draw.GetScreenSize, client.GetConVar, client.SetConVar, client.Command, client.GetPlayerNameByUserID, client.GetPlayerIndexByUserID, entities.GetLocalPlayer, gui.SetValue, gui.GetValue, client.GetLocalPlayerIndex, client.AllowListener, callbacks.Register, globals.TickCount, globals.RealTime, globals.CurTime, math.floor, math.sqrt, entities.GetPlayerResources, entities.FindByClass, entities.GetPlayerResources
  10.  
  11. -- GUI Additions
  12.  
  13. local essentialsmenu = gui.Checkbox(menuloc, "essentialslua", "Show Aimware Essentials", false);
  14.  
  15.     -- window
  16.    
  17.         local window = gui.Window("essentialswindow", "Aimware Essentials", 1200, 300, 500, 700)
  18.         local hvhgroupbox = gui.Groupbox(window, "HvH Essentials", 10, 20, 230, 300)
  19.         local visualsgroupbox = gui.Groupbox(window, "Visuals Essentials", 260, 20, 230, 300)
  20.         local miscgroupbox = gui. Groupbox(window, "Misc Essentials", 260, 350, 230, 300)
  21.         local aagroupgox = gui.Groupbox(window, "Manual AA", 10, 350, 230, 300)
  22.  
  23.  
  24.  
  25. -----------------------------HVH-------------------------
  26.  
  27. -- jumpshot
  28.  
  29. local jumpshot = gui.Checkbox(hvhgroupbox, "jumpshot", "Jumpscout Fix", false)
  30.  
  31. local function jumpshot()
  32.     if gui.GetValue("jumpshot") == true then
  33.         local velocity = vector.Length(entities.GetLocalPlayer():GetPropVector("localdata", "m_vecVelocity[0]"))
  34.         gui.SetValue("msc_autostrafer_enable", 0)
  35.         if input.IsButtonDown(32) then
  36.             local x,y,z = entities.GetLocalPlayer():GetPropVector("localdata", "m_vecVelocity[0]")
  37.             local velocity = math.sqrt(x^2 + y^2)
  38.             if velocity >= 5 then
  39.                 gui.SetValue("msc_autostrafer_enable", 1)
  40.             else
  41.                 gui.SetValue("msc_autostrafer_enable", 0)
  42.             end
  43.         end
  44.     end
  45. end
  46. callbacks.Register("CreateMove", jumpshot)
  47.  
  48. -- fakeduck improvements
  49.  
  50. local fakeduckEnabled = gui.Checkbox(hvhgroupbox, "fdfakelag", "Fakeduck Fakelag", false)
  51. local fakeduckDisable = gui.Checkbox(hvhgroupbox, "fdaafix", "Fakeduck AA Fix", false)
  52. local fakeduckKey = gui.GetValue("rbot_antiaim_fakeduck")
  53. local fakeducking = false
  54.  
  55. local fakeduck_mode = 0;
  56.  
  57. local fakeduck_value = 4;
  58. local fakeduck_valueB, fakeduck_modeB, desyncS, desyncM;
  59.  
  60.  
  61. function fakeduckFix()
  62.     if entities.GetLocalPlayer() ~= nil then
  63.         if fakeduckEnabled:GetValue() == true and fakeduckKey ~= nil then
  64.             if input.IsButtonDown( fakeduckKey ) then
  65.                 if fakeducking == false then
  66.                     fakeduck_modeB = gui.GetValue("msc_fakelag_mode")
  67.                     fakeduck_valueB = gui.GetValue("msc_fakelag_value")
  68.                     desyncS = gui.GetValue("rbot_antiaim_stand_desync")
  69.                     desyncM = gui.GetValue("rbot_antiaim_move_desync")
  70.                     fakeducking = true;
  71.                 end
  72.                 if fakeduckDisable:GetValue() == true then
  73.                     gui.SetValue("rbot_antiaim_stand_desync", 0)
  74.                     gui.SetValue("rbot_antiaim_move_desync", 0)
  75.                 end
  76.                 gui.SetValue("msc_fakelag_mode", fakeduck_mode)
  77.                 gui.SetValue("msc_fakelag_value", fakeduck_value)
  78.             else
  79.                 if fakeducking == true then
  80.                     gui.SetValue("msc_fakelag_enable", 1)
  81.                     gui.SetValue("msc_fakelag_mode", fakeduck_modeB)
  82.                     gui.SetValue("msc_fakelag_value", fakeduck_valueB)
  83.                     gui.SetValue("rbot_antiaim_stand_desync", desyncS)
  84.                     gui.SetValue("rbot_antiaim_move_desync", desyncM)
  85.                     fakeducking = false;
  86.                 end
  87.             end
  88.         end
  89.     end
  90. end
  91. callbacks.Register("Draw", "fakeduckFix", fakeduckFix)
  92.  
  93. -- fakeduck indicator
  94.  
  95. local fdind = gui.Checkbox(hvhgroupbox, "fdind", "Fakeduck Indicator", false)
  96. local storedTick = 0
  97. local crouched_ticks = { }
  98.  
  99. local fdR = gui.Slider(hvhgroupbox, "fdR", "R", 0, 0, 255);
  100. local fdG = gui.Slider(hvhgroupbox, "fdG", "G", 0, 0, 255);
  101. local fdB = gui.Slider(hvhgroupbox, "fdB", "B", 0, 0, 255);
  102. local fdA = gui.Slider(hvhgroupbox, "fdA", "A", 255, 0, 255);
  103.  
  104.  
  105. local function toBits(num)
  106.     local t = { }
  107.     while num > 0 do
  108.         rest = math.fmod(num,2)
  109.         t[#t+1] = rest
  110.         num = (num-rest) / 2
  111.     end
  112.  
  113.     return t
  114. end
  115.  
  116. callbacks.Register("DrawESP", "FD_Indicator", function(Builder)
  117.     local g_Local = entities.GetLocalPlayer()
  118.     local Entity = Builder:GetEntity()
  119.  
  120.     if g_Local == nil or Entity == nil or not Entity:IsPlayer() or not Entity:IsAlive() then
  121.         return
  122.     end
  123.  
  124.     local index = Entity:GetIndex()
  125.     local m_flDuckAmount = Entity:GetProp("m_flDuckAmount")
  126.     local m_flDuckSpeed = Entity:GetProp("m_flDuckSpeed")
  127.     local m_fFlags = Entity:GetProp("m_fFlags")
  128.  
  129.     if crouched_ticks[index] == nil then
  130.         crouched_ticks[index] = 0
  131.     end
  132.  
  133.     if m_flDuckSpeed ~= nil and m_flDuckAmount ~= nil then
  134.         if m_flDuckSpeed == 8 and m_flDuckAmount <= 0.9 and m_flDuckAmount > 0.01 and toBits(m_fFlags)[1] == 1 then
  135.             if storedTick ~= globals.TickCount() then
  136.                 crouched_ticks[index] = crouched_ticks[index] + 1
  137.                 storedTick = globals.TickCount()
  138.             end
  139.  
  140.        if gui.GetValue("fdind") == true then
  141.             if crouched_ticks[index] >= 5 then
  142.             local fR = gui.GetValue("fdR");
  143.             local fG = gui.GetValue("fdG");
  144.             local fB = gui.GetValue("fdB");
  145.             local fA = gui.GetValue("fdA");
  146.                 Builder:Color(fR, fG, fB, fA)
  147.                 Builder:AddTextTop("Fake Duck")
  148.             end
  149.         else
  150.             crouched_ticks[index] = 0
  151.         end
  152.     end
  153. end
  154. end)
  155.  
  156. -- adaptive hitboxes
  157.  
  158. local adapcheck = gui.Checkbox(hvhgroupbox, "adapcheck", "Auto Adaptive Hitboxes", false)
  159. local gui_set = gui.SetValue;
  160. local gui_get = gui.GetValue;
  161. local fpstotoggle = gui.Slider(hvhgroupbox, "fpstotoggle", "FPS To Toggle", 64, 20, 1000)
  162. local frame_rate = 0.0
  163. local get_abs_fps = function()
  164.   frame_rate = 0.9 * frame_rate + (1.0 - 0.9) * globals.AbsoluteFrameTime()
  165.   return math.floor((1.0 / frame_rate) + 0.5)
  166. end
  167.  
  168. function isFPSLow()
  169.    if gui.GetValue("adapcheck") == true then
  170. local w,h = draw.GetScreenSize();
  171. fps = get_abs_fps()
  172. if entities.GetLocalPlayer() ~= nil then
  173.     if fps <= gui.GetValue("fpstotoggle") then -- If fps is below the set value (slider) then it will turn adaptive hitboxes on and same if its above
  174.         draw.Color(200, 0, 0, 255)
  175.         draw.Text(w/w, (h/2), "Adaptive Hitboxes ON")
  176.         AdaptiveHitBoxON();
  177.     else
  178.         draw.Color(0, 255, 0, 255)
  179.         draw.Text(w/w, (h/2), "Adaptive Hitboxes OFF")
  180.         AdaptiveHitBoxOFF();
  181.     end
  182. end
  183. end
  184.  
  185. function AdaptiveHitBoxON()
  186.    
  187. gui_set("rbot_pistol_hitbox_adaptive", 1);
  188. gui_set("rbot_smg_hitbox_adaptive", 1);
  189. gui_set("rbot_revolver_hitbox_adaptive", 1);
  190. gui_set("rbot_rifle_hitbox_adaptive", 1);
  191. gui_set("rbot_scout_hitbox_adaptive", 1);
  192. gui_set("rbot_sniper_hitbox_adaptive", 1);
  193. gui_set("rbot_autosniper_hitbox_adaptive", 1);
  194. gui_set("rbot_lmg_hitbox_adaptive", 1);
  195. end
  196.  
  197. function AdaptiveHitBoxOFF()
  198.    
  199. gui_set("rbot_pistol_hitbox_adaptive", 0);
  200. gui_set("rbot_smg_hitbox_adaptive", 0);
  201. gui_set("rbot_revolver_hitbox_adaptive", 0);
  202. gui_set("rbot_rifle_hitbox_adaptive", 0);
  203. gui_set("rbot_scout_hitbox_adaptive", 0);
  204. gui_set("rbot_sniper_hitbox_adaptive", 0);
  205. gui_set("rbot_autosniper_hitbox_adaptive", 0);
  206. gui_set("rbot_lmg_hitbox_adaptive", 0);
  207. end
  208. end
  209. callbacks.Register( "Draw", "isFPSLow", isFPSLow);
  210. callbacks.Register( "Draw", "AdaptiveHitBoxOFF", AdaptiveHitBoxOFF);
  211. callbacks.Register( "Draw", "AdaptiveHitBoxON", AdaptiveHitBoxON);
  212. -- autobuy
  213.  
  214. local Autobuy_Text = gui.Text( hvhgroupbox, "Autobuy" );
  215. local Autobuy_Enable = gui.Checkbox( hvhgroupbox, "lua_autobuy_enable", "Enable", 0 );
  216.  
  217. local Autobuy_PrimaryWeapon = gui.Combobox( hvhgroupbox, "lua_autobuy_primaryweapon", "Primary Weapon", "Off", "Auto", "Scout", "AWP", "Rifle", "Famas : Galil AR", "AUG : SG 553", "MP9 : MAC-10", "MP7 : MP5-SD", "UMP-45", "P90", "PP-Bizon", "Nova", "XM1014", "MAG-7 : Sawed-Off", "M249", "Negev" );
  218. local Autobuy_SecondaryWeapon = gui.Combobox( hvhgroupbox, "lua_autobuy_secondaryweapon", "Secondary Weapon", "Off", "Dual Berettas", "P250", "Five-Seven : CZ75-Auto : Tec-9", "Desert Eagle : R8 Revolver" );
  219.  
  220. local Autobuy_Armor = gui.Combobox( hvhgroupbox, "lua_autobuy_armor", "Armor", "Off", "Kevlar", "Kevlar + Helmet" );
  221. local Autobuy_Defuser = gui.Checkbox( hvhgroupbox, "lua_autobuy_defuser", "Defuser", 0 );
  222. local Autobuy_Taser = gui.Checkbox( hvhgroupbox, "lua_autobuy_taser", "Taser", 0 );
  223.  
  224. local Autobuy_HEGrenade = gui.Checkbox( hvhgroupbox, "lua_autobuy_hegrenade", "HE Grenade", 0 );
  225. local Autobuy_Smoke = gui.Checkbox( hvhgroupbox, "lua_autobuy_smoke", "Smoke", 0 );
  226. local Autobuy_Molotov = gui.Checkbox( hvhgroupbox, "lua_autobuy_molotov", "Molotov", 0 );
  227. local Autobuy_Flashbang = gui.Checkbox( hvhgroupbox, "lua_autobuy_flashbang", "Flashbang", 0 );
  228. local Autobuy_Decoy = gui.Checkbox( hvhgroupbox, "lua_autobuy_decoy", "Decoy", 0 );
  229.  
  230. local Money = 0
  231.  
  232. local function LocalPlayerMoney()
  233.     if Autobuy_Enable:GetValue() then
  234.         if entities.GetLocalPlayer() ~= nil then
  235.             Money = entities.GetLocalPlayer():GetProp( "m_iAccount" )
  236.         end
  237.     end
  238. end
  239.  
  240. local function Autobuy( Event )
  241.  
  242.     local PrimaryWeapon = Autobuy_PrimaryWeapon:GetValue()
  243.     local SecondaryWeapon = Autobuy_SecondaryWeapon:GetValue()
  244.     local Armor = Autobuy_Armor:GetValue()
  245.  
  246.     if Autobuy_Enable:GetValue() then
  247.  
  248.         if Event:GetName() ~= "player_spawn" then
  249.             return;
  250.         end
  251.  
  252.         local INT_UID = Event:GetInt( "userid" );
  253.         local PlayerIndex = client.GetPlayerIndexByUserID( INT_UID );
  254.        
  255.         if client.GetLocalPlayerIndex() == PlayerIndex then
  256.             ME = true
  257.         else
  258.             ME = false
  259.         end
  260.  
  261.         if ME and Money == 0 then
  262.             -- Primary Weapon
  263.             if PrimaryWeapon == 1 then client.Command( "buy scar20", true ); -- Auto
  264.             elseif PrimaryWeapon == 2 then client.Command( "buy ssg08", true ); -- Scout
  265.             elseif PrimaryWeapon == 3 then client.Command( "buy awp", true ); -- AWP
  266.             elseif PrimaryWeapon == 4 then client.Command( "buy ak47", true ); -- Rifle
  267.             elseif PrimaryWeapon == 5 then client.Command( "buy famas", true ); -- Famas : Galil AR
  268.             elseif PrimaryWeapon == 6 then client.Command( "buy aug", true ); -- AUG : SG 553
  269.             elseif PrimaryWeapon == 7 then client.Command( "buy mac10", true ); --  MP9 : MAC-10
  270.             elseif PrimaryWeapon == 8 then client.Command( "buy mp7", true ); -- MP7 : MP5-SD
  271.             elseif PrimaryWeapon == 9 then client.Command( "buy ump45", true ); -- UMP-45
  272.             elseif PrimaryWeapon == 10 then client.Command( "buy p90", true ); -- P90
  273.             elseif PrimaryWeapon == 11 then client.Command( "buy bizon", true ); -- PP-Bizon
  274.             elseif PrimaryWeapon == 12 then client.Command( "buy nova", true ); -- Nova
  275.             elseif PrimaryWeapon == 13 then client.Command( "buy xm1014", true ); -- XM1014
  276.             elseif PrimaryWeapon == 14 then client.Command( "buy mag7", true ); -- MAG-7 : Sawed-Off
  277.             elseif PrimaryWeapon == 15 then client.Command( "buy m249", true ); -- M249
  278.             elseif PrimaryWeapon == 16 then client.Command( "buy negev", true ); -- Negev
  279.             end
  280.             -- Secondary Weapon
  281.             if SecondaryWeapon == 1 then client.Command( "buy elite", true ); -- Dual Berettas
  282.             elseif SecondaryWeapon == 2 then client.Command( "buy p250", true ); -- P250
  283.             elseif SecondaryWeapon == 3 then client.Command( "buy tec9", true ); -- Five-Seven : CZ75-Auto : Tec-9
  284.             elseif SecondaryWeapon == 4 then client.Command( "buy deagle", true ); -- Desert Eagle : R8 Revolver
  285.             end
  286.             -- Taser
  287.             if Autobuy_Taser:GetValue() then
  288.                 client.Command( "buy taser", true );
  289.             end
  290.         elseif ME and Money <= 800 then
  291.             -- Secondary Weapon
  292.             if SecondaryWeapon == 1 then client.Command( "buy elite", true ); -- Dual Berettas
  293.             elseif SecondaryWeapon == 2 then client.Command( "buy p250", true ); -- P250
  294.             elseif SecondaryWeapon == 3 then client.Command( "buy tec9", true ); -- Five-Seven : CZ75-Auto : Tec-9
  295.             elseif SecondaryWeapon == 4 then client.Command( "buy deagle", true ); -- Desert Eagle : R8 Revolver
  296.             end
  297.             -- Taser
  298.             if Autobuy_Taser:GetValue() then
  299.                 client.Command( "buy taser", true );
  300.             end
  301.         elseif ME and Money > 800 then
  302.             -- Primary Weapon
  303.             if PrimaryWeapon == 1 then client.Command( "buy scar20", true ); -- Auto
  304.             elseif PrimaryWeapon == 2 then client.Command( "buy ssg08", true ); -- Scout
  305.             elseif PrimaryWeapon == 3 then client.Command( "buy awp", true ); -- AWP
  306.             elseif PrimaryWeapon == 4 then client.Command( "buy ak47", true ); -- Rifle
  307.             elseif PrimaryWeapon == 5 then client.Command( "buy famas", true ); -- Famas : Galil AR
  308.             elseif PrimaryWeapon == 6 then client.Command( "buy aug", true ); -- AUG : SG 553
  309.             elseif PrimaryWeapon == 7 then client.Command( "buy mac10", true ); --  MP9 : MAC-10
  310.             elseif PrimaryWeapon == 8 then client.Command( "buy mp7", true ); -- MP7 : MP5-SD
  311.             elseif PrimaryWeapon == 9 then client.Command( "buy ump45", true ); -- UMP-45
  312.             elseif PrimaryWeapon == 10 then client.Command( "buy p90", true ); -- P90
  313.             elseif PrimaryWeapon == 11 then client.Command( "buy bizon", true ); -- PP-Bizon
  314.             elseif PrimaryWeapon == 12 then client.Command( "buy nova", true ); -- Nova
  315.             elseif PrimaryWeapon == 13 then client.Command( "buy xm1014", true ); -- XM1014
  316.             elseif PrimaryWeapon == 14 then client.Command( "buy mag7", true ); -- MAG-7 : Sawed-Off
  317.             elseif PrimaryWeapon == 15 then client.Command( "buy m249", true ); -- M249
  318.             elseif PrimaryWeapon == 16 then client.Command( "buy negev", true ); -- Negev
  319.             end
  320.             -- Secondary Weapon
  321.             if SecondaryWeapon == 1 then client.Command( "buy elite", true ); -- Dual Berettas
  322.             elseif SecondaryWeapon == 2 then client.Command( "buy p250", true ); -- P250
  323.             elseif SecondaryWeapon == 3 then client.Command( "buy tec9", true ); -- Five-Seven : CZ75-Auto : Tec-9
  324.             elseif SecondaryWeapon == 4 then client.Command( "buy deagle", true ); -- Desert Eagle : R8 Revolver
  325.             end
  326.  
  327.             -- Armor
  328.             if Armor == 1 then client.Command( "buy vest", true );
  329.             elseif Armor == 2 then client.Command( "buy vesthelm", true );
  330.             end
  331.             -- Defuser
  332.             if Autobuy_Defuser:GetValue() then
  333.                 client.Command( "buy defuser", true );
  334.             end
  335.             -- Taser
  336.             if Autobuy_Taser:GetValue() then
  337.                 client.Command( "buy taser", true );
  338.             end
  339.  
  340.             -- HE Grenade
  341.             if Autobuy_HEGrenade:GetValue() then
  342.                 client.Command( "buy hegrenade", true );
  343.             end
  344.             -- Smoke
  345.             if Autobuy_Smoke:GetValue() then
  346.                 client.Command( "buy smokegrenade", true );
  347.             end
  348.             -- Molotov
  349.             if Autobuy_Molotov:GetValue() then
  350.                 client.Command( "buy molotov", true );
  351.             end
  352.             -- Flashbang
  353.             if Autobuy_Flashbang:GetValue() then
  354.                 client.Command( "buy flashbang", true );
  355.             end
  356.             -- Decoy
  357.             if Autobuy_Decoy:GetValue() then
  358.                 client.Command( "buy decoy", true );
  359.             end
  360.         end
  361.  
  362.     end
  363.  
  364. end
  365.  
  366. client.AllowListener( "player_spawn" )
  367.  
  368. callbacks.Register( "Draw", "Local Player Money", LocalPlayerMoney )
  369. callbacks.Register( "FireGameEvent", "Autobuy", Autobuy )
  370.  
  371. ----------------------VISUALS-------------------------
  372.  
  373. -- bomb timer
  374.  
  375. local bombtimer = gui.Checkbox(visualsgroupbox, "bombtimer", "Bomb Timer", false)
  376. local ref = gui.Reference("MISC", "GENERAL", "Main");
  377. local mouseX, mouseY, x, y, dx, dy, w, h = 0, 0, 650, 10, 0, 0, 400, 50;
  378. local shouldDrag = false;
  379. local fonticon = draw.CreateFont("icomoon", 25, 25);
  380. local fontinfo = draw.CreateFont("Verdana", 15, 15);
  381. local fonttext = draw.CreateFont("Verdana", 15, 15);
  382. local fontbombtext = draw.CreateFont("skeet Smallest Pixel-7 Modified", 10, 15);
  383.  
  384. local defusing = false;
  385.  
  386. function EventHook(Event)
  387. if gui.GetValue("bombtimer") == true then
  388.    if Event:GetName() == "bomb_begindefuse" then
  389.      defusing = true;
  390.      elseif Event:GetName() == "bomb_abortdefuse" then
  391.      defusing = false;
  392.    elseif Event:GetName() == "round_officially_ended"
  393.      or Event:GetName() == "bomb_defused" or Event:GetName() == "bomb_exploded" then
  394.       defusing = false;
  395.     end
  396. end
  397.  
  398. local function dragFeature()
  399.     if input.IsButtonDown(1) then
  400.         mouseX, mouseY = input.GetMousePos();
  401.         if shouldDrag then
  402.             x = mouseX - dx;
  403.             y = mouseY - dy;
  404.         end
  405.         if mouseX >= x and mouseX <= x + w and mouseY >= y and mouseY <= y + 40 then
  406.             shouldDrag = true;
  407.             dx = mouseX - x;
  408.             dy = mouseY - y;
  409.         end
  410.     else
  411.         shouldDrag = false;
  412.     end
  413. end
  414.  
  415. local function drawTimer()
  416.  
  417. if entities.FindByClass("CPlantedC4")[1] ~= nil then
  418. local Bomb = entities.FindByClass("CPlantedC4")[1];
  419.  
  420. if Bomb:GetProp("m_bBombTicking") and Bomb:GetProp("m_bBombDefused") == 0 and globals.CurTime() < Bomb:GetProp("m_flC4Blow") then
  421. local Player = entities.GetLocalPlayer();
  422. if defusing == true then
  423. local BombMath = ((globals.CurTime() - Bomb:GetProp("m_flDefuseCountDown")) * 0.5) / ((Bomb:GetProp("m_flDefuseCountDown") - Bomb:GetProp("m_flDefuseLength")) - Bomb:GetProp("m_flDefuseCountDown")) + 1;
  424.  
  425. draw.Color(8, 8, 8, 30)
  426. draw.FilledRect(x, y, x + w, y + h)
  427. draw.FilledRect(x - 65, y, x + (w - 405), y + h )
  428.  
  429. draw.Color(8, 8, 8, 90)
  430. draw.FilledRect(x + 20, y + 20, x + (w - 20), y + h - 20)
  431.  
  432. draw.Color(0, 150, 255, 240)
  433. draw.FilledRect(x + 20, y + 20, (x + 20) * BombMath, y + h - 20)
  434.  
  435. draw.Color(180, 180, 180, 120)
  436. draw.OutlinedRect(x, y, x + w, y + h)
  437. draw.OutlinedRect(x - 65,y , x + (w - 405), y + h)
  438.  
  439. draw.Color(255, 255, 255, 255)
  440. draw.SetFont(fontbombtext)
  441. draw.Text(x - 48, y + 30, "BOMB")
  442. draw.SetFont(fonticon)
  443. draw.Text(x - 50, y + 10, "y")
  444.  
  445. else
  446.  
  447. local BombMath = ((globals.CurTime() - Bomb:GetProp("m_flC4Blow")) * 0.5) / ((Bomb:GetProp("m_flC4Blow") - Bomb:GetProp("m_flTimerLength")) - Bomb:GetProp("m_flC4Blow")) + 1;
  448.  
  449. draw.Color(8, 8, 8, 30)
  450. draw.FilledRect(x, y, x + w, y + h)
  451. draw.FilledRect(x - 65, y, x + (w - 405), y + h )
  452.  
  453. draw.Color(8, 8, 8, 90)
  454. draw.FilledRect(x + 20, y + 20, x + (w - 20), y + h - 20)
  455.  
  456. draw.Color(130, 255, 0, 240)
  457. draw.FilledRect(x + 20, y + 20, (x + 20) * BombMath, y + h - 20)
  458.  
  459. draw.Color(180, 180, 180, 120)
  460. draw.OutlinedRect(x, y, x + w, y + h)
  461. draw.OutlinedRect(x - 65,y , x + (w - 405), y + h)
  462.  
  463. draw.Color(255, 255, 255, 255)
  464. draw.SetFont(fontbombtext)
  465. draw.Text(x - 48, y + 30, "BOMB")
  466. draw.SetFont(fonticon)
  467. draw.Text(x - 50, y + 10, "y")
  468. end
  469.  
  470. if Player:IsAlive() and globals.CurTime() < Bomb:GetProp("m_flC4Blow") then
  471. if math.floor(0.5 + BombDamage(Bomb, Player)) >= Player:GetHealth() then
  472. draw.Color(255, 0, 0, 255)
  473. draw.SetFont(fontinfo)
  474. draw.Text(5, 0, "LETHAL");
  475. draw.TextShadow(5, 0, "LETHAL");
  476. else
  477. draw.Color(255, 255, 255, 255)
  478. draw.SetFont(fontinfo)
  479. draw.Text(5, 0, math.floor(0.5 + BombDamage(Bomb, Player)) .. " HP");
  480. draw.TextShadow(5, 0, math.floor(0.5 + BombDamage(Bomb, Player)) .. " HP");
  481. end
  482. end
  483. end
  484. end
  485. end
  486.  
  487. function BombDamage(Bomb, Player)
  488. local C4Distance = math.sqrt((select(1,Bomb:GetAbsOrigin()) - select(1,Player:GetAbsOrigin())) ^ 2 +
  489. (select(2,Bomb:GetAbsOrigin()) - select(2,Player:GetAbsOrigin())) ^ 2 +
  490. (select(3,Bomb:GetAbsOrigin()) - select(3,Player:GetAbsOrigin())) ^ 2);
  491.  
  492. local Gauss = (C4Distance - 75.68) / 789.2
  493. local flDamage = 450.7 * math.exp(-Gauss * Gauss);
  494.  
  495. if Player:GetProp("m_ArmorValue") > 0 then
  496.  
  497. local flArmorRatio = 0.5;
  498. local flArmorBonus = 0.5;
  499.  
  500. if Player:GetProp("m_ArmorValue") > 0 then
  501. local flNew = flDamage * flArmorRatio;
  502. local flArmor = (flDamage - flNew) * flArmorBonus;
  503.  
  504. if flArmor > Player:GetProp("m_ArmorValue") then
  505. flArmor = Player:GetProp("m_ArmorValue") * (1 / flArmorBonus);
  506. flNew = flDamage - flArmor;
  507. end
  508.  
  509. flDamage = flNew;
  510.  
  511. end
  512.  
  513. end
  514. return math.max(flDamage, 0);
  515. end
  516.  
  517. callbacks.Register( "Draw", "drag", dragFeature)
  518. callbacks.Register("FireGameEvent", "EventHookB", EventHook);
  519. callbacks.Register( "Draw", "drawTimer", drawTimer );
  520.  
  521. end
  522.  
  523. -- disable post prossesing
  524.  
  525. local disablepost = gui.Checkbox(visualsgroupbox, "vis_disable_post", "Disable Post Processing", false)
  526. function disablepp()
  527. if disablepost:GetValue() then client_SetConVar("mat_postprocess_enable", 0, true); else client_SetConVar("mat_postprocess_enable", 1, true); end end
  528. cb_Register('Draw', "Disable Post Processing" ,disablepp);
  529.  
  530. -- full bright
  531.  
  532. local fullbright = gui.Checkbox(visualsgroupbox, "fulbright", "Full Bright", false)
  533. function full_bright() if fullbright:GetValue() then client_SetConVar("mat_fullbright", 1, true); else client_SetConVar("mat_fullbright", 0, true); end end
  534. cb_Register('Draw', "Full brightness" ,full_bright);
  535.  
  536. -- scoped fov fix
  537.  
  538. local fovfix = gui.Checkbox(visualsgroupbox, "foxfix", "Fix Scope Fov", false)
  539. local fov_value = gui_GetValue("vis_view_fov")
  540. local vm_fov_value = gui_GetValue("vis_view_model_fov")
  541. function scopefov()
  542. local view_fov = gui_GetValue("vis_view_fov"); local view_model_fov = gui_GetValue("vis_view_model_fov");
  543. if view_fov ~= 0 then fov_value = gui_GetValue("vis_view_fov"); end if view_model_fov ~= 0 then vm_fov_value = gui_GetValue("vis_view_model_fov"); end
  544. if fovfix:GetValue() then
  545. if GetLocalPlayer() ~= nil then
  546. if GetLocalPlayer():GetProp("m_bIsScoped") == 1 or GetLocalPlayer():GetProp("m_bIsScoped") == 257 then gui_SetValue("vis_view_fov", 0); gui_SetValue("vis_view_model_fov", 0);
  547. elseif view_fov == 0 then gui_SetValue("vis_view_fov", fov_value); gui_SetValue("vis_view_model_fov", vm_fov_value); end end end end
  548. cb_Register("Draw", "scopefov", scopefov);
  549.  
  550. -- engine radar
  551.  
  552. local ERadar = gui.Checkbox(visualsgroupbox, "esp_engine_radar", "Engine Radar", false)
  553. function engineradar()
  554. if ERadar:GetValue() then ERval = 1; else ERval = 0; end
  555. for o, radar in pairs(entities_FindByClass("CCSPlayer")) do radar:SetProp("m_bSpotted", ERval); end end
  556. cb_Register("Draw", "engine radar", engineradar);
  557.  
  558. -- sniper crosshairs
  559.  
  560. local ComboCrosshair = gui.Combobox(visualsgroupbox, "vis_sniper_crosshair", "Force Sniper Crosshairs", "Off", "Force Crosshair", "Force Crosshair (+Scoped)", "Aimware Crosshair", "Draw Crosshair")
  561. function ifCrosshair()
  562. if GetLocalPlayer() == nil then return; end
  563. local Weapon = GetLocalPlayer():GetPropEntity("m_hActiveWeapon");
  564. local Scoped = GetLocalPlayer():GetProp("m_bIsScoped") == 1 or GetLocalPlayer():GetProp("m_bIsScoped") == 257
  565. if Weapon == nil then return; end
  566. local cWep = Weapon:GetClass();
  567. if cWep == "CWeaponAWP" or cWep == "CWeaponSSG08" or cWep == "CWeaponSCAR20" or cWep == "CWeaponG3SG1" then drawCrosshair = true;
  568. else drawCrosshair = false; end
  569. local screenCenterX, screenY = draw_GetScreenSize(); local scX, scY = screenCenterX / 2, screenY / 2;
  570. if drawCrosshair == true and ComboCrosshair:GetValue() == 0 then client_SetConVar("weapon_debug_spread_show", 0, true)
  571. elseif drawCrosshair == true and ComboCrosshair:GetValue() == 1 then gui_SetValue('esp_crosshair', false); if Scoped then client_SetConVar("weapon_debug_spread_show", 0, true); else client_SetConVar("weapon_debug_spread_show", 3, true) end
  572. elseif drawCrosshair == true and ComboCrosshair:GetValue() == 2 then gui_SetValue('esp_crosshair', false); client_SetConVar("weapon_debug_spread_show", 3, true)
  573. elseif drawCrosshair == true and ComboCrosshair:GetValue() == 3 then if Scoped then gui_SetValue('esp_crosshair', false); else client_SetConVar("weapon_debug_spread_show", 0, true); gui_SetValue('esp_crosshair', true); end
  574. elseif drawCrosshair == false and ComboCrosshair:GetValue() == 3 then gui_SetValue('esp_crosshair', false)
  575. elseif drawCrosshair == true and ComboCrosshair:GetValue() == 4 then client_SetConVar("weapon_debug_spread_show", 0, true); gui_SetValue('esp_crosshair', false); draw.SetFont(ff);
  576. draw_Color(255,255,255,255); draw_Line(scX, scY - 8, scX, scY + 8); --[[ line down ]] draw_Line(scX - 8, scY, scX + 8, scY); --[[ line across ]] end end
  577. cb_Register("Draw", "sniper crosshairs", ifCrosshair);
  578.  
  579. --thirdperson keybind
  580. local gui_get = gui.GetValue
  581. local tp_val = 0
  582. local tpkey = gui.Keybox( visualsgroupbox, "thirdperson_bind", "Third Person Bind", 0 )
  583. local tpamount = gui.Slider( visualsgroupbox, "thirdperson_distance", "Distance", 90, 50, 800 )
  584. function mainthirdperson()
  585.     if tpkey:GetValue() ~= 0 then
  586.         if input.IsButtonPressed( tpkey:GetValue() ) then
  587.             tp_val = tp_val + 1
  588.         end
  589.     end
  590. end
  591. function Check()
  592.     if (tp_val == 2) then
  593.     tp_val = 0
  594.    end
  595. end
  596. function thirdperson()
  597.     if (tp_val == 1) then
  598.         gui.SetValue( "vis_thirdperson_dist", tpamount:GetValue() )
  599.     elseif (tp_val == 0) then
  600.         gui.SetValue( "vis_thirdperson_dist", 0 )
  601.     end
  602. end
  603. callbacks.Register( "Draw", "mainthirdperson", mainthirdperson );
  604. callbacks.Register( "Draw", "Check", Check );
  605. callbacks.Register( "Draw", "thirdperson", thirdperson );
  606.  
  607. ---------------------------MISC------------------------
  608.  
  609. -- viewmodel changer
  610.  
  611. local function VM_Cache() xO = client_GetConVar("viewmodel_offset_x"); yO = client_GetConVar("viewmodel_offset_y"); zO = client_GetConVar("viewmodel_offset_z"); fO = client_GetConVar("viewmodel_fov"); end; VM_Cache()
  612. local show2, pressed2 = false, true
  613. local ViewModelShown = gui.Checkbox(miscgroupbox, "msc_vme", "Viewmodel Changer", false)
  614. local VM_W = gui.Window("VM_W", "Viewmodel Changer", 200,200,200,300)
  615. local VMStuff = gui.Groupbox(VM_W, "Viewmodel Changer", 15, 14, 170, 240)
  616. local VM_e = gui.Checkbox(VMStuff, "msc_vme", "Enable", false)
  617. local xS = gui.Slider(VMStuff, "VM_X", "X", xO, -20, 20)
  618. local yS = gui.Slider(VMStuff, "VM_Y", "Y", yO, -100, 100)
  619. local zS = gui.Slider(VMStuff, "VM_Z", "Z", zO, -20, 20)
  620. function press2() if ViewModelShown:GetValue() then show2 = true; else show2 = false; end if input.IsButtonPressed(gui_GetValue("msc_menutoggle")) then if pressed2 == true then pressed2 = false; else pressed2 = true; end end end
  621. function shows2() if show2 == true and pressed2 == true then VM_W:SetActive(1); elseif show2 == true and pressed2 == false or show2 == false and pressed2 == true or show2 == false and pressed2 == false then VM_W:SetActive(0); end end
  622. function VM_E() if VM_e:GetValue() then client_SetConVar("viewmodel_offset_x", xS:GetValue(), true); client_SetConVar("viewmodel_offset_y", yS:GetValue(), true); client_SetConVar("viewmodel_offset_z", zS:GetValue(), true);
  623. else client_SetConVar("viewmodel_offset_x", 2.0, true); client_SetConVar("viewmodel_offset_y", 0.0, true); client_SetConVar("viewmodel_offset_z", -2.0, true); end end
  624. cb_Register("Draw", "p2", press2); cb_Register("Draw", "s2", shows2); cb_Register("Draw", "vm sets", VM_E);
  625.  
  626. -- aspect ratio
  627.  
  628. local aspect_ratio_table = {};
  629. local aspect_ratio_check = gui.Checkbox(miscgroupbox, "msc_aspect_enable", "Aspect Ratio Changer", false)
  630. local aspect_ratio_reference = gui.Slider(miscgroupbox, "msc_aspect_value", "Force aspect ratio", 100, 1, 199) -- % times your original ratio
  631. local function gcd(m, n) while m ~= 0 do m, n = math.fmod(n, m), m; end return n; end
  632. local function set_aspect_ratio(aspect_ratio_multiplier) local screen_width, screen_height = draw_GetScreenSize(); local aspectratio_value = (screen_width*aspect_ratio_multiplier)/screen_height; if aspect_ratio_multiplier == 1 or not aspect_ratio_check:GetValue() then aspectratio_value = 0; end client_SetConVar( "r_aspectratio", tonumber(aspectratio_value), true); end
  633. local function on_aspect_ratio_changed() local screen_width, screen_height = draw_GetScreenSize(); for i=1, 200 do local i2=i*0.01;    i2 = 2 - i2; local divisor = gcd(screen_width*i2, screen_height); if screen_width*i2/divisor < 100 or i2 == 1 then aspect_ratio_table[i] = screen_width*i2/divisor .. ":" .. screen_height/divisor;  end  end local aspect_ratio = aspect_ratio_reference:GetValue()*0.01; aspect_ratio = 2 - aspect_ratio; set_aspect_ratio(aspect_ratio); end
  634. cb_Register('Draw', "aspect ratio" ,on_aspect_ratio_changed);
  635.  
  636. -- knife on left hand
  637.  
  638. local K_O_L_H = gui.Checkbox(miscgroupbox, "msc_knifelefthand", "Knife On Left Hand", false)
  639. function on_knife_righthand()
  640. if not K_O_L_H:GetValue() then return end
  641. if GetLocalPlayer() == nil then return end
  642. if GetLocalPlayer():GetHealth() == nil or GetLocalPlayer():GetHealth() <= 0 then client_exec("cl_righthand 1", true); return; end
  643. local wep = GetLocalPlayer():GetPropEntity("m_hActiveWeapon");
  644. if wep == nil then return; end local cwep = wep:GetClass();
  645. if cwep == "CKnife" then client_exec("cl_righthand 0", true); else client_exec("cl_righthand 1", true); end end
  646. cb_Register("Draw", "knife", on_knife_righthand);
  647.  
  648. -- skeet hitsoud
  649.  
  650. local MSC_PART_REF = gui.Reference( "MISC", "ENHANCEMENT", "Hitmarkers" );
  651. local AWMetallicHitsound = gui.Checkbox( miscgroupbox, "lua_hitsound", "Metallic Hitsound (Skeet)", 0 );
  652. local mhvolume = gui.Slider( miscgroupbox, "mhvolume", "Volume", 0, 0, 100)
  653. local function MetallicHitsound( Event )
  654.  
  655.  
  656.     if AWMetallicHitsound:GetValue() then
  657.         if gui.GetValue( "msc_hitmarker_enable" ) then
  658.             gui.SetValue( "msc_hitmarker_enable", 0 );
  659.         end
  660.         if ( Event:GetName() == "player_hurt" ) then
  661.             local ME = client.GetLocalPlayerIndex();
  662.             local INT_UID = Event:GetInt( "userid" );
  663.             local INT_ATTACKER = Event:GetInt( "attacker" );
  664.             local NAME_Victim = client.GetPlayerNameByUserID( INT_UID );
  665.             local INDEX_Victim = client.GetPlayerIndexByUserID( INT_UID );
  666.             local NAME_Attacker = client.GetPlayerNameByUserID( INT_ATTACKER );
  667.             local INDEX_Attacker = client.GetPlayerIndexByUserID( INT_ATTACKER );
  668.             if ( INDEX_Attacker == ME and INDEX_Victim ~= ME ) then
  669.                 volume = gui.GetValue("mhvolume");
  670.                 client.Command("playvol buttons\\arena_switch_press_02.wav "..volume, true);
  671.             end
  672.         end
  673.     end
  674. end
  675. client.AllowListener( "player_hurt" );
  676. callbacks.Register( "FireGameEvent", "Metallic Hitsound", MetallicHitsound );
  677.  
  678. -- hit log
  679.  
  680. local HitLog = gui.Checkbox(miscgroupbox, "msc_hitlog", "Hit Log", false)
  681. function HitGroup(i_hitgroup) if i_hitgroup == nil then return; elseif i_hitgroup == 0 then return "body"; elseif i_hitgroup == 1 then return "head"; elseif i_hitgroup == 2 then return "chest"; elseif i_hitgroup == 3 then return "stomach"; elseif i_hitgroup == 4 then return "left arm"; elseif i_hitgroup == 5 then return "right arm";  elseif i_hitgroup == 6 then return "left leg"; elseif i_hitgroup == 7 then return "right leg"; elseif i_hitgroup == 10 then return "body"; end end
  682. local draw_hitsay = {};
  683. function ChatLogger(Event)
  684. if HitLog:GetValue() then
  685. if Event:GetName() == nil then return;
  686. elseif (Event:GetName() == 'player_hurt') then
  687. local ME = LocalPlayerIndex();
  688. local uid = Event:GetInt('userid');
  689. local i_attacker = Event:GetInt('attacker');
  690. local i_dmg = Event:GetString('dmg_health');
  691. local i_health = Event:GetString('health');
  692. local i_hitgroup = Event:GetInt('hitgroup');
  693. local ind_Attacker = PlayerIndexByUserID(i_attacker);
  694. local N_Attacker = PlayerNameByUserID(i_attacker);
  695. local ind_Victim = PlayerIndexByUserID(uid);
  696. local n_Victim = PlayerNameByUserID(uid);
  697. hitPlayerName = ""; hitSpot = ""; hitDmg = ""; hitHealthRemaining = "";
  698. hitPlayerName = n_Victim; hitSpot = i_hitgroup; hitDmg = i_dmg; hitHealthRemaining = i_health;
  699. response = string.format("Hit %s in the %s for %s damage (%s health remaining)\n", hitPlayerName, HitGroup(hitSpot), hitDmg, hitHealthRemaining);
  700. if ( ind_Attacker == ME and ind_Victim ~= ME ) then print(response);
  701. table.insert(draw_hitsay, {globals.RealTime(), response}); end end end end
  702. local On_Screen_Time, pixels_between_each_line, ScreenX, ScreenY = 10, 10, 10, 10
  703. function hitlog()
  704. if HitLog:GetValue() then local things_on_screen = 0;
  705. for k, l in pairs(draw_hitsay) do
  706. if globals.RealTime() > l[1] + On_Screen_Time then table.remove(draw_hitsay, k); else
  707. draw_Color(255,255,255,255); draw.SetFont(); draw_TextShadow(ScreenX, things_on_screen * pixels_between_each_line + ScreenY, l[2]); things_on_screen = things_on_screen + 1; end end end end
  708. c_AllowListener('player_hurt'); cb_Register('Draw', 'drawing your hits', hitlog); cb_Register('FireGameEvent', 'ChatLogger', ChatLogger);  
  709.  
  710. --------------------------------AA---------------------------------
  711.  
  712. -- Manual AA
  713.  
  714. leftKey = -1;
  715. backKey = -1;
  716. rightKey = -1;
  717. check_indicator = gui.Checkbox( aagroupgox, "Enable", "Manual Anti-Aim", false);
  718. outline_check = gui.Checkbox( aagroupgox, "Outline", "Outline", false);
  719. antiAimLeft = gui.Keybox(aagroupgox, "antiAimLeft", "Left", 0);
  720. antiAimRight = gui.Keybox(aagroupgox, "antiAimRight", "Right", 0);
  721. antiAimBack = gui.Keybox(aagroupgox, "antiAimBack", "Back", 0);
  722. local standdef = gui.GetValue("rbot_antiaim_stand_real_add");
  723. local movedef = gui.GetValue("rbot_antiaim_move_real_add");
  724. local autodirdef = gui.GetValue("rbot_antiaim_at_targets");
  725. local customaddleft = gui.Slider(aagroupgox, "customaddleft", "Left Yaw Add (Default -90)", -90, -180, 180)
  726. local customaddright = gui.Slider(aagroupgox, "customaddright", "Right Yaw Add (Default 90)", 90, -180, 180)
  727. local customaddbacl = gui.Slider(aagroupgox, "customaddback", "Back Yaw Add (Default 0)", 0, -180, 180)
  728.  
  729.  
  730. R = gui.Slider(aagroupgox, "R", "R", 0, 0, 255);
  731. G = gui.Slider(aagroupgox, "G", "G", 0, 0, 255);
  732. B = gui.Slider(aagroupgox, "B", "B", 0, 0, 255);
  733. A = gui.Slider(aagroupgox, "A", "A", 255, 0, 255);
  734.  
  735. S = gui.Slider(aagroupgox, "S", "Indicator Size", 40, 0, 70);
  736.  
  737. S1 = gui.Slider(aagroupgox, "S1", "Font Size", 40, 0, 70);
  738.  
  739.  
  740.  
  741.  
  742. --You can change the RGBA to your liking.
  743. arrowSize = 40;
  744. arrowR = 255;
  745. arrowG = 255;
  746. arrowB = 255;
  747. arrowA = 150;
  748.  
  749. local function main()  
  750.    if antiAimLeft:GetValue() ~= 0 then
  751.        if input.IsButtonPressed(antiAimLeft:GetValue()) then
  752.            leftKey = leftKey * -1;
  753.            backKey = -1;
  754.            rightKey = -1;
  755.            gui.SetValue("rbot_antiaim_stand_real_add", gui.GetValue("customaddleft"));
  756.            gui.SetValue("rbot_antiaim_move_real_add", gui.GetValue("customaddleft"));
  757.            gui.SetValue("rbot_antiaim_at_targets", 0);
  758.        end
  759.    end
  760.    if antiAimBack:GetValue() ~= 0 then
  761.        if input.IsButtonPressed(antiAimBack:GetValue()) then
  762.            backKey = backKey * -1;
  763.            leftKey = -1;
  764.            rightKey = -1;
  765.            gui.SetValue("rbot_antiaim_stand_real_add", gui.GetValue("customaddback"));
  766.             gui.SetValue("rbot_antiaim_move_real_add", gui.GetValue("customaddback"));
  767.             gui.SetValue("rbot_antiaim_at_targets", 0);
  768.        end
  769.    end
  770.    if antiAimRight:GetValue() ~= 0 then
  771.        if input.IsButtonPressed(antiAimRight:GetValue()) then
  772.            rightKey = rightKey * -1;
  773.            leftKey = -1;
  774.            backKey = -1;
  775.            gui.SetValue("rbot_antiaim_stand_real_add", gui.GetValue("customaddright"));
  776.            gui.SetValue("rbot_antiaim_move_real_add", gui.GetValue("customaddright"));
  777.            gui.SetValue("rbot_antiaim_at_targets", 0);
  778.        end
  779.    end
  780. end
  781.  
  782.  
  783. function SetAuto()
  784.   gui.SetValue("rbot_antiaim_stand_real_add", 0);
  785.   gui.SetValue("rbot_antiaim_move_real_add", 0);
  786.   gui.SetValue("rbot_antiaim_at_targets", 1);
  787. end
  788.  
  789. function draw_indicator()
  790.  
  791.  arrowR = gui.GetValue("R");
  792.  arrowG = gui.GetValue("G");
  793.  arrowB = gui.GetValue("B");
  794.  arrowA = gui.GetValue("A");
  795.  
  796.    arrowSize = math.floor(gui.GetValue("S"));
  797.    textSize = math.floor(gui.GetValue("S1"));
  798.  
  799.  
  800.  
  801.    local active = check_indicator:GetValue();
  802.  
  803.    if active then
  804.    local arrowFont = draw.CreateFont("Arial", arrowSize, 30);
  805.      local textFont = draw.CreateFont("Arial", textSize, 30);
  806.       draw.SetFont(arrowFont);
  807.    local w, h = draw.GetScreenSize();
  808.        if (leftKey == 1) then
  809.            draw.Color(arrowR, arrowG, arrowB, arrowA);
  810.  
  811.            if(outline_check:GetValue()) then
  812.                draw.TextShadow( w/2 - w/14.7692307692, h/2 - arrowSize/2, "〈"); --Uncomment if u want arrows to have an outline. I personally don't like it. (Also delete previous line so you dont draw twice).
  813.                   else
  814.                      draw.Text( w/2 - w/14.7692307692, h/2 - arrowSize/2, "〈");
  815.            end
  816.  
  817.  
  818.        elseif (backKey == 1) then
  819.  
  820.            draw.Color(arrowR, arrowG, arrowB, arrowA);
  821.  
  822.            if(outline_check:GetValue()) then
  823.              draw.TextShadow( w/2 - arrowSize/2.4, h/2 + h/11.7391304348, "♕"); --Uncomment if u want arrows to have an outline. I personally don't like it. (Also delete previous line so you dont draw twice).
  824.            else
  825.                       draw.Text( w/2 - arrowSize/2.35, h/2 + h/11.7391304348, "♕");
  826.            end
  827.  
  828.  
  829.        elseif (rightKey == 1) then
  830.  
  831.  
  832.            draw.Color(arrowR, arrowG, arrowB, arrowA);
  833.            if(outline_check:GetValue()) then
  834.              draw.TextShadow( w/2 + w/20.2105263158, h/2 - arrowSize/2, "〉"); --Uncomment if u want arrows to have an outline. I personally don't like it. (Also delete previous line so you dont draw twice).
  835.            else
  836.                  draw.Text( w/2 + w/20.2105263158, h/2 - arrowSize/2, "〉");
  837.            end
  838.        else
  839.            draw.SetFont(textFont);
  840.            draw.Color(arrowR, arrowG, arrowB, 200);
  841.            draw.TextShadow(15, h/2, "AUTO");
  842.            SetAuto();
  843.            
  844.  
  845.        end
  846.    end
  847. end
  848.  
  849. callbacks.Register( "Draw", "main", main);
  850. callbacks.Register( "Draw", "draw_indicator", draw_indicator);
  851.  
  852. -- Inverter Key
  853.  
  854. local invertKey = gui.Keybox(aagroupgox, "cluainvert_key", "Inverter key", false)
  855. local desyncators = gui.Multibox(aagroupgox, "Indicators")
  856. local dArrows = gui.Checkbox(desyncators, "cluadesync_arrows", "Arrows (Real)", false)
  857. local dText = gui.Checkbox(desyncators, "cluadesync_text", "Text", false)
  858. local vleftDesync = 3;
  859. local vrightDesync = 2;
  860. local eleftDesync = 2;
  861. local erightDesync = 3;
  862. local activeSide = "null";
  863. iR = gui.Slider(aagroupgox, "iR", "R", 0, 0, 255);
  864. iG = gui.Slider(aagroupgox, "iG", "G", 0, 0, 255);
  865. iB = gui.Slider(aagroupgox, "iB", "B", 0, 0, 255);
  866. iA = gui.Slider(aagroupgox, "iA", "A", 255, 0, 255);
  867. local function inverter()
  868.     if entities.GetLocalPlayer() ~= nil then
  869.         if invertKey:GetValue() == 0 then return end
  870.         if input.IsButtonPressed(invertKey:GetValue()) and not input.IsButtonDown(69) then
  871.             if rightDesync == false then
  872.                 gui.SetValue("rbot_antiaim_stand_desync", vrightDesync);
  873.                 gui.SetValue("rbot_antiaim_move_desync", vrightDesync);
  874.                 rightDesync = not rightDesync;
  875.             else
  876.                 gui.SetValue("rbot_antiaim_stand_desync", vleftDesync);
  877.                 gui.SetValue("rbot_antiaim_move_desync", vleftDesync);
  878.                 rightDesync = not rightDesync;
  879.             end
  880.         else if input.IsButtonPressed(invertKey:GetValue()) and input.IsButtonDown(69) then
  881.             if rightDesync == false then
  882.                 gui.SetValue("rbot_antiaim_stand_desync", erightDesync);
  883.                 gui.SetValue("rbot_antiaim_move_desync", erightDesync);
  884.                 rightDesync = not rightDesync;
  885.             else
  886.                 gui.SetValue("rbot_antiaim_stand_desync", eleftDesync);
  887.                 gui.SetValue("rbot_antiaim_move_desync", eleftDesync);
  888.                 rightDesync = not rightDesync;
  889.             end
  890.         end
  891.         end
  892.     end
  893. end
  894. callbacks.Register("Draw", "inverter", inverter)
  895. local function indicators()
  896.  
  897.  cR = gui.GetValue("iR");
  898.  cG = gui.GetValue("iG");
  899.  cB = gui.GetValue("iB");
  900.  cA = gui.GetValue("iA");
  901.  
  902.     if entities.GetLocalPlayer() ~= nil then
  903.         local x, y = draw.GetScreenSize()
  904.         local textFont = draw.CreateFont('Verdana', 30, 30)
  905.         local arrowFont = draw.CreateFont('Verdana', 100, 300)
  906.         draw.SetFont(textFont)
  907.         if not rightDesync then
  908.             if gui.GetValue("cluadesync_text") == true then
  909.                 draw.Color(cR, cG, cB, cA)
  910.                 draw.Text(20, y - 200, "REAL: RIGHT")
  911.                 draw.TextShadow(20, y - 200, "REAL: RIGHT")
  912.             end
  913.  
  914.             if gui.GetValue("cluadesync_arrows") == true then
  915.                 draw.SetFont(arrowFont)
  916.                 draw.Color(255, 255, 255, cA)
  917.                 draw.Text(x/2 - 75, y/2 - 55, "﹙")
  918.                 draw.TextShadow(x/2 - 75, y/2 - 55, "﹙")
  919.                 draw.Color(cR, cG, cB, cA)
  920.                 draw.Text(x/2 + 10, y/2 - 55, "﹚")
  921.                 draw.TextShadow(x/2 + 10, y/2 - 55, "﹚")
  922.             end
  923.  
  924.         else if rightDesync then
  925.             if gui.GetValue("cluadesync_text") == true then
  926.                 draw.Color(cR, cG, cB, cA)
  927.                 draw.Text(20, y - 200, "REAL: LEFT")
  928.                 draw.TextShadow(20, y - 200, "REAL: LEFT")
  929.             end
  930.  
  931.             if gui.GetValue("cluadesync_arrows") == true then
  932.                 draw.SetFont(arrowFont)
  933.                 draw.Color(cR, cG, cB, cA)
  934.                 draw.Text(x/2 - 75, y/2 - 55, "﹙")
  935.                 draw.TextShadow(x/2 - 75, y/2 - 55, "﹙")
  936.                 draw.Color(255, 255, 255, cA)
  937.                 draw.Text(x/2 + 10, y/2 - 55, "﹚")
  938.                 draw.TextShadow(x/2 + 10, y/2 - 55, "﹚")
  939.             end
  940.         else
  941.             if gui.GetValue("cluadesync_text") == true then
  942.                 draw.Color(cR, cG, cB, cA)
  943.                 draw.Text(30, y - 600, "INVERTER: OFF")
  944.                 draw.TextShadow(30, y - 600, "INVERTER: OFF")
  945.             end
  946.  
  947.             if gui.GetValue("cluadesync_arrows") == true then
  948.                 draw.SetFont(arrowFont)
  949.                 draw.Color(255, 255, 255, cA)
  950.                 draw.Text(x/2 - 75, y/2 - 55, "﹚")
  951.                 draw.TextShadow(x/2 - 75, y/2 - 55, "﹚")
  952.                 draw.Color(255, 255, 255, cA)
  953.                 draw.Text(x/2 + 10, y/2 - 55, "﹙")
  954.                 draw.TextShadow(x/2 + 10, y/2 - 55, "﹙")
  955.             end
  956.         end
  957.         end
  958.     end
  959. end
  960. callbacks.Register("Draw", "indicators", indicators)
  961.  
  962. -- menu toggle (DO NOT EDIT)
  963.  
  964.  
  965. local awMenu = gui.Reference("MENU");
  966.  
  967. local function hideMenu()
  968.     if awMenu:IsActive() then
  969.         eActive = 1
  970.     else
  971.         eActive = 0
  972.     end
  973.     if (essentialsmenu:GetValue()) then
  974.         window:SetActive(eActive);
  975.     else
  976.         window:SetActive(0);
  977.     end
  978. end
  979. callbacks.Register("Draw", "hideMenu", hideMenu)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement