Untitled diff

Created Diff never expires
--[[
--[[
_ _ _
Copyright (C) Insan3 Cheats.
/\ | | | | | |
/ \ | |__| | __ _ ___| | __
--Credits:
/ /\ \ | __ |/ _` |/ __| |/ /
Insan3, Steavix.
/ ____ \| | | | (_| | (__| <
/_/ \_\_| |_|\__,_|\___|_|\_\
Created by Atheon and originally released at MPGH.
Current Version: 1.5.0
Features:
On/Off Switch - In the top right of the hack there is an on/off switch that will deactivate everything.
Aimbot -
Active - Determines, overall, if the aimbot should be working.
Random Bone - If enabled the aimbot will pick a random bone to attack instead of always going at the players head.
Preference - Used to determine who the aimbot should target next. Can be set to Distance or Angle.
Attack NPCs - Determines if the aimbot should target NPCs.
Attack Player - Determines if the aimbot should target Players.
Prediction - Velocity prediction, to increase the aimbots accuracy.
Aim On Key - If this is on the aimbot will only target when your selected key is pressed.
Key - Determines the key for the previous option.
Anti Snap - Stops the aimbot from snapping to the target. But will decrease accuracy.
A-Snap Speed - The speed of the anti-snap. Value between 1 and 5.
Max Angle - The maximum angle the target can be away from you. Value between 0-270.
Auto Shoot - If this is on and the aimbot is locked on it will automatically shoot.
Panic Mode - If this is on the aimbot wont function while you are being spectated.
Ignore Team - If this is on the aimbot will not target players on your team, works with TTT if the traitor detector is enabled.
ESP -
Active - Determines, overall, if the ESP is working.
Player Info - Determines if the ESP should show player information.
NPC Info - Determines if the ESP should show NPC information.
Names - Determines if the targets name should be shown. (on NPCs it will be the class name, ex: npc_monk)
Weapons - Determines if the targets weapon should be displayed
Distance - Determines if distance between you and the target should be displayed.
Health - Determines if the targets health should be displayed.
Bounding Box - Determines if a bounding box should be drawn around the target.
TTT Feature - Show Traitors - Determines if the ESP should display if the target is a traitor. (must have traitor finder active, see Misc)
TTT Feature - Bodies - Will display body information on TTT. (Credits on body, Name of player, Found or not found)
2D Radar - Enables a 2D radar on screen. Players and NPCs are shown as arrows, bodies (TTT) are shown as circles.
Radar Scale - The distance the radar reaches. Value between 1 and 100
Max Distance - Determines the maximum distance the ESP will work to. (set to 0 for unlimited distance)
Team Based - Make the color of the ESP based on the targets team. Works with TTT.
Chams -
Active - Determines, overall, if the Chams are working.
Draw Players - Determines if the Chams should draw players.
Draw NPCs - Determines if the Chams should draw NPCs.
Draw Weapons - Determines if the Chams should draw the targets weapon.
TTT Feature - Bodies - Adds TTT bodies to the Chams
Team Based - Makes the color of the chams based on the targets team. Works with TTT.
Max Distance - Determines the maximum distance the Chams will work to. (set to 0 for unlimited distance)
Misc -
Show Admins - Displays all current admins in the top right corner of your screen.
Crosshair - Will draw a crosshair on your screen.
Crosshair Size - The size of the crosshair. Value between 0 and 1000.
No Recoil - Will remove all weapon recoil. (doesn't work in singleplayer)
Spectators - Displays all your current spectators in the top right corner of your screen, under the admins.
Auto Reload - Will automatically reload your weapon when your magazine is empty.
Bunny Hop - If this is on you will bunny hop while pressing the bunny hop key.
Key - Determines the key for the previous option.
Auto Pistol - Fires semi-automatic weapons as fast as possible. (doesn't work on default HL2 weapons)
DarkRP Feature - Buy Health - Will automatically use /buyhealth when your health falls below the minimum value set.
DarkRP Feature - Minimum - Minimum health before buying health. Value between 0 and 100.
TTT Feature - Traitor Finder - Will display when a traitor buys a traitor weapon. (see also the ESP option for displaying traitors)
Show Deaths - Will notify you via chat when a player dies.
Sounds - Enables sound cues along with notifications.
Style -
Bounding Box - Determines the color the bounding box should draw in.
ESP Text - Determines the color the ESP text should draw in.
Crosshair - Determines the color the Crosshair should draw in.
TTT Feature - Body Text - Determines the color body information will be shown in.
Chams - The color of the chams. (will be overwritten if Cham option Team Based is on)
TTT Feature - Body Chams - The color TTT bodies should be on the chams.
--]]
--]]
//I hear this makes the hack load faster, i didn't actually check the O times but whatever.
//I hear this makes the hack load faster, i didn't actually check the O times but whatever.
local hook = hook
local hook = hook
local derma = derma
local derma = derma
local surface = surface
local surface = surface
local vgui = vgui
local vgui = vgui
local input = input
local input = input
local util = util
local util = util
local cam = cam
local cam = cam
local render = render
local render = render
local math = math
local math = math
local draw = draw
local draw = draw
local team = team
local team = team
local AHack = {}
local Sasha = {}
AHack.Active = CreateClientConVar("AHack_Active", 1, true, false)
Sasha.Active = CreateClientConVar("Sasha_Active", 1, true, false)
AHack.Version = "1.5.0"
Sasha.Version = "1.5.0"
AHack.Ply = LocalPlayer()
Sasha.Ply = LocalPlayer()
AHack.TTT = (GAMEMODE and GAMEMODE.Name and string.find(GAMEMODE.Name, "Terror") and true) or false
Sasha.TTT = (GAMEMODE and GAMEMODE.Name and string.find(GAMEMODE.Name, "Terror") and true) or false
if AHack.TTT then AHack.TTTCORPSE = CORPSE end
if Sasha.TTT then Sasha.TTTCORPSE = CORPSE end
AHack.DarkRP = (GAMEMODE and GAMEMODE.Name and string.find(GAMEMODE.Name, "DarkRP") and true) or false
Sasha.DarkRP = (GAMEMODE and GAMEMODE.Name and string.find(GAMEMODE.Name, "DarkRP") and true) or false
//Converts a string of a color (ex. "Color(255, 255, 255, 255)") into an actual color, and returns the color.
//Converts a string of a color (ex. "Color(255, 255, 255, 255)") into an actual color, and returns the color.
AHack.GetColorFromString = function(words)
Sasha.GetColorFromString = function(words)
//I probably shouldve just used string.explode...well.......
//I probably shouldve just used string.explode...well.......
if type(words) != "string" then return Color(255, 255, 255, 255) end
if type(words) != "string" then return Color(255, 255, 255, 255) end
words = "return "..words
words = "return "..words
local func = CompileString(words, "GettingColors", true)
local func = CompileString(words, "GettingColors", true)
local good, color = pcall(func)
local good, color = pcall(func)
if good and type(color) == "table" and color.r and color.g and color.b and color.a then
if good and type(color) == "table" and color.r and color.g and color.b and color.a then
return color
return color
else
else
return Color(255, 255, 255, 255)
return Color(255, 255, 255, 255)
end
end
end
end
AHack.Chars = {"A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"}
Sasha.Chars = {"A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"}
AHack.RandomName = function(amount)
Sasha.RandomName = function(amount)
local toReturn = ""
local toReturn = ""
local amount = amount or 10
local amount = amount or 10
for i = 1, amount do
for i = 1, amount do
if math.random(0, 1) == 0 then
if math.random(0, 1) == 0 then
toReturn = toReturn..string.lower(table.Random(AHack.Chars))
toReturn = toReturn..string.lower(table.Random(Sasha.Chars))
else
else
toReturn = toReturn..table.Random(AHack.Chars)
toReturn = toReturn..table.Random(Sasha.Chars)
end
end
end
end
return toReturn
return toReturn
end
end
AHack.Message = function(...)
Sasha.Message = function(...)
chat.AddText(Color(50, 255, 100), "[AHack] ", ...)
chat.AddText(Color(50, 255, 100), "[Sasha] ", ...)
end
end
AHack.Aimbot = {}
Sasha.Aimbot = {}
AHack.Aimbot.CurTarget = nil
Sasha.Aimbot.CurTarget = nil
AHack.Aimbot.Vars = {}
Sasha.Aimbot.Vars = {}
AHack.Aimbot.Vars["Active"] = CreateClientConVar("AHack_Aimbot_Active", 0, true, false)
Sasha.Aimbot.Vars["Active"] = CreateClientConVar("Sasha_Aimbot_Active", 0, true, false)
AHack.Aimbot.Vars["RandomBones"] = CreateClientConVar("AHack_Aimbot_RandomBones", 0, true, false)
Sasha.Aimbot.Vars["RandomBones"] = CreateClientConVar("Sasha_Aimbot_RandomBones", 0, true, false)
AHack.Aimbot.Vars["AttackNPCs"] = CreateClientConVar("AHack_Aimbot_AttackNPCs", 0, true, false)
Sasha.Aimbot.Vars["AttackNPCs"] = CreateClientConVar("Sasha_Aimbot_AttackNPCs", 0, true, false)
AHack.Aimbot.Vars["AttackPlayers"] = CreateClientConVar("AHack_Aimbot_AttackPlayers", 0, true, false)
Sasha.Aimbot.Vars["AttackPlayers"] = CreateClientConVar("Sasha_Aimbot_AttackPlayers", 0, true, false)
AHack.Aimbot.Vars["Prediction"] = CreateClientConVar("AHack_Aimbot_Prediction", 0, true, false)
Sasha.Aimbot.Vars["Prediction"] = CreateClientConVar("Sasha_Aimbot_Prediction", 0, true, false)
AHack.Aimbot.Vars["AimOnKey"] = CreateClientConVar("AHack_Aimbot_AimOnKey", 0, true, false)
Sasha.Aimbot.Vars["AimOnKey"] = CreateClientConVar("Sasha_Aimbot_AimOnKey", 0, true, false)
AHack.Aimbot.Vars["AimOnKey_Key"] = CreateClientConVar("AHack_Aimbot_AimOnKey_Key", "MOUSE_LEFT", true, false)
Sasha.Aimbot.Vars["AimOnKey_Key"] = CreateClientConVar("Sasha_Aimbot_AimOnKey_Key", "MOUSE_LEFT", true, false)
AHack.Aimbot.Vars["MaxAngle"] = CreateClientConVar("AHack_Aimbot_MaxAngle", 180, true, false)
Sasha.Aimbot.Vars["MaxAngle"] = CreateClientConVar("Sasha_Aimbot_MaxAngle", 180, true, false)
AHack.Aimbot.Vars["Preferance"] = CreateClientConVar("AHack_Aimbot_Preferance", "Distance", true, false)
Sasha.Aimbot.Vars["Preferance"] = CreateClientConVar("Sasha_Aimbot_Preferance", "Distance", true, false)
AHack.Aimbot.Vars["AntiSnap"] = CreateClientConVar("AHack_Aimbot_AntiSnap", 0, true, false)
Sasha.Aimbot.Vars["AntiSnap"] = CreateClientConVar("Sasha_Aimbot_AntiSnap", 0, true, false)
AHack.Aimbot.Vars["AntiSnapSpeed"] = CreateClientConVar("AHack_Aimbot_AntiSnapSpeed", 4, true, false)
Sasha.Aimbot.Vars["AntiSnapSpeed"] = CreateClientConVar("Sasha_Aimbot_AntiSnapSpeed", 4, true, false)
AHack.Aimbot.Vars["AutoShoot"] = CreateClientConVar("AHack_Aimbot_AutoShoot", 0, true, false)
Sasha.Aimbot.Vars["AutoShoot"] = CreateClientConVar("Sasha_Aimbot_AutoShoot", 0, true, false)
AHack.Aimbot.Vars["PanicMode"] = CreateClientConVar("AHack_Aimbot_PanicMode", 0, true, false)
Sasha.Aimbot.Vars["PanicMode"] = CreateClientConVar("Sasha_Aimbot_PanicMode", 0, true, false)
AHack.Aimbot.Vars["IgnoreTeam"] = CreateClientConVar("AHack_Aimbot_IgnoreTeam", 0, true, false)
Sasha.Aimbot.Vars["IgnoreTeam"] = CreateClientConVar("Sasha_Aimbot_IgnoreTeam", 0, true, false)
AHack.Friends = {}
Sasha.Friends = {}
AHack.Friends.List = {} //The steamIDs of everyone on your friends list
Sasha.Friends.List = {} //The steamIDs of everyone on your friends list
AHack.Friends.Vars = {}
Sasha.Friends.Vars = {}
AHack.Friends.Vars["Active"] = CreateClientConVar("AHack_Friends_Active", 0, true, false)
Sasha.Friends.Vars["Active"] = CreateClientConVar("Sasha_Friends_Active", 0, true, false)
AHack.Friends.Vars["Reverse"] = CreateClientConVar("AHack_Friends_Reverse", 0, true, false)
Sasha.Friends.Vars["Reverse"] = CreateClientConVar("Sasha_Friends_Reverse", 0, true, false)
AHack.ESP = {}
Sasha.ESP = {}
AHack.ESP.Vars = {}
Sasha.ESP.Vars = {}
AHack.ESP.Vars["Active"] = CreateClientConVar("AHack_ESP_Active", 0, true, false)
Sasha.ESP.Vars["Active"] = CreateClientConVar("Sasha_ESP_Active", 0, true, false)
AHack.ESP.Vars["Players"] = CreateClientConVar("AHack_ESP_Players", 0, true, false)
Sasha.ESP.Vars["Players"] = CreateClientConVar("Sasha_ESP_Players", 0, true, false)
AHack.ESP.Vars["NPCs"] = CreateClientConVar("AHack_ESP_NPCs", 0, true, false)
Sasha.ESP.Vars["NPCs"] = CreateClientConVar("Sasha_ESP_NPCs", 0, true, false)
AHack.ESP.Vars["Name"] = CreateClientConVar("AHack_ESP_Name", "Off", true, false)
Sasha.ESP.Vars["Name"] = CreateClientConVar("Sasha_ESP_Name", "Off", true, false)
AHack.ESP.Vars["Weapons"] = CreateClientConVar("AHack_ESP_Weapons", "Off", true, false)
Sasha.ESP.Vars["Weapons"] = CreateClientConVar("Sasha_ESP_Weapons", "Off", true, false)
AHack.ESP.Vars["Distance"] = CreateClientConVar("AHack_ESP_Distance", "Off", true, false)
Sasha.ESP.Vars["Distance"] = CreateClientConVar("Sasha_ESP_Distance", "Off", true, false)
AHack.ESP.Vars["Health"] = CreateClientConVar("AHack_ESP_Health", "Off", true, false)
Sasha.ESP.Vars["Health"] = CreateClientConVar("Sasha_ESP_Health", "Off", true, false)
AHack.ESP.Vars["MaxDistance"] = CreateClientConVar("AHack_ESP_MaxDistance", 0, true, false)
Sasha.ESP.Vars["MaxDistance"] = CreateClientConVar("Sasha_ESP_MaxDistance", 0, true, false)
AHack.ESP.Vars["Box"] = CreateClientConVar("AHack_ESP_Box", 0, true, false)
Sasha.ESP.Vars["Box"] = CreateClientConVar("Sasha_ESP_Box", 0, true, false)
AHack.ESP.Vars["ShowTraitors"] = CreateClientConVar("AHack_ESP_ShowTraitors", "Off", true, false)
Sasha.ESP.Vars["ShowTraitors"] = CreateClientConVar("Sasha_ESP_ShowTraitors", "Off", true, false)
AHack.ESP.Vars["Bodies"] = CreateClientConVar("AHack_ESP_Bodies", 0, true, false)
Sasha.ESP.Vars["Bodies"] = CreateClientConVar("Sasha_ESP_Bodies", 0, true, false)
AHack.ESP.Vars["Radar"] = CreateClientConVar("AHack_ESP_Radar", 0, true, false)
Sasha.ESP.Vars["Radar"] = CreateClientConVar("Sasha_ESP_Radar", 0, true, false)
AHack.ESP.Vars["RadarScale"] = CreateClientConVar("AHack_ESP_RadarScale", 20, true, false)
Sasha.ESP.Vars["RadarScale"] = CreateClientConVar("Sasha_ESP_RadarScale", 20, true, false)
AHack.ESP.Vars["TeamBased"] = CreateClientConVar("AHack_ESP_TeamBased", 0, true, false)
Sasha.ESP.Vars["TeamBased"] = CreateClientConVar("Sasha_ESP_TeamBased", 0, true, false)
AHack.Chams = {}
Sasha.Chams = {}
AHack.Chams.Mat = CreateMaterial(AHack.RandomName(math.random(10,15)), "VertexLitGeneric", { ["$basetexture"] = "models/debug/debugwhite", ["$model"] = 1, ["$ignorez"] = 1 })
Sasha.Chams.Mat = CreateMaterial(Sasha.RandomName(math.random(10,15)), "VertexLitGeneric", { ["$basetexture"] = "models/debug/debugwhite", ["$model"] = 1, ["$ignorez"] = 1 })
AHack.Chams.Vars = {}
Sasha.Chams.Vars = {}
AHack.Chams.Vars["Active"] = CreateClientConVar("AHack_Chams_Active", 0, true, false)
Sasha.Chams.Vars["Active"] = CreateClientConVar("Sasha_Chams_Active", 0, true, false)
AHack.Chams.Vars["Players"] = CreateClientConVar("AHack_Chams_Players", 0, true, false)
Sasha.Chams.Vars["Players"] = CreateClientConVar("Sasha_Chams_Players", 0, true, false)
AHack.Chams.Vars["NPCs"] = CreateClientConVar("AHack_Chams_NPCs", 0, true, false)
Sasha.Chams.Vars["NPCs"] = CreateClientConVar("Sasha_Chams_NPCs", 0, true, false)
AHack.Chams.Vars["Weapons"] = CreateClientConVar("AHack_Chams_Weapons", 0, true, false)
Sasha.Chams.Vars["Weapons"] = CreateClientConVar("Sasha_Chams_Weapons", 0, true, false)
AHack.Chams.Vars["MaxDistance"] = CreateClientConVar("AHack_Chams_MaxDistance", 0, true, false)
Sasha.Chams.Vars["MaxDistance"] = CreateClientConVar("Sasha_Chams_MaxDistance", 0, true, false)
AHack.Chams.Vars["Bodies"] = CreateClientConVar("AHack_Chams_Bodies", 0, true, false)
Sasha.Chams.Vars["Bodies"] = CreateClientConVar("Sasha_Chams_Boddies", 0, true, false)
AHack.Chams.Vars["TeamBased"] = CreateClientConVar("AHack_Chams_TeamBased", 0, true, false)
Sasha.Chams.Vars["TeamBased"] = CreateClientConVar("Sasha_Chams_TeamBased", 0, true, false)
AHack.Entities = {}
Sasha.Entities = {}
AHack.Entities.List = {} //The class namse of all the entities
Sasha.Entities.List = {} //The class namse of all the entities
AHack.Entities.Vars = {}
Sasha.Entities.Vars = {}
AHack.Entities.Vars["Active"] = CreateClientConVar("AHack_Entities_Active", 0, true, false)
Sasha.Entities.Vars["Active"] = CreateClientConVar("Sasha_Entities_Active", 0, true, false)
AHack.Misc = {}
Sasha.Misc = {}
AHack.Misc.Vars = {}
Sasha.Misc.Vars = {}
AHack.Misc.Vars["ShowAdmins"] = CreateClientConVar("AHack_Misc_ShowAdmins", 0, true, false)
Sasha.Misc.Vars["ShowAdmins"] = CreateClientConVar("Sasha_Misc_ShowAdmins", 0, true, false)
AHack.Misc.Vars["Crosshair"] = CreateClientConVar("AHack_Misc_Cross", 0, true, false)
Sasha.Misc.Vars["Crosshair"] = CreateClientConVar("Sasha_Misc_Cross", 0, true, false)
AHack.Misc.Vars["CrosshairSize"] = CreateClientConVar("AHack_Misc_CrossSize", 50, true, false)
Sasha.Misc.Vars["CrosshairSize"] = CreateClientConVar("Sasha_Misc_CrossSize", 50, true, false)
AHack.Misc.Vars["NoRecoil"] = CreateClientConVar("AHack_Misc_NoRecoil", 0, true, false)
Sasha.Misc.Vars["NoRecoil"] = CreateClientConVar("Sasha_Misc_NoRecoil", 0, true, false)
AHack.Misc.Vars["ShowSpectators"] = CreateClientConVar("AHack_Misc_ShowSpectators", 0, true, false)
Sasha.Misc.Vars["ShowSpectators"] = CreateClientConVar("Sasha_Misc_ShowSpectators", 0, true, false)
AHack.Misc.Vars["BunnyHop"] = CreateClientConVar("AHack_Misc_BunnyHop", 0, true, false)
Sasha.Misc.Vars["BunnyHop"] = CreateClientConVar("Sasha_Misc_BunnyHop", 0, true, false)
AHack.Misc.Vars["BunnyHop_Key"] = CreateClientConVar("AHack_Misc_BunnyHop_Key", "KEY_SPACE", true, false)
Sasha.Misc.Vars["BunnyHop_Key"] = CreateClientConVar("Sasha_Misc_BunnyHop_Key", "KEY_SPACE", true, false)
AHack.Misc.Vars["AutoReload"] = CreateClientConVar("AHack_Misc_AutoReload", 0, true, false)
Sasha.Misc.Vars["AutoReload"] = CreateClientConVar("Sasha_Misc_AutoReload", 0, true, false)
AHack.Misc.Vars["AutoPistol"] = CreateClientConVar("AHack_Misc_AutoPistol", 0, true, false)
Sasha.Misc.Vars["AutoPistol"] = CreateClientConVar("Sasha_Misc_AutoPistol", 0, true, false)
AHack.Misc.Vars["BuyHealth"] = CreateClientConVar("AHack_Misc_BuyHealth", 0, true, false)
Sasha.Misc.Vars["BuyHealth"] = CreateClientConVar("Sasha_Misc_BuyHealth", 0, true, false)
AHack.Misc.Vars["BuyHealth_Minimum"] = CreateClientConVar("AHack_Misc_BuyHealth_Minimum", 80, true, false)
Sasha.Misc.Vars["BuyHealth_Minimum"] = CreateClientConVar("Sasha_Misc_BuyHealth_Minimum", 80, true, false)
AHack.Misc.Vars["TraitorFinder"] = CreateClientConVar("AHack_Misc_TraitorFinder", 0, true, false)
Sasha.Misc.Vars["TraitorFinder"] = CreateClientConVar("Sasha_Misc_TraitorFinder", 0, true, false)
AHack.Misc.Vars["Deaths"] = CreateClientConVar("AHack_Misc_Deaths", 0, true, false)
Sasha.Misc.Vars["Deaths"] = CreateClientConVar("Sasha_Misc_Deaths", 0, true, false)
AHack.Misc.Vars["Sounds"] = CreateClientConVar("AHack_Misc_Sounds", 0, true, false)
Sasha.Misc.Vars["Sounds"] = CreateClientConVar("Sasha_Misc_Sounds", 0, true, false)
AHack.Style = {}
Sasha.Style = {}
AHack.Style.Vars = {}
Sasha.Style.Vars = {}
AHack.Style.Vars["BoundingBox"] = {}
Sasha.Style.Vars["BoundingBox"] = {}
AHack.Style.Vars["BoundingBox"].var = CreateClientConVar("AHack_Style_BoundingBox", "Color(255, 0, 0, 255)", true, false)
Sasha.Style.Vars["BoundingBox"].var = CreateClientConVar("Sasha_Style_BoundingBox", "Color(255, 0, 0, 255)", true, false)
AHack.Style.Vars["BoundingBox"].color = AHack.GetColorFromString(AHack.Style.Vars["BoundingBox"].var:GetString())
Sasha.Style.Vars["BoundingBox"].color = Sasha.GetColorFromString(Sasha.Style.Vars["BoundingBox"].var:GetString())
AHack.Style.Vars["ESPText"] = {}
Sasha.Style.Vars["ESPText"] = {}
AHack.Style.Vars["ESPText"].var = CreateClientConVar("AHack_Style_ESPText", "Color(255, 255, 255, 255)", true, false)
Sasha.Style.Vars["ESPText"].var = CreateClientConVar("Sasha_Style_ESPText", "Color(255, 255, 255, 255)", true, false)
AHack.Style.Vars["ESPText"].color = AHack.GetColorFromString(AHack.Style.Vars["ESPText"].var:GetString())
Sasha.Style.Vars["ESPText"].color = Sasha.GetColorFromString(Sasha.Style.Vars["ESPText"].var:GetString())
AHack.Style.Vars["Crosshair"] = {}
Sasha.Style.Vars["Crosshair"] = {}
AHack.Style.Vars["Crosshair"].var = CreateClientConVar("AHack_Style_Cross", "Color(255, 255, 255, 255)", true, false)
Sasha.Style.Vars["Crosshair"].var = CreateClientConVar("Sasha_Style_Cross", "Color(255, 255, 255, 255)", true, false)
AHack.Style.Vars["Crosshair"].color = AHack.GetColorFromString(AHack.Style.Vars["Crosshair"].var:GetString())
Sasha.Style.Vars["Crosshair"].color = Sasha.GetColorFromString(Sasha.Style.Vars["Crosshair"].var:GetString())
AHack.Style.Vars["BodyText"] = {}
Sasha.Style.Vars["BodyText"] = {}
AHack.Style.Vars["BodyText"].var = CreateClientConVar("AHack_Style_BodyText", "Color(255, 255, 255, 255)", true, false)
Sasha.Style.Vars["BodyText"].var = CreateClientConVar("Sasha_Style_BodyText", "Color(255, 255, 255, 255)", true, false)
AHack.Style.Vars["BodyText"].color = AHack.GetColorFromString(AHack.Style.Vars["BodyText"].var:GetString())
Sasha.Style.Vars["BodyText"].color = Sasha.GetColorFromString(Sasha.Style.Vars["BodyText"].var:GetString())
AHack.Style.Vars["Chams"] = {}
Sasha.Style.Vars["Chams"] = {}
AHack.Style.Vars["Chams"].var = CreateClientConVar("AHack_Style_Chams", "Color(0, 255, 0, 255)", true, false)
Sasha.Style.Vars["Chams"].var = CreateClientConVar("Sasha_Style_Chams", "Color(0, 255, 0, 255)", true, false)
AHack.Style.Vars["Chams"].color = AHack.GetColorFromString(AHack.Style.Vars["Chams"].var:GetString())
Sasha.Style.Vars["Chams"].color = Sasha.GetColorFromString(Sasha.Style.Vars["Chams"].var:GetString())
AHack.Style.Vars["BodyChams"] = {}
Sasha.Style.Vars["BodyChams"] = {}
AHack.Style.Vars["BodyChams"].var = CreateClientConVar("AHack_Style_BodyChams", "Color(0, 255, 0, 255)", true, false)
Sasha.Style.Vars["BodyChams"].var = CreateClientConVar("Sasha_Style_BodyChams", "Color(0, 255, 0, 255)", true, false)
AHack.Style.Vars["BodyChams"].color = AHack.GetColorFromString(AHack.Style.Vars["BodyChams"].var:GetString())
Sasha.Style.Vars["BodyChams"].color = Sasha.GetColorFromString(Sasha.Style.Vars["BodyChams"].var:GetString())
//This loads our friends list and custom entities list.
//This loads our friends list and custom entities list.
/*AHack.SavedData = CreateClientConVar("AHack_SaveData", AHack.RandomName(math.random(10, 15)), true, false)
/*Sasha.SavedData = CreateClientConVar("Sasha_SaveData", Sasha.RandomName(math.random(10, 15)), true, false)
if file.Exists(AHack.SavedData:GetString()..".txt", "DATA") then
if file.Exists(Sasha.SavedData:GetString()..".txt", "DATA") then
local info = string.Explode("\n", file.Read(AHack.SavedData:GetString()..".txt", "DATA"))
local info = string.Explode("\n", file.Read(Sasha.SavedData:GetString()..".txt", "DATA"))
if type(info) == "table" and info[1] and info[2] then
if type(info) == "table" and info[1] and info[2] then
AHack.Friends.List = util.JSONToTable(info[1])
Sasha.Friends.List = util.JSONToTable(info[1])
AHack.Entities.List = util.JSONToTable(info[2])
Sasha.Entities.List = util.JSONToTable(info[2])
end
end
end
end
AHack.SaveData = function()
Sasha.SaveData = function()
file.Write(AHack.SavedData:GetString()..".txt", util.TableToJSON(AHack.Friends.List))
file.Write(Sasha.SavedData:GetString()..".txt", util.TableToJSON(Sasha.Friends.List))
file.Append(AHack.SavedData:GetString()..".txt", "\n")
file.Append(Sasha.SavedData:GetString()..".txt", "\n")
file.Append(AHack.SavedData:GetString()..".txt", util.TableToJSON(AHack.Entities.List))
file.Append(Sasha.SavedData:GetString()..".txt", util.TableToJSON(Sasha.Entities.List))
end*/
end*/
//This is all the bones i look for in the order im looking for them. Feel free to change the order if you want to attack the foot before the head or something like that.
//This is all the bones i look for in the order im looking for them. Feel free to change the order if you want to attack the foot before the head or something like that.
AHack.Bones = {
Sasha.Bones = {
"ValveBiped.Bip01_Head1",
"ValveBiped.Bip01_Head1",
"ValveBiped.Bip01_Neck1",
"ValveBiped.Bip01_Neck1",
"ValveBiped.Bip01_Spine4",
"ValveBiped.Bip01_Spine4",
"ValveBiped.Bip01_Spine2",
"ValveBiped.Bip01_Spine2",
"ValveBiped.Bip01_Spine1",
"ValveBiped.Bip01_Spine1",
"ValveBiped.Bip01_Spine",
"ValveBiped.Bip01_Spine",
"ValveBiped.Bip01_R_UpperArm",
"ValveBiped.Bip01_R_UpperArm",
"ValveBiped.Bip01_R_Forearm",
"ValveBiped.Bip01_R_Forearm",
"ValveBiped.Bip01_R_Hand",
"ValveBiped.Bip01_R_Hand",
"ValveBiped.Bip01_L_UpperArm",
"ValveBiped.Bip01_L_UpperArm",
"ValveBiped.Bip01_L_Forearm",
"ValveBiped.Bip01_L_Forearm",
"ValveBiped.Bip01_L_Hand",
"ValveBiped.Bip01_L_Hand",
"ValveBiped.Bip01_R_Thigh",
"ValveBiped.Bip01_R_Thigh",
"ValveBiped.Bip01_R_Calf",
"ValveBiped.Bip01_R_Calf",
"ValveBiped.Bip01_R_Foot",
"ValveBiped.Bip01_R_Foot",
"ValveBiped.Bip01_R_Toe0",
"ValveBiped.Bip01_R_Toe0",
"ValveBiped.Bip01_L_Thigh",
"ValveBiped.Bip01_L_Thigh",
"ValveBiped.Bip01_L_Calf",
"ValveBiped.Bip01_L_Calf",
"ValveBiped.Bip01_L_Foot",
"ValveBiped.Bip01_L_Foot",
"ValveBiped.Bip01_L_Toe0"
"ValveBiped.Bip01_L_Toe0"
}
}
//If random bones is enabled this list is gone through, randomly, and if none of the bones on this list are found the entire list (above) is gone through.
//If random bones is enabled this list is gone through, randomly, and if none of the bones on this list are found the entire list (above) is gone through.
//If you edit this be sure to edit the function below it.
//If you edit this be sure to edit the function below it.
AHack.RandomBones = {
Sasha.RandomBones = {
"ValveBiped.Bip01_Head1",
"ValveBiped.Bip01_Head1",
"ValveBiped.Bip01_Neck1",
"ValveBiped.Bip01_Neck1",
"ValveBiped.Bip01_Spine4",
"ValveBiped.Bip01_Spine4",
"ValveBiped.Bip01_Spine2",
"ValveBiped.Bip01_Spine2",
"ValveBiped.Bip01_R_UpperArm",
"ValveBiped.Bip01_R_UpperArm",
"ValveBiped.Bip01_L_UpperArm"
"ValveBiped.Bip01_L_UpperArm"
}
}
AHack.GetRandomBones = function()
Sasha.GetRandomBones = function()
local temp = {}
local temp = {}
local function GetBones() //Ahh recursion, i love you.
local function GetBones() //Ahh recursion, i love you.
if #AHack.RandomBones > 0 then
if #Sasha.RandomBones > 0 then
local random = math.random(1, #AHack.RandomBones)
local random = math.random(1, #Sasha.RandomBones)
table.insert(temp, AHack.RandomBones[random])
table.insert(temp, Sasha.RandomBones[random])
table.remove(AHack.RandomBones, random)
table.remove(Sasha.RandomBones, random)
GetBones()
GetBones()
else
else
table.insert(AHack.RandomBones, "ValveBiped.Bip01_Head1")
table.insert(Sasha.RandomBones, "ValveBiped.Bip01_Head1")
table.insert(AHack.RandomBones, "ValveBiped.Bip01_Neck1")
table.insert(Sasha.RandomBones, "ValveBiped.Bip01_Neck1")
table.insert(AHack.RandomBones, "ValveBiped.Bip01_Spine4")
table.insert(Sasha.RandomBones, "ValveBiped.Bip01_Spine4")
table.insert(AHack.RandomBones, "ValveBiped.Bip01_Spine2")
table.insert(Sasha.RandomBones, "ValveBiped.Bip01_Spine2")
table.insert(AHack.RandomBones, "ValveBiped.Bip01_R_UpperArm")
table.insert(Sasha.RandomBones, "ValveBiped.Bip01_R_UpperArm")
table.insert(AHack.RandomBones, "ValveBiped.Bip01_L_UpperArm")
table.insert(Sasha.RandomBones, "ValveBiped.Bip01_L_UpperArm")
end
end
end
end
GetBones()
GetBones()
return temp
return temp
end
end
//A list of all keyboard keys, for binding
//A list of all keyboard keys, for binding
AHack.Keys = {
Sasha.Keys = {
[0] = "KEY_NONE",
[0] = "KEY_NONE",
[1] = "KEY_0",
[1] = "KEY_0",
[2] = "KEY_1",
[2] = "KEY_1",
[3] = "KEY_2",
[3] = "KEY_2",
[4] = "KEY_3",
[4] = "KEY_3",
[5] = "KEY_4",
[5] = "KEY_4",
[6] = "KEY_5",
[6] = "KEY_5",
[7] = "KEY_6",
[7] = "KEY_6",
[8] = "KEY_7",
[8] = "KEY_7",
[9] = "KEY_8",
[9] = "KEY_8",
[10] = "KEY_9",
[10] = "KEY_9",
[11] = "KEY_A",
[11] = "KEY_A",
[12] = "KEY_B",
[12] = "KEY_B",
[13] = "KEY_C",
[13] = "KEY_C",
[14] = "KEY_D",
[14] = "KEY_D",
[15] = "KEY_E",
[15] = "KEY_E",
[16] = "KEY_F",
[16] = "KEY_F",
[17] = "KEY_G",
[17] = "KEY_G",
[18] = "KEY_H",
[18] = "KEY_H",
[19] = "KEY_I",
[19] = "KEY_I",
[20] = "KEY_J",
[20] = "KEY_J",
[21] = "KEY_K",
[21] = "KEY_K",
[22] = "KEY_L",
[22] = "KEY_L",
[23] = "KEY_M",
[23] = "KEY_M",
[24] = "KEY_N",
[24] = "KEY_N",
[25] = "KEY_O",
[25] = "KEY_O",
[26] = "KEY_P",
[26] = "KEY_P",
[27] = "KEY_Q",
[27] = "KEY_Q",
[28] = "KEY_R",
[28] = "KEY_R",
[29] = "KEY_S",
[29] = "KEY_S",
[30] = "KEY_T",
[30] = "KEY_T",
[31] = "KEY_U",
[31] = "KEY_U",
[32] = "KEY_V",
[32] = "KEY_V",
[33] = "KEY_W",
[33] = "KEY_W",
[34] = "KEY_X",
[34] = "KEY_X",
[35] = "KEY_Y",
[35] = "KEY_Y",
[36] = "KEY_Z",
[36] = "KEY_Z",
[37] = "KEY_PAD_0",
[37] = "KEY_PAD_0",
[38] = "KEY_PAD_1",
[38] = "KEY_PAD_1",
[39] = "KEY_PAD_2",
[39] = "KEY_PAD_2",
[40] = "KEY_PAD_3",
[40] = "KEY_PAD_3",
[41] = "KEY_PAD_4",
[41] = "KEY_PAD_4",
[42] = "KEY_PAD_5",
[42] = "KEY_PAD_5",
[43] = "KEY_PAD_6",
[43] = "KEY_PAD_6",
[44] = "KEY_PAD_7",
[44] = "KEY_PAD_7",
[45] = "KEY_PAD_8",
[45] = "KEY_PAD_8",
[46] = "KEY_PAD_9",
[46] = "KEY_PAD_9",
[47] = "KEY_PAD_DIVIDE",
[47] = "KEY_PAD_DIVIDE",
[48] = "KEY_PAD_MULTIPLY",
[48] = "KEY_PAD_MULTIPLY",
[49] = "KEY_PAD_MINUS",
[49] = "KEY_PAD_MINUS",
[50] = "KEY_PAD_PLUS",
[50] = "KEY_PAD_PLUS",
[51] = "KEY_PAD_ENTER",
[51] = "KEY_PAD_ENTER",
[52] = "KEY_PAD_DECIMAL",
[52] = "KEY_PAD_DECIMAL",
[53] = "KEY_LBRACKET",
[53] = "KEY_LBRACKET",
[54] = "KEY_RBRACKET",
[54] = "KEY_RBRACKET",
[55] = "KEY_SEMICOLON",
[55] = "KEY_SEMICOLON",
[56] = "KEY_APOSTROPHE",
[56] = "KEY_APOSTROPHE",
[57] = "KEY_BACKQUOTE",
[57] = "KEY_BACKQUOTE",
[58] = "KEY_COMMA",
[58] = "KEY_COMMA",
[59] = "KEY_PERIOD",
[59] = "KEY_PERIOD",
[60] = "KEY_SLASH",
[60] = "KEY_SLASH",
[61] = "KEY_BACKSLASH",
[61] = "KEY_BACKSLASH",
[62] = "KEY_MINUS",
[62] = "KEY_MINUS",
[63] = "KEY_EQUAL",
[63] = "KEY_EQUAL",
[64] = "KEY_ENTER",
[64] = "KEY_ENTER",
[65] = "KEY_SPACE",
[65] = "KEY_SPACE",
[66] = "KEY_BACKSPACE",
[66] = "KEY_BACKSPACE",
[67] = "KEY_TAB",
[67] = "KEY_TAB",
[68] = "KEY_CAPSLOCK",
[68] = "KEY_CAPSLOCK",
[69] = "KEY_NUMLOCK",
[69] = "KEY_NUMLOCK",
[70] = "KEY_ESCAPE",
[70] = "KEY_ESCAPE",
[71] = "KEY_SCROLLLOCK",
[71] = "KEY_SCROLLLOCK",
[72] = "KEY_INSERT",
[72] = "KEY_INSERT",
[73] = "KEY_DELETE",
[73] = "KEY_DELETE",
[74] = "KEY_HOME",
[74] = "KEY_HOME",
[75] = "KEY_END",
[75] = "KEY_END",
[76] = "KEY_PAGEUP",
[76] = "KEY_PAGEUP",
[77] = "KEY_PAGEDOWN",
[77] = "KEY_PAGEDOWN",
[78] = "KEY_BREAK",
[78] = "KEY_BREAK",
[79] = "KEY_LSHIFT",
[79] = "KEY_LSHIFT",
[80] = "KEY_RSHIFT",
[80] = "KEY_RSHIFT",
[81] = "KEY_LALT",
[81] = "KEY_LALT",
[82] = "KEY_RALT",
[82] = "KEY_RALT",
[83] = "KEY_LCONTROL",
[83] = "KEY_LCONTROL",
[84] = "KEY_RCONTROL",
[84] = "KEY_RCONTROL",
[85] = "KEY_LWIN",
[85] = "KEY_LWIN",
[86] = "KEY_RWIN",
[86] = "KEY_RWIN",
[87] = "KEY_APP",
[87] = "KEY_APP",
[88] = "KEY_UP",
[88] = "KEY_UP",
[89] = "KEY_LEFT",
[89] = "KEY_LEFT",
[90] = "KEY_DOWN",
[90] = "KEY_DOWN",
[91] = "KEY_RIGHT",
[91] = "KEY_RIGHT",
[92] = "KEY_F1",
[92] = "KEY_F1",
[93] = "KEY_F2",
[93] = "KEY_F2",
[94] = "KEY_F3",
[94] = "KEY_F3",
[95] = "KEY_F4",
[95] = "KEY_F4",
[96] = "KEY_F5",
[96] = "KEY_F5",
[97] = "KEY_F6",
[97] = "KEY_F6",
[98] = "KEY_F7",
[98] = "KEY_F7",
[99] = "KEY_F8",
[99] = "KEY_F8",
[100] = "KEY_F9",
[100] = "KEY_F9",
[101] = "KEY_F10",
[101] = "KEY_F10",
[102] = "KEY_F11",
[102] = "KEY_F11",
[103] = "KEY_F12",
[103] = "KEY_F12",
//[104] = "KEY_CAPSLOCKTOGGLE", //THESE
//[104] = "KEY_CAPSLOCKTOGGLE", //THESE
//[105] = "KEY_NUMLOCKTOGGLE", //MOFOS
//[105] = "KEY_NUMLOCKTOGGLE", //MOFOS
//[106] = "KEY_SCROLLLOCKTOGGLE", //SHOULD DIE
//[106] = "KEY_SCROLLLOCKTOGGLE", //SHOULD DIE
[107] = "KEY_XBUTTON_UP",
[107] = "KEY_XBUTTON_UP",
[108] = "KEY_XBUTTON_DOWN",
[108] = "KEY_XBUTTON_DOWN",
[109] = "KEY_XBUTTON_LEFT",
[109] = "KEY_XBUTTON_LEFT",
[110] = "KEY_XBUTTON_RIGHT",
[110] = "KEY_XBUTTON_RIGHT",
[111] = "KEY_XBUTTON_START",
[111] = "KEY_XBUTTON_START",
[112] = "KEY_XBUTTON_BACK",
[112] = "KEY_XBUTTON_BACK",
[113] = "KEY_XBUTTON_STICK1",
[113] = "KEY_XBUTTON_STICK1",
[114] = "KEY_XBUTTON_STICK2",
[114] = "KEY_XBUTTON_STICK2",
[115] = "KEY_XBUTTON_A",
[115] = "KEY_XBUTTON_A",
[116] = "KEY_XBUTTON_B",
[116] = "KEY_XBUTTON_B",
[117] = "KEY_XBUTTON_X",
[117] = "KEY_XBUTTON_X",
[118] = "KEY_XBUTTON_Y",
[118] = "KEY_XBUTTON_Y",
[119] = "KEY_XBUTTON_BLACK",
[119] = "KEY_XBUTTON_BLACK",
[120] = "KEY_XBUTTON_WHITE",
[120] = "KEY_XBUTTON_WHITE",
[121] = "KEY_XBUTTON_LTRIGGER",
[121] = "KEY_XBUTTON_LTRIGGER",
[122] = "KEY_XBUTTON_RTRIGGER",
[122] = "KEY_XBUTTON_RTRIGGER",
[123] = "KEY_XSTICK1_UP",
[123] = "KEY_XSTICK1_UP",
[124] = "KEY_XSTICK1_DOWN",
[124] = "KEY_XSTICK1_DOWN",
[125] = "KEY_XSTICK1_LEFT",
[125] = "KEY_XSTICK1_LEFT",
[126] = "KEY_XSTICK1_RIGHT",
[126] = "KEY_XSTICK1_RIGHT",
[127] = "KEY_XSTICK2_UP",
[127] = "KEY_XSTICK2_UP",
[128] = "KEY_XSTICK2_DOWN",
[128] = "KEY_XSTICK2_DOWN",
[129] = "KEY_XSTICK2_LEFT",
[129] = "KEY_XSTICK2_LEFT",
[130] = "KEY_XSTICK2_RIGHT"
[130] = "KEY_XSTICK2_RIGHT"
}
}
//A list of all mouse keys, for binding
//A list of all mouse keys, for binding
AHack.MouseKeys = {
Sasha.MouseKeys = {
[107] = "MOUSE_LEFT",
[107] = "MOUSE_LEFT",
[108] = "MOUSE_RIGHT",
[108] = "MOUSE_RIGHT",
[109] = "MOUSE_MIDDLE",
[109] = "MOUSE_MIDDLE",
[110] = "MOUSE_4",
[110] = "MOUSE_4",
[111] = "MOUSE_5"
[111] = "MOUSE_5"
}
}
//Tells me if a specific key is pressed. Loops through both tables.
//Tells me if a specific key is pressed. Loops through both tables.
AHack.KeyPressed = function(key)
Sasha.KeyPressed = function(key)
if AHack.InChat then return false end
if Sasha.InChat then return false end
for k = 107, 111 do
for k = 107, 111 do
if key == AHack.MouseKeys[k] then
if key == Sasha.MouseKeys[k] then
if input.IsMouseDown(k) then
if input.IsMouseDown(k) then
return true
return true
else
else
return false
return false
end
end
end
end
end
end
for k = 0, 130 do
for k = 0, 130 do
if key == AHack.Keys[k] then
if key == Sasha.Keys[k] then
if input.IsKeyDown(k) then
if input.IsKeyDown(k) then
return true
return true
else
else
return false
return false
end
end
end
end
end
end
return false
return false
end
end
//Very simple. If the boolean is true it returns 1. If the boolean is false then it returns 0. I dont think i ended up using this anywhere, but whatever, ill leave it here.
//Very simple. If the boolean is true it returns 1. If the boolean is false then it returns 0. I dont think i ended up using this anywhere, but whatever, ill leave it here.
AHack.BoolToInt = function(bool)
Sasha.BoolToInt = function(bool)
if bool then
if bool then
return 1
return 1
else
else
return 0
return 0
end
end
end
end
//Checking if a bone is visible, pos is the position of the bone and ent is the entity whos bone were looking for.
//Checking if a bone is visible, pos is the position of the bone and ent is the entity whos bone were looking for.
AHack.SpotIsVisible = function(pos, ent)
Sasha.SpotIsVisible = function(pos, ent)
ent = ent or AHack.Aimbot.CurTarget
ent = ent or Sasha.Aimbot.CurTarget
local tracedata = {}
local tracedata = {}
tracedata.start = AHack.Ply:GetShootPos()
tracedata.start = Sasha.Ply:GetShootPos()
tracedata.endpos = pos
tracedata.endpos = pos
tracedata.filter = {AHack.Ply, ent}
tracedata.filter = {Sasha.Ply, ent}
local trace = util.TraceLine(tracedata)
local trace = util.TraceLine(tracedata)
if trace.HitPos:Distance(pos) < 0.005 then
if trace.HitPos:Distance(pos) < 0.005 then
return true
return true
else
else
return false
return false
end
end
end
end
//Checks all of the entities bones to find if we can see this entity or not.
//Checks all of the entities bones to find if we can see this entity or not.
AHack.CanSee = function(ent)
Sasha.CanSee = function(ent)
for k = 1, #AHack.Bones do
for k = 1, #Sasha.Bones do
local v = AHack.Bones[k]
local v = Sasha.Bones[k]
local bone = ent:LookupBone(v)
local bone = ent:LookupBone(v)
if bone != nil then
if bone != nil then
local pos, ang = ent:GetBonePosition(bone)
local pos, ang = ent:GetBonePosition(bone)
if AHack.SpotIsVisible(pos, ent) then
if Sasha.SpotIsVisible(pos, ent) then
return true
return true
end
end
end
end
end
end
return false
return false
end
end
//This returns the next entity we should attack.
//This returns the next entity we should attack.
AHack.GetTarget = function()
Sasha.GetTarget = function()
if AHack.Aimbot.Vars["AttackNPCs"]:GetBool() or AHack.Aimbot.Vars["AttackPlayers"]:GetBool() then
if Sasha.Aimbot.Vars["AttackNPCs"]:GetBool() or Sasha.Aimbot.Vars["AttackPlayers"]:GetBool() then
local targets = {}
local targets = {}
local everything = ents.GetAll()
local everything = ents.GetAll()
for k = 1, #everything do
for k = 1, #everything do
local v = everything[k]
local v = everything[k]
if AHack.Aimbot.Vars["AttackNPCs"]:GetBool() and v:IsNPC() then
if Sasha.Aimbot.Vars["AttackNPCs"]:GetBool() and v:IsNPC() then
if AHack.CanSee(v) then
if Sasha.CanSee(v) then
table.insert(targets, {["Target"] = v, ["Pos"] = v:LocalToWorld(v:OBBCenter())})
table.insert(targets, {["Target"] = v, ["Pos"] = v:LocalToWorld(v:OBBCenter())})
end
end
elseif AHack.Aimbot.Vars["AttackPlayers"]:GetBool() and v:IsPlayer() and v != AHack.Ply then
elseif Sasha.Aimbot.Vars["AttackPlayers"]:GetBool() and v:IsPlayer() and v != Sasha.Ply then
if AHack.CanSee(v) then
if Sasha.CanSee(v) then
table.insert(targets, {["Target"] = v, ["Pos"] = v:LocalToWorld(v:OBBCenter())})
table.insert(targets, {["Target"] = v, ["Pos"] = v:LocalToWorld(v:OBBCenter())})
end
end
end
end
end
end
for k,v in SortedPairs(targets, true) do //It will already be sorted so this shouldn't be too resource heavy, the main point of this is to loop through the table backwards
for k,v in SortedPairs(targets, true) do //It will already be sorted so this shouldn't be too resource heavy, the main point of this is to loop through the table backwards
local v = v["Target"]
local v = v["Target"]
local shouldremove = false
local shouldremove = false
if AHack.Aimbot.Vars["IgnoreTeam"]:GetBool() and v:IsPlayer() then
if Sasha.Aimbot.Vars["IgnoreTeam"]:GetBool() and v:IsPlayer() then
if AHack.TTT then
if Sasha.TTT then
if AHack.Ply:GetRole() == 1 and v:GetRole() == 1 then
if Sasha.Ply:GetRole() == 1 and v:GetRole() == 1 then
shouldremove = true
shouldremove = true
end
end
if AHack.Ply:GetRole() != 1 and not table.HasValue(AHack.Traitors, v) then
if Sasha.Ply:GetRole() != 1 and not table.HasValue(Sasha.Traitors, v) then
shouldremove = true
shouldremove = true
end
end
else
else
if v:Team() == AHack.Ply:Team() then
if v:Team() == Sasha.Ply:Team() then
shouldremove = true
shouldremove = true
end
end
end
end
end
end
if AHack.Friends.Vars["Active"]:GetBool() then
if Sasha.Friends.Vars["Active"]:GetBool() then
if AHack.Friends.Vars["Reverse"]:GetBool() then
if Sasha.Friends.Vars["Reverse"]:GetBool() then
if not table.HasValue(AHack.Friends.L
if not table.HasValue(Sasha.Friends.List, v:SteamID()) then
shouldremove = true
end
else
if table.HasValue(Sasha.Friends.List, v:SteamID()) then
shouldremove = true
end
end
end
if shouldremove then
table.remove(targets, k)
end
end
if #targets == 0 then
return nil
elseif #targets == 1 then
targets[1]["Target"].BoneToAimAt = nil
return targets[1]["Target"]
end
if Sasha.Aimbot.Vars["Preferance"]:GetString() == "Distance" then
local min = {["Distance"] = Sasha.Ply:GetPos():Distance(targets[1]["Pos"]), ["Target"] = targets[1]["Target"]}
for k = 1, #targets do
local v = targets[k]
local distance = Sasha.Ply:GetPos():Distance(v["Pos"])
if distance < min["Distance"] then
min = {["Distance"] = distance, ["Target"] = v["Target"]}
end
end
min["Target"].BoneToAimAt = nil
return min["Target"]
elseif Sasha.Aimbot.Vars["Preferance"]:GetString() == "Angle" then
local min = {["Angle"] = Sasha.AngleTo(targets[1]["Pos"]), ["Target"] = targets[1]["Target"]}
for k = 1, #targets do
local v = targets[k]
local angle = Sasha.AngleTo(v["Pos"])
if angle < min["Angle"] then
min = {["Angle"] = angle, ["Target"] = v["Target"]}
end
end
min["Target"].BoneToAimAt = nil
return min["Target"]
end
else
return nil
end
end
//This returns the total angle away from the target we are, and then the pitch and yaw seperately
Sasha.AngleTo = function(pos)
local myAngs = Sasha.Ply:GetAngles()
local needed = (pos - Sasha.Ply:GetShootPos()):Angle()
myAngs.p = math.NormalizeAngle(myAngs.p)
needed.p = math.NormalizeAngle(needed.p)
myAngs.y = math.NormalizeAngle(myAngs.y)
needed.y = math.NormalizeAngle(needed.y)
local p = math.NormalizeAngle(needed.p - myAngs.p)
local y = math.NormalizeAngle(needed.y - myAngs.y)
return math.abs(p) + math.abs(y), {p = p, y = y}
end
//Returns true if our target meets our preferances.
Sasha.ValidTarget = function()
if Sasha.Aimbot.CurTarget == nil then return false end
if not IsValid(Sasha.Aimbot.CurTarget) then return false end
if Sasha.Aimbot.CurTarget:IsPlayer() and (not Sasha.Aimbot.CurTarget:Alive() or Sasha.Aimbot.CurTarget:Team() == TEAM_SPECTATOR or Sasha.Aimbot.CurTarget:Health() < 1) then return false end
if not Sasha.Aimbot.Vars["AttackNPCs"]:GetBool() and Sasha.Aimbot.CurTarget:IsNPC() then return false end
if not Sasha.Aimbot.Vars["AttackPlayers"]:GetBool() and Sasha.Aimbot.CurTarget:IsPlayer() then return false end
if not Sasha.CanSee(Sasha.Aimbot.CurTarget) then return false end
if Sasha.Aimbot.Vars["IgnoreTeam"]:GetBool() and Sasha.Aimbot.CurTarget:IsPlayer() then
if Sasha.TTT then
if Sasha.Ply:GetRole() == 1 and Sasha.Aimbot.CurTarget:GetRole() == 1 then return false end
if Sasha.Ply:GetRole() != 1 and not table.HasValue(Sasha.Traitors, Sasha.Aimbot.CurTarget) then return false end
else
if Sasha.Aimbot.CurTarget:Team() == Sasha.Ply:Team() then return false end
end
end
return true
end
hook.Add("RenderScreenspaceEffects", Sasha.RandomName(math.random(10, 15)), function()
if Sasha.Active:GetBool() then
local everything = ents.GetAll()
for k = 1, #everything do
local v = everything[k]
if Sasha.Chams.Vars["Active"]:GetBool() and v != Sasha.Ply and (Sasha.Chams.Vars["MaxDistance"]:GetInt() == 0 or v:GetPos():Distance(Sasha.Ply:GetPos()) < Sasha.Chams.Vars["MaxDistance"]:GetInt()) then
cam.Start3D(EyePos(), EyeAngles())
if (v:IsPlayer() and v:Alive() and v:Team() != TEAM_SPECTATOR and Sasha.Chams.Vars["Players"]:GetBool()) or (v:IsNPC() and v:Health() > 0 and Sasha.Chams.Vars["NPCs"]:GetBool()) then
local color = Sasha.Style.Vars["Chams"].color
if Sasha.Chams.Vars["TeamBased"]:GetBool() and v:IsPlayer() then
color = team.GetColor(v:Team())
if Sasha.TTT then
if v:GetRole() == 2 then
color = Color(0, 0, 255, 255)
elseif table.HasValue(Sasha.Traitors, v) then
color = Color(255, 0, 0, 255)
else
color = Color(0, 255, 0, 255)
end
end
end
render.SuppressEngineLighting(true)
render.SetColorModulation(color.r/255, color.g/255, color.b/255, 1)
render.MaterialOverride(Sasha.Chams.Mat)
v:DrawModel()
render.SetColorModulation((color.r + 150)/250, (color.g + 150)/250, (color.b + 150)/255, 1)
if IsValid(v:GetActiveWeapon()) and Sasha.Chams.Vars["Weapons"]:GetBool() then
v:GetActiveWeapon():DrawModel()
end
render.SetColorModulation(1, 1, 1, 1)
render.MaterialOverride()
render.SetModelLighting(4, color.r/255, color.g/255, color.b/255)
v:DrawModel()
render.SuppressEngineLighting(false)
elseif Sasha.TTT and Sasha.Chams.Vars["Bodies"]:GetBool() and v:GetClass() == "prop_ragdoll" then
local color = Sasha.Style.Vars["BodyChams"].color
render.SuppressEngineLighting(true)
render.SetColorModulation(color.r/255, color.g/255, color.b/255, 1)
render.MaterialOverride(Sasha.Chams.Mat)
v:DrawModel()
render.SetColorModulation(1, 1, 1, 1)
render.MaterialOverride()
render.SetModelLighting(4, color.r/255, color.g/255, color.b/255)
v:DrawModel()
render.SuppressEngineLighting(false)
elseif Sasha.Entities.Vars["Active"]:GetBool() and table.HasValue(Sasha.Entities.List, v:GetClass()) then
local color = Sasha.Style.Vars["Chams"].color
render.SuppressEngineLighting(true)
render.SetColorModulation(color.r/255, color.g/255, color.b/255, 1)
render.MaterialOverride(Sasha.Chams.Mat)
v:DrawModel()
render.SetColorModulation(1, 1, 1, 1)
render.MaterialOverride()
render.SetModelLighting(4, color.r/255, color.g/255, color.b/255)
v:DrawModel()
render.SuppressEngineLighting(false)
end
cam.End3D()
end
end
end
end)
//Helper function on radar. I just copied this one from the wiki.
Sasha.DrawFilledCircle = function(x, y, radius, quality)
local circle = {}
local tmp = 0
for i = 1, quality do
tmp = math.rad(i * 360) / quality
circle[i] = {x = x + math.cos(tmp) * radius, y = y + math.sin(tmp) * radius}
end
surface.DrawPoly(circle)
end
//Another helper fuction on the radar.
Sasha.DrawArrow = function(x, y, myRotation)
local arrow = {}
arrow[1] = {x = x, y = y}
arrow[2] = {x = x + 4, y = y + 7.5}
arrow[3] = {x = x, y = y + 5}
arrow[4] = {x = x - 4, y = y + 7.5}
//Now that i have the arrow determined, i have to rotate it to match the targets angle
myRotation = myRotation * -1
myRotation = math.rad(myRotation)
for i = 1, 4 do
local theirX = arrow[i].x
local theirY = arrow[i].y
theirX = theirX - x
theirY = theirY - y
arrow[i].x = theirX * math.cos(myRotation) - theirY * math.sin(myRotation)
arrow[i].y = theirX * math.sin(myRotation) + theirY * math.cos(myRotation)