Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- 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", 600, 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", 10, 20, 230, 300)
- -----------------------------HVH-------------------------
- -- jumpshot
- -- fakeduck improvements
- -- fakeduck indicator
- -- 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
- -- 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
- -- 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
- -- aspect ratio
- -- knife on left hand
- -- 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
- -- 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