Untitled diff

Created Diff never expires
--[[
--[[
_ _ _
# # ###### ####### ####### #
/\ | | | | | |
# # ## #### # # # # # # # #
/ \ | |__| | __ _ ___| | __
# # # # # # # # # # # # # #
/ /\ \ | __ |/ _` |/ __| |/ /
####### # # # #### ###### ##### # # #
/ ____ \| | | | (_| | (__| <
# # ###### # # # # # # # #######
/_/ \_\_| |_|\__,_|\___|_|\_\
# # # # # # # # # # # # # #
# # # # #### # # ###### ####### # # #
Created by Atheon and originally released at MPGH.
# # # # ####### ###
Current Version: 1.5.0
# # # # ## #### # # ## # # #
# # # # # # # # # # # # # # #
# # ####### # # # #### # ###### # #
####### # # ###### # # # # # # #
# # # # # # # # # # # ### # # ### # #
# # # # # # #### # # ##### ### ##### ### ###
Features:
This is barely a release.
On/Off Switch - In the top right of the hack there is an on/off switch that will deactivate everything.
This is a cleaned and organized version of AHack v1.5.0 made by Atheon.
To me, AHack is the only respectable hack out there.
Aimbot -
There are better hacks I know, but this one is my favourite as it is the easiest to control.
Active - Determines, overall, if the aimbot should be working.
It is also easier to configure so that spectators won't think you're hacking.
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.
Changes:
Attack NPCs - Determines if the aimbot should target NPCs.
Moved some code around to hopefully prevent memory leaks
Attack Player - Determines if the aimbot should target Players.
Added load checkers
Prediction - Velocity prediction, to increase the aimbots accuracy.
Removed the double slant comments
Aim On Key - If this is on the aimbot will only target when your selected key is pressed.
Removed the localization to improve speed
Key - Determines the key for the previous option.
Set vars for propkilling
Anti Snap - Stops the aimbot from snapping to the target. But will decrease accuracy.
Removed a BoolToInt that wasn't being used.
A-Snap Speed - The speed of the anti-snap. Value between 1 and 5.
Added PennyLenny's FOV changer
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.
Essentially, this is an easier-to-edit version of AHack that is slightly faster and has an FOV changer.
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.
local HackB = {}
ESP -
HackB.Active = CreateClientConVar("HackB_Active", 1, true, false)
Active - Determines, overall, if the ESP is working.
HackB.Version = "1.6.5"
Player Info - Determines if the ESP should show player information.
HackB.Ply = LocalPlayer()
NPC Info - Determines if the ESP should show NPC information.
HackB.TTT = (GAMEMODE and GAMEMODE.Name and string.find(GAMEMODE.Name, "Terror") and true) or false
Names - Determines if the targets name should be shown. (on NPCs it will be the class name, ex: npc_monk)
if HackB.TTT then HackB.TTTCORPSE = CORPSE end
Weapons - Determines if the targets weapon should be displayed
HackB.DarkRP = (GAMEMODE and GAMEMODE.Name and string.find(GAMEMODE.Name, "DarkRP") and true) or false
Distance - Determines if distance between you and the target should be displayed.
Health - Determines if the targets health should be displayed.
HackB.Message = function(...)
Bounding Box - Determines if a bounding box should be drawn around the target.
chat.AddText(Color(50, 255, 100), "[HackBETA] ", ...)
TTT Feature - Show Traitors - Determines if the ESP should display if the target is a traitor. (must have traitor finder active, see Misc)
end
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.
local propkill = {}
Radar Scale - The distance the radar reaches. Value between 1 and 100
propkill.Message = function(...)
Max Distance - Determines the maximum distance the ESP will work to. (set to 0 for unlimited distance)
chat.AddText(Color(50, 255, 100), "Propkill Help ", ...)
Team Based - Make the color of the ESP based on the targets team. Works with TTT.
end
Chams -
RunConsoleCommand( "physgun_wheelspeed" , 999999 )
Active - Determines, overall, if the Chams are working.
RunConsoleCommand( "cl_interp" , 0 )
Draw Players - Determines if the Chams should draw players.
RunConsoleCommand( "cl_interp_ratio" , 0 )
Draw NPCs - Determines if the Chams should draw NPCs.
RunConsoleCommand( "cl_cmdrate" , 200 )
Draw Weapons - Determines if the Chams should draw the targets weapon.
RunConsoleCommand( "cl_updaterate" , 200 )
TTT Feature - Bodies - Adds TTT bodies to the Chams
RunConsoleCommand( "rate" , 51200 )
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)
propkill.Message("Loaded")
Misc -
HackB.GetColorFromString = function(words)
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.
local hook = hook
local derma = derma
local surface = surface
local vgui = vgui
local input = input
local util = util
local cam = cam
local render = render
local math = math
local draw = draw
local team = team
local AHack = {}
AHack.Active = CreateClientConVar("AHack_Active", 1, true, false)
AHack.Version = "1.5.0"
AHack.Ply = LocalPlayer()
AHack.TTT = (GAMEMODE and GAMEMODE.Name and string.find(GAMEMODE.Name, "Terror") and true) or false
if AHack.TTT then AHack.TTTCORPSE = CORPSE end
AHack.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.
AHack.GetColorFromString = function(words)
//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"}
HackB.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)
HackB.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(HackB.Chars))
else
else
toReturn = toReturn..table.Random(AHack.Chars)
toReturn = toReturn..table.Random(HackB.Chars)
end
end
end
end
return toReturn
return toReturn
end
end
AHack.Message = function(...)
surface.CreateFont("TitleFont", {font = "Arial", size = 20})
chat.AddText(Color(50, 255, 100), "[AHack] ", ...)
surface.CreateFont("CatagoryHeader", {font = "CloseCaption_Normal", size = 34})
surface.CreateFont("CatagoryText", {font = "CloseCaption_Normal", size = 28})
surface.CreateFont("ESPFont", {font = "CloseCaption_Normal", weight = 1000, size = 15})
local varc = {}
varc.Message = function(...)
chat.AddText(Color(50, 255, 100), "Variables ", ...)
end
end
AHack.Aimbot = {}
AHack.Aimbot.CurTarget = nil
HackB.Aimbot = {}
AHack.Aimbot.Vars = {}
HackB.Aimbot.CurTarget = nil
AHack.Aimbot.Vars["Active"] = CreateClientConVar("AHack_Aimbot_Active", 0, true, false)
HackB.Aimbot.Vars = {}
AHack.Aimbot.Vars["RandomBones"] = CreateClientConVar("AHack_Aimbot_RandomBones", 0, true, false)
HackB.Aimbot.Vars["Active"] = CreateClientConVar("HackB_Aimbot_Active", 0, true, false)
AHack.Aimbot.Vars["AttackNPCs"] = CreateClientConVar("AHack_Aimbot_AttackNPCs", 0, true, false)
HackB.Aimbot.Vars["RandomBones"] = CreateClientConVar("HackB_Aimbot_RandomBones", 0, true, false)
AHack.Aimbot.Vars["AttackPlayers"] = CreateClientConVar("AHack_Aimbot_AttackPlayers", 0, true, false)
HackB.Aimbot.Vars["AttackNPCs"] = CreateClientConVar("HackB_Aimbot_AttackNPCs", 0, true, false)
AHack.Aimbot.Vars["Prediction"] = CreateClientConVar("AHack_Aimbot_Prediction", 0, true, false)
HackB.Aimbot.Vars["AttackPlayers"] = CreateClientConVar("HackB_Aimbot_AttackPlayers", 0, true, false)
AHack.Aimbot.Vars["AimOnKey"] = CreateClientConVar("AHack_Aimbot_AimOnKey", 0, true, false)
HackB.Aimbot.Vars["Prediction"] = CreateClientConVar("HackB_Aimbot_Prediction", 0, true, false)
AHack.Aimbot.Vars["AimOnKey_Key"] = CreateClientConVar("AHack_Aimbot_AimOnKey_Key", "MOUSE_LEFT", true, false)
HackB.Aimbot.Vars["AimOnKey"] = CreateClientConVar("HackB_Aimbot_AimOnKey", 0, true, false)
AHack.Aimbot.Vars["MaxAngle"] = CreateClientConVar("AHack_Aimbot_MaxAngle", 180, true, false)
HackB.Aimbot.Vars["AimOnKey_Key"] = CreateClientConVar("HackB_Aimbot_AimOnKey_Key", "MOUSE_LEFT", true, false)
AHack.Aimbot.Vars["Preferance"] = CreateClientConVar("AHack_Aimbot_Preferance", "Distance", true, false)
HackB.Aimbot.Vars["MaxAngle"] = CreateClientConVar("HackB_Aimbot_MaxAngle", 180, true, false)
AHack.Aimbot.Vars["AntiSnap"] = CreateClientConVar("AHack_Aimbot_AntiSnap", 0, true, false)
HackB.Aimbot.Vars["Preferance"] = CreateClientConVar("HackB_Aimbot_Preferance", "Distance", true, false)
AHack.Aimbot.Vars["AntiSnapSpeed"] = CreateClientConVar("AHack_Aimbot_AntiSnapSpeed", 4, true, false)
HackB.Aimbot.Vars["AntiSnap"] = CreateClientConVar("HackB_Aimbot_AntiSnap", 0, true, false)
AHack.Aimbot.Vars["AutoShoot"] = CreateClientConVar("AHack_Aimbot_AutoShoot", 0, true, false)
HackB.Aimbot.Vars["AntiSnapSpeed"] = CreateClientConVar("HackB_Aimbot_AntiSnapSpeed", 4, true, false)
AHack.Aimbot.Vars["PanicMode"] = CreateClientConVar("AHack_Aimbot_PanicMode", 0, true, false)
HackB.Aimbot.Vars["AutoShoot"] = CreateClientConVar("HackB_Aimbot_AutoShoot", 0, true, false)
AHack.Aimbot.Vars["IgnoreTeam"] = CreateClientConVar("AHack_Aimbot_IgnoreTeam", 0, true, false)
HackB.Aimbot.Vars["PanicMode"] = CreateClientConVar("HackB_Aimbot_PanicMode", 0, true, false)
HackB.Aimbot.Vars["IgnoreTeam"] = CreateClientConVar("HackB_Aimbot_IgnoreTeam", 0, true, false)
AHack.Friends = {}
AHack.Friends.List = {} //The steamIDs of everyone on your friends list
HackB.Friends = {}
AHack.Friends.Vars = {}
HackB.Friends.List = {} //The steamIDs of everyone on your friends list
AHack.Friends.Vars["Active"] = CreateClientConVar("AHack_Friends_Active", 0, true, false)
HackB.Friends.Vars = {}
AHack.Friends.Vars["Reverse"] = CreateClientConVar("AHack_Friends_Reverse", 0, true, false)
HackB.Friends.Vars["Active"] = CreateClientConVar("HackB_Friends_Active", 0, true, false)
HackB.Friends.Vars["Reverse"] = CreateClientConVar("HackB_Friends_Reverse", 0, true, false)
AHack.ESP = {}
AHack.ESP.Vars = {}
HackB.ESP = {}
AHack.ESP.Vars["Active"] = CreateClientConVar("AHack_ESP_Active", 0, true, false)
HackB.ESP.Vars = {}
AHack.ESP.Vars["Players"] = CreateClientConVar("AHack_ESP_Players", 0, true, false)
HackB.ESP.Vars["Active"] = CreateClientConVar("HackB_ESP_Active", 0, true, false)
AHack.ESP.Vars["NPCs"] = CreateClientConVar("AHack_ESP_NPCs", 0, true, false)
HackB.ESP.Vars["Players"] = CreateClientConVar("HackB_ESP_Players", 0, true, false)
AHack.ESP.Vars["Name"] = CreateClientConVar("AHack_ESP_Name", "Off", true, false)
HackB.ESP.Vars["NPCs"] = CreateClientConVar("HackB_ESP_NPCs", 0, true, false)
AHack.ESP.Vars["Weapons"] = CreateClientConVar("AHack_ESP_Weapons", "Off", true, false)
HackB.ESP.Vars["Name"] = CreateClientConVar("HackB_ESP_Name", "Off", true, false)
AHack.ESP.Vars["Distance"] = CreateClientConVar("AHack_ESP_Distance", "Off", true, false)
HackB.ESP.Vars["Weapons"] = CreateClientConVar("HackB_ESP_Weapons", "Off", true, false)
AHack.ESP.Vars["Health"] = CreateClientConVar("AHack_ESP_Health", "Off", true, false)
HackB.ESP.Vars["Distance"] = CreateClientConVar("HackB_ESP_Distance", "Off", true, false)
AHack.ESP.Vars["MaxDistance"] = CreateClientConVar("AHack_ESP_MaxDistance", 0, true, false)
HackB.ESP.Vars["Health"] = CreateClientConVar("HackB_ESP_Health", "Off", true, false)
AHack.ESP.Vars["Box"] = CreateClientConVar("AHack_ESP_Box", 0, true, false)
HackB.ESP.Vars["MaxDistance"] = CreateClientConVar("HackB_ESP_MaxDistance", 0, true, false)
AHack.ESP.Vars["ShowTraitors"] = CreateClientConVar("AHack_ESP_ShowTraitors", "Off", true, false)
HackB.ESP.Vars["Box"] = CreateClientConVar("HackB_ESP_Box", 0, true, false)
AHack.ESP.Vars["Bodies"] = CreateClientConVar("AHack_ESP_Bodies", 0, true, false)
HackB.ESP.Vars["ShowTraitors"] = CreateClientConVar("HackB_ESP_ShowTraitors", "Off", true, false)
AHack.ESP.Vars["Radar"] = CreateClientConVar("AHack_ESP_Radar", 0, true, false)
HackB.ESP.Vars["Bodies"] = CreateClientConVar("HackB_ESP_Bodies", 0, true, false)
AHack.ESP.Vars["RadarScale"] = CreateClientConVar("AHack_ESP_RadarScale", 20, true, false)
HackB.ESP.Vars["Radar"] = CreateClientConVar("HackB_ESP_Radar", 0, true, false)
AHack.ESP.Vars["TeamBased"] = CreateClientConVar("AHack_ESP_TeamBased", 0, true, false)
HackB.ESP.Vars["RadarScale"] = CreateClientConVar("HackB_ESP_RadarScale", 20, true, false)
HackB.ESP.Vars["TeamBased"] = CreateClientConVar("HackB_ESP_TeamBased", 0, true, false)
AHack.Chams = {}
AHack.Chams.Mat = CreateMaterial(AHack.RandomName(math.random(10,15)), "VertexLitGeneric", { ["$basetexture"] = "models/debug/debugwhite", ["$model"] = 1, ["$ignorez"] = 1 })
HackB.Chams = {}
AHack.Chams.Vars = {}
HackB.Chams.Mat = CreateMaterial(HackB.RandomName(math.random(10,15)), "VertexLitGeneric", { ["$basetexture"] = "models/debug/debugwhite", ["$model"] = 1, ["$ignorez"] = 1 })
AHack.Chams.Vars["Active"] = CreateClientConVar("AHack_Chams_Active", 0, true, false)
HackB.Chams.Vars = {}
AHack.Chams.Vars["Players"] = CreateClientConVar("AHack_Chams_Players", 0, true, false)
HackB.Chams.Vars["Active"] = CreateClientConVar("HackB_Chams_Active", 0, true, false)
AHack.Chams.Vars["NPCs"] = CreateClientConVar("AHack_Chams_NPCs", 0, true, false)
HackB.Chams.Vars["Players"] = CreateClientConVar("HackB_Chams_Players", 0, true, false)
AHack.Chams.Vars["Weapons"] = CreateClientConVar("AHack_Chams_Weapons", 0, true, false)
HackB.Chams.Vars["NPCs"] = CreateClientConVar("HackB_Chams_NPCs", 0, true, false)
AHack.Chams.Vars["MaxDistance"] = CreateClientConVar("AHack_Chams_MaxDistance", 0, true, false)
HackB.Chams.Vars["Weapons"] = CreateClientConVar("HackB_Chams_Weapons", 0, true, false)
AHack.Chams.Vars["Bodies"] = CreateClientConVar("AHack_Chams_Bodies", 0, true, false)
HackB.Chams.Vars["MaxDistance"] = CreateClientConVar("HackB_Chams_MaxDistance", 0, true, false)
AHack.Chams.Vars["TeamBased"] = CreateClientConVar("AHack_Chams_TeamBased", 0, true, false)
HackB.Chams.Vars["Bodies"] = CreateClientConVar("HackB_Chams_Bodies", 0, true, false)
HackB.Chams.Vars["TeamBased"] = CreateClientConVar("HackB_Chams_TeamBased", 0, true, false)
AHack.Entities = {}
AHack.Entities.List = {} //The class namse of all the entities
HackB.Entities = {}
AHack.Entities.Vars = {}
HackB.Entities.List = {} //The class namse of all the entities
AHack.Entities.Vars["Active"] = CreateClientConVar("AHack_Entities_Active", 0, true, false)
HackB.Entities.Vars = {}
HackB.Entities.Vars["Active"] = CreateClientConVar("HackB_Entities_Active", 0, true, false)
AHack.Misc = {}
AHack.Misc.Vars = {}
HackB.Misc = {}
AHack.Misc.Vars["ShowAdmins"] = CreateClientConVar("AHack_Misc_ShowAdmins", 0, true, false)
HackB.Misc.Vars = {}
AHack.Misc.Vars["Crosshair"] = CreateClientConVar("AHack_Misc_Cross", 0, true, false)
HackB.Misc.Vars["ShowAdmins"] = CreateClientConVar("HackB_Misc_ShowAdmins", 0, true, false)
AHack.Misc.Vars["CrosshairSize"] = CreateClientConVar("AHack_Misc_CrossSize", 50, true, false)
HackB.Misc.Vars["Crosshair"] = CreateClientConVar("HackB_Misc_Cross", 0, true, false)
AHack.Misc.Vars["NoRecoil"] = CreateClientConVar("AHack_Misc_NoRecoil", 0, true, false)
HackB.Misc.Vars["CrosshairSize"] = CreateClientConVar("HackB_Misc_CrossSize", 50, true, false)
AHack.Misc.Vars["ShowSpectators"] = CreateClientConVar("AHack_Misc_ShowSpectators", 0, true, false)
HackB.Misc.Vars["NoRecoil"] = CreateClientConVar("HackB_Misc_NoRecoil", 0, true, false)
AHack.Misc.Vars["BunnyHop"] = CreateClientConVar("AHack_Misc_BunnyHop", 0, true, false)
HackB.Misc.Vars["ShowSpectators"] = CreateClientConVar("HackB_Misc_ShowSpectators", 0, true, false)
AHack.Misc.Vars["BunnyHop_Key"] = CreateClientConVar("AHack_Misc_BunnyHop_Key", "KEY_SPACE", true, false)
HackB.Misc.Vars["BunnyHop"] = CreateClientConVar("HackB_Misc_BunnyHop", 0, true, false)
AHack.Misc.Vars["AutoReload"] = CreateClientConVar("AHack_Misc_AutoReload", 0, true, false)
HackB.Misc.Vars["BunnyHop_Key"] = CreateClientConVar("HackB_Misc_BunnyHop_Key", "KEY_SPACE", true, false)
AHack.Misc.Vars["AutoPistol"] = CreateClientConVar("AHack_Misc_AutoPistol", 0, true, false)
HackB.Misc.Vars["AutoReload"] = CreateClientConVar("HackB_Misc_AutoReload", 0, true, false)
AHack.Misc.Vars["BuyHealth"] = CreateClientConVar("AHack_Misc_BuyHealth", 0, true, false)
HackB.Misc.Vars["AutoPistol"] = CreateClientConVar("HackB_Misc_AutoPistol", 0, true, false)
AHack.Misc.Vars["BuyHealth_Minimum"] = CreateClientConVar("AHack_Misc_BuyHealth_Minimum", 80, true, false)
HackB.Misc.Vars["BuyHealth"] = CreateClientConVar("HackB_Misc_BuyHealth", 0, true, false)
AHack.Misc.Vars["TraitorFinder"] = CreateClientConVar("AHack_Misc_TraitorFinder", 0, true, false)
HackB.Misc.Vars["BuyHealth_Minimum"] = CreateClientConVar("HackB_Misc_BuyHealth_Minimum", 80, true, false)
AHack.Misc.Vars["Deaths"] = CreateClientConVar("AHack_Misc_Deaths", 0, true, false)
HackB.Misc.Vars["TraitorFinder"] = CreateClientConVar("HackB_Misc_TraitorFinder", 0, true, false)
AHack.Misc.Vars["Sounds"] = CreateClientConVar("AHack_Misc_Sounds", 0, true, false)
HackB.Misc.Vars["Deaths"] = CreateClientConVar("HackB_Misc_Deaths", 0, true, false)
HackB.Misc.Vars["Sounds"] = CreateClientConVar("HackB_Misc_Sounds", 0, true, false)
AHack.Style = {}
AHack.Style.Vars = {}
HackB.Style = {}
AHack.Style.Vars["BoundingBox"] = {}
HackB.Style.Vars = {}
AHack.Style.Vars["BoundingBox"].var = CreateClientConVar("AHack_Style_BoundingBox", "Color(255, 0, 0, 255)", true, false)
HackB.Style.Vars["BoundingBox"] = {}
AHack.Style.Vars["BoundingBox"].color = AHack.GetColorFromString(AHack.Style.Vars["BoundingBox"].var:GetString())
HackB.Style.Vars["BoundingBox"].var = CreateClientConVar("HackB_Style_BoundingBox", "Color(255, 0, 0, 255)", true, false)
AHack.Style.Vars["ESPText"] = {}
HackB.Style.Vars["BoundingBox"].color = HackB.GetColorFromString(HackB.Style.Vars["BoundingBox"].var:GetString())
AHack.Style.Vars["ESPText"].var = CreateClientConVar("AHack_Style_ESPText", "Color(255, 255, 255, 255)", true, false)
HackB.Style.Vars["ESPText"] = {}
AHack.Style.Vars["ESPText"].color = AHack.GetColorFromString(AHack.Style.Vars["ESPText"].var:GetString())
HackB.Style.Vars["ESPText"].var = CreateClientConVar("HackB_Style_ESPText", "Color(255, 255, 255, 255)", true, false)
AHack.Style.Vars["Crosshair"] = {}
HackB.Style.Vars["ESPText"].color = HackB.GetColorFromString(HackB.Style.Vars["ESPText"].var:GetString())
AHack.Style.Vars["Crosshair"].var = CreateClientConVar("AHack_Style_Cross", "Color(255, 255, 255, 255)", true, false)
HackB.Style.Vars["Crosshair"] = {}
AHack.Style.Vars["Crosshair"].color = AHack.GetColorFromString(AHack.Style.Vars["Crosshair"].var:GetString())
HackB.Style.Vars["Crosshair"].var = CreateClientConVar("HackB_Style_Cross", "Color(255, 255, 255, 255)", true, false)
AHack.Style.Vars["BodyText"] = {}
HackB.Style.Vars["Crosshair"].color = HackB.GetColorFromString(HackB.Style.Vars["Crosshair"].var:GetString())
AHack.Style.Vars["BodyText"].var = CreateClientConVar("AHack_Style_BodyText", "Color(255, 255, 255, 255)", true, false)
HackB.Style.Vars["BodyText"] = {}
AHack.Style.Vars["BodyText"].color = AHack.GetColorFromString(AHack.Style.Vars["BodyText"].var:GetString())
HackB.Style.Vars["BodyText"].var = CreateClientConVar("HackB_Style_BodyText", "Color(255, 255, 255, 255)", true, false)
AHack.Style.Vars["Chams"] = {}
HackB.Style.Vars["BodyText"].color = HackB.GetColorFromString(HackB.Style.Vars["BodyText"].var:GetString())
AHack.Style.Vars["Chams"].var = CreateClientConVar("AHack_Style_Chams", "Color(0, 255, 0, 255)", true, false)
HackB.Style.Vars["Chams"] = {}
AHack.Style.Vars["Chams"].color = AHack.GetColorFromString(AHack.Style.Vars["Chams"].var:GetString())
HackB.Style.Vars["Chams"].var = CreateClientConVar("HackB_Style_Chams", "Color(0, 255, 0, 255)", true, false)
AHack.Style.Vars["BodyChams"] = {}
HackB.Style.Vars["Chams"].color = HackB.GetColorFromString(HackB.Style.Vars["Chams"].var:GetString())
AHack.Style.Vars["BodyChams"].var = CreateClientConVar("AHack_Style_BodyChams", "Color(0, 255, 0, 255)", true, false)
HackB.Style.Vars["BodyChams"] = {}
AHack.Style.Vars["BodyChams"].color = AHack.GetColorFromString(AHack.Style.Vars["BodyChams"].var:GetString())
HackB.Style.Vars["BodyChams"].var = CreateClientConVar("HackB_Style_BodyChams", "Color(0, 255, 0, 255)", true, false)
HackB.Style.Vars["BodyChams"].color = HackB.GetColorFromString(HackB.Style.Vars["BodyChams"].var:GetString())
//This loads our friends list and custom entities list.
/*AHack.SavedData = CreateClientConVar("AHack_SaveData", AHack.RandomName(math.random(10, 15)), true, false)
varc.Message("Set")
if file.Exists(AHack.SavedData:GetString()..".txt", "DATA") then
local info = string.Explode("\n", file.Read(AHack.SavedData:GetString()..".txt", "DATA"))
local save = {}
save.Message = function(...)
chat.AddText(Color(50, 255, 100), "Save ", ...)
end
HackB.SavedData = CreateClientConVar("HackB_SaveData", HackB.RandomName(math.random(10, 15)), true, false)
local frnd = {}
frnd.Message = function(...)
chat.AddText(Color(50, 255, 100), "Friends List ", ...)
end
HackB.SaveData = function()
file.Write(HackB.SavedData:GetString()..".txt", util.TableToJSON(HackB.Friends.List))
file.Append(HackB.SavedData:GetString()..".txt", "\n")
file.Append(HackB.SavedData:GetString()..".txt", util.TableToJSON(HackB.Entities.List))
end
if file.Exists(HackB.SavedData:GetString()..".txt", "DATA") then
local info = string.Explode("\n", file.Read(HackB.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])
HackB.Friends.List = util.JSONToTable(info[1])
AHack.Entities.List = util.JSONToTable(info[2])
HackB.Entities.List = util.JSONToTable(info[2])
end
end
end
end
AHack.SaveData = function()
save.Message("Added")
file.Write(AHack.SavedData:GetString()..".txt", util.TableToJSON(AHack.Friends.List))
file.Append(AHack.SavedData:GetString()..".txt", "\n")
local keys = {}
file.Append(AHack.SavedData:GetString()..".txt", util.TableToJSON(AHack.Entities.List))
keys.Message = function(...)
end*/
chat.AddText(Color(50, 255, 100), "Keys ", ...)
//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 = {
"ValveBiped.Bip01_Head1",
"ValveBiped.Bip01_Neck1",
"ValveBiped.Bip01_Spine4",
"ValveBiped.Bip01_Spine2",
"ValveBiped.Bip01_Spine1",
"ValveBiped.Bip01_Spine",
"ValveBiped.Bip01_R_UpperArm",
"ValveBiped.Bip01_R_Forearm",
"ValveBiped.Bip01_R_Hand",
"ValveBiped.Bip01_L_UpperArm",
"ValveBiped.Bip01_L_Forearm",
"ValveBiped.Bip01_L_Hand",
"ValveBiped.Bip01_R_Thigh",
"ValveBiped.Bip01_R_Calf",
"ValveBiped.Bip01_R_Foot",
"ValveBiped.Bip01_R_Toe0",
"ValveBiped.Bip01_L_Thigh",
"ValveBiped.Bip01_L_Calf",
"ValveBiped.Bip01_L_Foot",
"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 you edit this be sure to edit the function below it.
AHack.RandomBones = {
"ValveBiped.Bip01_Head1",
"ValveBiped.Bip01_Neck1",
"ValveBiped.Bip01_Spine4",
"ValveBiped.Bip01_Spine2",
"ValveBiped.Bip01_R_UpperArm",
"ValveBiped.Bip01_L_UpperArm"
}
AHack.GetRandomBones = function()
local temp = {}
local function GetBones() //Ahh recursion, i love you.
if #AHack.RandomBones > 0 then
local random = math.random(1, #AHack.RandomBones)
table.insert(temp, AHack.RandomBones[random])
table.remove(AHack.RandomBones, random)
GetBones()
else
table.insert(AHack.RandomBones, "ValveBiped.Bip01_Head1")
table.insert(AHack.RandomBones, "ValveBiped.Bip01_Neck1")
table.insert(AHack.RandomBones, "ValveBiped.Bip01_Spine4")
table.insert(AHack.RandomBones, "ValveBiped.Bip01_Spine2")
table.insert(AHack.RandomBones, "ValveBiped.Bip01_R_UpperArm")
table.insert(AHack.RandomBones, "ValveBiped.Bip01_L_UpperArm")
end
end
GetBones()
return temp
end
end
//A list of all keyboard keys, for binding
HackB.Keys = {
AHack.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",
//[105] = "KEY_NUMLOCKTOGGLE", //MOFOS
[105] = "KEY_NUMLOCKTOGGLE",
//[106] = "KEY_SCROLLLOCKTOGGLE", //SHOULD DIE
[106] = "KEY_SCROLLLOCKTOGGLE",
[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
HackB.MouseKeys = {
AHack.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.
AHack.KeyPressed = function(key)
varc.Message("Found")
if AHack.InChat then return false end
local chatr = {}
chatr.Message = function(...)
chat.AddText(Color(50, 255, 100), "Chat Rules ", ...)
end
HackB.InChat = false
hook.Add("StartChat", HackB.RandomName(math.random(10, 15)), function()
HackB.InChat = true
end)
hook.Add("FinishChat", HackB.RandomName(math.random(10, 15)), function()
HackB.InChat = false
end)
chatr.Message("Added")
HackB.KeyPressed = function(key)
if HackB.InChat then return false end
for k = 107, 111 do
for k = 107, 111 do
if key == AHack.MouseKeys[k] then
if key == HackB.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 == HackB.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.
local bones = {}
AHack.BoolToInt = function(bool)
bones.Message = function(...)
if bool then
chat.AddText(Color(50, 255, 100), "Bones ", ...)
return 1
end
else
return 0
HackB.Bones = {
"ValveBiped.Bip01_Head1",
"ValveBiped.Bip01_Neck1",
"ValveBiped.Bip01_Spine4",
"ValveBiped.Bip01_Spine2",
"ValveBiped.Bip01_Spine1",
"ValveBiped.Bip01_Spine",
"ValveBiped.Bip01_R_UpperArm",
"ValveBiped.Bip01_R_Forearm",
"ValveBiped.Bip01_R_Hand",
"ValveBiped.Bip01_L_UpperArm",
"ValveBiped.Bip01_L_Forearm",
"ValveBiped.Bip01_L_Hand",
"ValveBiped.Bip01_R_Thigh",
"ValveBiped.Bip01_R_Calf",
"ValveBiped.Bip01_R_Foot",
"ValveBiped.Bip01_R_Toe0",
"ValveBiped.Bip01_L_Thigh",
"ValveBiped.Bip01_L_Calf",
"ValveBiped.Bip01_L_Foot",
"ValveBiped.Bip01_L_Toe0"
}
HackB.RandomBones = {
"ValveBiped.Bip01_Head1",
"ValveBiped.Bip01_Neck1",
"ValveBiped.Bip01_Spine4",
"ValveBiped.Bip01_Spine2",
"ValveBiped.Bip01_R_UpperArm",
"ValveBiped.Bip01_L_UpperArm"
}
bones.Message("Found")
HackB.GetRandomBones = function()
local temp = {}
local function GetBones() //Ahh recursion, i love you.
if #HackB.RandomBones > 0 then
local random = math.random(1, #HackB.RandomBones)
table.insert(temp, HackB.RandomBones[random])
table.remove(HackB.RandomBones, random)
GetBones()
else
table.insert(HackB.RandomBones, "ValveBiped.Bip01_Head1")
table.insert(HackB.RandomBones, "ValveBiped.Bip01_Neck1")
table.insert(HackB.RandomBones, "ValveBiped.Bip01_Spine4")
table.insert(HackB.RandomBones, "ValveBiped.Bip01_Spine2")
table.insert(HackB.RandomBones, "ValveBiped.Bip01_R_UpperArm")
table.insert(HackB.RandomBones, "ValveBiped.Bip01_L_UpperArm")
end
end
end
GetBones()
return temp
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.
HackB.SpotIsVisible = function(pos, ent)
AHack.SpotIsVisible = function(pos, ent)
ent = ent or HackB.Aimbot.CurTarget
ent = ent or AHack.Aimbot.CurTarget
local tracedata = {}
local tracedata = {}
tracedata.start = AHack.Ply:GetShootPos()
tracedata.start = HackB.Ply:GetShootPos()
tracedata.endpos = pos
tracedata.endpos = pos
tracedata.filter = {AHack.Ply, ent}
tracedata.filter = {HackB.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
HackB.CanSee = function(ent)
//Checks all of the entities bones to find if we can see this entity or not.
for k = 1, #HackB.Bones do
AHack.CanSee = function(ent)
local v = HackB.Bones[k]
for k = 1, #AHack.Bones do
local v = AHack.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 HackB.SpotIsVisible(pos, ent) then
return true
return true
end
end
end
end
end
end
return false
return false
end
end
HackB.GetTarget = function()
//This returns the next entity we should attack.
if HackB.Aimbot.Vars["AttackNPCs"]:GetBool() or HackB.Aimbot.Vars["AttackPlayers"]:GetBool() then
AHack.GetTarget = function()
if AHack.Aimbot.Vars["AttackNPCs"]:GetBool() or AHack.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 HackB.Aimbot.Vars["AttackNPCs"]:GetBool() and v:IsNPC() then
if AHack.CanSee(v) then
if HackB.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 HackB.Aimbot.Vars["AttackPlayers"]:GetBool() and v:IsPlayer() and v != HackB.Ply then
if AHack.CanSee(v) then
if HackB.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 HackB.Aimbot.Vars["IgnoreTeam"]:GetBool() and v:IsPlayer() then
if AHack.TTT then
if HackB.TTT then
if AHack.Ply:GetRole() == 1 and v:GetRole() == 1 then
if HackB.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 HackB.Ply:GetRole() != 1 and not table.HasValue(HackB.Traitors, v) then
shouldremove = true
shouldremove = true
end
end
else
else
if v:Team() == AHack.Ply:Team() then
if v:Team() == HackB.Ply:Team() then
shouldremove = true
shouldremove = true
end
end
end
end
end
end
if AHack.Friends.Vars["Active"]:GetBool() then
if HackB.Friends.Vars["Active"]:GetBool() then
if AHack.Friends.Vars["Reverse"]:GetBool() then
if HackB.Friends.Vars["Reverse"]:GetBool() then
if not table.HasValue(AHack.Friends.L
if not table.HasValue(HackB.Friends.List, v:SteamID()) then
shouldremove = true
end
else
if table.HasValue(HackB.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 HackB.Aimbot.Vars["Preferance"]:GetString() == "Distance" then
local min = {["Distance"] = HackB.Ply:GetPos():Distance(targets[1]["Pos"]), ["Target"] = targets[1]["Target"]}
for k = 1, #targets do
local v = targets[k]
local distance = HackB.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 HackB.Aimbot.Vars["Preferance"]:GetString() == "Angle" then
local min = {["Angle"] = HackB.AngleTo(targets[1]["Pos"]), ["Target"] = targets[1]["Target"]}
for k = 1, #targets do
local v = targets[k]
local angle = HackB.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
HackB.AngleTo = function(pos)
local myAngs = HackB.Ply:GetAngles()
local needed = (pos - HackB.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
HackB.ValidTarget = function()
if HackB.Aimbot.CurTarget == nil then return f