Untitled diff

Creado El diff nunca expira
535 eliminaciones
661 líneas
474 adiciones
601 líneas
--[[
--[[
Copyright (C) Insan3 Cheats.
# # ###### ####### ####### #
# # ## #### # # # # # # # #
# # # # # # # # # # # # # #
####### # # # #### ###### ##### # # #
# # ###### # # # # # # # #######
# # # # # # # # # # # # # #
# # # # #### # # ###### ####### # # #
# # # # ####### ###
# # # # ## #### # # ## # # #
# # # # # # # # # # # # # # #
# # ####### # # # #### # ###### # #
####### # # ###### # # # # # # #
# # # # # # # # # # # ### # # ### # #
# # # # # # #### # # ##### ### ##### ### ###
This is barely a release.
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.
There are better hacks I know, but this one is my favourite as it is the easiest to control.
It is also easier to configure so that spectators won't think you're hacking.
--Credits:
Changes:
Insan3, Steavix.
Moved some code around to hopefully prevent memory leaks
--]]
Added load checkers
Removed the double slant comments
Removed the localization to improve speed
Set vars for propkilling
Removed a BoolToInt that wasn't being used.
Added PennyLenny's FOV changer
//I hear this makes the hack load faster, i didn't actually check the O times but whatever.
Essentially, this is an easier-to-edit version of AHack that is slightly faster and has an FOV changer.
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 Sasha = {}
local HackB = {}
Sasha.Active = CreateClientConVar("Sasha_Active", 1, true, false)
HackB.Active = CreateClientConVar("HackB_Active", 1, true, false)
Sasha.Version = "1.5.0"
HackB.Version = "1.6.5"
Sasha.Ply = LocalPlayer()
HackB.Ply = LocalPlayer()
Sasha.TTT = (GAMEMODE and GAMEMODE.Name and string.find(GAMEMODE.Name, "Terror") and true) or false
HackB.TTT = (GAMEMODE and GAMEMODE.Name and string.find(GAMEMODE.Name, "Terror") and true) or false
if Sasha.TTT then Sasha.TTTCORPSE = CORPSE end
if HackB.TTT then HackB.TTTCORPSE = CORPSE end
Sasha.DarkRP = (GAMEMODE and GAMEMODE.Name and string.find(GAMEMODE.Name, "DarkRP") and true) or false
HackB.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.
HackB.Message = function(...)
Sasha.GetColorFromString = function(words)
chat.AddText(Color(50, 255, 100), "[HackBETA] ", ...)
//I probably shouldve just used string.explode...well.......
if type(words) != "string" then return Color(255, 255, 255, 255) end
words = "return "..words
local func = CompileString(words, "GettingColors", true)
local good, color = pcall(func)
if good and type(color) == "table" and color.r and color.g and color.b and color.a then
return color
else
return Color(255, 255, 255, 255)
end
end
end
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"}
local propkill = {}
Sasha.RandomName = function(amount)
propkill.Message = function(...)
local toReturn = ""
chat.AddText(Color(50, 255, 100), "Propkill Help ", ...)
local amount = amount or 10
for i = 1, amount do
if math.random(0, 1) == 0 then
toReturn = toReturn..string.lower(table.Random(Sasha.Chars))
else
toReturn = toReturn..table.Random(Sasha.Chars)
end
end
return toReturn
end
end
Sasha.Message = function(...)
RunConsoleCommand( "physgun_wheelspeed" , 999999 )
chat.AddText(Color(50, 255, 100), "[Sasha] ", ...)
RunConsoleCommand( "cl_interp" , 0 )
RunConsoleCommand( "cl_interp_ratio" , 0 )
RunConsoleCommand( "cl_cmdrate" , 200 )
RunConsoleCommand( "cl_updaterate" , 200 )
RunConsoleCommand( "rate" , 51200 )
propkill.Message("Loaded")
HackB.GetColorFromString = function(words)
if type(words) != "string" then return Color(255, 255, 255, 255) end
words = "return "..words
local func = CompileString(words, "GettingColors", true)
local good, color = pcall(func)
if good and type(color) == "table" and color.r and color.g and color.b and color.a then
return color
else
return Color(255, 255, 255, 255)
end
end
end
Sasha.Aimbot = {}
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"}
Sasha.Aimbot.CurTarget = nil
HackB.RandomName = function(amount)
Sasha.Aimbot.Vars = {}
local toReturn = ""
Sasha.Aimbot.Vars["Active"] = CreateClientConVar("Sasha_Aimbot_Active", 0, true, false)
local amount = amount or 10
Sasha.Aimbot.Vars["RandomBones"] = CreateClientConVar("Sasha_Aimbot_RandomBones", 0, true, false)
for i = 1, amount do
Sasha.Aimbot.Vars["AttackNPCs"] = CreateClientConVar("Sasha_Aimbot_AttackNPCs", 0, true, false)
if math.random(0, 1) == 0 then
Sasha.Aimbot.Vars["AttackPlayers"] = CreateClientConVar("Sasha_Aimbot_AttackPlayers", 0, true, false)
toReturn = toReturn..string.lower(table.Random(HackB.Chars))
Sasha.Aimbot.Vars["Prediction"] = CreateClientConVar("Sasha_Aimbot_Prediction", 0, true, false)
else
Sasha.Aimbot.Vars["AimOnKey"] = CreateClientConVar("Sasha_Aimbot_AimOnKey", 0, true, false)
toReturn = toReturn..table.Random(HackB.Chars)
Sasha.Aimbot.Vars["AimOnKey_Key"] = CreateClientConVar("Sasha_Aimbot_AimOnKey_Key", "MOUSE_LEFT", true, false)
end
Sasha.Aimbot.Vars["MaxAngle"] = CreateClientConVar("Sasha_Aimbot_MaxAngle", 180, true, false)
end
Sasha.Aimbot.Vars["Preferance"] = CreateClientConVar("Sasha_Aimbot_Preferance", "Distance", true, false)
return toReturn
Sasha.Aimbot.Vars["AntiSnap"] = CreateClientConVar("Sasha_Aimbot_AntiSnap", 0, true, false)
end
Sasha.Aimbot.Vars["AntiSnapSpeed"] = CreateClientConVar("Sasha_Aimbot_AntiSnapSpeed", 4, true, false)
Sasha.Aimbot.Vars["AutoShoot"] = CreateClientConVar("Sasha_Aimbot_AutoShoot", 0, true, false)
Sasha.Aimbot.Vars["PanicMode"] = CreateClientConVar("Sasha_Aimbot_PanicMode", 0, true, false)
Sasha.Aimbot.Vars["IgnoreTeam"] = CreateClientConVar("Sasha_Aimbot_IgnoreTeam", 0, true, false)
Sasha.Friends = {}
surface.CreateFont("TitleFont", {font = "Arial", size = 20})
Sasha.Friends.List = {} //The steamIDs of everyone on your friends list
surface.CreateFont("CatagoryHeader", {font = "CloseCaption_Normal", size = 34})
Sasha.Friends.Vars = {}
surface.CreateFont("CatagoryText", {font = "CloseCaption_Normal", size = 28})
Sasha.Friends.Vars["Active"] = CreateClientConVar("Sasha_Friends_Active", 0, true, false)
surface.CreateFont("ESPFont", {font = "CloseCaption_Normal", weight = 1000, size = 15})
Sasha.Friends.Vars["Reverse"] = CreateClientConVar("Sasha_Friends_Reverse", 0, true, false)
Sasha.ESP = {}
local varc = {}
Sasha.ESP.Vars = {}
varc.Message = function(...)
Sasha.ESP.Vars["Active"] = CreateClientConVar("Sasha_ESP_Active", 0, true, false)
chat.AddText(Color(50, 255, 100), "Variables ", ...)
Sasha.ESP.Vars["Players"] = CreateClientConVar("Sasha_ESP_Players", 0, true, false)
end
Sasha.ESP.Vars["NPCs"] = CreateClientConVar("Sasha_ESP_NPCs", 0, true, false)
Sasha.ESP.Vars["Name"] = CreateClientConVar("Sasha_ESP_Name", "Off", true, false)
Sasha.ESP.Vars["Weapons"] = CreateClientConVar("Sasha_ESP_Weapons", "Off", true, false)
Sasha.ESP.Vars["Distance"] = CreateClientConVar("Sasha_ESP_Distance", "Off", true, false)
Sasha.ESP.Vars["Health"] = CreateClientConVar("Sasha_ESP_Health", "Off", true, false)
Sasha.ESP.Vars["MaxDistance"] = CreateClientConVar("Sasha_ESP_MaxDistance", 0, true, false)
Sasha.ESP.Vars["Box"] = CreateClientConVar("Sasha_ESP_Box", 0, true, false)
Sasha.ESP.Vars["ShowTraitors"] = CreateClientConVar("Sasha_ESP_ShowTraitors", "Off", true, false)
Sasha.ESP.Vars["Bodies"] = CreateClientConVar("Sasha_ESP_Bodies", 0, true, false)
Sasha.ESP.Vars["Radar"] = CreateClientConVar("Sasha_ESP_Radar", 0, true, false)
Sasha.ESP.Vars["RadarScale"] = CreateClientConVar("Sasha_ESP_RadarScale", 20, true, false)
Sasha.ESP.Vars["TeamBased"] = CreateClientConVar("Sasha_ESP_TeamBased", 0, true, false)
Sasha.Chams = {}
Sasha.Chams.Mat = CreateMaterial(Sasha.RandomName(math.random(10,15)), "VertexLitGeneric", { ["$basetexture"] = "models/debug/debugwhite", ["$model"] = 1, ["$ignorez"] = 1 })
Sasha.Chams.Vars = {}
Sasha.Chams.Vars["Active"] = CreateClientConVar("Sasha_Chams_Active", 0, true, false)
Sasha.Chams.Vars["Players"] = CreateClientConVar("Sasha_Chams_Players", 0, true, false)
Sasha.Chams.Vars["NPCs"] = CreateClientConVar("Sasha_Chams_NPCs", 0, true, false)
Sasha.Chams.Vars["Weapons"] = CreateClientConVar("Sasha_Chams_Weapons", 0, true, false)
Sasha.Chams.Vars["MaxDistance"] = CreateClientConVar("Sasha_Chams_MaxDistance", 0, true, false)
Sasha.Chams.Vars["Bodies"] = CreateClientConVar("Sasha_Chams_Boddies", 0, true, false)
Sasha.Chams.Vars["TeamBased"] = CreateClientConVar("Sasha_Chams_TeamBased", 0, true, false)
Sasha.Entities = {}
HackB.Aimbot = {}
Sasha.Entities.List = {} //The class namse of all the entities
HackB.Aimbot.CurTarget = nil
Sasha.Entities.Vars = {}
HackB.Aimbot.Vars = {}
Sasha.Entities.Vars["Active"] = CreateClientConVar("Sasha_Entities_Active", 0, true, false)
HackB.Aimbot.Vars["Active"] = CreateClientConVar("HackB_Aimbot_Active", 0, true, false)
HackB.Aimbot.Vars["RandomBones"] = CreateClientConVar("HackB_Aimbot_RandomBones", 0, true, false)
HackB.Aimbot.Vars["AttackNPCs"] = CreateClientConVar("HackB_Aimbot_AttackNPCs", 0, true, false)
HackB.Aimbot.Vars["AttackPlayers"] = CreateClientConVar("HackB_Aimbot_AttackPlayers", 0, true, false)
HackB.Aimbot.Vars["Prediction"] = CreateClientConVar("HackB_Aimbot_Prediction", 0, true, false)
HackB.Aimbot.Vars["AimOnKey"] = CreateClientConVar("HackB_Aimbot_AimOnKey", 0, true, false)
HackB.Aimbot.Vars["AimOnKey_Key"] = CreateClientConVar("HackB_Aimbot_AimOnKey_Key", "MOUSE_LEFT", true, false)
HackB.Aimbot.Vars["MaxAngle"] = CreateClientConVar("HackB_Aimbot_MaxAngle", 180, true, false)
HackB.Aimbot.Vars["Preferance"] = CreateClientConVar("HackB_Aimbot_Preferance", "Distance", true, false)
HackB.Aimbot.Vars["AntiSnap"] = CreateClientConVar("HackB_Aimbot_AntiSnap", 0, true, false)
HackB.Aimbot.Vars["AntiSnapSpeed"] = CreateClientConVar("HackB_Aimbot_AntiSnapSpeed", 4, true, false)
HackB.Aimbot.Vars["AutoShoot"] = CreateClientConVar("HackB_Aimbot_AutoShoot", 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)
Sasha.Misc = {}
HackB.Friends = {}
Sasha.Misc.Vars = {}
HackB.Friends.List = {} //The steamIDs of everyone on your friends list
Sasha.Misc.Vars["ShowAdmins"] = CreateClientConVar("Sasha_Misc_ShowAdmins", 0, true, false)
HackB.Friends.Vars = {}
Sasha.Misc.Vars["Crosshair"] = CreateClientConVar("Sasha_Misc_Cross", 0, true, false)
HackB.Friends.Vars["Active"] = CreateClientConVar("HackB_Friends_Active", 0, true, false)
Sasha.Misc.Vars["CrosshairSize"] = CreateClientConVar("Sasha_Misc_CrossSize", 50, true, false)
HackB.Friends.Vars["Reverse"] = CreateClientConVar("HackB_Friends_Reverse", 0, true, false)
Sasha.Misc.Vars["NoRecoil"] = CreateClientConVar("Sasha_Misc_NoRecoil", 0, true, false)
Sasha.Misc.Vars["ShowSpectators"] = CreateClientConVar("Sasha_Misc_ShowSpectators", 0, true, false)
Sasha.Misc.Vars["BunnyHop"] = CreateClientConVar("Sasha_Misc_BunnyHop", 0, true, false)
Sasha.Misc.Vars["BunnyHop_Key"] = CreateClientConVar("Sasha_Misc_BunnyHop_Key", "KEY_SPACE", true, false)
Sasha.Misc.Vars["AutoReload"] = CreateClientConVar("Sasha_Misc_AutoReload", 0, true, false)
Sasha.Misc.Vars["AutoPistol"] = CreateClientConVar("Sasha_Misc_AutoPistol", 0, true, false)
Sasha.Misc.Vars["BuyHealth"] = CreateClientConVar("Sasha_Misc_BuyHealth", 0, true, false)
Sasha.Misc.Vars["BuyHealth_Minimum"] = CreateClientConVar("Sasha_Misc_BuyHealth_Minimum", 80, true, false)
Sasha.Misc.Vars["TraitorFinder"] = CreateClientConVar("Sasha_Misc_TraitorFinder", 0, true, false)
Sasha.Misc.Vars["Deaths"] = CreateClientConVar("Sasha_Misc_Deaths", 0, true, false)
Sasha.Misc.Vars["Sounds"] = CreateClientConVar("Sasha_Misc_Sounds", 0, true, false)
Sasha.Style = {}
HackB.ESP = {}
Sasha.Style.Vars = {}
HackB.ESP.Vars = {}
Sasha.Style.Vars["BoundingBox"] = {}
HackB.ESP.Vars["Active"] = CreateClientConVar("HackB_ESP_Active", 0, true, false)
Sasha.Style.Vars["BoundingBox"].var = CreateClientConVar("Sasha_Style_BoundingBox", "Color(255, 0, 0, 255)", true, false)
HackB.ESP.Vars["Players"] = CreateClientConVar("HackB_ESP_Players", 0, true, false)
Sasha.Style.Vars["BoundingBox"].color = Sasha.GetColorFromString(Sasha.Style.Vars["BoundingBox"].var:GetString())
HackB.ESP.Vars["NPCs"] = CreateClientConVar("HackB_ESP_NPCs", 0, true, false)
Sasha.Style.Vars["ESPText"] = {}
HackB.ESP.Vars["Name"] = CreateClientConVar("HackB_ESP_Name", "Off", true, false)
Sasha.Style.Vars["ESPText"].var = CreateClientConVar("Sasha_Style_ESPText", "Color(255, 255, 255, 255)", true, false)
HackB.ESP.Vars["Weapons"] = CreateClientConVar("HackB_ESP_Weapons", "Off", true, false)
Sasha.Style.Vars["ESPText"].color = Sasha.GetColorFromString(Sasha.Style.Vars["ESPText"].var:GetString())
HackB.ESP.Vars["Distance"] = CreateClientConVar("HackB_ESP_Distance", "Off", true, false)
Sasha.Style.Vars["Crosshair"] = {}
HackB.ESP.Vars["Health"] = CreateClientConVar("HackB_ESP_Health", "Off", true, false)
Sasha.Style.Vars["Crosshair"].var = CreateClientConVar("Sasha_Style_Cross", "Color(255, 255, 255, 255)", true, false)
HackB.ESP.Vars["MaxDistance"] = CreateClientConVar("HackB_ESP_MaxDistance", 0, true, false)
Sasha.Style.Vars["Crosshair"].color = Sasha.GetColorFromString(Sasha.Style.Vars["Crosshair"].var:GetString())
HackB.ESP.Vars["Box"] = CreateClientConVar("HackB_ESP_Box", 0, true, false)
Sasha.Style.Vars["BodyText"] = {}
HackB.ESP.Vars["ShowTraitors"] = CreateClientConVar("HackB_ESP_ShowTraitors", "Off", true, false)
Sasha.Style.Vars["BodyText"].var = CreateClientConVar("Sasha_Style_BodyText", "Color(255, 255, 255, 255)", true, false)
HackB.ESP.Vars["Bodies"] = CreateClientConVar("HackB_ESP_Bodies", 0, true, false)
Sasha.Style.Vars["BodyText"].color = Sasha.GetColorFromString(Sasha.Style.Vars["BodyText"].var:GetString())
HackB.ESP.Vars["Radar"] = CreateClientConVar("HackB_ESP_Radar", 0, true, false)
Sasha.Style.Vars["Chams"] = {}
HackB.ESP.Vars["RadarScale"] = CreateClientConVar("HackB_ESP_RadarScale", 20, true, false)
Sasha.Style.Vars["Chams"].var = CreateClientConVar("Sasha_Style_Chams", "Color(0, 255, 0, 255)", true, false)
HackB.ESP.Vars["TeamBased"] = CreateClientConVar("HackB_ESP_TeamBased", 0, true, false)
Sasha.Style.Vars["Chams"].color = Sasha.GetColorFromString(Sasha.Style.Vars["Chams"].var:GetString())
Sasha.Style.Vars["BodyChams"] = {}
Sasha.Style.Vars["BodyChams"].var = CreateClientConVar("Sasha_Style_BodyChams", "Color(0, 255, 0, 255)", true, false)
Sasha.Style.Vars["BodyChams"].color = Sasha.GetColorFromString(Sasha.Style.Vars["BodyChams"].var:GetString())
//This loads our friends list and custom entities list.
HackB.Chams = {}
/*Sasha.SavedData = CreateClientConVar("Sasha_SaveData", Sasha.RandomName(math.random(10, 15)), true, false)
HackB.Chams.Mat = CreateMaterial(HackB.RandomName(math.random(10,15)), "VertexLitGeneric", { ["$basetexture"] = "models/debug/debugwhite", ["$model"] = 1, ["$ignorez"] = 1 })
if file.Exists(Sasha.SavedData:GetString()..".txt", "DATA") then
HackB.Chams.Vars = {}
local info = string.Explode("\n", file.Read(Sasha.SavedData:GetString()..".txt", "DATA"))
HackB.Chams.Vars["Active"] = CreateClientConVar("HackB_Chams_Active", 0, true, false)
if type(info) == "table" and info[1] and info[2] then
HackB.Chams.Vars["Players"] = CreateClientConVar("HackB_Chams_Players", 0, true, false)
Sasha.Friends.List = util.JSONToTable(info[1])
HackB.Chams.Vars["NPCs"] = CreateClientConVar("HackB_Chams_NPCs", 0, true, false)
Sasha.Entities.List = util.JSONToTable(info[2])
HackB.Chams.Vars["Weapons"] = CreateClientConVar("HackB_Chams_Weapons", 0, true, false)
HackB.Chams.Vars["MaxDistance"] = CreateClientConVar("HackB_Chams_MaxDistance", 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)
HackB.Entities = {}
HackB.Entities.List = {} //The class namse of all the entities
HackB.Entities.Vars = {}
HackB.Entities.Vars["Active"] = CreateClientConVar("HackB_Entities_Active", 0, true, false)
HackB.Misc = {}
HackB.Misc.Vars = {}
HackB.Misc.Vars["ShowAdmins"] = CreateClientConVar("HackB_Misc_ShowAdmins", 0, true, false)
HackB.Misc.Vars["Crosshair"] = CreateClientConVar("HackB_Misc_Cross", 0, true, false)
HackB.Misc.Vars["CrosshairSize"] = CreateClientConVar("HackB_Misc_CrossSize", 50, true, false)
HackB.Misc.Vars["NoRecoil"] = CreateClientConVar("HackB_Misc_NoRecoil", 0, true, false)
HackB.Misc.Vars["ShowSpectators"] = CreateClientConVar("HackB_Misc_ShowSpectators", 0, true, false)
HackB.Misc.Vars["BunnyHop"] = CreateClientConVar("HackB_Misc_BunnyHop", 0, true, false)
HackB.Misc.Vars["BunnyHop_Key"] = CreateClientConVar("HackB_Misc_BunnyHop_Key", "KEY_SPACE", true, false)
HackB.Misc.Vars["AutoReload"] = CreateClientConVar("HackB_Misc_AutoReload", 0, true, false)
HackB.Misc.Vars["AutoPistol"] = CreateClientConVar("HackB_Misc_AutoPistol", 0, true, false)
HackB.Misc.Vars["BuyHealth"] = CreateClientConVar("HackB_Misc_BuyHealth", 0, true, false)
HackB.Misc.Vars["BuyHealth_Minimum"] = CreateClientConVar("HackB_Misc_BuyHealth_Minimum", 80, true, false)
HackB.Misc.Vars["TraitorFinder"] = CreateClientConVar("HackB_Misc_TraitorFinder", 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)
HackB.Style = {}
HackB.Style.Vars = {}
HackB.Style.Vars["BoundingBox"] = {}
HackB.Style.Vars["BoundingBox"].var = CreateClientConVar("HackB_Style_BoundingBox", "Color(255, 0, 0, 255)", true, false)
HackB.Style.Vars["BoundingBox"].color = HackB.GetColorFromString(HackB.Style.Vars["BoundingBox"].var:GetString())
HackB.Style.Vars["ESPText"] = {}
HackB.Style.Vars["ESPText"].var = CreateClientConVar("HackB_Style_ESPText", "Color(255, 255, 255, 255)", true, false)
HackB.Style.Vars["ESPText"].color = HackB.GetColorFromString(HackB.Style.Vars["ESPText"].var:GetString())
HackB.Style.Vars["Crosshair"] = {}
HackB.Style.Vars["Crosshair"].var = CreateClientConVar("HackB_Style_Cross", "Color(255, 255, 255, 255)", true, false)
HackB.Style.Vars["Crosshair"].color = HackB.GetColorFromString(HackB.Style.Vars["Crosshair"].var:GetString())
HackB.Style.Vars["BodyText"] = {}
HackB.Style.Vars["BodyText"].var = CreateClientConVar("HackB_Style_BodyText", "Color(255, 255, 255, 255)", true, false)
HackB.Style.Vars["BodyText"].color = HackB.GetColorFromString(HackB.Style.Vars["BodyText"].var:GetString())
HackB.Style.Vars["Chams"] = {}
HackB.Style.Vars["Chams"].var = CreateClientConVar("HackB_Style_Chams", "Color(0, 255, 0, 255)", true, false)
HackB.Style.Vars["Chams"].color = HackB.GetColorFromString(HackB.Style.Vars["Chams"].var:GetString())
HackB.Style.Vars["BodyChams"] = {}
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())
varc.Message("Set")
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
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
HackB.Friends.List = util.JSONToTable(info[1])
HackB.Entities.List = util.JSONToTable(info[2])
end
end
end
Sasha.SaveData = function()
save.Message("Added")
file.Write(Sasha.SavedData:GetString()..".txt", util.TableToJSON(Sasha.Friends.List))
file.Append(Sasha.SavedData:GetString()..".txt", "\n")
file.Append(Sasha.SavedData:GetString()..".txt", util.TableToJSON(Sasha.Entities.List))
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.
Text moved with changes to lines 415-436 (99.1% similarity)
Sasha.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.
local keys = {}
//If you edit this be sure to edit the function below it.
keys.Message = function(...)
Text moved with changes to lines 437-444 (98.3% similarity)
Sasha.RandomBones = {
chat.AddText(Color(50, 255, 100), "Keys ", ...)
"ValveBiped.Bip01_Head1",
"ValveBiped.Bip01_Neck1",
"ValveBiped.Bip01_Spine4",
"ValveBiped.Bip01_Spine2",
"ValveBiped.Bip01_R_UpperArm",
"ValveBiped.Bip01_L_UpperArm"
}
Sasha.GetRandomBones = function()
local temp = {}
local function GetBones() //Ahh recursion, i love you.
if #Sasha.RandomBones > 0 then
local random = math.random(1, #Sasha.RandomBones)
table.insert(temp, Sasha.RandomBones[random])
table.remove(Sasha.RandomBones, random)
GetBones()
else
table.insert(Sasha.RandomBones, "ValveBiped.Bip01_Head1")
table.insert(Sasha.RandomBones, "ValveBiped.Bip01_Neck1")
table.insert(Sasha.RandomBones, "ValveBiped.Bip01_Spine4")
table.insert(Sasha.RandomBones, "ValveBiped.Bip01_Spine2")
table.insert(Sasha.RandomBones, "ValveBiped.Bip01_R_UpperArm")
table.insert(Sasha.RandomBones, "ValveBiped.Bip01_L_UpperArm")
end
end
GetBones()
return temp
end
end
//A list of all keyboard keys, for binding
HackB.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",
//[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 = {
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.
Sasha.KeyPressed = function(key)
varc.Message("Found")
if Sasha.InChat then return false end
local chatr = {}
for k = 107, 111 do
chatr.Message = function(...)
if key == Sasha.MouseKeys[k] then
chat.AddText(Color(50, 255, 100), "Chat Rules ", ...)
if input.IsMouseDown(k) then
return true
else
return false
end
end
end
for k = 0, 130 do
if key == Sasha.Keys[k] then
if input.IsKeyDown(k) then
return true
else
return false
end
end
end
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.
HackB.InChat = false
Sasha.BoolToInt = function(bool)
hook.Add("StartChat", HackB.RandomName(math.random(10, 15)), function()
if bool then
HackB.InChat = true
return 1
end)
else
hook.Add("FinishChat", HackB.RandomName(math.random(10, 15)), function()
return 0
HackB.InChat = false
end
end)
chatr.Message("Added")
HackB.KeyPressed = function(key)
if HackB.InChat then return false end
for k = 107, 111 do
if key == HackB.MouseKeys[k] then
if input.IsMouseDown(k) then
return true
else
return false
end
end
end
for k = 0, 130 do
if key == HackB.Keys[k] then
if input.IsKeyDown(k) then
return true
else
return false
end
end
end
return false
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.
local bones = {}
Sasha.SpotIsVisible = function(pos, ent)
bones.Message = function(...)
ent = ent or Sasha.Aimbot.CurTarget
chat.AddText(Color(50, 255, 100), "Bones ", ...)
local tracedata = {}
tracedata.start = Sasha.Ply:GetShootPos()
tracedata.endpos = pos
tracedata.filter = {Sasha.Ply, ent}
local trace = util.TraceLine(tracedata)
if trace.HitPos:Distance(pos) < 0.005 then
return true
else
return false
end
end
end
Text moved with changes from lines 173-194 (99.1% similarity)
//Checks all of the entities bones to find if we can see this entity or not.
HackB.Bones = {
Sasha.CanSee = function(ent)
"ValveBiped.Bip01_Head1",
for k = 1, #Sasha.Bones do
"ValveBiped.Bip01_Neck1",
local v = Sasha.Bones[k]
"ValveBiped.Bip01_Spine4",
local bone = ent:LookupBone(v)
"ValveBiped.Bip01_Spine2",
if bone != nil then
"ValveBiped.Bip01_Spine1",
local pos, ang = ent:GetBonePosition(bone)
"ValveBiped.Bip01_Spine",
if Sasha.SpotIsVisible(pos, ent) then
"ValveBiped.Bip01_R_UpperArm",
return true
"ValveBiped.Bip01_R_Forearm",
end
"ValveBiped.Bip01_R_Hand",
end
"ValveBiped.Bip01_L_UpperArm",
end
"ValveBiped.Bip01_L_Forearm",
return false
"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"
}
Text moved with changes from lines 198-205 (98.3% similarity)
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
GetBones()
return temp
end
end
//This returns the next entity we should attack.
HackB.SpotIsVisible = function(pos, ent)
Sasha.GetTarget = function()
ent = ent or HackB.Aimbot.CurTarget
if Sasha.Aimbot.Vars["AttackNPCs"]:GetBool() or Sasha.Aimbot.Vars["AttackPlayers"]:GetBool() then
local tracedata = {}
local targets = {}
tracedata.start = HackB.Ply:GetShootPos()
local everything = ents.GetAll()
tracedata.endpos = pos
for k = 1, #everything do
tracedata.filter = {HackB.Ply, ent}
local v = everything[k]
if Sasha.Aimbot.Vars["AttackNPCs"]:GetBool() and v:IsNPC() then
local trace = util.TraceLine(tracedata)
if Sasha.CanSee(v) then
if trace.HitPos:Distance(pos) < 0.005 then
table.insert(targets, {["Target"] = v, ["Pos"] = v:LocalToWorld(v:OBBCenter())})
return true
end
else
elseif Sasha.Aimbot.Vars["AttackPlayers"]:GetBool() and v:IsPlayer() and v != Sasha.Ply then
return false
if Sasha.CanSee(v) then
end
table.insert(targets, {["Target"] = v, ["Pos"] = v:LocalToWorld(v:OBBCenter())})
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
local v = v["Target"]
local shouldremove = false
if Sasha.Aimbot.Vars["IgnoreTeam"]:GetBool() and v:IsPlayer() then
if Sasha.TTT then
if Sasha.Ply:GetRole() == 1 and v:GetRole() == 1 then
shouldremove = true
end
if Sasha.Ply:GetRole() != 1 and not table.HasValue(Sasha.Traitors, v) then
shouldremove = true
end
else
if v:Team() == Sasha.Ply:Team() then
shouldremove = true
end
end
end
if Sasha.Friends.Vars["Active"]:GetBool() then
if Sasha.Friends.Vars["Reverse"]:GetBool() then
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
end
HackB.CanSee = function(ent)
//This returns the total angle away from the target we are, and then the pitch and yaw seperately
for k = 1, #HackB.Bones do
Sasha.AngleTo = function(pos)
local v = HackB.Bones[k]
local myAngs = Sasha.Ply:GetAngles()
local bone = ent:LookupBone(v)
local needed = (pos - Sasha.Ply:GetShootPos()):Angle()
if bone != nil then
local pos, ang = ent:GetBonePosition(bone)
myAngs.p = math.NormalizeAngle(myAngs.p)
if HackB.SpotIsVisible(pos, ent) then
needed.p = math.NormalizeAngle(needed.p)
return true
end
myAngs.y = math.NormalizeAngle(myAngs.y)
end
needed.y = math.NormalizeAngle(needed.y)
end
return false
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
end
HackB.GetTarget = function()
//Returns true if our target meets our preferances.
if HackB.Aimbot.Vars["AttackNPCs"]:GetBool() or HackB.Aimbot.Vars["AttackPlayers"]:GetBool() then
Sasha.ValidTarget = function()
local targets = {}
if Sasha.Aimbot.CurTarget == nil then return false end
local everything = ents.GetAll()
if not IsValid(Sasha.Aimbot.CurTarget) then return false end
for k = 1, #everything do
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
local v = everything[k]
if not Sasha.Aimbot.Vars["AttackNPCs"]:GetBool() and Sasha.Aimbot.CurTarget:IsNPC() then return false end
if HackB.Aimbot.Vars["AttackNPCs"]:GetBool() and v:IsNPC() then
if not Sasha.Aimbot.Vars["AttackPlayers"]:GetBool() and Sasha.Aimbot.CurTarget:IsPlayer() then return false end
if HackB.CanSee(v) then
if not Sasha.CanSee(Sasha.Aimbot.CurTarget) then return false end
table.insert(targets, {["Target"] = v, ["Pos"] = v:LocalToWorld(v:OBBCenter())})
if Sasha.Aimbot.Vars["IgnoreTeam"]:GetBool() and Sasha.Aimbot.CurTarget:IsPlayer() then
end
if Sasha.TTT then
elseif HackB.Aimbot.Vars["AttackPlayers"]:GetBool() and v:IsPlayer() and v != HackB.Ply then
if Sasha.Ply:GetRole() == 1 and Sasha.Aimbot.CurTarget:GetRole() == 1 then return false end
if HackB.CanSee(v) then
if Sasha.Ply:GetRole() != 1 and not table.HasValue(Sasha.Traitors, Sasha.Aimbot.CurTarget) then return false end
table.insert(targets, {["Target"] = v, ["Pos"] = v:LocalToWorld(v:OBBCenter())})
else
end
if Sasha.Aimbot.CurTarget:Team() == Sasha.Ply:Team() then return false 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
return true
local v = v["Target"]
local shouldremove = false
if HackB.Aimbot.Vars["IgnoreTeam"]:GetBool() and v:IsPlayer() then
if HackB.TTT then
if HackB.Ply:GetRole() == 1 and v:GetRole() == 1 then
shouldremove = true
end
if HackB.Ply:GetRole() != 1 and not table.HasValue(HackB.Traitors, v) then
shouldremove = true
end
else
if v:Team() == HackB.Ply:Team() then
shouldremove = true
end
end
end
if HackB.Friends.Vars["Active"]:GetBool() then
if HackB.Friends.Vars["Reverse"]:GetBool() then
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
end
HackB.AngleTo = function(pos)
hook.Add("RenderScreenspaceEffects", Sasha.RandomName(math.random(10, 15)), function()
local myAngs = HackB.Ply:GetAngles()
if Sasha.Active:GetBool() then
local needed = (pos - HackB.Ply:GetShootPos()):Angle()
local everything = ents.GetAll()
for k = 1, #everything do
myAngs.p = math.NormalizeAngle(myAngs.p)
local v = everything[k]
needed.p = math.NormalizeAngle(needed.p)
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
myAngs.y = math.NormalizeAngle(myAngs.y)
cam.Start3D(EyePos(), EyeAngles())
needed.y = math.NormalizeAngle(needed.y)
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
local p = math.NormalizeAngle(needed.p - myAngs.p)
if Sasha.Chams.Vars["TeamBased"]:GetBool() and v:IsPlayer() then
local y = math.NormalizeAngle(needed.y - myAngs.y)
color = team.GetColor(v:Team())
if Sasha.TTT then
return math.abs(p) + math.abs(y), {p = p, y = y}
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
end
HackB.ValidTarget = function()
//Another helper fuction on the radar.
if HackB.Aimbot.CurTarget == nil then return f
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)