Untitled diff

Creado El diff nunca expira
590 eliminaciones
661 líneas
525 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.......
end
local propkill = {}
propkill.Message = function(...)
chat.AddText(Color(50, 255, 100), "Propkill Help ", ...)
end
RunConsoleCommand( "physgun_wheelspeed" , 999999 )
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
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
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"}
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.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(Sasha.Chars))
toReturn = toReturn..string.lower(table.Random(HackB.Chars))
else
else
toReturn = toReturn..table.Random(Sasha.Chars)
toReturn = toReturn..table.Random(HackB.Chars)
end
end
end
end
return toReturn
return toReturn
end
end
Sasha.Message = function(...)
surface.CreateFont("TitleFont", {font = "Arial", size = 20})
chat.AddText(Color(50, 255, 100), "[Sasha] ", ...)
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
Sasha.Aimbot = {}
Sasha.Aimbot.CurTarget = nil
Sasha.Aimbot.Vars = {}
Sasha.Aimbot.Vars["Active"] = CreateClientConVar("Sasha_Aimbot_Active", 0, true, false)
Sasha.Aimbot.Vars["RandomBones"] = CreateClientConVar("Sasha_Aimbot_RandomBones", 0, true, false)
Sasha.Aimbot.Vars["AttackNPCs"] = CreateClientConVar("Sasha_Aimbot_AttackNPCs", 0, true, false)
Sasha.Aimbot.Vars["AttackPlayers"] = CreateClientConVar("Sasha_Aimbot_AttackPlayers", 0, true, false)
Sasha.Aimbot.Vars["Prediction"] = CreateClientConVar("Sasha_Aimbot_Prediction", 0, true, false)
Sasha.Aimbot.Vars["AimOnKey"] = CreateClientConVar("Sasha_Aimbot_AimOnKey", 0, true, false)
Sasha.Aimbot.Vars["AimOnKey_Key"] = CreateClientConVar("Sasha_Aimbot_AimOnKey_Key", "MOUSE_LEFT", true, false)
Sasha.Aimbot.Vars["MaxAngle"] = CreateClientConVar("Sasha_Aimbot_MaxAngle", 180, true, false)
Sasha.Aimbot.Vars["Preferance"] = CreateClientConVar("Sasha_Aimbot_Preferance", "Distance", true, false)
Sasha.Aimbot.Vars["AntiSnap"] = CreateClientConVar("Sasha_Aimbot_AntiSnap", 0, true, false)
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 = {}
HackB.Aimbot = {}
Sasha.Friends.List = {} //The steamIDs of everyone on your friends list
HackB.Aimbot.CurTarget = nil
Sasha.Friends.Vars = {}
HackB.Aimbot.Vars = {}
Sasha.Friends.Vars["Active"] = CreateClientConVar("Sasha_Friends_Active", 0, true, false)
HackB.Aimbot.Vars["Active"] = CreateClientConVar("HackB_Aimbot_Active", 0, true, false)
Sasha.Friends.Vars["Reverse"] = CreateClientConVar("Sasha_Friends_Reverse", 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.ESP = {}
HackB.Friends = {}
Sasha.ESP.Vars = {}
HackB.Friends.List = {} //The steamIDs of everyone on your friends list
Sasha.ESP.Vars["Active"] = CreateClientConVar("Sasha_ESP_Active", 0, true, false)
HackB.Friends.Vars = {}
Sasha.ESP.Vars["Players"] = CreateClientConVar("Sasha_ESP_Players", 0, true, false)
HackB.Friends.Vars["Active"] = CreateClientConVar("HackB_Friends_Active", 0, true, false)
Sasha.ESP.Vars["NPCs"] = CreateClientConVar("Sasha_ESP_NPCs", 0, true, false)
HackB.Friends.Vars["Reverse"] = CreateClientConVar("HackB_Friends_Reverse", 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 = {}
HackB.ESP = {}
Sasha.Chams.Mat = CreateMaterial(Sasha.RandomName(math.random(10,15)), "VertexLitGeneric", { ["$basetexture"] = "models/debug/debugwhite", ["$model"] = 1, ["$ignorez"] = 1 })
HackB.ESP.Vars = {}
Sasha.Chams.Vars = {}
HackB.ESP.Vars["Active"] = CreateClientConVar("HackB_ESP_Active", 0, true, false)
Sasha.Chams.Vars["Active"] = CreateClientConVar("Sasha_Chams_Active", 0, true, false)
HackB.ESP.Vars["Players"] = CreateClientConVar("HackB_ESP_Players", 0, true, false)
Sasha.Chams.Vars["Players"] = CreateClientConVar("Sasha_Chams_Players", 0, true, false)
HackB.ESP.Vars["NPCs"] = CreateClientConVar("HackB_ESP_NPCs", 0, true, false)
Sasha.Chams.Vars["NPCs"] = CreateClientConVar("Sasha_Chams_NPCs", 0, true, false)
HackB.ESP.Vars["Name"] = CreateClientConVar("HackB_ESP_Name", "Off", true, false)
Sasha.Chams.Vars["Weapons"] = CreateClientConVar("Sasha_Chams_Weapons", 0, true, false)
HackB.ESP.Vars["Weapons"] = CreateClientConVar("HackB_ESP_Weapons", "Off", true, false)
Sasha.Chams.Vars["MaxDistance"] = CreateClientConVar("Sasha_Chams_MaxDistance", 0, true, false)
HackB.ESP.Vars["Distance"] = CreateClientConVar("HackB_ESP_Distance", "Off", true, false)
Sasha.Chams.Vars["Bodies"] = CreateClientConVar("Sasha_Chams_Boddies", 0, true, false)
HackB.ESP.Vars["Health"] = CreateClientConVar("HackB_ESP_Health", "Off", true, false)
Sasha.Chams.Vars["TeamBased"] = CreateClientConVar("Sasha_Chams_TeamBased", 0, true, false)
HackB.ESP.Vars["MaxDistance"] = CreateClientConVar("HackB_ESP_MaxDistance", 0, true, false)
HackB.ESP.Vars["Box"] = CreateClientConVar("HackB_ESP_Box", 0, true, false)
HackB.ESP.Vars["ShowTraitors"] = CreateClientConVar("HackB_ESP_ShowTraitors", "Off", true, false)
HackB.ESP.Vars["Bodies"] = CreateClientConVar("HackB_ESP_Bodies", 0, true, false)
HackB.ESP.Vars["Radar"] = CreateClientConVar("HackB_ESP_Radar", 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)
Sasha.Entities = {}
HackB.Chams = {}
Sasha.Entities.List = {} //The class namse of all the entities
HackB.Chams.Mat = CreateMaterial(HackB.RandomName(math.random(10,15)), "VertexLitGeneric", { ["$basetexture"] = "models/debug/debugwhite", ["$model"] = 1, ["$ignorez"] = 1 })
Sasha.Entities.Vars = {}
HackB.Chams.Vars = {}
Sasha.Entities.Vars["Active"] = CreateClientConVar("Sasha_Entities_Active", 0, true, false)
HackB.Chams.Vars["Active"] = CreateClientConVar("HackB_Chams_Active", 0, true, false)
HackB.Chams.Vars["Players"] = CreateClientConVar("HackB_Chams_Players", 0, true, false)
HackB.Chams.Vars["NPCs"] = CreateClientConVar("HackB_Chams_NPCs", 0, true, false)
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)
Sasha.Misc = {}
HackB.Entities = {}
Sasha.Misc.Vars = {}
HackB.Entities.List = {} //The class namse of all the entities
Sasha.Misc.Vars["ShowAdmins"] = CreateClientConVar("Sasha_Misc_ShowAdmins", 0, true, false)
HackB.Entities.Vars = {}
Sasha.Misc.Vars["Crosshair"] = CreateClientConVar("Sasha_Misc_Cross", 0, true, false)
HackB.Entities.Vars["Active"] = CreateClientConVar("HackB_Entities_Active", 0, true, false)
Sasha.Misc.Vars["CrosshairSize"] = CreateClientConVar("Sasha_Misc_CrossSize", 50, 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.Misc = {}
Sasha.Style.Vars = {}
HackB.Misc.Vars = {}
Sasha.Style.Vars["BoundingBox"] = {}
HackB.Misc.Vars["ShowAdmins"] = CreateClientConVar("HackB_Misc_ShowAdmins", 0, true, false)
Sasha.Style.Vars["BoundingBox"].var = CreateClientConVar("Sasha_Style_BoundingBox", "Color(255, 0, 0, 255)", true, false)
HackB.Misc.Vars["Crosshair"] = CreateClientConVar("HackB_Misc_Cross", 0, true, false)
Sasha.Style.Vars["BoundingBox"].color = Sasha.GetColorFromString(Sasha.Style.Vars["BoundingBox"].var:GetString())
HackB.Misc.Vars["CrosshairSize"] = CreateClientConVar("HackB_Misc_CrossSize", 50, true, false)
Sasha.Style.Vars["ESPText"] = {}
HackB.Misc.Vars["NoRecoil"] = CreateClientConVar("HackB_Misc_NoRecoil", 0, true, false)
Sasha.Style.Vars["ESPText"].var = CreateClientConVar("Sasha_Style_ESPText", "Color(255, 255, 255, 255)", true, false)
HackB.Misc.Vars["ShowSpectators"] = CreateClientConVar("HackB_Misc_ShowSpectators", 0, true, false)
Sasha.Style.Vars["ESPText"].color = Sasha.GetColorFromString(Sasha.Style.Vars["ESPText"].var:GetString())
HackB.Misc.Vars["BunnyHop"] = CreateClientConVar("HackB_Misc_BunnyHop", 0, true, false)
Sasha.Style.Vars["Crosshair"] = {}
HackB.Misc.Vars["BunnyHop_Key"] = CreateClientConVar("HackB_Misc_BunnyHop_Key", "KEY_SPACE", true, false)
Sasha.Style.Vars["Crosshair"].var = CreateClientConVar("Sasha_Style_Cross", "Color(255, 255, 255, 255)", true, false)
HackB.Misc.Vars["AutoReload"] = CreateClientConVar("HackB_Misc_AutoReload", 0, true, false)
Sasha.Style.Vars["Crosshair"].color = Sasha.GetColorFromString(Sasha.Style.Vars["Crosshair"].var:GetString())
HackB.Misc.Vars["AutoPistol"] = CreateClientConVar("HackB_Misc_AutoPistol", 0, true, false)
Sasha.Style.Vars["BodyText"] = {}
HackB.Misc.Vars["BuyHealth"] = CreateClientConVar("HackB_Misc_BuyHealth", 0, true, false)
Sasha.Style.Vars["BodyText"].var = CreateClientConVar("Sasha_Style_BodyText", "Color(255, 255, 255, 255)", true, false)
HackB.Misc.Vars["BuyHealth_Minimum"] = CreateClientConVar("HackB_Misc_BuyHealth_Minimum", 80, true, false)
Sasha.Style.Vars["BodyText"].color = Sasha.GetColorFromString(Sasha.Style.Vars["BodyText"].var:GetString())
HackB.Misc.Vars["TraitorFinder"] = CreateClientConVar("HackB_Misc_TraitorFinder", 0, true, false)
Sasha.Style.Vars["Chams"] = {}
HackB.Misc.Vars["Deaths"] = CreateClientConVar("HackB_Misc_Deaths", 0, true, false)
Sasha.Style.Vars["Chams"].var = CreateClientConVar("Sasha_Style_Chams", "Color(0, 255, 0, 255)", true, false)
HackB.Misc.Vars["Sounds"] = CreateClientConVar("HackB_Misc_Sounds", 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.Style = {}
/*Sasha.SavedData = CreateClientConVar("Sasha_SaveData", Sasha.RandomName(math.random(10, 15)), true, false)
HackB.Style.Vars = {}
if file.Exists(Sasha.SavedData:GetString()..".txt", "DATA") then
HackB.Style.Vars["BoundingBox"] = {}
local info = string.Explode("\n", file.Read(Sasha.SavedData:GetString()..".txt", "DATA"))
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
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
Sasha.Friends.List = util.JSONToTable(info[1])
HackB.Friends.List = util.JSONToTable(info[1])
Sasha.Entities.List = util.JSONToTable(info[2])
HackB.Entities.List = util.JSONToTable(info[2])
end
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 (98.9% 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 (97.7% 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 = {}
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 == Sasha.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 == Sasha.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 = {}
Sasha.BoolToInt = function(bool)
bones.Message = function(...)
if bool then
chat.AddText(Color(50, 255, 100), "Bones ", ...)
return 1
end
Text moved with changes from lines 173-194 (98.9% similarity)
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"
}
Text moved with changes from lines 198-205 (97.7% 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
else
return 0
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
end
GetBones()
return temp
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)
Sasha.SpotIsVisible = function(pos, ent)
ent = ent or HackB.Aimbot.CurTarget
ent = ent or Sasha.Aimbot.CurTarget
local tracedata = {}
local tracedata = {}
tracedata.start = Sasha.Ply:GetShootPos()
tracedata.start = HackB.Ply:GetShootPos()
tracedata.endpos = pos
tracedata.endpos = pos
tracedata.filter = {Sasha.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
Sasha.CanSee = function(ent)
local v = HackB.Bones[k]
for k = 1, #Sasha.Bones do
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 Sasha.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
Sasha.GetTarget = function()
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 Sasha.Aimbot.Vars["AttackNPCs"]:GetBool() and v:IsNPC() then
if HackB.Aimbot.Vars["AttackNPCs"]:GetBool() and v:IsNPC() then
if Sasha.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 Sasha.Aimbot.Vars["AttackPlayers"]:GetBool() and v:IsPlayer() and v != Sasha.Ply then
elseif HackB.Aimbot.Vars["AttackPlayers"]:GetBool() and v:IsPlayer() and v != HackB.Ply then
if Sasha.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 Sasha.Aimbot.Vars["IgnoreTeam"]:GetBool() and v:IsPlayer() then
if HackB.Aimbot.Vars["IgnoreTeam"]:GetBool() and v:IsPlayer() then
if Sasha.TTT then
if HackB.TTT then
if Sasha.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 Sasha.Ply:GetRole() != 1 and not table.HasValue(Sasha.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() == Sasha.Ply:Team() then
if v:Team() == HackB.Ply:Team() then
shouldremove = true
shouldremove = true
end
end
end
end
end
end
if Sasha.Friends.Vars["Active"]:GetBool() then
if HackB.Friends.Vars["Active"]:GetBool() then
if Sasha.Friends.Vars["Reverse"]:GetBool() then
if HackB.Friends.Vars["Reverse"]:GetBool() then
if not table.HasValue(Sasha.Friends.List, v:SteamID()) then
if not table.HasValue(HackB.Friends.List, v:SteamID()) then
shouldremove = true
shouldremove = true
end
end
else
else
if table.HasValue(Sasha.Friends.List, v:SteamID()) then
if table.HasValue(HackB.Friends.List, v:SteamID()) then
shouldremove = true
shouldremove = true
end
end
end
end
end
end
if shouldremove then
if shouldremove then
table.remove(targets, k)
table.remove(targets, k)
end
end
end
end
if #targets == 0 then
if #targets == 0 then
return nil
return nil
elseif #targets == 1 then
elseif #targets == 1 then
targets[1]["Target"].BoneToAimAt = nil
targets[1]["Target"].BoneToAimAt = nil
return targets[1]["Target"]
return targets[1]["Target"]
end
end
if Sasha.Aimbot.Vars["Preferance"]:GetString() == "Distance" then
if HackB.Aimbot.Vars["Preferance"]:GetString() == "Distance" then
local min = {["Distance"] = Sasha.Ply:GetPos():Distance(targets[1]["Pos"]), ["Target"] = targets[1]["Target"]}
local min = {["Distance"] = HackB.Ply:GetPos():Distance(targets[1]["Pos"]), ["Target"] = targets[1]["Target"]}
for k = 1, #targets do
for k = 1, #targets do
local v = targets[k]
local v = targets[k]
local distance = Sasha.Ply:GetPos():Distance(v["Pos"])
local distance = HackB.Ply:GetPos():Distance(v["Pos"])
if distance < min["Distance"] then
if distance < min["Distance"] then
min = {["Distance"] = distance, ["Target"] = v["Target"]}
min = {["Distance"] = distance, ["Target"] = v["Target"]}
end
end
end
end
min["Target"].BoneToAimAt = nil
min["Target"].BoneToAimAt = nil
return min["Target"]
return min["Target"]
elseif Sasha.Aimbot.Vars["Preferance"]:GetString() == "Angle" then
elseif HackB.Aimbot.Vars["Preferance"]:GetString() == "Angle" then
local min = {["Angle"] = Sasha.AngleTo(targets[1]["Pos"]), ["Target"] = targets[1]["Target"]}
local min = {["Angle"] = HackB.AngleTo(targets[1]["Pos"]), ["Target"] = targets[1]["Target"]}
for k = 1, #targets do
for k = 1, #targets do
local v = targets[k]
local v = targets[k]
local angle = Sasha.AngleTo(v["Pos"])
local angle = HackB.AngleTo(v["Pos"])
if angle < min["Angle"] then
if angle < min["Angle"] then
min = {["Angle"] = angle, ["Target"] = v["Target"]}
min = {["Angle"] = angle, ["Target"] = v["Target"]}
end
end
end
end
min["Target"].BoneToAimAt = nil
min["Target"].BoneToAimAt = nil
return min["Target"]
return min["Target"]
end
end
else
else
return nil
return nil
end
end
end
end
HackB.AngleTo = function(pos)
//This returns the total angle away from the target we are, and then the pitch and yaw seperately
local myAngs = HackB.Ply:GetAngles()
Sasha.AngleTo = function(pos)
local needed = (pos - HackB.Ply:GetShootPos()):Angle()
local myAngs = Sasha.Ply:GetAngles()
local needed = (pos - Sasha.Ply:GetShootPos()):Angle()
myAngs.p = math.NormalizeAngle(myAngs.p)
myAngs.p = math.NormalizeAngle(myAngs.p)
needed.p = math.NormalizeAngle(needed.p)
needed.p = math.NormalizeAngle(needed.p)
myAngs.y = math.NormalizeAngle(myAngs.y)
myAngs.y = math.NormalizeAngle(myAngs.y)
needed.y = math.NormalizeAngle(needed.y)
needed.y = math.NormalizeAngle(needed.y)
local p = math.NormalizeAngle(needed.p - myAngs.p)
local p = math.NormalizeAngle(needed.p - myAngs.p)
local y = math.NormalizeAngle(needed.y - myAngs.y)
local y = math.NormalizeAngle(needed.y - myAngs.y)
return math.abs(p) + math.abs(y), {p = p, y = y}
return math.abs(p) + math.abs(y), {p = p, y = y}
end
end
HackB.ValidTarget = function()
//Returns true if our target meets our preferances.
if HackB.Aimbot.CurTarget == nil then return f
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)