Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Essentials Lua By The_Belch
- -- dependencies
- print("Successfully Loaded Aimware Essentials Lua")
- local menuloc = gui.Reference("SETTINGS", "MISCELLANEOUS");
- 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
- -- GUI Additions
- local essentialsmenu = gui.Checkbox(menuloc, "essentialslua", "Show Aimware Essentials", false);
- -- window
- local window = gui.Window("essentialswindow", "Aimware Essentials", 1200, 300, 500, 700)
- local hvhgroupbox = gui.Groupbox(window, "HvH Essentials", 10, 20, 230, 300)
- local visualsgroupbox = gui.Groupbox(window, "Visuals Essentials", 260, 20, 230, 300)
- local miscgroupbox = gui. Groupbox(window, "Misc Essentials", 260, 350, 230, 300)
- local aagroupgox = gui.Groupbox(window, "Manual AA", 10, 350, 230, 300)
- -----------------------------HVH-------------------------
- -- jumpshot
- local jumpshot = gui.Checkbox(hvhgroupbox, "jumpshot", "Jumpscout Fix", false)
- local function jumpshot()
- if gui.GetValue("jumpshot") == true then
- local velocity = vector.Length(entities.GetLocalPlayer():GetPropVector("localdata", "m_vecVelocity[0]"))
- gui.SetValue("msc_autostrafer_enable", 0)
- if input.IsButtonDown(32) then
- local x,y,z = entities.GetLocalPlayer():GetPropVector("localdata", "m_vecVelocity[0]")
- local velocity = math.sqrt(x^2 + y^2)
- if velocity >= 5 then
- gui.SetValue("msc_autostrafer_enable", 1)
- else
- gui.SetValue("msc_autostrafer_enable", 0)
- end
- end
- end
- end
- callbacks.Register("CreateMove", jumpshot)
- -- fakeduck improvements
- local fakeduckEnabled = gui.Checkbox(hvhgroupbox, "fdfakelag", "Fakeduck Fakelag", false)
- local fakeduckDisable = gui.Checkbox(hvhgroupbox, "fdaafix", "Fakeduck AA Fix", false)
- local fakeduckKey = gui.GetValue("rbot_antiaim_fakeduck")
- local fakeducking = false
- local fakeduck_mode = 0;
- local fakeduck_value = 4;
- local fakeduck_valueB, fakeduck_modeB, desyncS, desyncM;
- function fakeduckFix()
- if entities.GetLocalPlayer() ~= nil then
- if fakeduckEnabled:GetValue() == true and fakeduckKey ~= nil then
- if input.IsButtonDown( fakeduckKey ) then
- if fakeducking == false then
- fakeduck_modeB = gui.GetValue("msc_fakelag_mode")
- fakeduck_valueB = gui.GetValue("msc_fakelag_value")
- desyncS = gui.GetValue("rbot_antiaim_stand_desync")
- desyncM = gui.GetValue("rbot_antiaim_move_desync")
- fakeducking = true;
- end
- if fakeduckDisable:GetValue() == true then
- gui.SetValue("rbot_antiaim_stand_desync", 0)
- gui.SetValue("rbot_antiaim_move_desync", 0)
- end
- gui.SetValue("msc_fakelag_mode", fakeduck_mode)
- gui.SetValue("msc_fakelag_value", fakeduck_value)
- else
- if fakeducking == true then
- gui.SetValue("msc_fakelag_enable", 1)
- gui.SetValue("msc_fakelag_mode", fakeduck_modeB)
- gui.SetValue("msc_fakelag_value", fakeduck_valueB)
- gui.SetValue("rbot_antiaim_stand_desync", desyncS)
- gui.SetValue("rbot_antiaim_move_desync", desyncM)
- fakeducking = false;
- end
- end
- end
- end
- end
- callbacks.Register("Draw", "fakeduckFix", fakeduckFix)
- -- fakeduck indicator
- local fdind = gui.Checkbox(hvhgroupbox, "fdind", "Fakeduck Indicator", false)
- local storedTick = 0
- local crouched_ticks = { }
- fdR = gui.Slider(hvhgroupbox, "fdR", "R", 0, 0, 255);
- fdG = gui.Slider(hvhgroupbox, "fdG", "G", 0, 0, 255);
- fdB = gui.Slider(hvhgroupbox, "fdB", "B", 0, 0, 255);
- fdA = gui.Slider(hvhgroupbox, "fdA", "A", 255, 0, 255);
- fR = gui.GetValue("fdR");
- fG = gui.GetValue("fdG");
- fB = gui.GetValue("fdB");
- fA = gui.GetValue("fdA");
- local function toBits(num)
- local t = { }
- while num > 0 do
- rest = math.fmod(num,2)
- t[#t+1] = rest
- num = (num-rest) / 2
- end
- return t
- end
- callbacks.Register("DrawESP", "FD_Indicator", function(Builder)
- local g_Local = entities.GetLocalPlayer()
- local Entity = Builder:GetEntity()
- if g_Local == nil or Entity == nil or not Entity:IsPlayer() or not Entity:IsAlive() then
- return
- end
- local index = Entity:GetIndex()
- local m_flDuckAmount = Entity:GetProp("m_flDuckAmount")
- local m_flDuckSpeed = Entity:GetProp("m_flDuckSpeed")
- local m_fFlags = Entity:GetProp("m_fFlags")
- if crouched_ticks[index] == nil then
- crouched_ticks[index] = 0
- end
- if m_flDuckSpeed ~= nil and m_flDuckAmount ~= nil then
- if m_flDuckSpeed == 8 and m_flDuckAmount <= 0.9 and m_flDuckAmount > 0.01 and toBits(m_fFlags)[1] == 1 then
- if storedTick ~= globals.TickCount() then
- crouched_ticks[index] = crouched_ticks[index] + 1
- storedTick = globals.TickCount()
- end
- if gui.GetValue("fdind") == true then
- if crouched_ticks[index] >= 5 then
- Builder:Color(fR, fG, fB, fA)
- Builder:AddTextTop("Fake Duck")
- end
- else
- crouched_ticks[index] = 0
- end
- end
- end
- end)
- -- autobuy
- local Autobuy_Text = gui.Text( hvhgroupbox, "Autobuy" );
- local Autobuy_Enable = gui.Checkbox( hvhgroupbox, "lua_autobuy_enable", "Enable", 0 );
- 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" );
- 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" );
- local Autobuy_Armor = gui.Combobox( hvhgroupbox, "lua_autobuy_armor", "Armor", "Off", "Kevlar", "Kevlar + Helmet" );
- local Autobuy_Defuser = gui.Checkbox( hvhgroupbox, "lua_autobuy_defuser", "Defuser", 0 );
- local Autobuy_Taser = gui.Checkbox( hvhgroupbox, "lua_autobuy_taser", "Taser", 0 );
- local Autobuy_HEGrenade = gui.Checkbox( hvhgroupbox, "lua_autobuy_hegrenade", "HE Grenade", 0 );
- local Autobuy_Smoke = gui.Checkbox( hvhgroupbox, "lua_autobuy_smoke", "Smoke", 0 );
- local Autobuy_Molotov = gui.Checkbox( hvhgroupbox, "lua_autobuy_molotov", "Molotov", 0 );
- local Autobuy_Flashbang = gui.Checkbox( hvhgroupbox, "lua_autobuy_flashbang", "Flashbang", 0 );
- local Autobuy_Decoy = gui.Checkbox( hvhgroupbox, "lua_autobuy_decoy", "Decoy", 0 );
- local Money = 0
- local function LocalPlayerMoney()
- if Autobuy_Enable:GetValue() then
- if entities.GetLocalPlayer() ~= nil then
- Money = entities.GetLocalPlayer():GetProp( "m_iAccount" )
- end
- end
- end
- local function Autobuy( Event )
- local PrimaryWeapon = Autobuy_PrimaryWeapon:GetValue()
- local SecondaryWeapon = Autobuy_SecondaryWeapon:GetValue()
- local Armor = Autobuy_Armor:GetValue()
- if Autobuy_Enable:GetValue() then
- if Event:GetName() ~= "player_spawn" then
- return;
- end
- local INT_UID = Event:GetInt( "userid" );
- local PlayerIndex = client.GetPlayerIndexByUserID( INT_UID );
- if client.GetLocalPlayerIndex() == PlayerIndex then
- ME = true
- else
- ME = false
- end
- if ME and Money == 0 then
- -- Primary Weapon
- if PrimaryWeapon == 1 then client.Command( "buy scar20", true ); -- Auto
- elseif PrimaryWeapon == 2 then client.Command( "buy ssg08", true ); -- Scout
- elseif PrimaryWeapon == 3 then client.Command( "buy awp", true ); -- AWP
- elseif PrimaryWeapon == 4 then client.Command( "buy ak47", true ); -- Rifle
- elseif PrimaryWeapon == 5 then client.Command( "buy famas", true ); -- Famas : Galil AR
- elseif PrimaryWeapon == 6 then client.Command( "buy aug", true ); -- AUG : SG 553
- elseif PrimaryWeapon == 7 then client.Command( "buy mac10", true ); -- MP9 : MAC-10
- elseif PrimaryWeapon == 8 then client.Command( "buy mp7", true ); -- MP7 : MP5-SD
- elseif PrimaryWeapon == 9 then client.Command( "buy ump45", true ); -- UMP-45
- elseif PrimaryWeapon == 10 then client.Command( "buy p90", true ); -- P90
- elseif PrimaryWeapon == 11 then client.Command( "buy bizon", true ); -- PP-Bizon
- elseif PrimaryWeapon == 12 then client.Command( "buy nova", true ); -- Nova
- elseif PrimaryWeapon == 13 then client.Command( "buy xm1014", true ); -- XM1014
- elseif PrimaryWeapon == 14 then client.Command( "buy mag7", true ); -- MAG-7 : Sawed-Off
- elseif PrimaryWeapon == 15 then client.Command( "buy m249", true ); -- M249
- elseif PrimaryWeapon == 16 then client.Command( "buy negev", true ); -- Negev
- end
- -- Secondary Weapon
- if SecondaryWeapon == 1 then client.Command( "buy elite", true ); -- Dual Berettas
- elseif SecondaryWeapon == 2 then client.Command( "buy p250", true ); -- P250
- elseif SecondaryWeapon == 3 then client.Command( "buy tec9", true ); -- Five-Seven : CZ75-Auto : Tec-9
- elseif SecondaryWeapon == 4 then client.Command( "buy deagle", true ); -- Desert Eagle : R8 Revolver
- end
- -- Taser
- if Autobuy_Taser:GetValue() then
- client.Command( "buy taser", true );
- end
- elseif ME and Money <= 800 then
- -- Secondary Weapon
- if SecondaryWeapon == 1 then client.Command( "buy elite", true ); -- Dual Berettas
- elseif SecondaryWeapon == 2 then client.Command( "buy p250", true ); -- P250
- elseif SecondaryWeapon == 3 then client.Command( "buy tec9", true ); -- Five-Seven : CZ75-Auto : Tec-9
- elseif SecondaryWeapon == 4 then client.Command( "buy deagle", true ); -- Desert Eagle : R8 Revolver
- end
- -- Taser
- if Autobuy_Taser:GetValue() then
- client.Command( "buy taser", true );
- end
- elseif ME and Money > 800 then
- -- Primary Weapon
- if PrimaryWeapon == 1 then client.Command( "buy scar20", true ); -- Auto
- elseif PrimaryWeapon == 2 then client.Command( "buy ssg08", true ); -- Scout
- elseif PrimaryWeapon == 3 then client.Command( "buy awp", true ); -- AWP
- elseif PrimaryWeapon == 4 then client.Command( "buy ak47", true ); -- Rifle
- elseif PrimaryWeapon == 5 then client.Command( "buy famas", true ); -- Famas : Galil AR
- elseif PrimaryWeapon == 6 then client.Command( "buy aug", true ); -- AUG : SG 553
- elseif PrimaryWeapon == 7 then client.Command( "buy mac10", true ); -- MP9 : MAC-10
- elseif PrimaryWeapon == 8 then client.Command( "buy mp7", true ); -- MP7 : MP5-SD
- elseif PrimaryWeapon == 9 then client.Command( "buy ump45", true ); -- UMP-45
- elseif PrimaryWeapon == 10 then client.Command( "buy p90", true ); -- P90
- elseif PrimaryWeapon == 11 then client.Command( "buy bizon", true ); -- PP-Bizon
- elseif PrimaryWeapon == 12 then client.Command( "buy nova", true ); -- Nova
- elseif PrimaryWeapon == 13 then client.Command( "buy xm1014", true ); -- XM1014
- elseif PrimaryWeapon == 14 then client.Command( "buy mag7", true ); -- MAG-7 : Sawed-Off
- elseif PrimaryWeapon == 15 then client.Command( "buy m249", true ); -- M249
- elseif PrimaryWeapon == 16 then client.Command( "buy negev", true ); -- Negev
- end
- -- Secondary Weapon
- if SecondaryWeapon == 1 then client.Command( "buy elite", true ); -- Dual Berettas
- elseif SecondaryWeapon == 2 then client.Command( "buy p250", true ); -- P250
- elseif SecondaryWeapon == 3 then client.Command( "buy tec9", true ); -- Five-Seven : CZ75-Auto : Tec-9
- elseif SecondaryWeapon == 4 then client.Command( "buy deagle", true ); -- Desert Eagle : R8 Revolver
- end
- -- Armor
- if Armor == 1 then client.Command( "buy vest", true );
- elseif Armor == 2 then client.Command( "buy vesthelm", true );
- end
- -- Defuser
- if Autobuy_Defuser:GetValue() then
- client.Command( "buy defuser", true );
- end
- -- Taser
- if Autobuy_Taser:GetValue() then
- client.Command( "buy taser", true );
- end
- -- HE Grenade
- if Autobuy_HEGrenade:GetValue() then
- client.Command( "buy hegrenade", true );
- end
- -- Smoke
- if Autobuy_Smoke:GetValue() then
- client.Command( "buy smokegrenade", true );
- end
- -- Molotov
- if Autobuy_Molotov:GetValue() then
- client.Command( "buy molotov", true );
- end
- -- Flashbang
- if Autobuy_Flashbang:GetValue() then
- client.Command( "buy flashbang", true );
- end
- -- Decoy
- if Autobuy_Decoy:GetValue() then
- client.Command( "buy decoy", true );
- end
- end
- end
- end
- client.AllowListener( "player_spawn" )
- callbacks.Register( "Draw", "Local Player Money", LocalPlayerMoney )
- callbacks.Register( "FireGameEvent", "Autobuy", Autobuy )
- ----------------------VISUALS-------------------------
- -- bomb timer
- local bombtimer = gui.Checkbox(visualsgroupbox, "bombtimer", "Bomb Timer", false)
- local ref = gui.Reference("MISC", "GENERAL", "Main");
- local mouseX, mouseY, x, y, dx, dy, w, h = 0, 0, 650, 10, 0, 0, 400, 50;
- local shouldDrag = false;
- local fonticon = draw.CreateFont("icomoon", 25, 25);
- local fontinfo = draw.CreateFont("Verdana", 15, 15);
- local fonttext = draw.CreateFont("Verdana", 15, 15);
- local fontbombtext = draw.CreateFont("skeet Smallest Pixel-7 Modified", 10, 15);
- local defusing = false;
- function EventHook(Event)
- if gui.GetValue("bombtimer") == true then
- if Event:GetName() == "bomb_begindefuse" then
- defusing = true;
- elseif Event:GetName() == "bomb_abortdefuse" then
- defusing = false;
- elseif Event:GetName() == "round_officially_ended"
- or Event:GetName() == "bomb_defused" or Event:GetName() == "bomb_exploded" then
- defusing = false;
- end
- end
- local function dragFeature()
- if input.IsButtonDown(1) then
- mouseX, mouseY = input.GetMousePos();
- if shouldDrag then
- x = mouseX - dx;
- y = mouseY - dy;
- end
- if mouseX >= x and mouseX <= x + w and mouseY >= y and mouseY <= y + 40 then
- shouldDrag = true;
- dx = mouseX - x;
- dy = mouseY - y;
- end
- else
- shouldDrag = false;
- end
- end
- local function drawTimer()
- if entities.FindByClass("CPlantedC4")[1] ~= nil then
- local Bomb = entities.FindByClass("CPlantedC4")[1];
- if Bomb:GetProp("m_bBombTicking") and Bomb:GetProp("m_bBombDefused") == 0 and globals.CurTime() < Bomb:GetProp("m_flC4Blow") then
- local Player = entities.GetLocalPlayer();
- if defusing == true then
- local BombMath = ((globals.CurTime() - Bomb:GetProp("m_flDefuseCountDown")) * 0.5) / ((Bomb:GetProp("m_flDefuseCountDown") - Bomb:GetProp("m_flDefuseLength")) - Bomb:GetProp("m_flDefuseCountDown")) + 1;
- draw.Color(8, 8, 8, 30)
- draw.FilledRect(x, y, x + w, y + h)
- draw.FilledRect(x - 65, y, x + (w - 405), y + h )
- draw.Color(8, 8, 8, 90)
- draw.FilledRect(x + 20, y + 20, x + (w - 20), y + h - 20)
- draw.Color(0, 150, 255, 240)
- draw.FilledRect(x + 20, y + 20, (x + 20) * BombMath, y + h - 20)
- draw.Color(180, 180, 180, 120)
- draw.OutlinedRect(x, y, x + w, y + h)
- draw.OutlinedRect(x - 65,y , x + (w - 405), y + h)
- draw.Color(255, 255, 255, 255)
- draw.SetFont(fontbombtext)
- draw.Text(x - 48, y + 30, "BOMB")
- draw.SetFont(fonticon)
- draw.Text(x - 50, y + 10, "y")
- else
- local BombMath = ((globals.CurTime() - Bomb:GetProp("m_flC4Blow")) * 0.5) / ((Bomb:GetProp("m_flC4Blow") - Bomb:GetProp("m_flTimerLength")) - Bomb:GetProp("m_flC4Blow")) + 1;
- draw.Color(8, 8, 8, 30)
- draw.FilledRect(x, y, x + w, y + h)
- draw.FilledRect(x - 65, y, x + (w - 405), y + h )
- draw.Color(8, 8, 8, 90)
- draw.FilledRect(x + 20, y + 20, x + (w - 20), y + h - 20)
- draw.Color(130, 255, 0, 240)
- draw.FilledRect(x + 20, y + 20, (x + 20) * BombMath, y + h - 20)
- draw.Color(180, 180, 180, 120)
- draw.OutlinedRect(x, y, x + w, y + h)
- draw.OutlinedRect(x - 65,y , x + (w - 405), y + h)
- draw.Color(255, 255, 255, 255)
- draw.SetFont(fontbombtext)
- draw.Text(x - 48, y + 30, "BOMB")
- draw.SetFont(fonticon)
- draw.Text(x - 50, y + 10, "y")
- end
- if Player:IsAlive() and globals.CurTime() < Bomb:GetProp("m_flC4Blow") then
- if math.floor(0.5 + BombDamage(Bomb, Player)) >= Player:GetHealth() then
- draw.Color(255, 0, 0, 255)
- draw.SetFont(fontinfo)
- draw.Text(5, 0, "LETHAL");
- draw.TextShadow(5, 0, "LETHAL");
- else
- draw.Color(255, 255, 255, 255)
- draw.SetFont(fontinfo)
- draw.Text(5, 0, math.floor(0.5 + BombDamage(Bomb, Player)) .. " HP");
- draw.TextShadow(5, 0, math.floor(0.5 + BombDamage(Bomb, Player)) .. " HP");
- end
- end
- end
- end
- end
- function BombDamage(Bomb, Player)
- local C4Distance = math.sqrt((select(1,Bomb:GetAbsOrigin()) - select(1,Player:GetAbsOrigin())) ^ 2 +
- (select(2,Bomb:GetAbsOrigin()) - select(2,Player:GetAbsOrigin())) ^ 2 +
- (select(3,Bomb:GetAbsOrigin()) - select(3,Player:GetAbsOrigin())) ^ 2);
- local Gauss = (C4Distance - 75.68) / 789.2
- local flDamage = 450.7 * math.exp(-Gauss * Gauss);
- if Player:GetProp("m_ArmorValue") > 0 then
- local flArmorRatio = 0.5;
- local flArmorBonus = 0.5;
- if Player:GetProp("m_ArmorValue") > 0 then
- local flNew = flDamage * flArmorRatio;
- local flArmor = (flDamage - flNew) * flArmorBonus;
- if flArmor > Player:GetProp("m_ArmorValue") then
- flArmor = Player:GetProp("m_ArmorValue") * (1 / flArmorBonus);
- flNew = flDamage - flArmor;
- end
- flDamage = flNew;
- end
- end
- return math.max(flDamage, 0);
- end
- callbacks.Register( "Draw", "drag", dragFeature)
- callbacks.Register("FireGameEvent", "EventHookB", EventHook);
- callbacks.Register( "Draw", "drawTimer", drawTimer );
- end
- -- disable post prossesing
- local disablepost = gui.Checkbox(visualsgroupbox, "vis_disable_post", "Disable Post Processing", false)
- function disablepp()
- if disablepost:GetValue() then client_SetConVar("mat_postprocess_enable", 0, true); else client_SetConVar("mat_postprocess_enable", 1, true); end end
- cb_Register('Draw', "Disable Post Processing" ,disablepp);
- -- full bright
- local fullbright = gui.Checkbox(visualsgroupbox, "fulbright", "Full Bright", false)
- function full_bright() if fullbright:GetValue() then client_SetConVar("mat_fullbright", 1, true); else client_SetConVar("mat_fullbright", 0, true); end end
- cb_Register('Draw', "Full brightness" ,full_bright);
- -- scoped fov fix
- local fovfix = gui.Checkbox(visualsgroupbox, "foxfix", "Fix Scope Fov", false)
- local fov_value = gui_GetValue("vis_view_fov")
- local vm_fov_value = gui_GetValue("vis_view_model_fov")
- function scopefov()
- local view_fov = gui_GetValue("vis_view_fov"); local view_model_fov = gui_GetValue("vis_view_model_fov");
- 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
- if fovfix:GetValue() then
- if GetLocalPlayer() ~= nil then
- 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);
- 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
- cb_Register("Draw", "scopefov", scopefov);
- -- engine radar
- local ERadar = gui.Checkbox(visualsgroupbox, "esp_engine_radar", "Engine Radar", false)
- function engineradar()
- if ERadar:GetValue() then ERval = 1; else ERval = 0; end
- for o, radar in pairs(entities_FindByClass("CCSPlayer")) do radar:SetProp("m_bSpotted", ERval); end end
- cb_Register("Draw", "engine radar", engineradar);
- -- sniper crosshairs
- local ComboCrosshair = gui.Combobox(visualsgroupbox, "vis_sniper_crosshair", "Force Sniper Crosshairs", "Off", "Force Crosshair", "Force Crosshair (+Scoped)", "Aimware Crosshair", "Draw Crosshair")
- function ifCrosshair()
- if GetLocalPlayer() == nil then return; end
- local Weapon = GetLocalPlayer():GetPropEntity("m_hActiveWeapon");
- local Scoped = GetLocalPlayer():GetProp("m_bIsScoped") == 1 or GetLocalPlayer():GetProp("m_bIsScoped") == 257
- if Weapon == nil then return; end
- local cWep = Weapon:GetClass();
- if cWep == "CWeaponAWP" or cWep == "CWeaponSSG08" or cWep == "CWeaponSCAR20" or cWep == "CWeaponG3SG1" then drawCrosshair = true;
- else drawCrosshair = false; end
- local screenCenterX, screenY = draw_GetScreenSize(); local scX, scY = screenCenterX / 2, screenY / 2;
- if drawCrosshair == true and ComboCrosshair:GetValue() == 0 then client_SetConVar("weapon_debug_spread_show", 0, true)
- 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
- elseif drawCrosshair == true and ComboCrosshair:GetValue() == 2 then gui_SetValue('esp_crosshair', false); client_SetConVar("weapon_debug_spread_show", 3, true)
- 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
- elseif drawCrosshair == false and ComboCrosshair:GetValue() == 3 then gui_SetValue('esp_crosshair', false)
- elseif drawCrosshair == true and ComboCrosshair:GetValue() == 4 then client_SetConVar("weapon_debug_spread_show", 0, true); gui_SetValue('esp_crosshair', false); draw.SetFont(ff);
- 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
- cb_Register("Draw", "sniper crosshairs", ifCrosshair);
- ---------------------------MISC------------------------
- -- viewmodel changer
- 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()
- local show2, pressed2 = false, true
- local ViewModelShown = gui.Checkbox(miscgroupbox, "msc_vme", "Viewmodel Changer", false)
- local VM_W = gui.Window("VM_W", "Viewmodel Changer", 200,200,200,300)
- local VMStuff = gui.Groupbox(VM_W, "Viewmodel Changer", 15, 14, 170, 240)
- local VM_e = gui.Checkbox(VMStuff, "msc_vme", "Enable", false)
- local xS = gui.Slider(VMStuff, "VM_X", "X", xO, -20, 20)
- local yS = gui.Slider(VMStuff, "VM_Y", "Y", yO, -100, 100)
- local zS = gui.Slider(VMStuff, "VM_Z", "Z", zO, -20, 20)
- 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
- 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
- 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);
- 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
- cb_Register("Draw", "p2", press2); cb_Register("Draw", "s2", shows2); cb_Register("Draw", "vm sets", VM_E);
- -- aspect ratio
- local aspect_ratio_table = {};
- local aspect_ratio_check = gui.Checkbox(miscgroupbox, "msc_aspect_enable", "Aspect Ratio Changer", false)
- local aspect_ratio_reference = gui.Slider(miscgroupbox, "msc_aspect_value", "Force aspect ratio", 100, 1, 199) -- % times your original ratio
- local function gcd(m, n) while m ~= 0 do m, n = math.fmod(n, m), m; end return n; end
- 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
- 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
- cb_Register('Draw', "aspect ratio" ,on_aspect_ratio_changed);
- -- knife on left hand
- local K_O_L_H = gui.Checkbox(miscgroupbox, "msc_knifelefthand", "Knife On Left Hand", false)
- function on_knife_righthand()
- if not K_O_L_H:GetValue() then return end
- if GetLocalPlayer() == nil then return end
- if GetLocalPlayer():GetHealth() == nil or GetLocalPlayer():GetHealth() <= 0 then client_exec("cl_righthand 1", true); return; end
- local wep = GetLocalPlayer():GetPropEntity("m_hActiveWeapon");
- if wep == nil then return; end local cwep = wep:GetClass();
- if cwep == "CKnife" then client_exec("cl_righthand 0", true); else client_exec("cl_righthand 1", true); end end
- cb_Register("Draw", "knife", on_knife_righthand);
- -- skeet hitsoud
- local MSC_PART_REF = gui.Reference( "MISC", "ENHANCEMENT", "Hitmarkers" );
- local AWMetallicHitsound = gui.Checkbox( miscgroupbox, "lua_hitsound", "Metallic Hitsound (Skeet)", 0 );
- local function MetallicHitsound( Event )
- if AWMetallicHitsound:GetValue() then
- if gui.GetValue( "msc_hitmarker_enable" ) then
- gui.SetValue( "msc_hitmarker_enable", 0 );
- end
- if ( Event:GetName() == "player_hurt" ) then
- local ME = client.GetLocalPlayerIndex();
- local INT_UID = Event:GetInt( "userid" );
- local INT_ATTACKER = Event:GetInt( "attacker" );
- local NAME_Victim = client.GetPlayerNameByUserID( INT_UID );
- local INDEX_Victim = client.GetPlayerIndexByUserID( INT_UID );
- local NAME_Attacker = client.GetPlayerNameByUserID( INT_ATTACKER );
- local INDEX_Attacker = client.GetPlayerIndexByUserID( INT_ATTACKER );
- if ( INDEX_Attacker == ME and INDEX_Victim ~= ME ) then
- volume = gui.GetValue("msc_hitmarker_volume");
- client.Command("playvol buttons\\arena_switch_press_02.wav "..volume, true);
- end
- end
- end
- end
- client.AllowListener( "player_hurt" );
- callbacks.Register( "FireGameEvent", "Metallic Hitsound", MetallicHitsound );
- -- hit log
- local HitLog = gui.Checkbox(miscgroupbox, "msc_hitlog", "Hit Log", false)
- 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
- local draw_hitsay = {};
- function ChatLogger(Event)
- if HitLog:GetValue() then
- if Event:GetName() == nil then return;
- elseif (Event:GetName() == 'player_hurt') then
- local ME = LocalPlayerIndex();
- local uid = Event:GetInt('userid');
- local i_attacker = Event:GetInt('attacker');
- local i_dmg = Event:GetString('dmg_health');
- local i_health = Event:GetString('health');
- local i_hitgroup = Event:GetInt('hitgroup');
- local ind_Attacker = PlayerIndexByUserID(i_attacker);
- local N_Attacker = PlayerNameByUserID(i_attacker);
- local ind_Victim = PlayerIndexByUserID(uid);
- local n_Victim = PlayerNameByUserID(uid);
- hitPlayerName = ""; hitSpot = ""; hitDmg = ""; hitHealthRemaining = "";
- hitPlayerName = n_Victim; hitSpot = i_hitgroup; hitDmg = i_dmg; hitHealthRemaining = i_health;
- response = string.format("Hit %s in the %s for %s damage (%s health remaining)\n", hitPlayerName, HitGroup(hitSpot), hitDmg, hitHealthRemaining);
- if ( ind_Attacker == ME and ind_Victim ~= ME ) then print(response);
- table.insert(draw_hitsay, {globals.RealTime(), response}); end end end end
- local On_Screen_Time, pixels_between_each_line, ScreenX, ScreenY = 10, 10, 10, 10
- function hitlog()
- if HitLog:GetValue() then local things_on_screen = 0;
- for k, l in pairs(draw_hitsay) do
- if globals.RealTime() > l[1] + On_Screen_Time then table.remove(draw_hitsay, k); else
- draw_Color(255,255,255,255); draw.SetFont(ff); draw_TextShadow(ScreenX, things_on_screen * pixels_between_each_line + ScreenY, l[2]); things_on_screen = things_on_screen + 1; end end end end
- c_AllowListener('player_hurt'); cb_Register('Draw', 'drawing your hits', hitlog); cb_Register('FireGameEvent', 'ChatLogger', ChatLogger);
- --------------------------------AA---------------------------------
- -- Manual AA
- leftKey = -1;
- backKey = -1;
- rightKey = -1;
- check_indicator = gui.Checkbox( aagroupgox, "Enable", "Manual Anti-Aim", false);
- outline_check = gui.Checkbox( aagroupgox, "Outline", "Outline", false);
- antiAimLeft = gui.Keybox(aagroupgox, "antiAimLeft", "Left", 0);
- antiAimRight = gui.Keybox(aagroupgox, "antiAimRight", "Right", 0);
- antiAimBack = gui.Keybox(aagroupgox, "antiAimBack", "Back", 0);
- local standdef = gui.GetValue("rbot_antiaim_stand_real_add");
- local movedef = gui.GetValue("rbot_antiaim_move_real_add");
- local autodirdef = gui.GetValue("rbot_antiaim_at_targets");
- R = gui.Slider(aagroupgox, "R", "R", 0, 0, 255);
- G = gui.Slider(aagroupgox, "G", "G", 0, 0, 255);
- B = gui.Slider(aagroupgox, "B", "B", 0, 0, 255);
- A = gui.Slider(aagroupgox, "A", "A", 255, 0, 255);
- S = gui.Slider(aagroupgox, "S", "Indicator Size", 40, 0, 70);
- S1 = gui.Slider(aagroupgox, "S1", "Font Size", 40, 0, 70);
- --You can change the RGBA to your liking.
- arrowSize = 40;
- arrowR = 255;
- arrowG = 255;
- arrowB = 255;
- arrowA = 150;
- local function main()
- if antiAimLeft:GetValue() ~= 0 then
- if input.IsButtonPressed(antiAimLeft:GetValue()) then
- leftKey = leftKey * -1;
- backKey = -1;
- rightKey = -1;
- gui.SetValue("rbot_antiaim_stand_real_add", -90);
- gui.SetValue("rbot_antiaim_move_real_add", -90);
- gui.SetValue("rbot_antiaim_at_targets", 0);
- end
- end
- if antiAimBack:GetValue() ~= 0 then
- if input.IsButtonPressed(antiAimBack:GetValue()) then
- backKey = backKey * -1;
- leftKey = -1;
- rightKey = -1;
- gui.SetValue("rbot_antiaim_stand_real_add", 0);
- gui.SetValue("rbot_antiaim_move_real_add", 0);
- gui.SetValue("rbot_antiaim_at_targets", 0);
- end
- end
- if antiAimRight:GetValue() ~= 0 then
- if input.IsButtonPressed(antiAimRight:GetValue()) then
- rightKey = rightKey * -1;
- leftKey = -1;
- backKey = -1;
- gui.SetValue("rbot_antiaim_stand_real_add", 90);
- gui.SetValue("rbot_antiaim_move_real_add", 90);
- gui.SetValue("rbot_antiaim_at_targets", 0);
- end
- end
- end
- function SetAuto()
- gui.SetValue("rbot_antiaim_stand_real_add", 0);
- gui.SetValue("rbot_antiaim_move_real_add", 0);
- gui.SetValue("rbot_antiaim_at_targets", 1);
- end
- function draw_indicator()
- arrowR = gui.GetValue("R");
- arrowG = gui.GetValue("G");
- arrowB = gui.GetValue("B");
- arrowA = gui.GetValue("A");
- arrowSize = math.floor(gui.GetValue("S"));
- textSize = math.floor(gui.GetValue("S1"));
- local active = check_indicator:GetValue();
- if active then
- local arrowFont = draw.CreateFont("Arial", arrowSize, 30);
- local textFont = draw.CreateFont("Arial", textSize, 30);
- draw.SetFont(arrowFont);
- local w, h = draw.GetScreenSize();
- if (leftKey == 1) then
- draw.Color(arrowR, arrowG, arrowB, arrowA);
- if(outline_check:GetValue()) then
- 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).
- else
- draw.Text( w/2 - w/14.7692307692, h/2 - arrowSize/2, "<");
- end
- elseif (backKey == 1) then
- draw.Color(arrowR, arrowG, arrowB, arrowA);
- if(outline_check:GetValue()) then
- 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).
- else
- draw.Text( w/2 - arrowSize/2.35, h/2 + h/11.7391304348, "?");
- end
- elseif (rightKey == 1) then
- draw.Color(arrowR, arrowG, arrowB, arrowA);
- if(outline_check:GetValue()) then
- 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).
- else
- draw.Text( w/2 + w/20.2105263158, h/2 - arrowSize/2, ">");
- end
- else
- draw.SetFont(textFont);
- draw.Color(arrowR, arrowG, arrowB, 200);
- draw.TextShadow(15, h/2, "AUTO");
- SetAuto();
- end
- end
- end
- callbacks.Register( "Draw", "main", main);
- callbacks.Register( "Draw", "draw_indicator", draw_indicator);
- -- Inverter Key
- local invertKey = gui.Keybox(aagroupgox, "cluainvert_key", "Inverter key", false)
- local desyncators = gui.Multibox(aagroupgox, "Indicators")
- local dArrows = gui.Checkbox(desyncators, "cluadesync_arrows", "Arrows (Real)", false)
- local dText = gui.Checkbox(desyncators, "cluadesync_text", "Text", false)
- local vleftDesync = 3;
- local vrightDesync = 2;
- local eleftDesync = 2;
- local erightDesync = 3;
- local activeSide = "null";
- iR = gui.Slider(aagroupgox, "iR", "R", 0, 0, 255);
- iG = gui.Slider(aagroupgox, "iG", "G", 0, 0, 255);
- iB = gui.Slider(aagroupgox, "iB", "B", 0, 0, 255);
- iA = gui.Slider(aagroupgox, "iA", "A", 255, 0, 255);
- local function inverter()
- if entities.GetLocalPlayer() ~= nil then
- if invertKey:GetValue() == 0 then return end
- if input.IsButtonPressed(invertKey:GetValue()) and not input.IsButtonDown(69) then
- if rightDesync == false then
- gui.SetValue("rbot_antiaim_stand_desync", vrightDesync);
- gui.SetValue("rbot_antiaim_move_desync", vrightDesync);
- rightDesync = not rightDesync;
- else
- gui.SetValue("rbot_antiaim_stand_desync", vleftDesync);
- gui.SetValue("rbot_antiaim_move_desync", vleftDesync);
- rightDesync = not rightDesync;
- end
- else if input.IsButtonPressed(invertKey:GetValue()) and input.IsButtonDown(69) then
- if rightDesync == false then
- gui.SetValue("rbot_antiaim_stand_desync", erightDesync);
- gui.SetValue("rbot_antiaim_move_desync", erightDesync);
- rightDesync = not rightDesync;
- else
- gui.SetValue("rbot_antiaim_stand_desync", eleftDesync);
- gui.SetValue("rbot_antiaim_move_desync", eleftDesync);
- rightDesync = not rightDesync;
- end
- end
- end
- end
- end
- callbacks.Register("Draw", "inverter", inverter)
- local function indicators()
- cR = gui.GetValue("iR");
- cG = gui.GetValue("iG");
- cB = gui.GetValue("iB");
- cA = gui.GetValue("iA");
- if entities.GetLocalPlayer() ~= nil then
- local x, y = draw.GetScreenSize()
- local textFont = draw.CreateFont('Verdana', 30, 30)
- local arrowFont = draw.CreateFont('Verdana', 100, 300)
- draw.SetFont(textFont)
- if not rightDesync then
- if gui.GetValue("cluadesync_text") == true then
- draw.Color(cR, cG, cB, cA)
- draw.Text(20, y - 200, "REAL: RIGHT")
- draw.TextShadow(20, y - 200, "REAL: RIGHT")
- end
- if gui.GetValue("cluadesync_arrows") == true then
- draw.SetFont(arrowFont)
- draw.Color(255, 255, 255, cA)
- draw.Text(x/2 - 75, y/2 - 55, "?")
- draw.TextShadow(x/2 - 75, y/2 - 55, "?")
- draw.Color(cR, cG, cB, cA)
- draw.Text(x/2 + 10, y/2 - 55, "?")
- draw.TextShadow(x/2 + 10, y/2 - 55, "?")
- end
- else if rightDesync then
- if gui.GetValue("cluadesync_text") == true then
- draw.Color(cR, cG, cB, cA)
- draw.Text(20, y - 200, "REAL: LEFT")
- draw.TextShadow(20, y - 200, "REAL: LEFT")
- end
- if gui.GetValue("cluadesync_arrows") == true then
- draw.SetFont(arrowFont)
- draw.Color(cR, cG, cB, cA)
- draw.Text(x/2 - 75, y/2 - 55, "?")
- draw.TextShadow(x/2 - 75, y/2 - 55, "?")
- draw.Color(255, 255, 255, cA)
- draw.Text(x/2 + 10, y/2 - 55, "?")
- draw.TextShadow(x/2 + 10, y/2 - 55, "?")
- end
- else
- if gui.GetValue("cluadesync_text") == true then
- draw.Color(cR, cG, cB, cA)
- draw.Text(30, y - 600, "INVERTER: OFF")
- draw.TextShadow(30, y - 600, "INVERTER: OFF")
- end
- if gui.GetValue("cluadesync_arrows") == true then
- draw.SetFont(arrowFont)
- draw.Color(255, 255, 255, cA)
- draw.Text(x/2 - 75, y/2 - 55, "?")
- draw.TextShadow(x/2 - 75, y/2 - 55, "?")
- draw.Color(255, 255, 255, cA)
- draw.Text(x/2 + 10, y/2 - 55, "?")
- draw.TextShadow(x/2 + 10, y/2 - 55, "?")
- end
- end
- end
- end
- end
- callbacks.Register("Draw", "indicators", indicators)
- -- menu toggle (DO NOT EDIT)
- local awMenu = gui.Reference("MENU");
- local function hideMenu()
- if awMenu:IsActive() then
- eActive = 1
- else
- eActive = 0
- end
- if (essentialsmenu:GetValue()) then
- window:SetActive(eActive);
- else
- window:SetActive(0);
- end
- end
- callbacks.Register("Draw", "hideMenu", hideMenu)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement