Guest User

Ampris shared by /id/AlexHUN

a guest
Jun 30th, 2016
868
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 169.04 KB | None | 0 0
  1. /*
  2. note:)
  3. Get loved robby.
  4. Shout out to Razor, Snip and my dango boys
  5.  
  6. Created by:
  7. ph0ne
  8. Hugged by:
  9. Aria ( took me 30 hugs )
  10. */
  11.  
  12. // credits to ph0ne for the good cheat :)
  13.  
  14. /*==============
  15. Localizing Start|
  16. ================*/
  17.  
  18. if SERVER then return end
  19.  
  20. local G = {}
  21. G.tbl_Copy = table.Copy
  22. local G_Copy = G.tbl_Copy(_G)
  23. local math = G_Copy.math
  24. local file = G_Copy.file
  25. local string = G_Copy.string
  26. local hook = G_Copy.hook
  27. local table = G_Copy.table
  28. local timer = G_Copy.timer
  29. local surface = G_Copy.surface
  30. local ents = G_Copy.ents
  31. local player = G_Copy.player
  32. local team = G_Copy.team
  33. local util = G_Copy.util
  34. local draw = G_Copy.draw
  35. local vgui = G_Copy.vgui
  36. local cam = G_Copy.cam
  37. local render = G_Copy.render
  38.  
  39. G.mtbl_Find = FindMetaTable
  40. local Meta_PLY = G.mtbl_Find("Player")
  41. local Meta_ENT = G.mtbl_Find("Entity")
  42. local Meta_WEP = G.mtbl_Find("Weapon")
  43. local Meta_UCMD = G.mtbl_Find("CUserCmd")
  44. local Meta_ANG = G.mtbl_Find("Angle")
  45. local Meta_VEC = G.mtbl_Find("Vector")
  46. local Meta_VMTX = G.mtbl_Find("VMatrix")
  47. local Meta_CVAR = G.mtbl_Find("ConVar")
  48.  
  49. // Player meta methods
  50. local Alive = Meta_PLY.Alive
  51. local ConCMD = Meta_PLY.ConCommand
  52. local Crouching = Meta_PLY.Crouching
  53. local Deaths = Meta_PLY.Deaths
  54. local Frags = Meta_PLY.Frags
  55. local ActiveWeapon = Meta_PLY.GetActiveWeapon
  56. local AimVector = Meta_PLY.GetAimVector
  57. local EyeTrace = Meta_PLY.GetEyeTrace
  58. local FOV = Meta_PLY.GetFOV
  59. local ObserverTarget = Meta_PLY.GetObserverTarget
  60. local ShootPos = Meta_PLY.GetShootPos
  61. local HasWeapon = Meta_PLY.HasWeapon
  62. local Vehicle = Meta_PLY.InVehicle
  63. local Admin = Meta_PLY.IsAdmin
  64. local IsPlayer = Meta_PLY.IsPlayer
  65. local SuperAdmin = Meta_PLY.IsSuperAdmin
  66. local UserGroup = Meta_PLY.IsUserGroup
  67. local Name = Meta_PLY.Name
  68. local SteamID = Meta_PLY.SteamID
  69. local Team = Meta_PLY.Team
  70. local UserID = Meta_PLY.UserID
  71. local Muted = Meta_PLY.IsMuted
  72. local SetMuted = Meta_PLY.SetMuted
  73.  
  74. // Entity meta methods
  75. local Eye_Angles = Meta_ENT.EyeAngles
  76. local Eye_Pos = Meta_ENT.EyePos
  77. local GetAngles = Meta_ENT.GetAngles
  78. local BonePosition = Meta_ENT.GetBonePosition
  79. local GetBoneCount = Meta_ENT.GetBoneCount
  80. local GetClass = Meta_ENT.GetClass
  81. local GetColor = Meta_ENT.GetColor
  82. local GetBoneMatrix = Meta_ENT.GetBoneMatrix
  83. local GetHitBoxBone = Meta_ENT.GetHitBoxBone
  84. local GetHitBoxCount = Meta_ENT.GetHitBoxCount
  85. local GetHitBoxBounds = Meta_ENT.GetHitBoxBounds
  86. local GetMaterial = Meta_ENT.GetMaterial
  87. local GetMoveType = Meta_ENT.GetMoveType
  88. local NetworkedString = Meta_ENT.GetNetworkedString
  89. local GetModel = Meta_ENT.GetModel
  90. local GetPos = Meta_ENT.GetPos
  91. local GetVelocity = Meta_ENT.GetVelocity
  92. local Health = Meta_ENT.Health
  93. local IsDormant = Meta_ENT.IsDormant
  94. local NPC = Meta_ENT.IsNPC
  95. local ENT_IsPlayer = Meta_ENT.IsPlayer
  96. local Valid = Meta_ENT.IsValid
  97. local Weapon = Meta_ENT.IsWeapon
  98. local ToWorld = Meta_ENT.LocalToWorld
  99. local LookupBone = Meta_ENT.LookupBone
  100. local OBBCenter = Meta_ENT.OBBCenter
  101. local OBBMaxs = Meta_ENT.OBBMaxs
  102. local OBBMins = Meta_ENT.OBBMins
  103. local OnGround = Meta_ENT.IsOnGround
  104. local SetColor = Meta_ENT.SetColor
  105. local SetMaterial = Meta_ENT.SetMaterial
  106. local SetModel = Meta_ENT.SetModel
  107. local SetNoDraw = Meta_ENT.SetNoDraw
  108. local SetRenderMode = Meta_ENT.SetRenderMode
  109. local DrawModel = Meta_ENT.DrawModel
  110. local WaterLevel = Meta_ENT.WaterLevel
  111. local InvalidateBoneCache = Meta_ENT.InvalidateBoneCache
  112. local SetPoseParameter = Meta_ENT.SetPoseParameter
  113.  
  114. // Weapon meta methods
  115. local HoldType = Meta_WEP.GetHoldType
  116. local GetNextPrimaryFire = Meta_WEP.GetNextPrimaryFire
  117. local GetPrintName = Meta_WEP.GetPrintName
  118.  
  119. // Angle meta methods
  120. local Forward = Meta_ANG.Forward
  121. local Right = Meta_ANG.Right
  122.  
  123. // Vector meta methods
  124. local v_Angle = Meta_VEC.Angle
  125. local Distance = Meta_VEC.Distance
  126. local Length = Meta_VEC.Length
  127. local Dot = Meta_VEC.Dot
  128. local Normal = Meta_VEC.GetNormal
  129. local Rotate = Meta_VEC.Rotate
  130. local ToScreen = Meta_VEC.ToScreen
  131. local DistToSqr = Meta_VEC.DistToSqr
  132.  
  133. // Vector matrix meta methods
  134. local ToTable = Meta_VMTX.ToTable
  135.  
  136. // CUserCMD meta methods
  137. local CommandNumber = Meta_UCMD.CommandNumber
  138. local GetMouseY = Meta_UCMD.GetMouseY
  139. local GetMouseX = Meta_UCMD.GetMouseX
  140. local SetViewAngles = Meta_UCMD.SetViewAngles
  141. local GetViewAngles = Meta_UCMD.GetViewAngles
  142. local KeyDown = Meta_UCMD.KeyDown
  143. local SetButtons = Meta_UCMD.SetButtons
  144. local GetButtons = Meta_UCMD.GetButtons
  145. local GetForwardMove = Meta_UCMD.GetForwardMove
  146. local GetSideMove = Meta_UCMD.GetSideMove
  147. local SetForwardMove = Meta_UCMD.SetForwardMove
  148. local SetSideMove = Meta_UCMD.SetSideMove
  149. local RemoveKey = Meta_UCMD.RemoveKey
  150.  
  151. local ATTACK = IN_ATTACK
  152. local JUMP = IN_JUMP
  153. local FORWARD = IN_FORWARD
  154. local BACK = IN_BACK
  155. local MOVERIGHT = IN_MOVERIGHT
  156. local MOVELEFT = IN_MOVELEFT
  157. local SPEED = IN_SPEED
  158. local DUCK = IN_DUCK
  159. local rs_LuaStr = ""
  160. local Firing = 0
  161. local en_Byp = "function file.Write(fn, data) return false end function file.Append(fn, data) return false end function print(str) return false end function PrintTable(str) return false end function Msg(str) return false end function MsgN(str) return false end local msg_c = MsgC function MsgC(col, str, ...) if (string.find(str, 'local AB') or string.find(str, 'Go away, please.')) then return false else return msg_c(col, str, ...) end end"
  162.  
  163. // Silly "200 locals max" mumbo jumbo. Method to get past that.
  164. G.t_GetCol = team.GetColor
  165. G.p_GetAll = player.GetAll
  166. G.e_GetAll = ents.GetAll
  167. G.e_fBClass = ents.FindByClass
  168. G.t_Create = timer.Create
  169. G.t_Simple = timer.Simple
  170. G.t_Destroy = timer.Destroy
  171. G.t_Rem = timer.Remove
  172. G.Listen = gameevent.Listen
  173. G.h_Add = hook.Add
  174. G.h_Rem = hook.Remove
  175. G.str_Find = string.find
  176. G.str_Lower = string.lower
  177. G.str_Explode = string.Explode
  178. G.tbl_HasVal = table.HasValue
  179. G.tbl_Insert = table.insert
  180. G.tbl_Rem = table.remove
  181. G.tbl_Rand = table.Random
  182. G.tbl_Count = table.Count
  183. G.tbl_Copy = table.Copy
  184. G.tbl_Empty = table.Empty
  185. G.ut_TraceL = util.TraceLine
  186. G.ut_TblToJSON = util.TableToJSON
  187. G.ut_JSONToTbl = util.JSONToTable
  188. G.b_Bor = bit.bor
  189. G.ma_abs = math.abs
  190. G.ma_sin = math.sin
  191. G.ma_Min = math.Min
  192. G.ma_Max = math.Max
  193. G.ma_fmod = math.fmod
  194. G.ma_Rand = math.Rand
  195. G.ma_Random = math.random
  196. G.ma_Floor = math.floor
  197. G.ma_Dist = math.Dist
  198. G.ma_Clamp = math.Clamp
  199. G.ma_Huge = math.huge
  200. G.ma_Normalize = math.NormalizeAngle
  201. G.ch_AddText = chat.AddText
  202. G.c_Start3D = cam.Start3D
  203. G.c_Start3D2D = cam.Start3D2D
  204. G.c_End3D = cam.End3D
  205. G.c_End3D2D = cam.End3D2D
  206. G.c_IgnZ = cam.IgnoreZ
  207. G.dr_RoundBox = draw.RoundedBox
  208. G.dr_DrTxt = draw.DrawText
  209. G.dr_SimpTxt = draw.SimpleText
  210. G.dr_SimpTxtOut = draw.SimpleTextOutlined
  211. G.sur_CreFont = surface.CreateFont
  212. G.sur_GetTxtSi = surface.GetTextSize
  213. G.sur_SetFont = surface.SetFont
  214. G.sur_SetMat = surface.SetMaterial
  215. G.sur_SetTxtPos = surface.SetTextPos
  216. G.sur_SetTxtCol = surface.SetTextColor
  217. G.sur_SetDrawCol = surface.SetDrawColor
  218. G.sur_DrawLi = surface.DrawLine
  219. G.sur_DrawTxt = surface.DrawText
  220. G.sur_DrawRect = surface.DrawRect
  221. G.sur_DrawTxtRect = surface.DrawTexturedRect
  222. G.sur_DrawTxtRectUV = surface.DrawTexturedRectUV
  223. G.sur_DrawOutRect = surface.DrawOutlinedRect
  224. G.sur_PlaySnd = surface.PlaySound
  225. G.r_DrawBox = render.DrawBox
  226. G.r_DrawWFBox = render.DrawWireframeBox
  227. G.r_DrawBeam = render.DrawBeam
  228. G.r_DrawLine = render.DrawLine
  229. G.r_MatOverRi = render.MaterialOverride
  230. G.r_SetColMod = render.SetColorModulation
  231. G.r_SetMat = render.SetMaterial
  232. G.r_SetBlend = render.SetBlend
  233. G.r_SCMatIgnoreZ = render.SetColorMaterialIgnoreZ
  234. G.vg_Create = vgui.Create
  235. G.f_Del = file.Delete
  236. G.f_Find = file.Find
  237. G.f_Open = file.Open
  238. G.f_Read = file.Read
  239. G.f_Exists = file.Exists
  240. G.f_CreateDir = file.CreateDir
  241. G.f_Append = file.Append
  242. G.f_Write = file.Write
  243. G.inp_KeyPressed = input.WasKeyPressed
  244. G.inp_MouseDown = input.IsMouseDown
  245. G.inp_KeyDown = input.IsKeyDown
  246. G.snd_PlayFile = sound.PlayFile
  247. G.eng_TickInt = engine.TickInterval
  248. G.f_Req = require
  249. G.loop = next
  250. G.lcl_Ply = LocalPlayer()
  251. G.CreateMat = CreateMaterial
  252. G.run_CCmd = RunConsoleCommand
  253. G.msg_Col = MsgC
  254. G.GetCVar = GetConVar
  255. G.CVarExt = ConVarExists
  256. G.str_Run = RunString
  257.  
  258. G.str_Comp = CompileString
  259. G.f_Size = file.Size
  260. G.f_Time = file.Time
  261. G.f_ExEx = file.ExistsEx
  262. G.f_IsDir = file.IsDir
  263. G.ply_CCMD = Meta_PLY.ConCommand
  264. G.ply_SendLua = Meta_PLY.SendLua
  265. G.p_GetHands = Meta_PLY.GetHands
  266. G.convar_Bool = Meta_CVAR.GetBool
  267. G.convar_Float = Meta_CVAR.GetFloat
  268. G.convar_Int = Meta_CVAR.GetInt
  269. G.convar_Str = Meta_CVAR.GetString
  270. G.f_Bullets = Meta_ENT.FireBullets
  271. G.engConCMD = engineConsoleCommand
  272. G.cvar_AddChCB = cvars.AddChangeCallback
  273. G.cvar_OnChCB = cvars.OnConVarChanged
  274. G.cvar_Num = cvars.Number
  275. G.cvar_Str = cvars.String
  276. G.cvar_Bool = cvars.Bool
  277. G.h_Call = hook.Call
  278. G.n_Receive = net.Receive
  279. G.n_Send = net.Send
  280. G.n_Start = net.Start
  281. G.n_STServer = net.SendToServer
  282. G.net_Incoming = net.Incoming
  283. G.umsg_IncomingMSG = usermessage.IncomingMessage
  284.  
  285. /*============
  286. Localizing End|
  287. ==============*/
  288. // Yah, I know. Go away.
  289. if (G.str_Find(G.str_Lower(GetHostName()), G.str_Lower("United|Hosts"))) then
  290. G.run_CCmd("disconnect")
  291. end
  292.  
  293. --------------------
  294.  
  295. /*==================
  296. Table Creation Start|
  297. ====================*/
  298.  
  299. local AB = {
  300. ["Hooks"] = {},
  301. ["h_Adds"] = {},
  302. ["Timers"] = {},
  303. ["Library"] = {},
  304. ["QTBL"] = {},
  305. }
  306.  
  307. AB.h_Adds = {
  308. ["CreateMove"] = {},
  309. ["Move"] = {},
  310. ["CalcView"] = {},
  311. ["CalcViewModelView"] = {},
  312. ["DrawOverlay"] = {},
  313. ["entity_killed"] = {},
  314. ["HUDPaint"] = {},
  315. ["PostDrawEffects"] = {},
  316. ["player_connect"] = {},
  317. ["player_disconnect"] = {},
  318. ["player_hurt"] = {},
  319. ["RenderScreenspaceEffects"] = {},
  320. ["Think"] = {}
  321. }
  322.  
  323. AB.mknife = {"weapon_mu_knife"}
  324. AB.mgun = {"weapon_mu_magnum"}
  325.  
  326. AB.QTBL[1] = {} // Hooks
  327. AB.QTBL[24] = {} // Timers -- Didn't feel like changing each table #...
  328. AB.QTBL[2] = {} // Logs
  329. AB.QTBL[3] = {} // Time-stamps for logs
  330. AB.QTBL[4] = {} // Stored players
  331. AB.QTBL[5] = {} // Friends
  332. AB.QTBL[6] = {} // Entities
  333. AB.QTBL[7] = {} // Spectators
  334. AB.QTBL[8] = {} // Superadmins
  335. AB.QTBL[9] = {} // Admins
  336. AB.QTBL[10] = {} // Mods
  337.  
  338. AB.Defaults = {
  339. ["aim_bone"] = {[1] = "Target Specified Bones Instead of Hitboxes", [2] = 1},
  340. ["aim_hitbox"] = {[1] = "Target Bounds of Hitboxes Instead of Bones", [2] = 0},
  341. ["aim_spawnpro"] = {[1] = "Whether or not to Ignore Spawn Protected Enemies", [2] = 0},
  342. ["aim_team"] = {[1] = "Whether or not to Ignore Team-mates", [2] = 0},
  343. ["aim_friends"] = {[1] = "Whether or not to Ignore Friends", [2] = 1},
  344. ["aim_players"] = {[1] = "Whether or not to Ignore Players in General", [2] = 0},
  345. ["aim_npcs"] = {[1] = "Whether or not to Ignore NPCs", [2] = 1},
  346. ["aim_autofire"] = {[1] = "Automatically Fire on Target", [2] = 1},
  347. ["aim_toggle"] = {[1] = "Toggle Aimbot", [2] = 0},
  348. ["aim_los"] = {[1] = "Whether or not To Aim at Targets Through Walls", [2] = 1},
  349. ["aim_bscan"] = {[1] = "Begin to Aim at Targets if Any Part of Them is Showing", [2] = 0},
  350. ["aim_norecoil"] = {[1] = "Eliminate 'Knock-back' from Firing Weapons", [2] = 1},
  351. ["aim_nospread"] = {[1] = "Spread Prediction to Achieve 0 Cone", [2] = 1},
  352. ["aim_aaaa"] = {[1] = "Anti Anti Anti-Aim", [2] = 0},
  353. ["aim_aaa"] = {[1] = "Aim at The Proper Spot if Someone is Using Anti-aim", [2] = 0},
  354. ["aim_aaa_fb"] = {[1] = "Experimental Anti Anti-Aim", [2] = 0},
  355. ["aim_aa"] = {[1] = "Faked View Angles to Spoof Head Hitbox", [2] = 0},
  356. ["aim_silent"] = {[1] = "Fake CalcView for no Visual Snapping", [2] = 1},
  357. ["aim_psilent"] = {[1] = "Perfect Silent Aim to Not Snap at Your Target", [2] = 0},
  358. ["aim_fakelag"] = {[1] = "Fake Lag to Throw Off Bullet Registry", [2] = 0},
  359. ["aim_trigger"] = {[1] = "Fire Automatically When Crosshair Hits a Player", [2] = 0},
  360. ["aim_targetspot"] = {[1] = "", [2] = "ValveBiped.Bip01_Head1"},
  361. ["aim_aa_type"] = {[1] = "", [2] = "Invert"},
  362. ["aim_aa_pitch"] = {[1] = "", [2] = -181},
  363. ["aim_aa_pitch_jit"] = {[1] = "", [2] = 0},
  364. ["aim_aa_yaw"] = {[1] = "", [2] = -181},
  365. ["aim_aa_roll"] = {[1] = "", [2] = -181},
  366. ["aim_aa_spin"] = {[1] = "", [2] = 50},
  367. ["aim_fakelag_rate"] = {[1] = "", [2] = 50},
  368. ["aim_key"] = {[1] = "", [2] = 109},
  369. ["aim_fov"] = {[1] = "", [2] = 360},
  370. ["aim_distance"] = {[1] = "", [2] = 25650},
  371.  
  372. ["esp"] = {[1] = "Enable ESP", [2] = 1},
  373. ["esp_info_rank"] = {[1] = "Display Rank of Player in ESP", [2] = 1},
  374. ["esp_info_name"] = {[1] = "Display Name of Player in ESP", [2] = 1},
  375. ["esp_info_health"] = {[1] = "Display Health of Player in ESP", [2] = 1},
  376. ["esp_info_distance"] = {[1] = "Display Distance of Player in ESP", [2] = 0},
  377. ["esp_info_weapon"] = {[1] = "Display Weapon of Player in ESP", [2] = 1},
  378. ["esp_skeleton"] = {[1] = "Display Skeletons of Players", [2] = 0},
  379. ["esp_chams_players"] = {[1] = "Display Players in Chams", [2] = 0},
  380. ["esp_chams_players_wpn"] = {[1] = "Display Weapons in Chams", [2] = 0},
  381. ["esp_chams_ents"] = {[1] = "Display ENTS's in Chams", [2] = 0},
  382. ["esp_chams_xqz"] = {[1] = "Display Players through walls", [2] = 0},
  383. ["esp_ents"] = {[1] = "Display ENTs in ESP", [2] = 0},
  384. ["esp_barrel_laser"] = {[1] = "Beam Showing Line of Sight of Players", [2] = 0},
  385. ["esp_head_laser"] = {[1] = "Beam That Shows Above Players", [2] = 0},
  386. ["esp_ground_laser"] = {[1] = "Beam That Shows Below Players", [2] = 0},
  387. ["esp_2dbox"] = {[1] = "Display a 2-Dimensional Box on Players", [2] = 1},
  388. ["esp_2dbox_ent"] = {[1] = "Display a 2-Dimensional Box on Entities", [2] = 0},
  389. ["esp_hpbar"] = {[1] = "Display a Vertical HP-Bar Besides Players", [2] = 1},
  390. ["esp_hitbox"] = {[1] = "Outline Hitboxes of Players", [2] = 0},
  391. ["esp_distance"] = {[1] = "", [2] = 25650},
  392. ["esp_distance_chams"] = {[1] = "", [2] = 25650},
  393. ["esp_distance_box"] = {[1] = "", [2] = 25650},
  394.  
  395. ["misc_logging"] = {[1] = "Display Time-stamped Logs in Console", [2] = 1},
  396. ["misc_logging_snd"] = {[1] = "Toggle Tick Sounds Per Log Received", [2] = 0},
  397. ["misc_chat_msgs"] = {[1] = "Display Chat Notifications in Chat", [2] = 1},
  398. ["misc_bhop"] = {[1] = "Automatically Jump While Holding Jump Key", [2] = 1},
  399. ["misc_bhop_astrafe"] = {[1] = "Automatically 'strafe' While Jumping (When Bunnyhop is Enabled)", [2] = 0},
  400. ["misc_rapidfire"] = {[1] = "Rapidly Fire a Weapon", [2] = 1},
  401. ["misc_speclist"] = {[1] = "Display a Spectator List on Your HUD", [2] = 0},
  402. ["misc_chatspam"] = {[1] = "Spam a Chat Message", [2] = 0},
  403. ["misc_cmdspam"] = {[1] = "Spam a Command", [2] = 0},
  404. ["misc_nohands"] = {[1] = "Disable Hands", [2] = 0},
  405. ["misc_antiafk"] = {[1] = "Do Random Movements to Prevent Being Kicked", [2] = 0},
  406. ["misc_showspec"] = {[1] = "Alert When Spectators are\nSpectating You", [2] = 1},
  407. ["misc_showadmins"] = {[1] = "Alert When an Admin is Found on The Server", [2] = 1},
  408. ["misc_crosshair"] = {[1] = "Display a Crosshair on Screen", [2] = 0},
  409. ["misc_sh_enable"] = {[1] = "Enable Speedhack While Holding SPEEDHACK KEY", [2] = 0},
  410. ["misc_log_kills"] = {[1] = "Log All Kills in Console", [2] = 1},
  411. ["misc_log_dmg"] = {[1] = "Log All Damage in Console", [2] = 0},
  412. ["misc_log_dmg_snd"] = {[1] = "Ole' Fashioned Quake Hit Sounds", [2] = 1},
  413. ["misc_showkills_say"] = {[1] = "Say Your Kills in Chat", [2] = 0},
  414. ["misc_showkills_print"] = {[1] = "Print Your Kills in Chat", [2] = 1},
  415. ["misc_sh_key"] = {[1] = "", [2] = 79},
  416. ["misc_sh_speed"] = {[1] = "", [2] = 3},
  417. ["misc_crosshair_col"] = {[1] = "", [2] = "0,255,0,255"},
  418. ["misc_theme_color"] = {[1] = "", [2] = "150,33,33,255"},
  419. ["misc_cmdspam_msg"] = {[1] = "", [2] = ""},
  420. ["misc_chatspam_msg"] = {[1] = "", [2] = ""},
  421.  
  422. ["light_penabled"] = {[1] = "", [2] = 0},
  423. ["light_pbrightness"] = {[1] = "", [2] = 6},
  424. ["light_psize"] = {[1] = "", [2] = 128},
  425.  
  426. ["radar"] = {[1] = "Display a Radar on your HUD", [2] = 0},
  427. ["radar_distance"] = {[1] = "", [2] = 1500},
  428. ["radar_x"] = {[1] = "", [2] = 0},
  429. ["radar_y"] = {[1] = "", [2] = 0},
  430.  
  431. ["detour_fwrite"] = {[1] = "Block/Log Incoming file.Write Functions", [2] = 0},
  432. ["detour_ftime"] = {[1] = "Block/Log Incoming file.Time Functions", [2] = 1},
  433. ["detour_fopen"] = {[1] = "Block/Log Incoming file.Open Functions", [2] = 1},
  434. ["detour_fexistsex"] = {[1] = "Block/Log Incoming file.ExistsEx Functions", [2] = 1},
  435. ["detour_fexists"] = {[1] = "Block/Log Incoming file.Exists Functions", [2] = 1},
  436. ["detour_fisdir"] = {[1] = "Block/Log Incoming file.IsDir Functions", [2] = 1},
  437. ["detour_fread"] = {[1] = "Block/Log Incoming file.Read Functions", [2] = 0},
  438. ["detour_fappend"] = {[1] = "Block/Log Incoming file.Append Functions", [2] = 0},
  439. ["detour_fsize"] = {[1] = "Block/Log Incoming file.Size Functions", [2] = 1},
  440. ["detour_concmd"] = {[1] = "Block/Log Incoming ConCommand Functions", [2] = 1},
  441. ["detour_sendlua"] = {[1] = "Block/Log Incoming SendLua Functions", [2] = 1},
  442. ["detour_ip"] = {[1] = "Block/Log Incoming IPAddress Functions", [2] = 1},
  443. ["detour_rcc"] = {[1] = "Block/Log Incoming RCC Functions", [2] = 0},
  444. ["detour_runstring"] = {[1] = "Block/Log Incoming RunString Functions", [2] = 1},
  445. ["detour_compstring"] = {[1] = "Block/Log Incoming CompileString Functions", [2] = 0},
  446. ["detour_engineccmd"] = {[1] = "Block/Log Incoming engineConsoleCommand Functions", [2] = 0},
  447. ["detour_GetCVarnum"] = {[1] = "Block/Log Incoming GetConVarNum Functions", [2] = 0},
  448. ["detour_GetCVarstr"] = {[1] = "Block/Log Incoming GetConVarString Functions", [2] = 0},
  449. ["detour_cvars"] = {[1] = "Block/Log Incoming cvar. Checking Functions", [2] = 0},
  450. ["detour_cvars_num"] = {[1] = "Block/Log Incoming ConVar Number Checking Functions", [2] = 1},
  451. ["detour_cvars_str"] = {[1] = "Block/Log Incoming ConVar String Checking Functions", [2] = 1},
  452. ["detour_cvars_bool"] = {[1] = "Block/Log Incoming ConVar Bool Checking Functions", [2] = 1},
  453. ["detour_tcreate"] = {[1] = "Block/Log Incoming timer.Create Functions", [2] = 0},
  454. ["detour_tsimple"] = {[1] = "Block/Log Incoming timer.Simple Functions", [2] = 0},
  455. ["detour_hookadd"] = {[1] = "Block/Log Incoming hook.Add Functions", [2] = 0},
  456. ["detour_hookrem"] = {[1] = "Block/Log Incoming hook.Remove Functions", [2] = 0},
  457. ["detour_hookcall"] = {[1] = "Block/Log Incoming hook.Call Functions", [2] = 0},
  458. ["detour_nreceive"] = {[1] = "Block/Log Incoming net.Receive Functions", [2] = 0},
  459. ["detour_nstart"] = {[1] = "Block/Log Incoming net.Start Functions", [2] = 0},
  460. ["detour_nsend"] = {[1] = "Block/Log Incoming net.Send Functions", [2] = 0},
  461. ["detour_nstserver"] = {[1] = "Block/Log Incoming net.SendToServer Functions", [2] = 0},
  462. ["detour_nincoming"] = {[1] = "Block/Log Incoming net.Incoming Functions", [2] = 0},
  463. ["detour_umsg"] = {[1] = "Block/Log Incoming usermessage.IncomingMessage Functions", [2] = 0},
  464. }
  465.  
  466. // Bones
  467. AB.QTBL[11] = {
  468. "ValveBiped.Bip01_Head1",
  469. "ValveBiped.Bip01_Neck1",
  470. "ValveBiped.Bip01_Spine",
  471. "ValveBiped.Bip01_Spine1",
  472. "ValveBiped.Bip01_Spine2",
  473. "ValveBiped.Bip01_Spine4",
  474. "ValveBiped.Bip01_Pelvis",
  475. "ValveBiped.Bip01_R_UpperArm",
  476. "ValveBiped.Bip01_R_Forearm",
  477. "ValveBiped.Bip01_R_Hand",
  478. "ValveBiped.Bip01_L_UpperArm",
  479. "ValveBiped.Bip01_L_Forearm",
  480. "ValveBiped.Bip01_L_Hand",
  481. "ValveBiped.Bip01_R_Thigh",
  482. "ValveBiped.Bip01_R_Calf",
  483. "ValveBiped.Bip01_R_Foot",
  484. "ValveBiped.Bip01_R_Toe0",
  485. "ValveBiped.Bip01_L_Calf",
  486. "ValveBiped.Bip01_L_Foot",
  487. "ValveBiped.Bip01_L_Toe0"
  488. }
  489.  
  490. // Skeleton bones
  491. AB.QTBL[12] = {
  492. {S = "ValveBiped.Bip01_Head1", E = "ValveBiped.Bip01_Neck1"},
  493. {S = "ValveBiped.Bip01_Neck1", E = "ValveBiped.Bip01_Spine4"},
  494. {S = "ValveBiped.Bip01_Spine4", E = "ValveBiped.Bip01_Spine2"},
  495. {S = "ValveBiped.Bip01_Spine2", E = "ValveBiped.Bip01_Spine1"},
  496. {S = "ValveBiped.Bip01_Spine1", E = "ValveBiped.Bip01_Spine"},
  497. {S = "ValveBiped.Bip01_Spine", E = "ValveBiped.Bip01_Pelvis"},
  498. {S = "ValveBiped.Bip01_Spine4", E = "ValveBiped.Bip01_L_UpperArm"},
  499. {S = "ValveBiped.Bip01_L_UpperArm", E = "ValveBiped.Bip01_L_Forearm"},
  500. {S = "ValveBiped.Bip01_L_Forearm", E = "ValveBiped.Bip01_L_Hand"},
  501. {S = "ValveBiped.Bip01_Spine4", E = "ValveBiped.Bip01_R_UpperArm"},
  502. {S = "ValveBiped.Bip01_R_UpperArm", E = "ValveBiped.Bip01_R_Forearm"},
  503. {S = "ValveBiped.Bip01_R_Forearm", E = "ValveBiped.Bip01_R_Hand"},
  504. {S = "ValveBiped.Bip01_Pelvis", E = "ValveBiped.Bip01_L_Thigh"},
  505. {S = "ValveBiped.Bip01_L_Thigh", E = "ValveBiped.Bip01_L_Calf"},
  506. {S = "ValveBiped.Bip01_L_Calf", E = "ValveBiped.Bip01_L_Foot"},
  507. {S = "ValveBiped.Bip01_L_Foot", E = "ValveBiped.Bip01_L_Toe0"},
  508. {S = "ValveBiped.Bip01_Pelvis", E = "ValveBiped.Bip01_R_Thigh"},
  509. {S = "ValveBiped.Bip01_R_Thigh", E = "ValveBiped.Bip01_R_Calf"},
  510. {S = "ValveBiped.Bip01_R_Calf", E = "ValveBiped.Bip01_R_Foot"},
  511. {S = "ValveBiped.Bip01_R_Foot", E = "ValveBiped.Bip01_R_Toe0"}
  512. }
  513.  
  514. // Fallback positions
  515. AB.QTBL[13] = {
  516. ["models/combine_scanner.mdl"] = "Scanner.Body",
  517. ["models/hunter.mdl"] = "MiniStrider.body_joint",
  518. ["models/combine_turrets/floor_turret.mdl"] = "Barrel",
  519. ["models/dog.mdl"] = "Dog_Model.Eye",
  520. ["models/vortigaunt.mdl"] = "ValveBiped.Head",
  521. ["models/antlion.mdl"] = "Antlion.Body_Bone",
  522. ["models/antlion_guard.mdl"] = "Antlion_Guard.Body",
  523. ["models/antlion_worker.mdl"] = "Antlion.Head_Bone",
  524. ["models/headcrabclassic.mdl"] = "HeadcrabClassic.SpineControl",
  525. ["models/headcrabblack.mdl"] = "HCBlack.body",
  526. ["models/headcrab.mdl"] = "HCFast.body",
  527. ["models/zombie/poison.mdl"] = "ValveBiped.Headcrab_Cube1",
  528. ["models/player/zombie_classic.mdl"] = "ValveBiped.HC_Body_Bone",
  529. ["models/zombie/classic.mdl"] = "ValveBiped.HC_Body_Bone",
  530. ["models/zombie/classic_torso.mdl"] = "ValveBiped.HC_Body_Bone",
  531. ["models/zombie/zombie_soldier.mdl"] = "ValveBiped.HC_Body_Bone",
  532. ["models/player/zombie_fast.mdl"] = "ValveBiped.HC_Body_Bone",
  533. ["models/combine_strider.mdl"] = "Combine_Strider.Body_Bone",
  534. ["models/combine_dropship.mdl"] = "D_ship.Spine1",
  535. ["models/combine_helicopter.mdl"] = "Chopper.Body",
  536. ["models/gunship.mdl"] = "Gunship.Body",
  537. ["models/lamarr.mdl"] = "HeadcrabClassic.SpineControl",
  538. ["models/mortarsynth.mdl"] = "Root Bone",
  539. ["models/synth.mdl"] = "Bip02 Spine1",
  540. ["models/vortigaunt_slave.mdl"] = "ValveBiped.Head"
  541. }
  542.  
  543. // Material Settings
  544. AB.QTBL[14] = {
  545. ["$basetexture"] = "models/debug/debugWhite",
  546. ["$ignorez"] = 1
  547. }
  548.  
  549. // AA methods
  550. AB.QTBL[15] = {
  551. ["Invert"] = "Invert",
  552. ["Spin"] = "Spin",
  553. ["Fake SW"] = "Fake SW",
  554. ["Custom"] = "Custom",
  555. }
  556.  
  557. // AFK commands
  558. AB.QTBL[16] = {
  559. "forward",
  560. "back",
  561. "jump",
  562. "moveleft",
  563. "moveright",
  564. "duck",
  565. "left",
  566. "right"
  567. }
  568.  
  569. // Ignore files
  570. AB.QTBL[17] = {
  571. "lua/vgui/dpanelselect.lua",
  572. "lua/derma/init.lua",
  573. "lua/includes/modules/spawnmenu.lua",
  574. "lua/vgui/spawnicon.lua",
  575. "lua/vgui/dform.lua",
  576. "gamemodes/sandbox/gamemode/spawnmenu/controls/control_presets.lua",
  577. "lua/vgui/dcolormixer.lua",
  578. "lua/vgui/propselect.lua",
  579. "lua/vgui/matselect.lua",
  580. "gamemodes/sandbox/gamemode/spawnmenu/controlpanel.lua",
  581. "lua/vgui/dpanelselect.lua",
  582. "gamemodes/sandbox/gamemode/spawnmenu/creationmenu/content/contenticon.lua",
  583. "lua/vgui/dhtml.lua",
  584. "gamemodes/sandbox/gamemode/spawnmenu/creationmenu/content/contenttypes/dupes.lua",
  585. "lua/vgui/dbutton.lua",
  586. "lua/includes/modules/undo.lua",
  587. "gamemodes/sandbox/gamemode/spawnmenu/creationmenu/content/contenttypes/saves.lua",
  588. "addons/chatbox/lua/scorpy_chatbox/vgui/scorpy_chatbox_panels.lua",
  589. "gamemodes/sandbox/gamemode/editor_player.lua",
  590. "lua/vgui/dmenuoptioncvar.lua",
  591. "gamemodes/darkrp/gamemode/cl_init.lua",
  592. "gamemodes/darkrp/gamemode/modules/f4menu/cl_init.lua",
  593. "gamemodes/darkrp/entities/entities/chatindicator/cl_init.lua",
  594. "lua/autorun/wac_aircraft_input.lua",
  595. "lua/includes/extensions/file.lua",
  596. "data/ampris/settings.txt"
  597. }
  598.  
  599. // Ignore commands
  600. AB.QTBL[18] = {
  601. "aim_aa_pitch",
  602. "aim_aa_yaw",
  603. "aim_aa_roll",
  604. "aim_aa_spin",
  605. "aim_fakelag_rate",
  606. "misc_theme_color",
  607. "misc_crosshair_col",
  608. "misc_sh_speed",
  609. "aim_fov",
  610. "aim_distance",
  611. "esp_distance",
  612. "esp_distance_chams",
  613. "esp_distance_box",
  614. "radar_distance",
  615. "radar_x",
  616. "radar_y",
  617. "light_pbrightness",
  618. "light_psize"
  619. }
  620.  
  621. // Characters
  622. AB.QTBL[19] = {
  623. "A","B","C","D","E","F","G","H","I","J",
  624. "K","L","M","N","O","P","Q","R","S","T",
  625. "U","V","W","X","Y","Z","1","2","3","4",
  626. "5","6","7","8","9","_","-","=","+","(",
  627. ")","<",">","?","/","'",";","!","@","#",
  628. "$","%","^","&","*","~","`","{","}","|"
  629. }
  630. // http://wiki.garrysmod.com/page/Enums/MOUSE
  631. AB.QTBL[20] = {
  632. [107] = "MOUSE_LEFT",
  633. [108] = "MOUSE_RIGHT",
  634. [109] = "MOUSE_MIDDLE",
  635. [110] = "MOUSE_4",
  636. [111] = "MOUSE_5",
  637. }
  638. // http://wiki.garrysmod.com/page/Enums/KEY
  639. AB.QTBL[21] = {
  640. [0] = "KEY_NONE",
  641. [1] = "KEY_0",
  642. [2] = "KEY_1",
  643. [3] = "KEY_2",
  644. [4] = "KEY_3",
  645. [5] = "KEY_4",
  646. [6] = "KEY_5",
  647. [7] = "KEY_6",
  648. [8] = "KEY_7",
  649. [9] = "KEY_8",
  650. [10] = "KEY_9",
  651. [11] = "KEY_A",
  652. [12] = "KEY_B",
  653. [13] = "KEY_C",
  654. [14] = "KEY_D",
  655. [15] = "KEY_E",
  656. [16] = "KEY_F",
  657. [17] = "KEY_G",
  658. [18] = "KEY_H",
  659. [19] = "KEY_I",
  660. [20] = "KEY_J",
  661. [21] = "KEY_K",
  662. [22] = "KEY_L",
  663. [23] = "KEY_M",
  664. [24] = "KEY_N",
  665. [25] = "KEY_O",
  666. [26] = "KEY_P",
  667. [27] = "KEY_Q",
  668. [28] = "KEY_R",
  669. [29] = "KEY_S",
  670. [30] = "KEY_T",
  671. [31] = "KEY_U",
  672. [32] = "KEY_V",
  673. [33] = "KEY_W",
  674. [34] = "KEY_X",
  675. [35] = "KEY_Y",
  676. [36] = "KEY_Z",
  677. [37] = "KEY_PAD_0",
  678. [38] = "KEY_PAD_1",
  679. [39] = "KEY_PAD_2",
  680. [40] = "KEY_PAD_3",
  681. [41] = "KEY_PAD_4",
  682. [42] = "KEY_PAD_5",
  683. [43] = "KEY_PAD_6",
  684. [44] = "KEY_PAD_7",
  685. [45] = "KEY_PAD_8",
  686. [46] = "KEY_PAD_9",
  687. [47] = "KEY_PAD_DIVIDE",
  688. [48] = "KEY_PAD_MULTIPLY",
  689. [49] = "KEY_PAD_MINUS",
  690. [50] = "KEY_PAD_PLUS",
  691. [51] = "KEY_PAD_ENTER",
  692. [52] = "KEY_PAD_DECIMAL",
  693. [53] = "KEY_LBRACKET",
  694. [54] = "KEY_RBRACKET",
  695. [55] = "KEY_SEMICOLON",
  696. [56] = "KEY_APOSTROPHE",
  697. [57] = "KEY_BACKQUOTE",
  698. [58] = "KEY_COMMA",
  699. [59] = "KEY_PERIOD",
  700. [60] = "KEY_SLASH",
  701. [61] = "KEY_BACKSLASH",
  702. [62] = "KEY_MINUS",
  703. [63] = "KEY_EQUAL",
  704. [64] = "KEY_ENTER",
  705. [65] = "KEY_SPACE",
  706. [66] = "KEY_BACKSPACE",
  707. [67] = "KEY_TAB",
  708. [68] = "KEY_CAPSLOCK",
  709. [69] = "KEY_NUMLOCK",
  710. [70] = "KEY_ESCAPE",
  711. [71] = "KEY_SCROLLLOCK",
  712. [72] = "KEY_INSERT",
  713. [73] = "KEY_DELETE",
  714. [74] = "KEY_HOME",
  715. [75] = "KEY_END",
  716. [76] = "KEY_PAGEUP",
  717. [77] = "KEY_PAGEDOWN",
  718. [78] = "KEY_BREAK",
  719. [79] = "KEY_LSHIFT",
  720. [80] = "KEY_RSHIFT",
  721. [81] = "KEY_LALT",
  722. [82] = "KEY_RALT",
  723. [83] = "KEY_LCONTROL",
  724. [84] = "KEY_RCONTROL",
  725. [85] = "KEY_LWIN",
  726. [86] = "KEY_RWIN",
  727. [87] = "KEY_APP",
  728. [88] = "KEY_UP",
  729. [89] = "KEY_LEFT",
  730. [90] = "KEY_DOWN",
  731. [91] = "KEY_RIGHT",
  732. [92] = "KEY_F1",
  733. [93] = "KEY_F2",
  734. [94] = "KEY_F3",
  735. [95] = "KEY_F4",
  736. [96] = "KEY_F5",
  737. [97] = "KEY_F6",
  738. [98] = "KEY_F7",
  739. [99] = "KEY_F8",
  740. [100] = "KEY_F9",
  741. [101] = "KEY_F10",
  742. [102] = "KEY_F11",
  743. [103] = "KEY_F12",
  744. [104] = "KEY_CAPSLOCKTOGGLE",
  745. [105] = "KEY_NUMLOCKTOGGLE",
  746. [106] = "KEY_SCROLLLOCKTOGGLE",
  747. [107] = "KEY_XBUTTON_UP",
  748. [108] = "KEY_XBUTTON_DOWN",
  749. [109] = "KEY_XBUTTON_LEFT",
  750. [110] = "KEY_XBUTTON_RIGHT",
  751. [111] = "KEY_XBUTTOG.n_Start",
  752. [112] = "KEY_XBUTTON_BACK",
  753. [113] = "KEY_XBUTTON_STICK1",
  754. [114] = "KEY_XBUTTON_STICK2",
  755. [115] = "KEY_XBUTTON_A",
  756. [116] = "KEY_XBUTTON_B",
  757. [117] = "KEY_XBUTTON_X",
  758. [118] = "KEY_XBUTTON_Y",
  759. [119] = "KEY_XBUTTON_BLACK",
  760. [120] = "KEY_XBUTTON_WHITE",
  761. [121] = "KEY_XBUTTON_LTRIGGER",
  762. [122] = "KEY_XBUTTON_RTRIGGER",
  763. [123] = "KEY_XSTICK1_UP",
  764. [124] = "KEY_XSTICK1_DOWN",
  765. [125] = "KEY_XSTICK1_LEFT",
  766. [126] = "KEY_XSTICK1_RIGHT",
  767. [127] = "KEY_XSTICK2_UP",
  768. [128] = "KEY_XSTICK2_DOWN",
  769. [129] = "KEY_XSTICK2_LEFT",
  770. }
  771.  
  772. AB.QTBL[25] = {
  773. ["weapon_smg1"] = Vector(-0.04362, -0.04362, -0.04362),
  774. ["weapon_ar2"] = Vector(-0.02618, -0.02618, 0.02618),
  775. ["weapon_shotgun"] = Vector( -0.08716, -0.08716, -0.08716),
  776. ["weapon_pistol"] = Vector(-0.01, -0.01, -0.01),
  777. }
  778.  
  779. /*================
  780. Table Creation End|
  781. ==================*/
  782.  
  783. --------------------
  784.  
  785. /*==================
  786. Fonts Creation Start|
  787. ====================*/
  788.  
  789. G.sur_CreFont("Items", {font = "Bebas Neue", size = 24, weight = 0, antialias = true})
  790. G.sur_CreFont("Logo", {font = "Bebas Neue", size = 20, weight = 10, antialias = true})
  791. G.sur_CreFont("LogoF", {font = "Bebas Neue", size = 75, weight = 200, antialias = true})
  792. G.sur_CreFont("LogoV", {font = "Bebas Neue", size = 40, weight = 200, antialias = true})
  793. G.sur_CreFont("Credits",{font = "Bebas Neue", size = 14, weight = 200, antialias = true})
  794. G.sur_CreFont("CBox", {font = "Arial", size = 14, weight = 200, antialias = true})
  795.  
  796. /*================
  797. Fonts Creation End|
  798. ==================*/
  799.  
  800. ----------------------
  801.  
  802. /*====================
  803. Detour Functions Start|
  804. ======================*/
  805.  
  806. function file.Write(fn, data)
  807. if (AB.set_Get("detour_fwrite") == 1) then
  808. if (!G.tbl_HasVal(AB.QTBL[17], debug.getinfo(2).short_src)) then
  809. AB.con_Log("detour", "[", color_black, debug.getinfo(2).short_src, color_white, "] ", Color(255, 0, 0), "Blocked", color_white, " function file.Write: ", Color(255, 255, 0), fn, color_white, ": ", Color(255, 255, 0), data, color_white, ".\n")
  810. AB.con_LogFunc("[Detour] Blocked function file.Write: " .. fn .. ": " .. data .. ".\n")
  811. return false
  812. else
  813. AB.con_Log("detour", "[", color_black, debug.getinfo(2).short_src, color_white, "] ", Color(0, 205, 0), "Allowed", color_white, " function file.Write: ", Color(255, 255, 0), fn, color_white, ": ", Color(255, 255, 0), data, color_white, ".\n")
  814. AB.con_LogFunc("[Detour] Allowed function file.Write: " .. fn .. ": " .. data .. ".\n")
  815. return G.f_Write(fn, data)
  816. end
  817. end
  818. return G.f_Write(fn, data)
  819. end
  820.  
  821. function file.Append(fn, data)
  822. if (AB.set_Get("detour_fappend") == 1) then
  823. if (!G.tbl_HasVal(AB.QTBL[17], debug.getinfo(2).short_src)) then
  824. AB.con_Log("detour", "[", color_black, debug.getinfo(2).short_src, color_white, "] ", Color(255, 0, 0), "Blocked", color_white, " function file.Append: ", Color(255, 255, 0), fn, color_white, ": ", Color(255, 255, 0), data, color_white, ".\n")
  825. AB.con_LogFunc("[Detour] Blocked function file.Append: " .. fn .. ": " .. data .. ".\n")
  826. return false
  827. else
  828. AB.con_Log("detour", "[", color_black, debug.getinfo(2).short_src, color_white, "] ", Color(0, 205, 0), "Allowed", color_white, " function file.Append: ", Color(255, 255, 0), fn, color_white, ": ", Color(255, 255, 0), data, color_white, ".\n")
  829. AB.con_LogFunc("[Detour] Allowed function file.Append: " .. fn .. ": " .. data .. ".\n")
  830. return G.f_Append(fn, data)
  831. end
  832. end
  833. return G.f_Append(fn, data)
  834. end
  835.  
  836. function file.Size(fn, path)
  837. if (AB.set_Get("detour_fsize") == 1) then
  838. if (!G.tbl_HasVal(AB.QTBL[17], debug.getinfo(2).short_src)) then
  839. AB.con_Log("detour", "[", color_black, debug.getinfo(2).short_src, color_white, "] ", Color(255, 0, 0), "Blocked", color_white, " function file.Size: ", Color(255, 255, 0), fn, color_white, ": ", Color(255, 255, 0), path, color_white, ".\n")
  840. AB.con_LogFunc("[Detour] Blocked function file.Size: " .. fn .. ": " .. path .. ".\n")
  841. return false
  842. else
  843. AB.con_Log("detour", "[", color_black, debug.getinfo(2).short_src, color_white, "] ", Color(0, 205, 0), "Allowed", color_white, " function file.Size: ", Color(255, 255, 0), fn, color_white, ": ", Color(255, 255, 0), path, color_white, ".\n")
  844. AB.con_LogFunc("[Detour] Allowed function file.Size: " .. fn .. ": " .. path .. ".\n")
  845. return G.f_Size(fn, path)
  846. end
  847. end
  848. return G.f_Size(fn, data)
  849. end
  850.  
  851. function file.Read(fn, data)
  852. if (AB.set_Get("detour_fread") == 1) then
  853. if (!G.tbl_HasVal(AB.QTBL[17], debug.getinfo(2).short_src)) then
  854. AB.con_Log("detour", "[", color_black, debug.getinfo(2).short_src, color_white, "] ", Color(255, 0, 0), "Blocked", color_white, " function file.Read: ", Color(255, 255, 0), fn, color_white, ": ", Color(255, 255, 0), data, color_white, ".\n")
  855. AB.con_LogFunc("[Detour] Blocked function file.Read: " .. fn .. ": " .. data .. ".\n")
  856. return false
  857. else
  858. AB.con_Log("detour", "[", color_black, debug.getinfo(2).short_src, color_white, "] ", Color(0, 205, 0), "Allowed", color_white, " function file.Read: ", Color(255, 255, 0), fn, color_white, ": ", Color(255, 255, 0), data, color_white, ".\n")
  859. AB.con_LogFunc("[Detour] Allowed function file.Read: " .. fn .. ": " .. data .. ".\n")
  860. return G.f_Read(fn, data)
  861. end
  862. end
  863. return G.f_Read(fn, data)
  864. end
  865.  
  866. function file.Time(fn, data)
  867. if (AB.set_Get("detour_ftime") == 1) then
  868. if (!G.tbl_HasVal(AB.QTBL[17], debug.getinfo(2).short_src)) then
  869. AB.con_Log("detour", "[", color_black, debug.getinfo(2).short_src, color_white, "] ", Color(255, 0, 0), "Blocked", color_white, " function file.Time: ", Color(255, 255, 0), fn, color_white, ": ", Color(255, 255, 0), data, color_white, ".\n")
  870. AB.con_LogFunc("[Detour] Blocked function file.Time: " .. fn .. ": " .. data .. ".\n")
  871. return false
  872. else
  873. AB.con_Log("detour", "[", color_black, debug.getinfo(2).short_src, color_white, "] ", Color(0, 205, 0), "Allowed", color_white, " function file.Time: ", Color(255, 255, 0), fn, color_white, ": ", Color(255, 255, 0), data, color_white, ".\n")
  874. AB.con_LogFunc("[Detour] Allowed function file.Time: " .. fn .. ": " .. data .. ".\n")
  875. return G.f_Time(fn, data)
  876. end
  877. end
  878. return G.f_Time(fn, data)
  879. end
  880.  
  881. function file.ExistsEx(fn, path)
  882. if (AB.set_Get("detour_fexistsex") == 1) then
  883. if (!G.tbl_HasVal(AB.QTBL[17], debug.getinfo(2).short_src)) then
  884. AB.con_Log("detour", "[", color_black, debug.getinfo(2).short_src, color_white, "] ", Color(255, 0, 0), "Blocked", color_white, " function file.ExistsEx: ", Color(255, 255, 0), fn, color_white, ": ", Color(255, 255, 0), path, color_white, ".\n")
  885. AB.con_LogFunc("[Detour] Blocked function file.ExistsEx: " .. fn .. ": " .. path .. ".\n")
  886. return false
  887. else
  888. AB.con_Log("detour", "[", color_black, debug.getinfo(2).short_src, color_white, "] ", Color(0, 205, 0), "Allowed", color_white, " function file.ExistsEx: ", Color(255, 255, 0), fn, color_white, ": ", Color(255, 255, 0), path, color_white, ".\n")
  889. AB.con_LogFunc("[Detour] Allowed function file.ExistsEx: " .. fn .. ": " .. path .. ".\n")
  890. return G.f_ExEx(fn, path)
  891. end
  892. end
  893. return G.f_ExEx(fn, path)
  894. end
  895.  
  896. function file.Exists(fn, path)
  897. if (AB.set_Get("detour_fexists") == 1) then
  898. if (!G.tbl_HasVal(AB.QTBL[17], debug.getinfo(2).short_src)) then
  899. AB.con_Log("detour", "[", color_black, debug.getinfo(2).short_src, color_white, "] ", Color(255, 0, 0), "Blocked", color_white, " function file.Exists: ", Color(255, 255, 0), fn, color_white, ": ", Color(255, 255, 0), path, color_white, ".\n")
  900. AB.con_LogFunc("[Detour] Blocked function file.Exists: " .. fn .. ": " .. path .. ".\n")
  901. return false
  902. else
  903. AB.con_Log("detour", "[", color_black, debug.getinfo(2).short_src, color_white, "] ", Color(0, 205, 0), "Allowed", color_white, " function file.Exists: ", Color(255, 255, 0), fn, color_white, ": ", Color(255, 255, 0), path, color_white, ".\n")
  904. AB.con_LogFunc("[Detour] Allowed function file.Exists: " .. fn .. ": " .. path .. ".\n")
  905. return G.f_Exists(fn, path)
  906. end
  907. end
  908. return G.f_Exists(fn, path)
  909. end
  910.  
  911. function file.IsDir(dir, path)
  912. if (AB.set_Get("detour_fisdir") == 1) then
  913. if (!G.tbl_HasVal(AB.QTBL[17], debug.getinfo(2).short_src)) then
  914. AB.con_Log("detour", "[", color_black, debug.getinfo(2).short_src, color_white, "] ", Color(255, 0, 0), "Blocked", color_white, " function file.IsDir: ", Color(255, 255, 0), dir, color_white, ": ", Color(255, 255, 0), path, color_white, ".\n")
  915. AB.con_LogFunc("[Detour] Blocked function file.IsDir: " .. dir .. ": " .. path .. ".\n")
  916. return false
  917. else
  918. AB.con_Log("detour", "[", color_black, debug.getinfo(2).short_src, color_white, "] ", Color(0, 205, 0), "Allowed", color_white, " function file.IsDir: ", Color(255, 255, 0), dir, color_white, ": ", Color(255, 255, 0), path, color_white, ".\n")
  919. AB.con_LogFunc("[Detour] Allowed function file.IsDir: " .. dir .. ": " .. path .. ".\n")
  920. return G.f_IsDir(dir, path)
  921. end
  922. end
  923. return G.f_IsDir(dir, path)
  924. end
  925.  
  926. function file.Open(fn, mode, data)
  927. if (AB.set_Get("detour_fopen") == 1) then
  928. if (!G.tbl_HasVal(AB.QTBL[17], debug.getinfo(2).short_src)) then
  929. AB.con_Log("detour", "[", color_black, debug.getinfo(2).short_src, color_white, "] ", Color(255, 0, 0), "Blocked", color_white, " function file.Open: ", Color(255, 255, 0), fn, color_white, ": ", Color(255, 255, 0), mode, color_white, "(", Color(255, 255, 0), data, color_white, ").\n")
  930. AB.con_LogFunc("[Detour] Blocked function file.Open: " .. fn .. ": " .. mod .. "(" .. data .. ")")
  931. return false
  932. else
  933. AB.con_Log("detour", "[", color_black, debug.getinfo(2).short_src, color_white, "] ", Color(0, 205, 0), "Allowed", color_white, " function file.Open: ", Color(255, 255, 0), fn, color_white, ": ", Color(255, 255, 0), mode, color_white, "(", Color(255, 255, 0), data, color_white, ").\n")
  934. AB.con_LogFunc("[Detour] Allowed function file.Open: " .. fn .. ": " .. mod .. "(" .. data .. ")")
  935. return G.f_Open(fn, mode, data)
  936. end
  937. end
  938. return G.f_Open(fn, mode, data)
  939. end
  940.  
  941. function file.Delete(fn)
  942. return false
  943. end
  944.  
  945. function Meta_PLY.ConCommand(ply, cmd)
  946. if (AB.set_Get("detour_concmd") == 1) then
  947. if (!G.tbl_HasVal(AB.QTBL[17], debug.getinfo(2).short_src)) then
  948. AB.con_Log("detour", "[", color_black, debug.getinfo(2).short_src, color_white, "] ", Color(255, 0, 0), "Blocked", color_white, " function ConCommand: ", Color(255, 255, 0), cmd, color_white, ".\n")
  949. AB.con_LogFunc("[Detour] Blocked function ConCommand: " .. cmd .. ".")
  950. return false
  951. else
  952. AB.con_Log("detour", "[", color_black, debug.getinfo(2).short_src, color_white, "] ", Color(0, 205, 0), "Allowed", color_white, " function ConCommand: ", Color(255, 255, 0), cmd, color_white, ".\n")
  953. AB.con_LogFunc("[Detour] Allowed function ConCommand: " .. cmd .. ".")
  954. return G.ply_CCMD(ply, cmd)
  955. end
  956. end
  957. return G.ply_CCMD(ply, cmd)
  958. end
  959.  
  960. function Meta_PLY.SendLua(ply, cmd)
  961. if (AB.set_Get("detour_sendlua") == 1) then
  962. if (!G.tbl_HasVal(AB.QTBL[17], debug.getinfo(2).short_src)) then
  963. AB.con_Log("detour", "[", color_black, debug.getinfo(2).short_src, color_white, "] ", Color(0, 205, 0), "Blocked", color_white, " function SendLua: ", Color(255, 255, 0), cmd, color_white, ".\n")
  964. AB.con_LogFunc("[Detour] Blocked function SendLua: " .. cmd .. ".")
  965. return false
  966. else
  967. AB.con_Log("detour", "[", color_black, debug.getinfo(2).short_src, color_white, "] ", Color(0, 205, 0), "Allowed", color_white, " function SendLua: ", Color(255, 255, 0), cmd, color_white, ".\n")
  968. AB.con_LogFunc("[Detour] Allowed function SendLua: " .. cmd .. ".")
  969. end
  970. end
  971. return G.ply_SendLua(ply, cmd)
  972. end
  973.  
  974. function Meta_PLY.IPAddress()
  975. if (AB.set_Get("detour_ip") == 1) then
  976. AB.con_Log("detour", "[", color_black, debug.getinfo(2).short_src, color_white, "] ", Color(255, 0, 0), "Blocked", color_white, " function IPAddress.\n")
  977. AB.con_LogFunc("[Detour] Blocked function IPAddress.")
  978. return "127.0.0.1"
  979. end
  980. end
  981.  
  982. function Meta_PLY.GetHands(...)
  983. if (AB.set_Get("misc_nohands") == 1) then
  984. return false
  985. end
  986. return G.p_GetHands(...)
  987. end
  988.  
  989. function RunConsoleCommand(cmd, val)
  990. if (AB.set_Get("detour_rcc") == 1) then
  991. if (!G.tbl_HasVal(AB.QTBL[17], debug.getinfo(2).short_src)) then
  992. AB.con_Log("detour", "[", color_black, debug.getinfo(2).short_src, color_white, "] ", Color(255, 0, 0), "Blocked", color_white, " function RunConsoleCommand: ", Color(255, 255, 0), cmd, color_white, ": ", Color(255, 255, 0), val, color_white, ".\n")
  993. AB.con_LogFunc("[Detour] Blocked function RunConsoleCommand: " .. cmd .. ".")
  994. return false
  995. else
  996. AB.con_Log("detour", "[", color_black, debug.getinfo(2).short_src, color_white, "] ", Color(0, 205, 0), "Allowed", color_white, " function RunConsoleCommand: ", Color(255, 255, 0), cmd, color_white, ": ", Color(255, 255, 0), val, color_white, ".\n")
  997. AB.con_LogFunc("[Detour] Allowed function RunConsoleCommand: " .. cmd .. ".")
  998. return G.run_CCmd(cmd, val)
  999. end
  1000. end
  1001. return G.run_CCmd(cmd, val)
  1002. end
  1003.  
  1004. G.GetCVarNum = GetConVarNumber
  1005. function GetConVarNumber(cvar)
  1006. if (AB.set_Get("detour_GetCVarnum") == 1) then
  1007. if (G.str_Find(G.str_Lower("sv_cheats"), cvar)) then
  1008. AB.con_Log("detour", "[", color_black, debug.getinfo(2).short_src, color_white, "] Spoofed function GetConVarNumber: ", Color(255, 255, 0), cvar, color_white, ".\n")
  1009. AB.con_LogFunc("[Detour] Spoofed function GetConVarNumber: " .. cvar .. ".")
  1010. return 0
  1011. elseif (G.str_Find(G.str_Lower("sv_allowcslua"), cvar)) then
  1012. AB.con_Log("detour", "[", color_black, debug.getinfo(2).short_src, color_white, "] Spoofed function GetConVarNumber: ", Color(255, 255, 0), cvar, color_white, ".\n")
  1013. AB.con_LogFunc("[Detour] Spoofed function GetConVarNumber: " .. cvar .. ".")
  1014. return 0
  1015. elseif (G.str_Find(G.str_Lower("host_timescale"), cvar)) then
  1016. AB.con_Log("detour", "[", color_black, debug.getinfo(2).short_src, color_white, "] Spoofed function GetConVarNumber: ", Color(255, 255, 0), cvar, color_white, ".\n")
  1017. AB.con_LogFunc("[Detour] Spoofed function GetConVarNumber: " .. cvar .. ".")
  1018. return 1
  1019. elseif G.str_Find(G.str_Lower("mat_fullbright"), cvar) then
  1020. AB.con_Log("detour", "[", color_black, debug.getinfo(2).short_src, color_white, "] Spoofed function GetConVarNumber: ", Color(255, 255, 0), cvar, color_white, ".\n")
  1021. AB.con_LogFunc("[Detour] Spoofed function GetConVarNumber: " .. cvar .. ".")
  1022. return 0
  1023. else
  1024. return G.GetCVarNum(cvar)
  1025. end
  1026. end
  1027. return G.GetCVarNum(cvar)
  1028. end
  1029.  
  1030. G.GetCVarStr = GetConVarString
  1031. function GetConVarString(cvar)
  1032. if (AB.set_Get("detour_GetCVarstr") == 1) then
  1033. if (G.str_Find(G.str_Lower("sv_cheats"), cvar)) then
  1034. AB.con_Log("detour", "[", color_black, debug.getinfo(2).short_src, color_white, "] Spoofed function GetConVarString: ", Color(255, 255, 0), cvar, color_white, ".\n")
  1035. AB.con_LogFunc("[Detour] Spoofed function GetConVarString: " .. cvar .. ".")
  1036. return "0"
  1037. elseif (G.str_Find(G.str_Lower("sv_allowcslua"), cvar)) then
  1038. AB.con_Log("detour", "[", color_black, debug.getinfo(2).short_src, color_white, "] Spoofed function GetConVarString: ", Color(255, 255, 0), cvar, color_white, ".\n")
  1039. AB.con_LogFunc("[Detour] Spoofed function GetConVarString: " .. cvar .. ".")
  1040. return "0"
  1041. elseif (G.str_Find(G.str_Lower("host_timescale"), cvar)) then
  1042. AB.con_Log("detour", "[", color_black, debug.getinfo(2).short_src, color_white, "] Spoofed function GetConVarString: ", Color(255, 255, 0), cvar, color_white, ".\n")
  1043. AB.con_LogFunc("[Detour] Spoofed function GetConVarString: " .. cvar .. ".")
  1044. return "1"
  1045. elseif G.str_Find(G.str_Lower("mat_fullbright"), cvar) then
  1046. AB.con_Log("detour", "[", color_black, debug.getinfo(2).short_src, color_white, "] Spoofed function GetConVarString: ", Color(255, 255, 0), cvar, color_white, ".\n")
  1047. AB.con_LogFunc("[Detour] Spoofed function GetConVarString: " .. cvar .. ".")
  1048. return "0"
  1049. else
  1050. return G.GetCVarStr(cvar)
  1051. end
  1052. end
  1053. return G.GetCVarStr(cvar)
  1054. end
  1055.  
  1056. function engineConsoleCommand(ply, cmd, args)
  1057. if (AB.set_Get("detour_engineccmd") == 1) then
  1058. if G.str_Find(G.str_Lower("sv_cheats"), cmd) then
  1059. AB.con_Log("detour", "[", color_black, debug.getinfo(2).short_src, color_white, "] Spoofed function engineConsoleCommand: ", Color(255, 255, 0), cmd, color_white, ": ", Color(255, 255, 0), args, color_white, ".\n")
  1060. AB.con_LogFunc("[Detour] Spoofed function engineConsoleCommand: " .. cmd .. ": " .. args .. ".")
  1061. return 0
  1062. elseif G.str_Find(G.str_Lower("sv_allowcslua"), cmd) then
  1063. AB.con_Log("detour", "[", color_black, debug.getinfo(2).short_src, color_white, "] Spoofed function engineConsoleCommand: ", Color(255, 255, 0), cmd, color_white, ": ", Color(255, 255, 0), args, color_white, ".\n")
  1064. AB.con_LogFunc("[Detour] Spoofed function engineConsoleCommand: " .. cmd .. ": " .. args .. ".")
  1065. return 0
  1066. elseif G.str_Find(G.str_Lower("host_timescale"), cmd) then
  1067. AB.con_Log("detour", "[", color_black, debug.getinfo(2).short_src, color_white, "] Spoofed function engineConsoleCommand: ", Color(255, 255, 0), cmd, color_white, ": ", Color(255, 255, 0), args, color_white, ".\n")
  1068. AB.con_LogFunc("[Detour] Spoofed function engineConsoleCommand: " .. cmd .. ": " .. args .. ".")
  1069. return 1
  1070. elseif G.str_Find(G.str_Lower("mat_fullbright"), cmd) then
  1071. AB.con_Log("detour", "[", color_black, debug.getinfo(2).short_src, color_white, "] Spoofed function engineConsoleCommand: ", Color(255, 255, 0), cmd, color_white, ": ", Color(255, 255, 0), args, color_white, ".\n")
  1072. AB.con_LogFunc("[Detour] Spoofed function engineConsoleCommand: " .. cmd .. ": " .. args .. ".")
  1073. return 0
  1074. else
  1075. return G.engConCMD(ply, cmd, args)
  1076. end
  1077. end
  1078. return G.engConCMD(ply, cmd, args)
  1079. end
  1080.  
  1081. function cvars.AddChangeCallback(cvar, call)
  1082. if (AB.set_Get("detour_cvars") == 1) then
  1083. if (G.str_Find(G.str_Lower("sv_cheats"), cvar)) then
  1084. AB.con_Log("detour", "[", color_black, debug.getinfo(2).short_src, color_white, "] Spoofed function cvars.AddChangeCallback: ", Color(255, 255, 0), cvar, color_white, ": ", Color(255, 255, 0), call, color_white, ".\n")
  1085. AB.con_LogFunc("[Detour] Spoofed function cvars.AddChangeCallback: " .. cvar .. ".")
  1086. return 0
  1087. elseif (G.str_Find(G.str_Lower("sv_allowcslua"), cvar)) then
  1088. AB.con_Log("detour", "[", color_black, debug.getinfo(2).short_src, color_white, "] Spoofed function cvars.AddChangeCallback: ", Color(255, 255, 0), cvar, color_white, ": ", Color(255, 255, 0), call, color_white, ".\n")
  1089. AB.con_LogFunc("[Detour] Spoofed function cvars.AddChangeCallback: " .. cvar .. ".")
  1090. return 0
  1091. elseif (G.str_Find(G.str_Lower("host_timescale"), cvar)) then
  1092. AB.con_Log("detour", "[", color_black, debug.getinfo(2).short_src, color_white, "] Spoofed function cvars.AddChangeCallback: ", Color(255, 255, 0), cvar, color_white, ": ", Color(255, 255, 0), call, color_white, ".\n")
  1093. AB.con_LogFunc("[Detour] Spoofed function cvars.AddChangeCallback: " .. cvar .. ".")
  1094. return 1
  1095. elseif G.str_Find(G.str_Lower("mat_fullbright"), cvar) then
  1096. AB.con_Log("detour", "[", color_black, debug.getinfo(2).short_src, color_white, "] Spoofed function cvars.AddChangeCallback: ", Color(255, 255, 0), cvar, color_white, ": ", Color(255, 255, 0), call, color_white, ".\n")
  1097. AB.con_LogFunc("[Detour] Spoofed function cvars.AddChangeCallback: " .. cvar .. ".")
  1098. return 0
  1099. else
  1100. return G.cvar_AddChCB(cvar, call)
  1101. end
  1102. end
  1103. return G.cvar_AddChCB(cvar, call)
  1104. end
  1105.  
  1106. function cvars.OnConVarChanged(cvar, old, new)
  1107. if (AB.set_Get("detour_cvars") == 1) then
  1108. if (G.str_Find(G.str_Lower("sv_cheats"), cvar)) then
  1109. AB.con_Log("detour", "[", color_black, debug.getinfo(2).short_src, color_white, "] Spoofed function cvars.OnConVarChanged: ", Color(255, 255, 0), cvar, color_white, ": ", Color(255, 255, 0), old, color_white, ".\n")
  1110. AB.con_LogFunc("[Detour] Spoofed function cvars.OnConVarChanged: " .. cvar .. ": " .. old .. " .\n")
  1111. return 0
  1112. elseif (G.str_Find(G.str_Lower("sv_allowcslua"), cvar)) then
  1113. AB.con_Log("detour", "[", color_black, debug.getinfo(2).short_src, color_white, "] Spoofed function cvars.OnConVarChanged: ", Color(255, 255, 0), cvar, color_white, ": ", Color(255, 255, 0), old, color_white, ".\n")
  1114. AB.con_LogFunc("[Detour] Spoofed function cvars.OnConVarChanged: " .. cvar .. ": " .. old .. " .\n")
  1115. return 0
  1116. elseif (G.str_Find(G.str_Lower("host_timescale"), cvar)) then
  1117. AB.con_Log("detour", "[", color_black, debug.getinfo(2).short_src, color_white, "] Spoofed function cvars.OnConVarChanged: ", Color(255, 255, 0), cvar, color_white, ": ", Color(255, 255, 0), old, color_white, ".\n")
  1118. AB.con_LogFunc("[Detour] Spoofed function cvars.OnConVarChanged: " .. cvar .. ": " .. old .. " .\n")
  1119. return 1
  1120. elseif G.str_Find(G.str_Lower("mat_fullbright"), cvar) then
  1121. AB.con_Log("detour", "[", color_black, debug.getinfo(2).short_src, color_white, "] Spoofed function cvars.OnConVarChanged: ", Color(255, 255, 0), cvar, color_white, ": ", Color(255, 255, 0), old, color_white, ".\n")
  1122. AB.con_LogFunc("[Detour] Spoofed function cvars.OnConVarChanged: " .. cvar .. ": " .. old .. " .\n")
  1123. return 0
  1124. else
  1125. return G.cvar_OnChCB(cvar, old, new)
  1126. end
  1127. end
  1128. return G.cvar_OnChCB(cvar, old, new)
  1129. end
  1130.  
  1131. function cvars.Number(cvar)
  1132. if (AB.set_Get("detour_cvars_num") == 1) then
  1133. if (G.str_Find(G.str_Lower("sv_cheats"), cvar)) then
  1134. AB.con_Log("detour", "[", color_black, debug.getinfo(2).short_src, color_white, "] Spoofed function cvars.Number: ", Color(255, 255, 0), cvar, color_white, ".\n")
  1135. AB.con_LogFunc("[Detour] Spoofed function cvars.Number: " .. cvar .. ".")
  1136. return 0
  1137. elseif (G.str_Find(G.str_Lower("sv_allowcslua"), cvar)) then
  1138. AB.con_Log("detour", "[", color_black, debug.getinfo(2).short_src, color_white, "] Spoofed function cvars.Number: ", Color(255, 255, 0), cvar, color_white, ".\n")
  1139. AB.con_LogFunc("[Detour] Spoofed function cvars.Number: " .. cvar .. ".")
  1140. return 0
  1141. elseif (G.str_Find(G.str_Lower("host_timescale"), cvar)) then
  1142. AB.con_Log("detour", "[", color_black, debug.getinfo(2).short_src, color_white, "] Spoofed function cvars.Number: ", Color(255, 255, 0), cvar, color_white, ".\n")
  1143. AB.con_LogFunc("[Detour] Spoofed function cvars.Number: " .. cvar .. ".")
  1144. return 1
  1145. elseif G.str_Find(G.str_Lower("mat_fullbright"), cvar) then
  1146. AB.con_Log("detour", "[", color_black, debug.getinfo(2).short_src, color_white, "] Spoofed function cvars.Number: ", Color(255, 255, 0), cvar, color_white, ".\n")
  1147. AB.con_LogFunc("[Detour] Spoofed function cvars.Number: " .. cvar .. ".")
  1148. return 0
  1149. else
  1150. return G.cvar_Num(cvar)
  1151. end
  1152. end
  1153. return G.cvar_Num(cvar)
  1154. end
  1155.  
  1156. function Meta_CVAR.GetInt(cvar)
  1157. if (AB.set_Get("detour_cvars_num") == 1) then
  1158. if (cvar:GetName() == "sv_cheats") then
  1159. AB.con_Log("detour", "[", color_black, debug.getinfo(2).short_src, color_white, "] Spoofed function ConVar:GetInt: ", Color(255, 255, 0), cvar, color_white, ".\n")
  1160. AB.con_LogFunc("[Detour] Spoofed function ConVar:GetInt.")
  1161. return 0
  1162. elseif (cvar:GetName() == "sv_allowcslua") then
  1163. AB.con_Log("detour", "[", color_black, debug.getinfo(2).short_src, color_white, "] Spoofed function ConVar:GetInt: ", Color(255, 255, 0), cvar, color_white, ".\n")
  1164. AB.con_LogFunc("[Detour] Spoofed function ConVar:GetInt.")
  1165. return 0
  1166. elseif (cvar:GetName() == "host_timescale") then
  1167. AB.con_Log("detour", "[", color_black, debug.getinfo(2).short_src, color_white, "] Spoofed function ConVar:GetInt: ", Color(255, 255, 0), cvar, color_white, ".\n")
  1168. AB.con_LogFunc("[Detour] Spoofed function ConVar:GetInt.")
  1169. return 1
  1170. elseif (cvar:GetName() == "mat_fullbright") then
  1171. AB.con_Log("detour", "[", color_black, debug.getinfo(2).short_src, color_white, "] Spoofed function ConVar:GetInt: ", Color(255, 255, 0), cvar, color_white, ".\n")
  1172. AB.con_LogFunc("[Detour] Spoofed function ConVar:GetInt.")
  1173. return 0
  1174. else
  1175. return G.convar_Int(cvar)
  1176. end
  1177. end
  1178. return G.convar_Int(cvar)
  1179. end
  1180.  
  1181. function Meta_CVAR.GetFloat(cvar)
  1182. if (AB.set_Get("detour_cvars_num") == 1) then
  1183. if (cvar:GetName() == "sv_cheats") then
  1184. AB.con_Log("detour", "[", color_black, debug.getinfo(2).short_src, color_white, "] Spoofed function ConVar:GetFloat: ", Color(255, 255, 0), cvar, color_white, ".\n")
  1185. AB.con_LogFunc("[Detour] Spoofed function ConVar:GetFloat.")
  1186. return 0
  1187. elseif (cvar:GetName() == "sv_allowcslua") then
  1188. AB.con_Log("detour", "[", color_black, debug.getinfo(2).short_src, color_white, "] Spoofed function ConVar:GetFloat: ", Color(255, 255, 0), cvar, color_white, ".\n")
  1189. AB.con_LogFunc("[Detour] Spoofed function ConVar:GetFloat.")
  1190. return 0
  1191. elseif (cvar:GetName() == "host_timescale") then
  1192. AB.con_Log("detour", "[", color_black, debug.getinfo(2).short_src, color_white, "] Spoofed function ConVar:GetFloat: ", Color(255, 255, 0), cvar, color_white, ".\n")
  1193. AB.con_LogFunc("[Detour] Spoofed function ConVar:GetFloat.")
  1194. return 1
  1195. elseif (cvar:GetName() == "mat_fullbright") then
  1196. AB.con_Log("detour", "[", color_black, debug.getinfo(2).short_src, color_white, "] Spoofed function ConVar:GetFloat: ", Color(255, 255, 0), cvar, color_white, ".\n")
  1197. AB.con_LogFunc("[Detour] Spoofed function ConVar:GetFloat.")
  1198. return 0
  1199. else
  1200. return G.convar_Float(cvar)
  1201. end
  1202. end
  1203. return G.convar_Float(cvar)
  1204. end
  1205.  
  1206. function cvars.String(cvar)
  1207. if (AB.set_Get("detour_cvars_str") == 1) then
  1208. if (G.str_Find(G.str_Lower("sv_cheats"), cvar)) then
  1209. AB.con_Log("detour", "[", color_black, debug.getinfo(2).short_src, color_white, "] Spoofed function cvars.String: ", Color(255, 255, 0), cvar, color_white, ".\n")
  1210. AB.con_LogFunc("[Detour] Spoofed function cvars.String: " .. cvar .. ".")
  1211. return "0"
  1212. elseif (G.str_Find(G.str_Lower("sv_allowcslua"), cvar)) then
  1213. AB.con_Log("detour", "[", color_black, debug.getinfo(2).short_src, color_white, "] Spoofed function cvars.String: ", Color(255, 255, 0), cvar, color_white, ".\n")
  1214. AB.con_LogFunc("[Detour] Spoofed function cvars.String: " .. cvar .. ".")
  1215. return "0"
  1216. elseif (G.str_Find(G.str_Lower("host_timescale"), cvar)) then
  1217. AB.con_Log("detour", "[", color_black, debug.getinfo(2).short_src, color_white, "] Spoofed function cvars.String: ", Color(255, 255, 0), cvar, color_white, ".\n")
  1218. AB.con_LogFunc("[Detour] Spoofed function cvars.String: " .. cvar .. ".")
  1219. return "1"
  1220. elseif G.str_Find(G.str_Lower("mat_fullbright"), cvar) then
  1221. AB.con_Log("detour", "[", color_black, debug.getinfo(2).short_src, color_white, "] Spoofed function cvars.String: ", Color(255, 255, 0), cvar, color_white, ".\n")
  1222. AB.con_LogFunc("[Detour] Spoofed function cvars.String: " .. cvar .. ".")
  1223. return "0"
  1224. else
  1225. return G.cvar_Str(cvar)
  1226. end
  1227. end
  1228. return G.cvar_Str(cvar)
  1229. end
  1230.  
  1231. function Meta_CVAR.GetString(cvar)
  1232. if (AB.set_Get("detour_cvars_str") == 1) then
  1233. if (cvar:GetName() == "sv_cheats") then
  1234. AB.con_Log("detour", "[", color_black, debug.getinfo(2).short_src, color_white, "] Spoofed function ConVar:GetString: ", Color(255, 255, 0), cvar, color_white, ".\n")
  1235. AB.con_LogFunc("[Detour] Spoofed function ConVar:GetString.")
  1236. return "0"
  1237. elseif (cvar:GetName() == "sv_allowcslua") then
  1238. AB.con_Log("detour", "[", color_black, debug.getinfo(2).short_src, color_white, "] Spoofed function ConVar:GetString: ", Color(255, 255, 0), cvar, color_white, ".\n")
  1239. AB.con_LogFunc("[Detour] Spoofed function ConVar:GetString.")
  1240. return "0"
  1241. elseif (cvar:GetName() == "host_timescale") then
  1242. AB.con_Log("detour", "[", color_black, debug.getinfo(2).short_src, color_white, "] Spoofed function ConVar:GetString: ", Color(255, 255, 0), cvar, color_white, ".\n")
  1243. AB.con_LogFunc("[Detour] Spoofed function ConVar:GetString.")
  1244. return "1"
  1245. elseif (cvar:GetName() == "mat_fullbright") then
  1246. AB.con_Log("detour", "[", color_black, debug.getinfo(2).short_src, color_white, "] Spoofed function ConVar:GetString: ", Color(255, 255, 0), cvar, color_white, ".\n")
  1247. AB.con_LogFunc("[Detour] Spoofed function ConVar:GetString.")
  1248. return "0"
  1249. else
  1250. return G.convar_Str(cvar)
  1251. end
  1252. end
  1253. return G.convar_Str(cvar)
  1254. end
  1255.  
  1256. function cvars.Bool(cvar)
  1257. if (AB.set_Get("detour_cvars_bool") == 1) then
  1258. if (G.str_Find(G.str_Lower("sv_cheats"), cvar)) then
  1259. AB.con_Log("detour", "[", color_black, debug.getinfo(2).short_src, color_white, "] Spoofed function cvars.Bool: ", Color(255, 255, 0), cvar, color_white, ".\n")
  1260. AB.con_LogFunc("[Detour] Spoofed function cvars.Bool: " .. cvar .. ".")
  1261. return false
  1262. elseif (G.str_Find(G.str_Lower("sv_allowcslua"), cvar)) then
  1263. AB.con_Log("detour", "[", color_black, debug.getinfo(2).short_src, color_white, "] Spoofed function cvars.Bool: ", Color(255, 255, 0), cvar, color_white, ".\n")
  1264. AB.con_LogFunc("[Detour] Spoofed function cvars.Bool: " .. cvar .. ".")
  1265. return false
  1266. elseif (G.str_Find(G.str_Lower("host_timescale"), cvar)) then
  1267. AB.con_Log("detour", "[", color_black, debug.getinfo(2).short_src, color_white, "] Spoofed function cvars.Bool: ", Color(255, 255, 0), cvar, color_white, ".\n")
  1268. AB.con_LogFunc("[Detour] Spoofed function cvars.Bool: " .. cvar .. ".")
  1269. return true
  1270. elseif G.str_Find(G.str_Lower("mat_fullbright"), cvar) then
  1271. AB.con_Log("detour", "[", color_black, debug.getinfo(2).short_src, color_white, "] Spoofed function cvars.Bool: ", Color(255, 255, 0), cvar, color_white, ".\n")
  1272. AB.con_LogFunc("[Detour] Spoofed function cvars.Bool: " .. cvar .. ".")
  1273. return false
  1274. else
  1275. return G.cvar_Bool(cvar)
  1276. end
  1277. end
  1278. return G.cvar_Bool(cvar)
  1279. end
  1280.  
  1281. function Meta_CVAR.GetBool(cvar)
  1282. if (AB.set_Get("detour_cvars_bool") == 1) then
  1283. if (cvar:GetName() == "sv_cheats") then
  1284. AB.con_Log("detour", "[", color_black, debug.getinfo(2).short_src, color_white, "] Spoofed function ConVar:GetBool: ", Color(255, 255, 0), cvar, color_white, ".\n")
  1285. AB.con_LogFunc("[Detour] Spoofed function ConVar:GetBool.")
  1286. return false
  1287. elseif (cvar:GetName() == "sv_allowcslua") then
  1288. AB.con_Log("detour", "[", color_black, debug.getinfo(2).short_src, color_white, "] Spoofed function ConVar:GetBool: ", Color(255, 255, 0), cvar, color_white, ".\n")
  1289. AB.con_LogFunc("[Detour] Spoofed function ConVar:GetBool.")
  1290. return false
  1291. elseif (cvar:GetName() == "host_timescale") then
  1292. AB.con_Log("detour", "[", color_black, debug.getinfo(2).short_src, color_white, "] Spoofed function ConVar:GetBool: ", Color(255, 255, 0), cvar, color_white, ".\n")
  1293. AB.con_LogFunc("[Detour] Spoofed function ConVar:GetBool.")
  1294. return true
  1295. elseif (cvar:GetName() == "mat_fullbright") then
  1296. AB.con_Log("detour", "[", color_black, debug.getinfo(2).short_src, color_white, "] Spoofed function ConVar:GetBool: ", Color(255, 255, 0), cvar, color_white, ".\n")
  1297. AB.con_LogFunc("[Detour] Spoofed function ConVar:GetBool.")
  1298. return false
  1299. else
  1300. return G.convar_Bool(cvar)
  1301. end
  1302. end
  1303. return G.convar_Bool(cvar)
  1304. end
  1305.  
  1306. function Meta_CVAR.GetInt(cvar)
  1307. if (AB.set_Get("detour_cvars_num") == 1) then
  1308. if (cvar:GetName() == "sv_cheats") then
  1309. AB.con_Log("detour", "[", color_black, debug.getinfo(2).short_src, color_white, "] Spoofed function ConVar:GetInt: ", Color(255, 255, 0), cvar, color_white, ".\n")
  1310. AB.con_LogFunc("[Detour] Spoofed function ConVar:GetInt.")
  1311. return 0
  1312. elseif (cvar:GetName() == "sv_allowcslua") then
  1313. AB.con_Log("detour", "[", color_black, debug.getinfo(2).short_src, color_white, "] Spoofed function ConVar:GetInt: ", Color(255, 255, 0), cvar, color_white, ".\n")
  1314. AB.con_LogFunc("[Detour] Spoofed function ConVar:GetInt.")
  1315. return 0
  1316. elseif (cvar:GetName() == "host_timescale") then
  1317. AB.con_Log("detour", "[", color_black, debug.getinfo(2).short_src, color_white, "] Spoofed function ConVar:GetInt: ", Color(255, 255, 0), cvar, color_white, ".\n")
  1318. AB.con_LogFunc("[Detour] Spoofed function ConVar:GetInt.")
  1319. return 1
  1320. elseif (cvar:GetName() == "mat_fullbright") then
  1321. AB.con_Log("detour", "[", color_black, debug.getinfo(2).short_src, color_white, "] Spoofed function ConVar:GetInt: ", Color(255, 255, 0), cvar, color_white, ".\n")
  1322. AB.con_LogFunc("[Detour] Spoofed function ConVar:GetInt.")
  1323. return 0
  1324. else
  1325. return G.convar_Int(cvar)
  1326. end
  1327. end
  1328. return G.convar_Int(cvar)
  1329. end
  1330.  
  1331. function Meta_CVAR.GetFloat(cvar)
  1332. if (AB.set_Get("detour_cvars_num") == 1) then
  1333. if (cvar:GetName() == "sv_cheats") then
  1334. AB.con_Log("detour", "[", color_black, debug.getinfo(2).short_src, color_white, "] Spoofed function ConVar:GetFloat: ", Color(255, 255, 0), cvar, color_white, ".\n")
  1335. AB.con_LogFunc("[Detour] Spoofed function ConVar:GetFloat.")
  1336. return 0
  1337. elseif (cvar:GetName() == "sv_allowcslua") then
  1338. AB.con_Log("detour", "[", color_black, debug.getinfo(2).short_src, color_white, "] Spoofed function ConVar:GetFloat: ", Color(255, 255, 0), cvar, color_white, ".\n")
  1339. AB.con_LogFunc("[Detour] Spoofed function ConVar:GetFloat.")
  1340. return 0
  1341. elseif (cvar:GetName() == "host_timescale") then
  1342. AB.con_Log("detour", "[", color_black, debug.getinfo(2).short_src, color_white, "] Spoofed function ConVar:GetFloat: ", Color(255, 255, 0), cvar, color_white, ".\n")
  1343. AB.con_LogFunc("[Detour] Spoofed function ConVar:GetFloat.")
  1344. return 1
  1345. elseif (cvar:GetName() == "mat_fullbright") then
  1346. AB.con_Log("detour", "[", color_black, debug.getinfo(2).short_src, color_white, "] Spoofed function ConVar:GetFloat: ", Color(255, 255, 0), cvar, color_white, ".\n")
  1347. AB.con_LogFunc("[Detour] Spoofed function ConVar:GetFloat.")
  1348. return 0
  1349. else
  1350. return G.convar_Float(cvar)
  1351. end
  1352. end
  1353. return G.convar_Float(cvar)
  1354. end
  1355.  
  1356. function Meta_CVAR.GetString(cvar)
  1357. if (AB.set_Get("detour_cvars_str") == 1) then
  1358. if (cvar:GetName() == "sv_cheats") then
  1359. AB.con_Log("detour", "[", color_black, debug.getinfo(2).short_src, color_white, "] Spoofed function ConVar:GetString: ", Color(255, 255, 0), cvar, color_white, ".\n")
  1360. AB.con_LogFunc("[Detour] Spoofed function ConVar:GetString.")
  1361. return "0"
  1362. elseif (cvar:GetName() == "sv_allowcslua") then
  1363. AB.con_Log("detour", "[", color_black, debug.getinfo(2).short_src, color_white, "] Spoofed function ConVar:GetString: ", Color(255, 255, 0), cvar, color_white, ".\n")
  1364. AB.con_LogFunc("[Detour] Spoofed function ConVar:GetString.")
  1365. return "0"
  1366. elseif (cvar:GetName() == "host_timescale") then
  1367. AB.con_Log("detour", "[", color_black, debug.getinfo(2).short_src, color_white, "] Spoofed function ConVar:GetString: ", Color(255, 255, 0), cvar, color_white, ".\n")
  1368. AB.con_LogFunc("[Detour] Spoofed function ConVar:GetString.")
  1369. return "1"
  1370. elseif (cvar:GetName() == "mat_fullbright") then
  1371. AB.con_Log("detour", "[", color_black, debug.getinfo(2).short_src, color_white, "] Spoofed function ConVar:GetString: ", Color(255, 255, 0), cvar, color_white, ".\n")
  1372. AB.con_LogFunc("[Detour] Spoofed function ConVar:GetString.")
  1373. return "0"
  1374. else
  1375. return G.convar_Str(cvar)
  1376. end
  1377. end
  1378. return G.convar_Str(cvar)
  1379. end
  1380.  
  1381. function Meta_CVAR.GetBool(cvar)
  1382. if (AB.set_Get("detour_cvars_bool") == 1) then
  1383. if (cvar:GetName() == "sv_cheats") then
  1384. AB.con_Log("detour", "[", color_black, debug.getinfo(2).short_src, color_white, "] Spoofed function ConVar:GetBool: ", Color(255, 255, 0), cvar, color_white, ".\n")
  1385. AB.con_LogFunc("[Detour] Spoofed function ConVar:GetBool.")
  1386. return false
  1387. elseif (cvar:GetName() == "sv_allowcslua") then
  1388. AB.con_Log("detour", "[", color_black, debug.getinfo(2).short_src, color_white, "] Spoofed function ConVar:GetBool: ", Color(255, 255, 0), cvar, color_white, ".\n")
  1389. AB.con_LogFunc("[Detour] Spoofed function ConVar:GetBool.")
  1390. return false
  1391. elseif (cvar:GetName() == "host_timescale") then
  1392. AB.con_Log("detour", "[", color_black, debug.getinfo(2).short_src, color_white, "] Spoofed function ConVar:GetBool: ", Color(255, 255, 0), cvar, color_white, ".\n")
  1393. AB.con_LogFunc("[Detour] Spoofed function ConVar:GetBool.")
  1394. return true
  1395. elseif (cvar:GetName() == "mat_fullbright") then
  1396. AB.con_Log("detour", "[", color_black, debug.getinfo(2).short_src, color_white, "] Spoofed function ConVar:GetBool: ", Color(255, 255, 0), cvar, color_white, ".\n")
  1397. AB.con_LogFunc("[Detour] Spoofed function ConVar:GetBool.")
  1398. return false
  1399. else
  1400. return G.convar_Bool(cvar)
  1401. end
  1402. end
  1403. return G.convar_Bool(cvar)
  1404. end
  1405.  
  1406. function RunString(str)
  1407. if (AB.set_Get("detour_runstring") == 1) then
  1408. if (!G.tbl_HasVal(AB.QTBL[17], debug.getinfo(2).short_src)) then
  1409. AB.con_Log("detour", "[", color_black, debug.getinfo(2).short_src, color_white, "] ", Color(255, 0, 0), "Blocked", color_white, " function RunString: ", Color(255, 255, 0), str, color_white, ".\n")
  1410. AB.con_LogFunc("[Detour] Blocked function RunString: " .. str .. ".")
  1411. return false
  1412. else
  1413. AB.con_Log("detour", "[", color_black, debug.getinfo(2).short_src, color_white, "] ", Color(0, 205, 0), "Allowed", color_white, " function RunString: ", Color(255, 255, 0), str, color_white, ".\n")
  1414. AB.con_LogFunc("[Detour] Allowed function RunString: " .. str .. ".")
  1415. return G.str_Run(str)
  1416. end
  1417. end
  1418. return G.str_Run(str)
  1419. end
  1420.  
  1421. G.str_RunEx = RunStringEx
  1422. function RunStringEx(str)
  1423. if (AB.set_Get("detour_runstring") == 1) then
  1424. if (!G.tbl_HasVal(AB.QTBL[17], debug.getinfo(2).short_src)) then
  1425. AB.con_Log("detour", "[", color_black, debug.getinfo(2).short_src, color_white, "] ", Color(255, 0, 0), "Blocked", color_white, " function RunStringEx: ", Color(255, 255, 0), str, color_white, ".\n")
  1426. AB.con_LogFunc("[Detour] Blocked function RunStringEx: " .. str .. ".")
  1427. return false
  1428. else
  1429. AB.con_Log("detour", "[", color_black, debug.getinfo(2).short_src, color_white, "] ", Color(0, 205, 0), "Allowed", color_white, " function RunStringEx: ", Color(255, 255, 0), str, color_white, ".\n")
  1430. AB.con_LogFunc("[Detour] Allowed function RunStringEx: " .. str .. ".")
  1431. return G.str_RunEx(str)
  1432. end
  1433. end
  1434. return G.str_RunEx(str)
  1435. end
  1436.  
  1437. function CompileString(str)
  1438. if (AB.set_Get("detour_compstring") == 1) then
  1439. if (!G.tbl_HasVal(AB.QTBL[17], debug.getinfo(2).short_src)) then
  1440. AB.con_Log("detour", "[", color_black, debug.getinfo(2).short_src, color_white, "] ", Color(255, 0, 0), "Blocked", color_white, " function CompileString: ", Color(255, 255, 0), str, color_white, ".\n")
  1441. AB.con_LogFunc("[Detour] Blocked function CompileString: " .. str .. ".")
  1442. return false
  1443. else
  1444. AB.con_Log("detour", "[", color_black, debug.getinfo(2).short_src, color_white, "] ", Color(0, 205, 0), "Allowed", color_white, " function CompileString: ", Color(255, 255, 0), str, color_white, ".\n")
  1445. AB.con_LogFunc("[Detour] Allowed function CompileString: " .. str .. ".")
  1446. return G.str_Comp(str)
  1447. end
  1448. end
  1449. return G.str_Comp(str)
  1450. end
  1451.  
  1452. function hook.Add(type, name, func)
  1453. if (AB.set_Get("detour_hookadd") == 1) then
  1454. if (!G.tbl_HasVal(AB.QTBL[1], name) && !G.tbl_HasVal(AB.QTBL[17], debug.getinfo(2).short_src)) then
  1455. AB.con_Log("detour", "[", color_black, debug.getinfo(2).short_src, color_white, "] ", Color(255, 0, 0), "Blocked", color_white, " function hook.Add: ", Color(255, 255, 0), type, color_white, ": ", Color(255, 255, 0), name, color_white, " to function ", Color(255, 255, 0), func, color_white, ".\n")
  1456. AB.con_LogFunc("[Detour] Blocked function hook.Add: " .. type .. ": " .. name .. ".")
  1457. return false
  1458. else
  1459. AB.con_Log("detour", "[", color_black, debug.getinfo(2).short_src, color_white, "] ", Color(0, 205, 0), "Allowed", color_white, " function hook.Add: ", Color(255, 255, 0), type, color_white, ": ", Color(255, 255, 0), name, color_white, " to function ", Color(255, 255, 0), func, color_white, ".\n")
  1460. AB.con_LogFunc("[Detour] Allowed function hook.Add: " .. type .. ": " .. name .. ".")
  1461. return G.h_Add(type, name, func)
  1462. end
  1463. end
  1464. return G.h_Add(type, name, func)
  1465. end
  1466.  
  1467. function hook.Remove(type, name)
  1468. if (AB.set_Get("detour_hookrem") == 1) then
  1469. if (!G.tbl_HasVal(AB.QTBL[1], name) && !G.tbl_HasVal(AB.QTBL[17], debug.getinfo(2).short_src)) then
  1470. AB.con_Log("detour", "[", color_black, debug.getinfo(2).short_src, color_white, "] ", Color(255, 0, 0), "Blocked", color_white, " function hook.Remove: ", Color(255, 255, 0), type, color_white, ": ", Color(255, 255, 0), name, color_white, ".\n")
  1471. AB.con_LogFunc("[Detour] Blocked function hook.Remove: " .. type .. ": " .. name .. ".")
  1472. return false
  1473. else
  1474. AB.con_Log("detour", "[", color_black, debug.getinfo(2).short_src, color_white, "] ", Color(0, 205, 0), "Allowed", color_white, " function hook.Remove: ", Color(255, 255, 0), type, color_white, ": ", Color(255, 255, 0), name, color_white, ".\n")
  1475. AB.con_LogFunc("[Detour] Allowed function hook.Remove: " .. type .. ": " .. name .. ".")
  1476. return G.h_Rem(type, name)
  1477. end
  1478. end
  1479. return G.h_Rem(type, name)
  1480. end
  1481.  
  1482. function hook.Call(type, gtbl, args)
  1483. if (AB.set_Get("detour_hookcall") == 1) then
  1484. if (!G.tbl_HasVal(AB.QTBL[17], debug.getinfo(2).short_src)) then
  1485. AB.con_Log("detour", "[", color_black, debug.getinfo(2).short_src, color_white, "] ", Color(255, 0, 0), "Blocked", color_white, " function hook.Call: ", Color(255, 255, 0), type, color_white, ", GM:Table ", Color(255, 255, 0), gtbl, color_white, " with arguments ", Color(255, 255, 0), args, color_white, ".\n")
  1486. AB.con_LogFunc("[Detour] Blocked function hook.Call: " .. type .. ", GM:Table " .. gtbl .. " with arguments " .. args .. ".")
  1487. return false
  1488. else
  1489. AB.con_Log("detour", "[", color_black, debug.getinfo(2).short_src, color_white, "] ", Color(0, 205, 0), "Allowed", color_white, " function hook.Call: ", Color(255, 255, 0), type, color_white, ", GM:Table ", Color(255, 255, 0), gtbl, color_white, " with arguments ", Color(255, 255, 0), args, color_white, ".\n")
  1490. AB.con_LogFunc("[Detour] Allowed function hook.Call: " .. type .. ", GM:Table " .. gtbl .. " with arguments " .. args .. ".")
  1491. return G.h_Call(type, gtbl, args)
  1492. end
  1493. end
  1494. return G.h_Call(type, gtbl, args)
  1495. end
  1496.  
  1497. function timer.Create(ind, sec, rep, func)
  1498. if (AB.set_Get("detour_tcreate") == 1) then
  1499. if (!G.tbl_HasVal(AB.QTBL[24], ind)) then
  1500. AB.con_Log("detour", "[", color_black, debug.getinfo(2).short_src, color_white, "] ", Color(255, 0, 0), "Blocked", color_white, " function timer.Create: ", Color(255, 255, 0), ind, color_white, ".\n")
  1501. AB.con_LogFunc("[Detour] Blocked function timer.Create: " .. ind .. ".")
  1502. return false
  1503. else
  1504. AB.con_Log("detour", "[", color_black, debug.getinfo(2).short_src, color_white, "] ", Color(0, 205, 0), "Allowed", color_white, " function timer.Create: ", Color(255, 255, 0), ind, color_white, ".\n")
  1505. AB.con_LogFunc("[Detour] Allowed function timer.Create: " .. ind .. ".")
  1506. return G.t_Create(ind, sec, rep, func)
  1507. end
  1508. end
  1509. return G.t_Create(ind, sec, rep, func)
  1510. end
  1511.  
  1512. function timer.Simple(sec, func)
  1513. if (AB.set_Get("detour_tsimple") == 1) then
  1514. if (!G.tbl_HasVal(AB.QTBL[17], debug.getinfo(2).short_src)) then
  1515. AB.con_Log("detour", "[", color_black, debug.getinfo(2).short_src, color_white, "] ", Color(255, 0, 0), "Blocked", color_white, " function timer.Simple: ", Color(255, 255, 0), func, color_white, ".\n")
  1516. AB.con_LogFunc("[Detour] Blocked function timer.Simple: " .. sec .. "(" .. sec .. ")")
  1517. return false
  1518. else
  1519. AB.con_Log("detour", "[", color_black, debug.getinfo(2).short_src, color_white, "] ", Color(0, 205, 0), "Allowed", color_white, " function timer.Simple: ", Color(255, 255, 0), func, color_white, ".\n")
  1520. AB.con_LogFunc("[Detour] Allowed function timer.Simple: " .. sec .. "(" .. sec .. ")")
  1521. return G.t_Simple(sec, func)
  1522. end
  1523. end
  1524. return G.t_Simple(sec, func)
  1525. end
  1526.  
  1527. function net.Receive(str, func)
  1528. if (AB.set_Get("detour_nreceive") == 1) then
  1529. if (!G.tbl_HasVal(AB.QTBL[17], debug.getinfo(2).short_src)) then
  1530. AB.con_Log("detour", "[", color_black, debug.getinfo(2).short_src, color_white, "] ", Color(255, 0, 0), "Blocked", color_white, " function net.Receive: ", Color(255, 255, 0), str, color_white, ": ", Color(255, 255, 0), func, color_white, ".\n")
  1531. AB.con_LogFunc("[Detour] Blocked function net.Receive: " .. str .. ": " .. func .. ".")
  1532. return false
  1533. else
  1534. AB.con_Log("detour", "[", color_black, debug.getinfo(2).short_src, color_white, "] ", Color(0, 205, 0), "Allowed", color_white, " function net.Receive: ", Color(255, 255, 0), str, color_white, ": ", Color(255, 255, 0), func, color_white, ".\n")
  1535. AB.con_LogFunc("[Detour] Allowed function net.Receive: " .. str .. ": " .. func .. ".")
  1536. return G.n_Receive(str, func)
  1537. end
  1538. end
  1539. return G.n_Receive(str, func)
  1540. end
  1541.  
  1542. function net.Send(ply)
  1543. if (AB.set_Get("detour_nsend") == 1) then
  1544. if (!G.tbl_HasVal(AB.QTBL[17], debug.getinfo(2).short_src)) then
  1545. AB.con_Log("detour", "[", color_black, debug.getinfo(2).short_src, color_white, "] ", Color(255, 0, 0), "Blocked", color_white, " function net.Send: ", Color(255, 255, 0), ply, color_white, ".\n")
  1546. AB.con_LogFunc("[Detour] Blocked function net.Send: " .. ply .. ".")
  1547. return false
  1548. else
  1549. AB.con_Log("detour", "[", color_black, debug.getinfo(2).short_src, color_white, "] ", Color(0, 205, 0), "Allowed", color_white, " function net.Send: ", Color(255, 255, 0), ply, color_white, ".\n")
  1550. AB.con_LogFunc("[Detour] Allowed function net.Send: " .. ply .. ".")
  1551. return G.n_Send(ply)
  1552. end
  1553. end
  1554. return G.n_Send(str)
  1555. end
  1556.  
  1557. function net.Start(str)
  1558. if (AB.set_Get("detour_nstart") == 1) then
  1559. if (!G.tbl_HasVal(AB.QTBL[17], debug.getinfo(2).short_src)) then
  1560. AB.con_Log("detour", "[", color_black, debug.getinfo(2).short_src, color_white, "] ", Color(255, 0, 0), "Blocked", color_white, " function net.Start: ", Color(255, 255, 0), str, color_white, ".\n")
  1561. AB.con_LogFunc("[Detour] Blocked function net.Start: " .. str .. ".")
  1562. return false
  1563. else
  1564. AB.con_Log("detour", "[", color_black, debug.getinfo(2).short_src, color_white, "] ", Color(0, 205, 0), "Allowed", color_white, " function net.Start: ", Color(255, 255, 0), str, color_white, ".\n")
  1565. AB.con_LogFunc("[Detour] Allowed function net.Start: " .. str .. ".")
  1566. return G.n_Start(str)
  1567. end
  1568. end
  1569. return G.n_Start(str)
  1570. end
  1571.  
  1572. function net.SendToServer()
  1573. if (AB.set_Get("detour_nstserver") == 1) then
  1574. if (!G.tbl_HasVal(AB.QTBL[17], debug.getinfo(2).short_src)) then
  1575. AB.con_Log("detour", "[", color_black, debug.getinfo(2).short_src, color_white, "] ", Color(255, 0, 0), "Blocked", color_white, " function net.SendToServer.\n")
  1576. AB.con_LogFunc("[Detour] Blocked function net.SendToServer.")
  1577. return false
  1578. else
  1579. AB.con_Log("detour", "[", color_black, debug.getinfo(2).short_src, color_white, "] ", Color(0, 205, 0), "Allowed", color_white, " function net.SendToServer.\n")
  1580. AB.con_LogFunc("[Detour] Allowed function net.SendToServer.")
  1581. return G.n_STServer()
  1582. end
  1583. end
  1584. return G.n_STServer()
  1585. end
  1586.  
  1587. function render.Capture()
  1588. AB.con_Log("detour", "[", color_black, debug.getinfo(2).short_src, color_white, "] ", Color(255, 0, 0), "Blocked", color_white, " function render.Capture.\n")
  1589. AB.con_LogFunc("[Detour] Blocked function render.Capture.")
  1590. return false
  1591. end
  1592.  
  1593. function render.CapturePixels()
  1594. AB.con_Log("detour", "[", color_black, debug.getinfo(2).short_src, color_white, "] ", Color(255, 0, 0), "Blocked", color_white, " function render.CapturePixels.\n")
  1595. AB.con_LogFunc("[Detour] Blocked function render.CapturePixels.")
  1596. return false
  1597. end
  1598.  
  1599. function usermessage.IncomingMessage(str, msg, ...)
  1600. if (AB.set_Get("detour_umsg") == 1) then
  1601. AB.con_Log("detour", Color(255, 0, 0), "Blocked", color_white, " function usermessage.IncomingMessage: ", Color(255, 255, 0), str, color_white, ".\n")
  1602. AB.con_LogFunc("[Detour] Blocked function usermessage.IncomingMessage: " .. str .. ".")
  1603. return false
  1604. end
  1605. return G.umsg_IncomingMSG(str, msg, ...)
  1606. end
  1607.  
  1608. function net.Incoming(num, ent)
  1609. if (AB.set_Get("detour_nincoming") == 1) then
  1610. AB.con_Log("detour", Color(255, 0, 0), "Blocked", color_white, " function net.Incoming: ", Color(255, 255, 0), num, color_white, ".\n")
  1611. AB.con_LogFunc("[Detour] Blocked function net.Incoming: " .. num .. ".")
  1612. return false
  1613. end
  1614. return G.net_Incoming(num, ent)
  1615. end
  1616.  
  1617. function Meta_ENT.FireBullets(p, data)
  1618. if (AB.set_Get("aim_nospread") == 1) then
  1619. local inv_VEC = Vector() * -1
  1620. if (data.Spread) then
  1621. d_Spread = data.Spread * -1
  1622. local w_Class = GetClass(ActiveWeapon(p))
  1623. if (d_Spread ~= AB.QTBL[25][w_Class] && d_Spread ~= inv_VEC) then
  1624. AB.QTBL[25][w_Class] = d_Spread
  1625. end
  1626. else
  1627. d_Spread = data.Spread || 0.0
  1628. end
  1629. return G.f_Bullets(p, data)
  1630. end
  1631. return G.f_Bullets(p, data)
  1632. end
  1633.  
  1634. function collectgarbage(act, arg)
  1635. AB.con_Log("detour", Color(255, 0, 0), "Blocked", color_white, " function collectgarbage: ", Color(255, 255, 0), act, color_white, ": ", Color(255, 255, 0), arg, color_white, ".\n")
  1636. AB.con_LogFunc("[Detour] Blocked function collectgarbage: " .. act .. ".")
  1637. return false
  1638. end
  1639.  
  1640. /*==================
  1641. Detour Functions End|
  1642. ====================*/
  1643.  
  1644. --------------------
  1645.  
  1646. /*==================
  1647. Base Functions Start|
  1648. ====================*/
  1649.  
  1650. function AB.con_Log(type, ...)
  1651. if (AB.set_Get("misc_logging") == 1 && type == "log") then
  1652. if (AB.set_Get("misc_logging_snd") == 1) then
  1653. G.sur_PlaySnd("buttons/button16.wav")
  1654. end
  1655. G.msg_Col(color_white, "[", Color(255, 255, 0,255), os.date("%I:%M:%S %p", os.time()), color_white,"] [", AB.MCol, "Ampris", color_white, "] ", ...)
  1656. elseif (type == "detour") then
  1657. if (AB.set_Get("misc_logging_snd") == 1) then
  1658. G.sur_PlaySnd("buttons/button16.wav")
  1659. end
  1660. G.msg_Col(color_white, "[", Color(255, 255, 0,255), os.date("%I:%M:%S %p", os.time()), color_white, "] [", Color(255, 0, 0), "Detour", color_white, "] ", ...)
  1661. end
  1662. end
  1663.  
  1664. function AB.con_LogFunc(Msg)
  1665. local Date = os.date("[%I:%M:%S %p]")
  1666. local Time = os.date("[%I:%M:%S %p]", os.time())
  1667. AB.f_CheckDir()
  1668. G.tbl_Insert(AB.QTBL[2], Msg)
  1669. G.tbl_Insert(AB.QTBL[3], Time)
  1670. if (G.tbl_Count(AB.QTBL[2]) > 250) then
  1671. G.tbl_Rem(AB.QTBL[2], 1)
  1672. elseif (G.tbl_Count(AB.QTBL[3]) > 250) then
  1673. G.tbl_Rem(AB.QTBL[3], 1)
  1674. end
  1675. end
  1676.  
  1677. function AB.ch_AddText(Sound, ...)
  1678. if (AB.set_Get("misc_chat_msgs") == 1) then
  1679. G.sur_PlaySnd(Sound)
  1680. local Col = AB.MCol or Color(75, 75, 75, 255)
  1681. G.ch_AddText(color_white, "[", Col, "Ampris", color_white, "] ", ...)
  1682. end
  1683. end
  1684.  
  1685. function AB.f_CheckDir()
  1686. if (!G.f_Exists("Ampris", "DATA")) then
  1687. G.f_CreateDir("Ampris")
  1688. AB.con_Log("log", "Data file ", Color(255, 0, 0, 255), "ampris/", color_white, " created.\n")
  1689. AB.con_LogFunc("Data file 'ampris/' created.")
  1690. end
  1691. end
  1692.  
  1693. function AB.set_Update(Settings, Type)
  1694. local ut_File = Type == 1 and ("ampris/settings.txt")
  1695. local ut_JSONSettings = G.ut_TblToJSON(Settings)
  1696. G.f_Write(ut_File, ut_JSONSettings)
  1697. end
  1698.  
  1699. function AB.set_Get(Setting)
  1700. return (AB.Defaults[Setting][2])
  1701. end
  1702.  
  1703. function AB.set_Change(Setting, Val)
  1704. AB.Defaults[Setting][2] = Val
  1705. AB.set_Update(AB.Defaults, 1)
  1706. if (!G.tbl_HasVal(AB.QTBL[18], Setting)) then
  1707. AB.con_Log("log", "Setting ", Color(255, 93, 0), Setting, color_white, " changed to ", Color(255, 255, 0), AB.Defaults[Setting][2], color_white, ".\n")
  1708. AB.con_LogFunc("Setting " .. Setting .. " changed to " .. AB.Defaults[Setting][2] .. ".")
  1709. end
  1710. end
  1711.  
  1712. function AB.Library.set_Load()
  1713. AB.f_CheckDir()
  1714. local ut_File = ("ampris/settings.txt")
  1715. local ut_FileJSON = {}
  1716. local ut_FileSettings = {}
  1717. if (G.f_Exists(ut_File, "DATA") and G.f_Read(ut_File, "DATA") ~= "") then
  1718. ut_FileJSON = G.f_Read(ut_File)
  1719. ut_FileSettings = G.ut_JSONToTbl(ut_FileJSON)
  1720. G.f_Write("ampris/settings.txt", G.f_Read(ut_File))
  1721. for k, v in G.loop, AB.Defaults do
  1722. if not (ut_FileSettings[k]) then
  1723. ut_FileSettings[k] = v
  1724. end
  1725. end
  1726. for k, v in G.loop, AB.Defaults do
  1727. v[2] = ut_FileSettings[k][2]
  1728. end
  1729. else
  1730. AB.set_Update(AB.Defaults, 1)
  1731. end
  1732. end
  1733.  
  1734. AB.MColCvar = AB.set_Get("misc_theme_color")
  1735. AB.MCol = Color(unpack(G.str_Explode(",", AB.set_Get("misc_theme_color"))))
  1736.  
  1737. function AB.str_Ran(Len)
  1738. Str = ""
  1739. for i = 1, Len do
  1740. Str = Str .. AB.QTBL[19][G.ma_Random(1, #AB.QTBL[19])]
  1741. end
  1742. return Str
  1743. end
  1744.  
  1745. function AB.t_Create(Sec, Rep, Func)
  1746. local Ind = AB.str_Ran(G.ma_Rand(8, 16))
  1747. G.tbl_Insert(AB.QTBL[24], Ind)
  1748. G.t_Create(Ind, Sec, Rep, Func)
  1749. AB.Timers[Ind] = {
  1750. ["index"] = Ind,
  1751. ["type"] = Sec,
  1752. ["delay"] = Rep,
  1753. ["function"] = Func
  1754. }
  1755. AB.con_Log("log", "Timer ", Color(255, 93, 0), Ind, color_white, " created.\n")
  1756. AB.con_LogFunc("Timer " .. Ind .. " created.")
  1757. end
  1758.  
  1759. function AB.ma_Format(Num)
  1760. Num = tostring(Num)
  1761. Sep = Sep or ","
  1762. Deci = G.str_Find(Num, "%.") or #Num + 1
  1763. for i = Deci - 4, 1, -3 do
  1764. Num = Num:sub(1, i) .. Sep .. Num:sub(i + 1)
  1765. end
  1766. return Num
  1767. end
  1768.  
  1769. G.f_Req("nspred")
  1770. G.f_Req("svm")
  1771.  
  1772. function AB.mod_CVar_Force(cvar, value)
  1773. G.GetCVar(cvar):SetValue(value)
  1774. AB.ch_AddText("common/null.wav", "Forced ConVar ", Color(255, 93, 0), cvar, color_white, " to ", Color(116, 187, 251), value, color_white, ".")
  1775. end
  1776.  
  1777. /*================
  1778. Base Functions End|
  1779. ==================*/
  1780.  
  1781. --------------------
  1782.  
  1783. /*==================
  1784. Hook Functions Start|
  1785. ====================*/
  1786.  
  1787. function AB.h_Add(Type, Func)
  1788. local Str = AB.str_Ran(G.ma_Rand(8, 16))
  1789. G.tbl_Insert(AB.QTBL[1], Str)
  1790. G.h_Add(Type, Str, Func)
  1791. AB.Hooks[Str] = {
  1792. ["type"] = Type,
  1793. ["name"] = Str,
  1794. ["function"] = Func
  1795. }
  1796. AB.con_Log("log", color_white, "Hook ", Color(255, 0, 0, 255), Type, color_white, ": ", Color(255, 93, 0), Str, color_white, " created.\n")
  1797. AB.con_LogFunc("Hook " .. Type .. ": " .. Str .. " created.")
  1798. end
  1799.  
  1800. function AB.CreateMove(ucmd)
  1801. for _, func in G.loop, AB.h_Adds.CreateMove do
  1802. func(ucmd)
  1803. end
  1804. end
  1805.  
  1806. function AB.DrawOverlay()
  1807. for _, func in G.loop, AB.h_Adds.DrawOverlay do
  1808. func()
  1809. end
  1810. end
  1811.  
  1812. function AB.entity_killed(data)
  1813. for _, func in G.loop, AB.h_Adds.entity_killed do
  1814. func(data)
  1815. end
  1816. end
  1817.  
  1818. function AB.HUDPaint()
  1819. for _, func in G.loop, AB.h_Adds.HUDPaint do
  1820. func()
  1821. end
  1822. end
  1823.  
  1824. function AB.Move()
  1825. for _, func in G.loop, AB.h_Adds.Move do
  1826. func()
  1827. end
  1828. end
  1829.  
  1830. function AB.PostDrawEffects()
  1831. for _, func in G.loop, AB.h_Adds.PostDrawEffects do
  1832. func()
  1833. end
  1834. end
  1835.  
  1836. function AB.player_connect(data)
  1837. for _, func in G.loop, AB.h_Adds.player_connect do
  1838. func(data)
  1839. end
  1840. end
  1841.  
  1842. function AB.player_disconnect(data)
  1843. for _, func in G.loop, AB.h_Adds.player_disconnect do
  1844. func(data)
  1845. end
  1846. end
  1847.  
  1848. function AB.player_hurt(data)
  1849. for _, func in G.loop, AB.h_Adds.player_hurt do
  1850. func(data)
  1851. end
  1852. end
  1853.  
  1854. function AB.RenderScreenspaceEffects()
  1855. for _, func in G.loop, AB.h_Adds.RenderScreenspaceEffects do
  1856. func()
  1857. end
  1858. end
  1859.  
  1860. function AB.Think()
  1861. for _, func in G.loop, AB.h_Adds.Think do
  1862. func()
  1863. end
  1864. end
  1865.  
  1866. function AB.Library.h_GetFuncs()
  1867. AB.h_Add("CreateMove", AB.CreateMove)
  1868. AB.h_Add("DrawOverlay", AB.DrawOverlay)
  1869. AB.h_Add("entity_killed", AB.entity_killed)
  1870. AB.h_Add("HUDPaint", AB.HUDPaint)
  1871. AB.h_Add("Move", AB.Move)
  1872. AB.h_Add("player_connect", AB.player_connect)
  1873. AB.h_Add("player_disconnect", AB.player_disconnect)
  1874. AB.h_Add("player_hurt", AB.player_hurt)
  1875. AB.h_Add("PostDrawEffects", AB.PostDrawEffects)
  1876. AB.h_Add("RenderScreenspaceEffects", AB.RenderScreenspaceEffects)
  1877. AB.h_Add("Think", AB.Think)
  1878. end
  1879.  
  1880. /*================
  1881. Hook Functions End|
  1882. ==================*/
  1883.  
  1884. ----------------------------
  1885.  
  1886. /*==========================
  1887. Player Check Functions Start|
  1888. ============================*/
  1889.  
  1890. function AB.check_Player(ply)
  1891. if (ply ~= G.lcl_Ply && Alive(ply) && Team(ply) ~= TEAM_SPECTATOR) then
  1892. return true
  1893. end
  1894. return false
  1895. end
  1896.  
  1897. function AB.check_Super(ply)
  1898. if (SuperAdmin(ply)) then
  1899. return true
  1900. end
  1901. return false
  1902. end
  1903.  
  1904. function AB.check_Admin(ply)
  1905. if (Admin(ply) && !SuperAdmin(ply)) then
  1906. return true
  1907. end
  1908. return false
  1909. end
  1910.  
  1911. function AB.check_Mod(ply)
  1912. if (UserGroup(ply, "moderator")
  1913. || UserGroup(ply, "mod")
  1914. || UserGroup(ply, "donormod")
  1915. || UserGroup(ply, "donormoderator")
  1916. || UserGroup(ply, "donatormod")
  1917. || UserGroup(ply, "trialadmin")
  1918. || UserGroup(ply, "trial-admin")
  1919. || UserGroup(ply, "trialmod")
  1920. || UserGroup(ply, "trial-mod")
  1921. || UserGroup(ply, "operator")
  1922. || UserGroup(ply, "donoradmin")) then
  1923. return true
  1924. end
  1925. return false
  1926. end
  1927.  
  1928. function AB.check_User(ply)
  1929. if (UserGroup(ply, "user")
  1930. || UserGroup(ply, "guest")) then
  1931. return true
  1932. end
  1933. return false
  1934. end
  1935.  
  1936. function AB.check_Other(ply)
  1937. if (UserGroup(ply, "donator")
  1938. || UserGroup(ply, "donor")
  1939. || UserGroup(ply, "vip")
  1940. || UserGroup(ply, "vip+")
  1941. || UserGroup(ply, "donor+")
  1942. || UserGroup(ply, "donator+")
  1943. || UserGroup(ply, "member")
  1944. || UserGroup(ply, "respected")
  1945. || UserGroup(ply, "premiumvip")
  1946. || UserGroup(ply, "standardvip")
  1947. || UserGroup(ply, "trusted")) then
  1948. return true
  1949. else
  1950. return false
  1951. end
  1952. end
  1953.  
  1954. /*========================
  1955. Player Check Functions End|
  1956. ==========================*/
  1957.  
  1958. --------------------------
  1959.  
  1960. /*=================
  1961. ESP Functions Start|
  1962. ===================*/
  1963.  
  1964. // Credit to whoever made Naisho
  1965. function AB.GCoords(ply)
  1966. local min, max = OBBMins(ply), OBBMaxs(ply)
  1967. AB.QTBL[30] = {
  1968. Vector(min.x, min.y, min.z),
  1969. Vector(min.x, min.y, max.z),
  1970. Vector(min.x, max.y, min.z),
  1971. Vector(min.x, max.y, max.z),
  1972. Vector(max.x, min.y, min.z),
  1973. Vector(max.x, min.y, max.z),
  1974. Vector(max.x, max.y, min.z),
  1975. Vector(max.x, max.y, max.z)
  1976. }
  1977. local minx, miny, maxx, maxy = ScrW() * 2, ScrH() * 2, 0, 0
  1978. for _, corner in pairs(AB.QTBL[30]) do
  1979. local screen = ToScreen(ToWorld(ply, corner))
  1980. minx, miny = G.ma_Min(minx, screen.x), G.ma_Min(miny, screen.y)
  1981. maxx, maxy = G.ma_Max(maxx, screen.x), G.ma_Max(maxy, screen.y)
  1982. end
  1983. return minx, miny, maxx, maxy
  1984. end
  1985.  
  1986. /*===============
  1987. ESP Functions End|
  1988. =================*/
  1989.  
  1990. ----------------------
  1991.  
  1992. /*====================
  1993. Aimbot Functions Start|
  1994. ======================*/
  1995.  
  1996. // Credit to Styles
  1997. function AB.Transform(pos, matrix)
  1998. local matA, matB, matC = matrix[1], matrix[2], matrix[3]
  1999. local x = Vector(matA[1], matA[2], matA[3])
  2000. local y = Vector(matB[1], matB[2], matB[3])
  2001. local z = Vector(matC[1], matC[2], matC[3])
  2002. return Vector(Dot(pos, x) + matA[4], Dot(pos, y) + matB[4], Dot(pos, z) + matC[4])
  2003. end
  2004.  
  2005. function AB.aim_FindBone(ply)
  2006. if (AB.set_Get("aim_bone") == 1) then
  2007. local BUBone = AB.QTBL[13][GetModel(ply)]
  2008. if not (BUBone) then
  2009. BoneType = AB.set_Get("aim_targetspot")
  2010. end
  2011. local lBone = LookupBone(ply, BoneType)
  2012. if (lBone) then
  2013. local pos, ang = BonePosition(ply, lBone)
  2014. return pos, ang
  2015. end
  2016. return ToWorld(ply, OBBCenter(ply))
  2017. end
  2018. end
  2019.  
  2020. // Credit to Styles
  2021. function AB.GetPosition(ply)
  2022. if (AB.set_Get("aim_hitbox") == 1) then
  2023. local Index = G.str_Find(GetModel(ply), "combine") and 1 or 0
  2024. local Bone = GetHitBoxBone(ply, Index,0)
  2025. if not BonePosition(ply, Bone) then
  2026. return
  2027. end
  2028. local _Matrix = GetBoneMatrix(ply, Bone)
  2029. if not _Matrix then
  2030. return
  2031. end
  2032. _Matrix = ToTable(_Matrix)
  2033. local min, max = GetHitBoxBounds(ply, Index, 0)
  2034. return (AB.Transform(min, _Matrix) + AB.Transform(max, _Matrix)) * .5
  2035. end
  2036. end
  2037.  
  2038. function AB.aim_Exceptions(ply)
  2039. if (AB.check_Player(ply)) then
  2040. if (Vehicle(ply)) then
  2041. return false
  2042. end
  2043. --if (IsDormant(ply)) then
  2044. --return false
  2045. --end
  2046. if (AB.set_Get("aim_players") == 1 && IsPlayer(ply)) then
  2047. return false
  2048. end
  2049. if (AB.set_Get("aim_team") == 1 && Team(ply) == Team(G.lcl_Ply)) then
  2050. return false
  2051. end
  2052. if (AB.set_Get("aim_friends") == 1 && G.tbl_HasVal(AB.QTBL[5], Name(ply))) then
  2053. return false
  2054. end
  2055. local ply_Col = GetColor(ply, r, g, b, a)
  2056. if (AB.set_Get("aim_spawnpro") == 1 && ply_Col.a < 255) then
  2057. return false
  2058. end
  2059. end
  2060. return true
  2061. end
  2062.  
  2063. function AB.aim_IsVisible(ply)
  2064. if (AB.set_Get("aim_los") == 0) then
  2065. return true
  2066. end
  2067. if (AB.set_Get("aim_bscan") == 1) then
  2068. for bone = 0, GetBoneCount(ply) do
  2069. local bPos = BonePosition(ply, bone)
  2070. trace = {
  2071. start = ShootPos(G.lcl_Ply),
  2072. endpos = bPos,
  2073. filter = G.lcl_Ply,
  2074. mask = MASK_SHOT
  2075. }
  2076. TRes = G.ut_TraceL(trace)
  2077. if (TRes.Entity == ply) then
  2078. return true
  2079. end
  2080. end
  2081. else
  2082. if (AB.set_Get("aim_bone") == 1) then
  2083. pos = AB.aim_FindBone(ply)
  2084. elseif (AB.set_Get("aim_hitbox") == 1) then
  2085. pos = AB.GetPosition(ply)
  2086. end
  2087. trace = {
  2088. start = ShootPos(G.lcl_Ply),
  2089. endpos = pos,
  2090. filter = G.lcl_Ply,
  2091. mask = MASK_SHOT
  2092. }
  2093. TRes = G.ut_TraceL(trace)
  2094. if (TRes.Entity == ply) then
  2095. return true
  2096. end
  2097. end
  2098. return false
  2099. end
  2100.  
  2101. local FakeAng = nil
  2102. function AB.aim_GetAng()
  2103. local EyeAng = Eye_Angles(G.lcl_Ply)
  2104. if FakeAng ~= nil then
  2105. return FakeAng
  2106. end
  2107. return Angle(EyeAng.p, EyeAng.y, EyeAng.r)
  2108. end
  2109.  
  2110. // Credit to whoever made 'dickwrap'
  2111. function AB.PredictSpread(ucmd, ang)
  2112. local Wep = ActiveWeapon(G.lcl_Ply)
  2113. if (!Wep || !Valid(Wep) || !AB.QTBL[25][GetClass(Wep)]) then
  2114. return ang
  2115. end
  2116. local ang = v_Angle(dickwrap.Predict(ucmd, Forward(ang), AB.QTBL[25][GetClass(Wep)]))
  2117. ang.p, ang.y, ang.x = G.ma_Normalize(ang.p), G.ma_Normalize(ang.y), G.ma_Normalize(ang.x)
  2118. return ang
  2119. end
  2120.  
  2121. // Credit to Kelse/Daz
  2122. function AB.VeloPredict(ply, vec)
  2123. ply_Pos = ShootPos(G.lcl_Ply) + GetVelocity(G.lcl_Ply) * G.eng_TickInt()
  2124. local ply_Frames = RealFrameTime() / 66 || 0
  2125. local tgt_Frames = RealFrameTime() / 25 || 0
  2126. local ply_Velo = GetVelocity(G.lcl_Ply) || Vector(0, 0, 0)
  2127. local tgt_Velo = GetVelocity(ply) || Vector(0, 0, 0)
  2128. return vec + (tgt_Velo * (tgt_Frames) - (ply_Velo * (ply_Frames))) || Vector(0, 0, 0)
  2129. end
  2130.  
  2131. function AB.aim_FoV(ply)
  2132. local FoV = AB.set_Get("aim_fov")
  2133. if (FoV ~= 360 && AB.set_Get("aim_aa") == 0) then
  2134. local Ang = (v_Angle(GetPos(ply) - Eye_Pos(G.lcl_Ply)))
  2135. local myAng = GetAngles(G.lcl_Ply)
  2136. local Yaw, Pitch = G.ma_abs(G.ma_Normalize(myAng.y - Ang.y)), G.ma_abs(G.ma_Normalize(myAng.p - Ang.p))
  2137. if (Yaw > FoV || Pitch > FoV) then
  2138. return false
  2139. end
  2140. elseif (AB.set_Get("aim_aa") == 1) then
  2141. return true
  2142. end
  2143. return true
  2144. end
  2145.  
  2146. function AB.aim_GetTgt()
  2147. local Target
  2148. if Target == nil then
  2149. Target = G.lcl_Ply
  2150. else
  2151. Target = Target
  2152. end
  2153. local AngA, AngB = 0
  2154. local x, y = ScrW(), ScrH()
  2155. for _, v in G.loop, G.p_GetAll() do
  2156. local Distance = Distance(GetPos(v), GetPos(G.lcl_Ply))
  2157. if (AB.aim_Exceptions(v) && AB.aim_IsVisible(v) && AB.aim_FoV(v) && Distance <= AB.set_Get("aim_distance") && GetPos(v) ~= Vector(0, 0, 0)) then
  2158. local EyePos, EyePosTS, EyeAng = ToScreen(Eye_Pos(v)), ToScreen(Eye_Pos(Target)), GetAngles(G.lcl_Ply)
  2159. local AimDist = DistToSqr(GetPos(v), GetPos(G.lcl_Ply))
  2160. AngA = G.ma_Dist(x / 10, y / 10, EyePosTS.x, EyePosTS.y)
  2161. AngB = G.ma_Dist(x / 10, y / 10, EyePos.x, EyePos.y)
  2162. if (AngB <= AngA) then
  2163. Target = v
  2164. elseif Target == G.lcl_Ply then
  2165. Target = v
  2166. end
  2167. end
  2168. end
  2169.  
  2170. if (AB.set_Get("aim_npcs") == 0) then
  2171. for _, v in G.loop, G.e_GetAll() do
  2172. local Distance = Distance(GetPos(v), GetPos(G.lcl_Ply))
  2173. if (v:IsNPC() && AB.aim_IsVisible(v) && AB.aim_FoV(v) && Distance <= AB.set_Get("aim_distance") && GetPos(v) ~= Vector(0, 0, 0)) then
  2174. local EyePos, EyePosTS, EyeAng = ToScreen(Eye_Pos(v)), ToScreen(Eye_Pos(Target)), GetAngles(G.lcl_Ply)
  2175. local AimDist = DistToSqr(GetPos(v), GetPos(G.lcl_Ply))
  2176. AngA = G.ma_Dist(x / 10, y / 10, EyePosTS.x, EyePosTS.y)
  2177. AngB = G.ma_Dist(x / 10, y / 10, EyePos.x, EyePos.y)
  2178. if (AngB <= AngA) then
  2179. Target = v
  2180. elseif Target == G.lcl_Ply then
  2181. Target = v
  2182. end
  2183. end
  2184. end
  2185. end
  2186. return Target
  2187. end
  2188.  
  2189. function AB.WepVector(num)
  2190. num = -num
  2191. return Vector(num, num, num)
  2192. end
  2193.  
  2194. function AB.GetCone()
  2195. local Wep = ActiveWeapon(G.lcl_Ply)
  2196. if (!Valid(Wep)) then return Vector(0, 0, 0) end
  2197. if (!Wep.Primary) then return Vector(0, 0, 0) end
  2198. if (!Wep.Primary.Cone) then return Vector(0, 0, 0) end
  2199. if (type(Wep.Primary.Cone) ~= "Vector") then
  2200. return AB.WepVector(Wep.Primary.Cone)
  2201. end
  2202. return Wep.Primary.Cone * -1
  2203. end
  2204.  
  2205. function AB.AngleBetween(a, b)
  2206. local dot = Dot(a,b)
  2207. if dot > 1.0 then
  2208. return 0
  2209. end
  2210. return math.deg(math.acos(dot))
  2211. end
  2212.  
  2213. // Credits to C0bra
  2214. function AB.PlyBlocked(ply, offset)
  2215. local AimVector = Forward(Eye_Angles(G.lcl_Ply))
  2216. local ShootPos = ShootPos(G.lcl_Ply)
  2217. local TargetPos = GetPos(ply)
  2218. if (offset) then
  2219. TargetPos = TargetPos + offset
  2220. end
  2221. local trace = {
  2222. start = ShootPos,
  2223. endpos = TargetPos,
  2224. filter = {G.lcl_Ply, ply},
  2225. mask = MASK_SHOT
  2226. }
  2227. local TRes = G.ut_TraceL(trace)
  2228. local AimVec = AimVector or AimVector(G.lcl_Ply)
  2229. local WrongAim = AB.AngleBetween(AimVec, Normal(TargetPos - ShootPos)) > 2
  2230. if (TRes.Hit and TRes.Entity ~= ply) then
  2231. return true, WrongAim
  2232. end
  2233. return false, WrongAim
  2234. end
  2235.  
  2236. function AB.GetDangerLevel()
  2237. local perc = 0
  2238. local lBone = LookupBone(G.lcl_Ply, "ValveBiped.Bip01_Head1")
  2239. local lp_sPos = BonePosition(G.lcl_Ply, lBone)
  2240. for _, v in G.loop, G.p_GetAll() do
  2241. if (v == G.lcl_Ply or not Valid(v)) then
  2242. continue
  2243. end
  2244. local notVisible, _ = AB.PlyBlocked(v)
  2245. local sPos = ShootPos(v)
  2246. local level = AB.AngleBetween(AimVector(v), Normal(sPos - lp_sPos)) / 180
  2247.  
  2248. if (notVisible) then
  2249. level = level * 0.33
  2250. end
  2251. perc = math.max(perc, level)
  2252. end
  2253. return perc
  2254. end
  2255.  
  2256. /*==================
  2257. Aimbot Functions End|
  2258. ====================*/
  2259.  
  2260. --------------------
  2261.  
  2262. /*==================
  2263. Misc Functions Start|
  2264. ====================*/
  2265.  
  2266. function AB.ServerStats()
  2267. AB.con_LogFunc("Current GameMode: " .. GAMEMODE.Name .. ".")
  2268. AB.con_LogFunc("Total players: " .. tostring(#G.p_GetAll()) .. "/" .. tostring(game.MaxPlayers()) .. ".")
  2269. AB.ch_AddText("common/null.wav", "Current GameMode: ", Color(116, 187, 251), GAMEMODE.Name, color_white, ".")
  2270. AB.ch_AddText("common/null.wav", "Total players: ", Color(116, 187, 251), tostring(#G.p_GetAll()), color_white, "/", Color(116, 187, 251), tostring(game.MaxPlayers()), color_white, ".")
  2271. end
  2272.  
  2273. function AB.GMRP()
  2274. if G.str_Find(G.str_Lower(GAMEMODE.Name), "dark") then return true end
  2275. return false
  2276. end
  2277.  
  2278. /*================
  2279. Misc Functions End|
  2280. ==================*/
  2281.  
  2282. ------------------
  2283.  
  2284. /*===============
  2285. Hook Adding Start|
  2286. =================*/
  2287.  
  2288. function AB.h_Adds.DrawOverlay.ESP()
  2289. if (AB.set_Get("esp") == 1) then
  2290. for _, ply in G.loop, G.p_GetAll() do
  2291. local Distance = Distance(GetPos(ply), GetPos(G.lcl_Ply))
  2292. local hp = Health(ply)
  2293. local hCol = Color(255 - 2.2 * hp, 2.2 * hp, 0, 255)
  2294. local Wep = "None/Unknown"
  2295. if (ActiveWeapon(ply) ~= nil) then
  2296. if (type(ActiveWeapon(ply)) == "Weapon") then
  2297. if (ActiveWeapon(ply) && Valid(ActiveWeapon(ply))) then
  2298. Wep = GetPrintName(ActiveWeapon(ply))
  2299. end
  2300. end
  2301. end
  2302. local UGroup = G.str_Lower(NetworkedString(ply, "UserGroup"))
  2303. local ePos = ToScreen(Eye_Pos(ply))
  2304. if (AB.check_Player(ply) && Distance <= AB.set_Get("esp_distance")) then
  2305. if (G.tbl_HasVal(AB.QTBL[5], Name(ply))) then
  2306. G.dr_DrTxt("[FRIEND]", "BudgetLabel", ePos.x, ePos.y - 61, Color(0, 201, 0), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER)
  2307. end
  2308. if (AB.set_Get("esp_info_rank") == 1) then
  2309. G.dr_DrTxt("["..UGroup.."]", "BudgetLabel", ePos.x, ePos.y - 50, Color(116, 187, 251), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER)
  2310. end
  2311. if (AB.set_Get("esp_info_name") == 1) then
  2312. G.dr_DrTxt(Name(ply), "BudgetLabel", ePos.x, ePos.y - 39, G.t_GetCol(Team(ply)), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER)
  2313. end
  2314. if (AB.set_Get("esp_info_health") == 1) then
  2315. G.dr_DrTxt(Health(ply), "BudgetLabel", ePos.x, ePos.y - 29, hCol, TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER)
  2316. end
  2317. if (AB.set_Get("esp_info_weapon") == 1) then
  2318. G.dr_DrTxt(Wep, "BudgetLabel", ePos.x, ePos.y - 19, Color(116, 187, 251), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER)
  2319. end
  2320. if (AB.set_Get("esp_info_distance") == 1 and AB.set_Get("esp_info_weapon") == 0) then
  2321. G.dr_DrTxt(AB.ma_Format(G.ma_Floor(Distance)), "BudgetLabel", ePos.x, ePos.y - 19, Color(116, 187, 251), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER)
  2322. elseif (AB.set_Get("esp_info_distance") == 1 and AB.set_Get("esp_info_weapon") == 1) then
  2323. G.dr_DrTxt(AB.ma_Format(G.ma_Floor(Distance)), "BudgetLabel", ePos.x, ePos.y - 9, Color(116, 187, 251), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER)
  2324. end
  2325. end
  2326. end
  2327. end
  2328.  
  2329. if (AB.set_Get("esp_ents") == 1) then
  2330. for _, ent in G.loop, G.e_GetAll() do
  2331. if (Valid(ent) && G.tbl_HasVal(AB.QTBL[6], GetClass(ent))) then
  2332. local x1, y1, x2, y2 = AB.GCoords(ent)
  2333. G.dr_DrTxt(GetClass(ent), "BudgetLabel", x1 + 38, y1 - 17, color_white, TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER)
  2334. end
  2335. end
  2336. end
  2337.  
  2338. if (AB.set_Get("esp_skeleton") == 1) then
  2339. for _, ply in G.loop, G.p_GetAll() do
  2340. local Distance = Distance(GetPos(ply), GetPos(G.lcl_Ply))
  2341. if (AB.check_Player(ply) && Distance <= AB.set_Get("esp_distance")) then
  2342. for _, v in G.loop, AB.QTBL[12] do
  2343. local sPos, ePos = ToScreen(BonePosition(ply, LookupBone(ply, v.S))), ToScreen(BonePosition(ply, LookupBone(ply, v.E)))
  2344. G.sur_SetDrawCol(G.t_GetCol(Team(ply)))
  2345. G.sur_DrawLi(sPos.x, sPos.y, ePos.x, ePos.y)
  2346. end
  2347. end
  2348. end
  2349. end
  2350.  
  2351. if (AB.set_Get("esp_2dbox") == 1) then
  2352. for _, ply in G.loop, G.p_GetAll() do
  2353. local Distance = Distance(GetPos(ply), GetPos(G.lcl_Ply))
  2354. if (AB.check_Player(ply) && Distance <= AB.set_Get("esp_distance_box")) then
  2355. local x1, y1, x2, y2 = AB.GCoords(ply)
  2356. if (x2 > x1) then
  2357. diff = x2 - x1
  2358. else
  2359. diff = x1 - x2
  2360. end
  2361. if (y2 > y1) then
  2362. diff2 = y2 - y1
  2363. else
  2364. diff2 = y1 - y2
  2365. end
  2366. G.sur_SetDrawCol(color_black)
  2367. G.sur_DrawOutRect(x1 - 1, y1 - 1, diff + 2, diff2 + 2)
  2368. G.sur_DrawOutRect(x1 + 1, y1 + 1, diff - 2, diff2 - 2)
  2369. G.sur_SetDrawCol(G.t_GetCol(Team(ply)))
  2370. G.sur_DrawOutRect(x1, y1, diff, diff2)
  2371. end
  2372. end
  2373. end
  2374.  
  2375. if (AB.set_Get("esp_2dbox_ent") == 1) then
  2376. for _, ent in G.loop, G.e_GetAll() do
  2377. local Distance = Distance(GetPos(ent), GetPos(G.lcl_Ply))
  2378. if (Valid(ent) && G.tbl_HasVal(AB.QTBL[6], GetClass(ent)) && Distance <= AB.set_Get("esp_distance_box")) then
  2379. local x1, y1, x2, y2 = AB.GCoords(ent)
  2380. if (x2 > x1) then
  2381. diff = x2 - x1
  2382. else
  2383. diff = x1 - x2
  2384. end
  2385. if (y2 > y1) then
  2386. diff2 = y2 - y1
  2387. else
  2388. diff2 = y1 - y2
  2389. end
  2390. G.sur_SetDrawCol(color_black)
  2391. G.sur_DrawOutRect(x1 - 1, y1 - 1, diff + 2, diff2 + 2)
  2392. G.sur_DrawOutRect(x1 + 1, y1 + 1, diff - 2, diff2 - 2)
  2393. G.sur_SetDrawCol(color_white)
  2394. G.sur_DrawOutRect(x1, y1, diff, diff2)
  2395. end
  2396. end
  2397. end
  2398.  
  2399. if (AB.set_Get("esp_hpbar") == 1) then
  2400. for _, ply in G.loop, G.p_GetAll() do
  2401. local Distance = Distance(GetPos(ply), GetPos(G.lcl_Ply))
  2402. if (AB.check_Player(ply) && Distance <= AB.set_Get("esp_distance_box")) then
  2403. local hp = Health(ply)
  2404. local hCol = Color(255 - 2.2 * hp, 2.2 * hp, 0, 255)
  2405. local x1, y1, x2, y2 = AB.GCoords(ply)
  2406. local diff
  2407. local health
  2408. if (y2 > y1) then
  2409. diff = y2 - y1
  2410. else
  2411. diff = y1 - y2
  2412. end
  2413. local height = (G.ma_Clamp(Health(ply), 0, 100) * diff) / 100
  2414. G.sur_SetDrawCol(color_black)
  2415. G.sur_DrawLi(x1 - 6 , y2 - 2, x1 - 6, y1 - 2)
  2416. G.sur_DrawLi(x1 - 6 , y2 + 0, x1 - 3, y2 + 0)
  2417. G.sur_DrawLi(x1 - 6 , y1, x1 - 3, y1 - 2)
  2418. G.sur_DrawLi(x1 - 3 , y2, x1 - 3, y1 - 2)
  2419. G.sur_SetDrawCol(hCol)
  2420. G.sur_DrawLi(x1 - 5, y2, x1 - 5, y2 - height - 2)
  2421. G.sur_DrawLi(x1 - 4, y2, x1 - 4, y2 - height - 2)
  2422. end
  2423. end
  2424. end
  2425. end
  2426.  
  2427. function AB.h_Adds.DrawOverlay.Radar()
  2428. if (AB.set_Get("radar") == 1) then
  2429. G.dr_RoundBox(0, AB.set_Get("radar_x"), AB.set_Get("radar_y"), 250, 250, Color(0, 0, 0, 185))
  2430. G.dr_RoundBox(0, AB.set_Get("radar_x"), AB.set_Get("radar_y"), 250, 5, AB.MCol)
  2431. G.dr_RoundBox(0, AB.set_Get("radar_x"), AB.set_Get("radar_y") + 250, 250, 5, AB.MCol)
  2432. for _, ply in G.loop, G.p_GetAll() do
  2433. if (AB.check_Player(ply)) then
  2434. local Distance = Distance(GetPos(ply), GetPos(G.lcl_Ply))
  2435. local FOV = FOV(ply) / 65
  2436. local zPos, plyPos = GetPos(G.lcl_Ply).z - (GetPos(ply).z), (GetPos(G.lcl_Ply) - GetPos(ply))
  2437. Rotate(plyPos, Angle(180, (Eye_Angles(G.lcl_Ply).y) * -1, -180))
  2438. local scrY = plyPos.y * (250 / ((AB.set_Get("radar_distance") * (FOV * (ScrW() / ScrH()))) + zPos * (FOV * (ScrW() / ScrH()))))
  2439. local scrX = plyPos.x * (250 / ((AB.set_Get("radar_distance") * (FOV * (ScrW() / ScrH()))) + zPos * (FOV * (ScrW() / ScrH()))))
  2440. local pX = AB.set_Get("radar_x") + 120 - scrY
  2441. local pY = AB.set_Get("radar_y") + 120 - scrX
  2442. if scrX < 120 && scrY < 120 && scrX > -120 && scrY > -120 then
  2443. G.dr_RoundBox(0, pX, pY, 6, 6, G.t_GetCol(Team(ply)))
  2444. G.dr_DrTxt(Name(ply), "Items", pX, pY - 20, G.t_GetCol(Team(ply)), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER)
  2445. G.dr_DrTxt(AB.ma_Format(G.ma_Floor(Distance)), "Items", pX, pY + 5, G.t_GetCol(Team(ply)), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER)
  2446. end
  2447. end
  2448. end
  2449. G.dr_RoundBox(0, AB.set_Get("radar_x"), AB.set_Get("radar_y"), 5, 250, AB.MCol)
  2450. G.dr_RoundBox(0, AB.set_Get("radar_x") + 250, AB.set_Get("radar_y"), 5, 255, AB.MCol)
  2451.  
  2452. G.sur_SetDrawCol(AB.MCol)
  2453. G.sur_DrawLi(AB.set_Get("radar_x") + 125, AB.set_Get("radar_y") + 125 - 120, AB.set_Get("radar_x") + 125, AB.set_Get("radar_y") + 125 + 125)
  2454. G.sur_DrawLi(AB.set_Get("radar_x") +125 - 120, AB.set_Get("radar_y") + 125, AB.set_Get("radar_x") + 125 + 125, AB.set_Get("radar_y") + 125)
  2455.  
  2456. G.sur_SetDrawCol(color_white)
  2457. G.sur_DrawLi(AB.set_Get("radar_x") + 125, AB.set_Get("radar_y") + 125 - 10, AB.set_Get("radar_x") + 125, AB.set_Get("radar_y") + 125 + 10)
  2458. G.sur_DrawLi(AB.set_Get("radar_x") + 125 - 10, AB.set_Get("radar_y") + 125, AB.set_Get("radar_x") + 125 + 10, AB.set_Get("radar_y") + 125)
  2459. end
  2460. end
  2461.  
  2462. function AB.h_Adds.DrawOverlay.SpecList()
  2463. if (AB.set_Get("misc_speclist") == 1) then
  2464. local Width = 0
  2465. local Height = 20
  2466. G.sur_SetFont("Items")
  2467. G.sur_SetTxtCol(color_white)
  2468. for _, v in G.loop, AB.QTBL[7] do
  2469. local W, H = G.sur_GetTxtSi(Name(v))
  2470. if W > Width then
  2471. Width = W
  2472. end
  2473. Height = Height + H
  2474. end
  2475. G.sur_SetMat(Material("background.png", "noclamp"))
  2476. G.sur_SetDrawCol(AB.MCol)
  2477. G.sur_DrawTxtRectUV(ScrW() - Width - 30, 10, Width + 20, Height + 20, 0, 0, Width / 32, Height / 32)
  2478. G.dr_RoundBox(0, ScrW() - Width - 30, 10, Width + 20, 18, AB.MCol)
  2479. G.dr_SimpTxt("Spectators", "Items", ScrW() - Width - 20, 10, color_white)
  2480. for _, v in G.loop, AB.QTBL[7] do
  2481. local Text = Name(v)
  2482. local W, H = G.sur_GetTxtSi(Text)
  2483. G.sur_SetTxtPos(ScrW() - 20 - Width, Height)
  2484. G.sur_DrawTxt(Text)
  2485. Height = Height - H
  2486. end
  2487. end
  2488. end
  2489.  
  2490. function AB.h_Adds.DrawOverlay.Chams()
  2491. if (AB.set_Get("esp_chams_players") == 1) then
  2492. for _, ply in G.loop, G.p_GetAll() do
  2493. local Distance = Distance(GetPos(ply), GetPos(G.lcl_Ply))
  2494. if (AB.check_Player(ply) && Distance <= AB.set_Get("esp_distance_chams")) then
  2495. local t_Col = G.t_GetCol(Team(ply))
  2496. G.c_Start3D()
  2497. SetMaterial(ply, "models/debug/debugwhite")
  2498. G.r_SetColMod(t_Col.r / 255, t_Col.g / 255, t_Col.b / 255)
  2499. G.r_SetBlend(t_Col.a / 255)
  2500. DrawModel(ply)
  2501. G.c_End3D()
  2502. end
  2503. end
  2504. end
  2505.  
  2506. if (AB.set_Get("esp_chams_players_wpn") == 1) then
  2507. for _, ply in G.loop, G.p_GetAll() do
  2508. local Wep = ActiveWeapon(ply)
  2509. local Distance = Distance(GetPos(ply), GetPos(G.lcl_Ply))
  2510. if (AB.check_Player(ply) && Valid(Wep) && Distance <= AB.set_Get("esp_distance_chams")) then
  2511. G.c_Start3D()
  2512. SetMaterial(Wep, "models/debug/debugwhite")
  2513. G.r_SetColMod(255, 0, 0)
  2514. G.r_SetBlend(1)
  2515. DrawModel(Wep)
  2516. G.c_End3D()
  2517. end
  2518. end
  2519. end
  2520.  
  2521. if (AB.set_Get("esp_chams_ents") == 1) then
  2522. for _, ent in G.loop, G.e_GetAll() do
  2523. local Distance = Distance(GetPos(ent), GetPos(G.lcl_Ply))
  2524. if (G.tbl_HasVal(AB.QTBL[6], GetClass(ent)) && Distance <= AB.set_Get("esp_distance_chams") && GetPos(ent) ~= Vector(0, 0, 0)) then
  2525. G.c_Start3D()
  2526. SetMaterial(ent, "models/debug/debugwhite")
  2527. G.r_SetColMod(1, 1, 1)
  2528. DrawModel(ent)
  2529. G.c_End3D()
  2530. end
  2531. end
  2532. end
  2533.  
  2534. if (AB.set_Get("esp_chams_players") == 0 or AB.set_Get("esp_chams_ents") == 0 or AB.set_Get("esp_chams_players_wpn") == 0) then
  2535. for _, ent in G.loop, G.e_GetAll() do
  2536. SetMaterial(ent, "")
  2537. G.r_SetColMod(1, 1, 1)
  2538. G.r_SetBlend(1)
  2539. end
  2540. end
  2541.  
  2542. if AB.set_Get("esp_chams_xqz") == 1 then
  2543. for _, ply in G.loop, G.p_GetAll() do
  2544. G.c_Start3D()
  2545. G.c_IgnZ(true)
  2546. ply:DrawModel()
  2547. G.c_End3D()
  2548. end
  2549. end
  2550.  
  2551. end
  2552.  
  2553. function AB.h_Adds.HUDPaint.CHair()
  2554. if (AB.set_Get("misc_crosshair") == 1) then
  2555. local CHCol = Color(unpack(G.str_Explode(",", tostring(AB.set_Get("misc_crosshair_col")))))
  2556. G.sur_SetDrawCol(CHCol)
  2557. G.sur_DrawLi(ScrW() / 2 + 22, ScrH() / 2, ScrW() / 2 - 23, ScrH() / 2)
  2558. G.sur_DrawLi(ScrW() / 2, ScrH() / 2 + 22, ScrW() / 2, ScrH() / 2 - 23)
  2559. end
  2560. end
  2561.  
  2562. function AB.h_Adds.RenderScreenspaceEffects.Beams()
  2563. if (AB.set_Get("esp_barrel_laser") == 1 or AB.set_Get("esp_ground_laser") == 1 or AB.set_Get("esp_head_laser") == 1) then
  2564. for _, ply in G.loop, G.p_GetAll() do
  2565. local Distance = Distance(GetPos(ply), GetPos(G.lcl_Ply))
  2566. if (AB.check_Player(ply) && Distance <= AB.set_Get("esp_distance")) then
  2567. G.c_Start3D(EyePos(), EyeAngles())
  2568. if (AB.set_Get("esp_barrel_laser") == 1) then
  2569. local Ang_Eye = Eye_Angles(ply)
  2570. local trace = {}
  2571. trace.start = ShootPos(ply)
  2572. trace.endpos = ShootPos(ply) + Forward(Ang_Eye) * 25650
  2573. trace.filter = ply
  2574. local tr = G.ut_TraceL(trace)
  2575. G.r_DrawLine(tr.StartPos, tr.HitPos, G.t_GetCol(Team(ply)), true)
  2576. end
  2577.  
  2578. if (AB.set_Get("esp_ground_laser") == 1) then
  2579. local Ang_Down = Angle(90, 0, 0)
  2580. local trace = {}
  2581. trace.start = ShootPos(ply)
  2582. trace.endpos = ShootPos(ply) + Forward(Ang_Down) * 25650
  2583. trace.filter = ply
  2584. local tr = G.ut_TraceL(trace)
  2585. G.r_DrawLine(tr.StartPos, tr.HitPos, G.t_GetCol(Team(ply)), true)
  2586. end
  2587.  
  2588. if (AB.set_Get("esp_head_laser") == 1) then
  2589. local Ang_Up = Angle(-90, 0, 0)
  2590. local trace = {}
  2591. trace.start = ShootPos(ply)
  2592. trace.endpos = ShootPos(ply) + Forward(Ang_Up) * 25650
  2593. trace.filter = ply
  2594. local tr = G.ut_TraceL(trace)
  2595. G.r_DrawLine(tr.StartPos, tr.HitPos, G.t_GetCol(Team(ply)), true)
  2596. end
  2597. G.c_End3D()
  2598. end
  2599. end
  2600. end
  2601.  
  2602. if (AB.set_Get("esp_hitbox") == 1) then
  2603. for _, ply in G.loop, G.p_GetAll() do
  2604. local Distance = Distance(GetPos(ply), GetPos(G.lcl_Ply))
  2605. if (AB.check_Player(ply) && Distance <= AB.set_Get("esp_distance_box")) then
  2606. for i = 0, GetHitBoxCount(ply, 0) do
  2607. local ply_Bone = GetHitBoxBone(ply, i, 0)
  2608. if (ply_Bone ~= nil) then
  2609. G.c_Start3D(EyePos(), EyeAngles())
  2610. local t_Col = G.t_GetCol(Team(ply))
  2611. local BCol = Color(t_Col.r, t_Col.g, t_Col.b, 35)
  2612. local BCol_Al = Color(BCol.r, BCol.g, BCol.b, 255)
  2613. local ply_BPos, ply_BAng = BonePosition(ply, ply_Bone)
  2614. local Min, Max = GetHitBoxBounds(ply, i, 0)
  2615. if Min ~= nil and Max ~= nil then
  2616. G.r_SCMatIgnoreZ()
  2617. G.r_SetBlend(BCol.a / 255)
  2618. G.r_DrawBox(ply_BPos, ply_BAng, Min, Max, BCol, false)
  2619. G.r_DrawWFBox(ply_BPos, ply_BAng, Min, Max, BCol_Al, false)
  2620. end
  2621. G.c_End3D()
  2622. end
  2623. end
  2624. end
  2625. end
  2626. end
  2627. end
  2628.  
  2629. local ProperCurTime = 0
  2630. function AB.h_Adds.Move.FixCurTime()
  2631. if IsFirstTimePredicted() then
  2632. ProperCurTime = CurTime()
  2633. end
  2634. end
  2635.  
  2636. ConCMD(G.lcl_Ply, "cl_updaterate 200;cl_cmdrate 200;cl_interp 0;cl_interp_ratio 0")
  2637.  
  2638. local Dead = {}
  2639. local aaCenter = {}
  2640. local aaNone = {}
  2641. local aaMeth = "default"
  2642. local bDelay = 0
  2643. local bDelay_AA = 0
  2644. local bQueued = 0
  2645. local t_Acq = false
  2646. local bSendPacket = true
  2647. local bBulletTime = true
  2648. function AB.h_Adds.CreateMove.BaseCMoves(ucmd)
  2649. if (FakeAng) then
  2650. if (AB.set_Get("aim_silent") == 1 or AB.set_Get("aim_psilent") == 1 or AB.set_Get("aim_aa") == 1) then
  2651. FakeAng.p = G.ma_Normalize(G.ma_Clamp(FakeAng.p + (GetMouseY(ucmd) * 0.02), -89, 89))
  2652. FakeAng.y = G.ma_Normalize(FakeAng.y + (GetMouseX(ucmd) * 0.02 * -1))
  2653. SetViewAngles(ucmd, FakeAng)
  2654. end
  2655. end
  2656.  
  2657. if (AB.set_Get("aim_aa") == 1) then
  2658. if (bSendPacket) then
  2659. FakeAng = GetViewAngles(ucmd)
  2660. end
  2661. end
  2662.  
  2663. if (AB.set_Get("aim_nospread") == 1) then
  2664. if (KeyDown(ucmd, ATTACK) && t_Acq == false) then
  2665. FakeAng = GetViewAngles(ucmd)
  2666. FakeAng.p = G.ma_Normalize(G.ma_Clamp(FakeAng.p + (GetMouseY(ucmd) * 0.011), -89, 89))
  2667. FakeAng.y = G.ma_Normalize(FakeAng.y + (GetMouseX(ucmd) * 0.011 * -1))
  2668. SetViewAngles(ucmd, AB.PredictSpread(ucmd, FakeAng))
  2669. end
  2670. end
  2671.  
  2672. if (AB.set_Get("aim_fakelag") == 1) then
  2673. if (Checked_CV == true) then
  2674. bQueued = bQueued + 1
  2675. if (bQueued >= 0) then
  2676. if (bQueued < AB.set_Get("aim_fakelag_rate")) then
  2677. G.GetCVar("host_timescale"):SetValue(0)
  2678. else
  2679. G.GetCVar("host_timescale"):SetValue(1)
  2680. end
  2681. --print(bQueued)
  2682. else
  2683. G.GetCVar("host_timescale"):SetValue(1)
  2684. end
  2685. if (bQueued == (AB.set_Get("aim_fakelag_rate") + 7)) then
  2686. bQueued = 0
  2687. end
  2688. end
  2689. else
  2690. bQueued = 0
  2691. end
  2692.  
  2693. if (AB.set_Get("aim_aaa") == 1) then
  2694. for _, ply in G.loop, G.p_GetAll() do
  2695. // 'Best' you can get to AAA in pure Lua. At least to my knowledge... -- Why don't you fucking credit me noob?
  2696. local EyeAng = Eye_Angles(ply)
  2697. local rAng = {
  2698. EyeAng.p + 180,
  2699. EyeAng.p - 180
  2700. }
  2701. if (G.tbl_HasVal(aaNone, Name(ply))) then
  2702. SetPoseParameter(ply, "aim_pitch", EyeAng.p)
  2703. InvalidateBoneCache(ply)
  2704. else
  2705. if (EyeAng.p < -89) then
  2706. if (AB.set_Get("aim_aaa_fb") == 1) then
  2707. SetPoseParameter(ply, "aim_pitch", G.tbl_Rand(rAng))
  2708. InvalidateBoneCache(ply)
  2709. else
  2710. SetPoseParameter(ply, "aim_pitch", EyeAng.p + 180)
  2711. InvalidateBoneCache(ply)
  2712. end
  2713. elseif (EyeAng.p > 89) then
  2714. if (AB.set_Get("aim_aaa_fb") == 1) then
  2715. SetPoseParameter(ply, "aim_pitch", G.tbl_Rand(rAng))
  2716. InvalidateBoneCache(ply)
  2717. else
  2718. SetPoseParameter(ply, "aim_pitch", EyeAng.p - 180)
  2719. InvalidateBoneCache(ply)
  2720. end
  2721. end
  2722. /*
  2723. if (EyeAng.y <= -360) then
  2724. SetPoseParameter(ply, "aim_yaw", G.ma_Normalize(-360))
  2725. elseif (EyeAng.y >= 360) then
  2726. SetPoseParameter(ply, "aim_yaw", G.ma_Normalize(360))
  2727. end
  2728. */
  2729. end
  2730. end
  2731. end
  2732.  
  2733. local fbSafe = true
  2734. if (AB.set_Get("aim_aaaa") == 1) then
  2735. if (AB.GetDangerLevel() <= .90) then
  2736. fbSafe = true
  2737. else
  2738. fbSafe = false
  2739. end
  2740. else
  2741. fbSafe = true
  2742. end
  2743.  
  2744. if (G.inp_MouseDown(AB.set_Get("aim_key")) or AB.set_Get("aim_toggle") == 1) then
  2745. local Target = AB.aim_GetTgt()
  2746. if (Alive(G.lcl_Ply) && Target ~= nil && Target ~= G.lcl_Ply) then
  2747. t_Acq = true
  2748. local Wep = ActiveWeapon(G.lcl_Ply)
  2749. if (!Target:IsNPC()) then
  2750. if (G.tbl_HasVal(aaCenter, Name(Target))) then
  2751. fBoneF = ToWorld(Target, OBBCenter(Target))
  2752. else
  2753. if (AB.set_Get("aim_bone") == 1) then
  2754. fBoneF = AB.aim_FindBone(Target) - Vector(0, 0, -3)
  2755. elseif (AB.set_Get("aim_hitbox") == 1) then
  2756. fBoneF = AB.GetPosition(Target)
  2757. end
  2758. end
  2759. else
  2760. if (AB.set_Get("aim_npcs") == 0) then
  2761. fBoneF = AB.aim_FindBone(Target)
  2762. end
  2763. end
  2764. --print(bDelay)
  2765. Ang = (AB.VeloPredict(Target, fBoneF))
  2766. Ang = v_Angle(Ang - ply_Pos)
  2767. if (AB.set_Get("aim_silent") == 1 or AB.set_Get("aim_psilent") == 1) then
  2768. if (bSendPacket) then
  2769. FakeAng = GetViewAngles(ucmd)
  2770. end
  2771. if (GetNextPrimaryFire(Wep) >= ProperCurTime) then
  2772. bBulletTime = false
  2773. else
  2774. bBulletTime = true
  2775. end
  2776. if (CommandNumber(ucmd) == 0) then
  2777. bSendPacket = true
  2778. else
  2779. bSendPacket = false
  2780. bDelay = bDelay + 1
  2781. if (AB.set_Get("aim_psilent") == 1) then
  2782. G.GetCVar("host_timescale"):SetValue(0)
  2783. end
  2784. end
  2785. if (bBulletTime && !bSendPacket) then
  2786. if (AB.set_Get("aim_psilent") == 1) then
  2787. if (bDelay >= 4) then
  2788. if (AB.set_Get("aim_nospread") == 1) then
  2789. Ang = AB.PredictSpread(ucmd, Ang)
  2790. SetViewAngles(ucmd, Ang)
  2791. else
  2792. AimAngle = Angle(G.ma_Normalize(Ang.p), G.ma_Normalize(Ang.y), 0)
  2793. SetViewAngles(ucmd, AimAngle)
  2794. end
  2795. if (AB.set_Get("aim_autofire") == 1) then
  2796. SetButtons(ucmd, G.b_Bor(GetButtons(ucmd), ATTACK))
  2797. end
  2798. bDelay = 0
  2799. G.GetCVar("host_timescale"):SetValue(1)
  2800. end
  2801. else
  2802. if (AB.set_Get("aim_nospread") == 1) then
  2803. Ang = AB.PredictSpread(ucmd, Ang)
  2804. SetViewAngles(ucmd, Ang)
  2805. else
  2806. AimAngle = Angle(G.ma_Normalize(Ang.p), G.ma_Normalize(Ang.y), 0)
  2807. SetViewAngles(ucmd, AimAngle)
  2808. end
  2809. if (AB.set_Get("aim_autofire") == 1) then
  2810. SetButtons(ucmd, G.b_Bor(GetButtons(ucmd), ATTACK))
  2811. end
  2812. end
  2813. else
  2814. FakeAng.p = G.ma_Normalize(G.ma_Clamp(FakeAng.p + (GetMouseY(ucmd) * 0.02), -89, 89))
  2815. FakeAng.y = G.ma_Normalize(FakeAng.y + (GetMouseX(ucmd) * 0.02 * -1))
  2816. SetViewAngles(ucmd, FakeAng)
  2817. end
  2818. else
  2819. if (AB.set_Get("aim_nospread") == 1) then
  2820. Ang = AB.PredictSpread(ucmd, Ang)
  2821. SetViewAngles(ucmd, Ang)
  2822. else
  2823. AimAngle = Angle(G.ma_Normalize(Ang.p), G.ma_Normalize(Ang.y), 0)
  2824. SetViewAngles(ucmd, AimAngle)
  2825. end
  2826. if (AB.set_Get("aim_autofire") == 1) then
  2827. SetButtons(ucmd, G.b_Bor(GetButtons(ucmd), ATTACK))
  2828. end
  2829. end
  2830. if (AB.set_Get("aim_silent") == 1 or AB.set_Get("aim_psilent") == 1) then
  2831. local a_Dir = Vector(GetForwardMove(ucmd), GetSideMove(ucmd), 0 )
  2832. local a_Vec = Forward((v_Angle(a_Dir) + (GetViewAngles(ucmd) - AB.aim_GetAng()))) * Length(a_Dir)
  2833. SetForwardMove(ucmd, a_Vec[1])
  2834. SetSideMove(ucmd, a_Vec[2])
  2835. end
  2836. if (AB.set_Get("aim_psilent") == 1) then
  2837. -- Fallback
  2838. if (bDelay >= 4) then
  2839. bDelay = 0
  2840. G.GetCVar("host_timescale"):SetValue(1)
  2841. end
  2842. end
  2843. else
  2844. t_Acq = false
  2845. if (AB.set_Get("aim_psilent") == 1) then
  2846. -- Fallback
  2847. bDelay = 0
  2848. G.GetCVar("host_timescale"):SetValue(1)
  2849. end
  2850. end
  2851. else
  2852. Target = nil
  2853. t_Acq = false
  2854. if (AB.set_Get("aim_psilent") == 1) then
  2855. -- Fallback
  2856. if (bDelay >= 4) then
  2857. bDelay = 0
  2858. G.GetCVar("host_timescale"):SetValue(1)
  2859. elseif (AB.set_Get("aim_fakelag") == 0 or AB.set_Get("aim_aa") == 0) then
  2860. G.GetCVar("host_timescale"):SetValue(1)
  2861. end
  2862. end
  2863. end
  2864.  
  2865. local r_Ang = GetViewAngles(ucmd)
  2866. local jit_Ang = {-181, 345}
  2867. local rSpeed = G.ma_abs(G.ma_sin(CurTime() * 25))
  2868. if (AB.set_Get("aim_aa") == 1) then
  2869. if (AB.set_Get("aim_aa_type") == "Invert") then
  2870. r_Ang.p = -181
  2871. r_Ang.y = r_Ang.y - 180
  2872. r_Ang.r = r_Ang.r
  2873. elseif (AB.set_Get("aim_aa_type") == "Spin") then
  2874. r_Ang.p = -271
  2875. r_Ang.y = G.ma_fmod(CurTime() / .1 * 35 * 6, 360)
  2876. r_Ang.r = -181
  2877. elseif (AB.set_Get("aim_aa_type") == "Fake SW") then
  2878. bDelay_AA = bDelay_AA + 1
  2879. if (bDelay_AA < 3) then
  2880. G.GetCVar("host_timescale"):SetValue(0)
  2881. r_Ang.p = -541
  2882. r_Ang.y = -620
  2883. r_Ang.r = r_Ang.r
  2884. else
  2885. r_Ang.p = 541
  2886. r_Ang.y = 720
  2887. r_Ang.r = r_Ang.r
  2888. end
  2889. if (bDelay_AA == 5) then
  2890. G.GetCVar("host_timescale"):SetValue(1)
  2891. bDelay_AA = 0
  2892. end
  2893. elseif (AB.set_Get("aim_aa_type") == "Custom") then
  2894. if (AB.set_Get("aim_aa_pitch") == 0) then
  2895. r_Ang.p = r_Ang.p
  2896. elseif (AB.set_Get("aim_aa_pitch_jit") == 1) then
  2897. r_Ang.p = G.tbl_Rand(jit_Ang)
  2898. elseif (fbSafe == false or fbSafe == true) then
  2899. r_Ang.p = AB.set_Get("aim_aa_pitch")
  2900. if (fbSafe == false) then
  2901. r_Ang.p = G.tbl_Rand(jit_Ang)
  2902. r_Ang.y = r_Ang.y - 362
  2903. r_Ang.r = 0
  2904. elseif (fbSafe == true) then
  2905. r_Ang.p = AB.set_Get("aim_aa_pitch")
  2906. r_Ang.y = r_Ang.y + AB.set_Get("aim_aa_yaw")
  2907. end
  2908. end
  2909.  
  2910. if (AB.set_Get("aim_aa_yaw") == 0 && AB.set_Get("aim_aa_spin") == 0) then
  2911. r_Ang.y = r_Ang.y
  2912. elseif (AB.set_Get("aim_aa_spin") == 0) then
  2913. r_Ang.y = r_Ang.y + AB.set_Get("aim_aa_yaw")
  2914. if (fbSafe == false) then
  2915. r_Ang.y = r_Ang.y - AB.set_Get("aim_aa_yaw")
  2916. elseif (fbSafe == true) then
  2917. r_Ang.y = r_Ang.y + AB.set_Get("aim_aa_yaw")
  2918. end
  2919. else
  2920. if (fbSafe == false) then
  2921. r_Ang.y = r_Ang.y + G.ma_fmod(CurTime() / .1 * 100 * 6, 360)
  2922. elseif (fbSafe == true) then
  2923. r_Ang.y = r_Ang.y - G.ma_fmod(CurTime() / .1 * AB.set_Get("aim_aa_spin") * 6, -360)
  2924. end
  2925. end
  2926.  
  2927. if (AB.set_Get("aim_aa_roll") == 0) then
  2928. r_Ang.r = r_Ang.r
  2929. else
  2930. r_Ang.r = AB.set_Get("aim_aa_roll")
  2931. end
  2932. end
  2933.  
  2934. if (!bBulletTime) then
  2935. SetViewAngles(ucmd, r_Ang)
  2936. a_Dir = Vector(GetForwardMove(ucmd), GetSideMove(ucmd), 0)
  2937. a_Vec = Forward((v_Angle(a_Dir) + (GetViewAngles(ucmd) - FakeAng))) * Length(a_Dir)
  2938. SetForwardMove(ucmd, a_Vec[1])
  2939. SetSideMove(ucmd, -a_Vec[2])
  2940. elseif (t_Acq == false) then
  2941. SetViewAngles(ucmd, r_Ang)
  2942. a_Dir = Vector(GetForwardMove(ucmd), GetSideMove(ucmd), 0)
  2943. a_Vec = Forward((v_Angle(a_Dir) + (GetViewAngles(ucmd) - FakeAng))) * Length(a_Dir)
  2944. SetForwardMove(ucmd, a_Vec[1])
  2945. SetSideMove(ucmd, -a_Vec[2])
  2946. end
  2947. end
  2948. end
  2949.  
  2950. function AB.h_Adds.CreateMove.TriggerBot(ucmd)
  2951. if (AB.set_Get("aim_trigger") == 1) then
  2952. local Target = EyeTrace(G.lcl_Ply).Entity
  2953. if (Valid(Target) && IsPlayer(Target)) then
  2954. SetButtons(ucmd, G.b_Bor(GetButtons(ucmd), ATTACK))
  2955. else
  2956. RemoveKey(ucmd, ATTACK)
  2957. end
  2958. end
  2959. end
  2960.  
  2961. function AB.h_Adds.CreateMove.RapidFire(ucmd)
  2962. if (AB.set_Get("misc_rapidfire") == 1) then
  2963. local Wep = ActiveWeapon(G.lcl_Ply)
  2964. if (Valid(Wep)) then
  2965. if (HoldType(Wep) ~= "physgun") then
  2966. if (G.b_Bor(GetButtons(ucmd), ATTACK)) then
  2967. if (GetNextPrimaryFire(Wep) >= ProperCurTime) then
  2968. RemoveKey(ucmd, ATTACK)
  2969. end
  2970. end
  2971. end
  2972. end
  2973. end
  2974. end
  2975.  
  2976. function AB.h_Adds.CreateMove.SpeedHack()
  2977. if (AB.set_Get("misc_sh_enable") == 1) then
  2978. if (G.inp_KeyDown(AB.set_Get("misc_sh_key"))) then
  2979. G.GetCVar("sv_cheats"):SetValue(1)
  2980. G.GetCVar("host_timescale"):SetValue(AB.set_Get("misc_sh_speed"))
  2981. else
  2982. G.GetCVar("sv_cheats"):SetValue(0)
  2983. G.GetCVar("host_timescale"):SetValue(1)
  2984. end
  2985. end
  2986. end
  2987.  
  2988. function AB.h_Adds.CreateMove.BunnyHop(ucmd)
  2989. if (AB.set_Get("misc_bhop") == 1) then
  2990. if (KeyDown(ucmd, JUMP)) then
  2991. if (OnGround(G.lcl_Ply)) then
  2992. SetButtons(ucmd, GetButtons(ucmd), JUMP)
  2993. elseif (WaterLevel(G.lcl_Ply) < 2 && GetMoveType(G.lcl_Ply) ~= MOVETYPE_LADDER && !OnGround(G.lcl_Ply)) then
  2994. RemoveKey(ucmd, JUMP)
  2995. end
  2996. if (AB.set_Get("misc_bhop_astrafe") == 1) then
  2997. if (GetMouseX(ucmd) < 0) then
  2998. SetSideMove(ucmd, -10000)
  2999. elseif (GetMouseX(ucmd) > 0) then
  3000. SetSideMove(ucmd, 10000)
  3001. end
  3002. end
  3003. end
  3004. end
  3005. end
  3006.  
  3007. local Streak = 0
  3008. function AB.h_Adds.entity_killed.Kills(data)
  3009. local killer = Entity(data.entindex_attacker)
  3010. local inflictor = Entity(data.entindex_inflictor)
  3011. local victim = Entity(data.entindex_killed)
  3012. if (AB.set_Get("misc_showkills_say") == 1 or AB.set_Get("misc_showkills_print") == 1) then
  3013. if (IsValid(victim) && IsValid(killer) && victim:IsPlayer() && killer:IsPlayer()) then
  3014. if (killer == G.lcl_Ply && victim ~= G.lcl_Ply) then
  3015. Streak = Streak + 1
  3016. if (AB.set_Get("misc_showkills_say") == 1) then
  3017. ConCMD(G.lcl_Ply, "say killed " .. Name(victim) .. " using " .. GetClass(ActiveWeapon(killer)) .. ". Killstreak: " .. Streak .. "!")
  3018. end
  3019. if (AB.set_Get("misc_showkills_print") == 1) then
  3020. AB.ch_AddText("common/null.wav", "Killed ", G.t_GetCol(Team(victim)), Name(victim), color_white, " using ", Color(255, 93, 0), GetClass(ActiveWeapon(killer)), color_white, ". Killstreak: " .. Streak .. "!")
  3021. end
  3022. elseif (killer ~= G.lcl_Ply && victim == G.lcl_Ply && Streak >= 1) then
  3023. if (AB.set_Get("misc_showkills_say") == 1) then
  3024. ConCMD(G.lcl_Ply, "say Killstreak of " .. Streak .. " ended by " .. Name(killer) .. "!")
  3025. end
  3026. if (AB.set_Get("misc_showkills_print") == 1) then
  3027. AB.ch_AddText("common/null.wav", "Killstreak of " .. Streak .. " ended by " .. Name(killer) .. "!")
  3028. end
  3029. Streak = 0
  3030. elseif (killer == G.lcl_Ply && victim == G.lcl_Ply && Streak >= 1) then
  3031. if (AB.set_Get("misc_showkills_say") == 1) then
  3032. ConCMD(G.lcl_Ply, "say suicided! Ending his Killstreak of " .. Streak .. "!")
  3033. end
  3034. if (AB.set_Get("misc_showkills_print") == 1) then
  3035. AB.ch_AddText("common/null.wav", "Suicided! Ending your Killstreak of " .. Streak .. "!")
  3036. end
  3037. Streak = 0
  3038. end
  3039. elseif (IsValid(victim) && victim:IsPlayer() && !killer:IsPlayer()) then
  3040. if (victim == G.lcl_Ply && Streak >= 1) then
  3041. if (AB.set_Get("misc_showkills_say") == 1) then
  3042. ConCMD(G.lcl_Ply, "say died mysteriously! Ending his Killstreak of " .. Streak .. "!")
  3043. end
  3044. if (AB.set_Get("misc_showkills_print") == 1) then
  3045. AB.ch_AddText("common/null.wav", "Died mysteriously! Ending your Killstreak of " .. Streak .. "!")
  3046. end
  3047. Streak = 0
  3048. end
  3049. end
  3050. end
  3051.  
  3052. if (AB.set_Get("misc_log_kills") == 1) then
  3053. AB.con_Log("log", "Player ", Color(116, 187, 251), Name(killer), color_white, " killed ", Color(255, 93, 0), Name(victim), color_white, " using ", Color(255, 93, 0), GetClass(ActiveWeapon(killer)), color_white, "!\n")
  3054. end
  3055. end
  3056. G.Listen("entity_killed")
  3057.  
  3058. function AB.h_Adds.player_hurt.Damage(data)
  3059. local userid = data.userid
  3060. local attacker = data.attacker
  3061. local hurter = nil
  3062. if (AB.set_Get("misc_log_dmg") == 1) then
  3063. for _, ply in G.loop, G.p_GetAll() do
  3064. if (attacker == ply:UserID()) then
  3065. hurter = ply
  3066. end
  3067. end
  3068. for _, ply in G.loop, G.p_GetAll() do
  3069. local health = Health(ply) - data.health
  3070. if (userid == ply:UserID()) then
  3071. AB.con_Log("log", "Player ", Color(116, 187, 251), Name(hurter), color_white, " hurt ", Color(255, 93, 0), Name(ply), color_white, " using ", Color(255, 93, 0), GetClass(ActiveWeapon(hurter)), color_white, " with ", Color(116, 187, 251), health, color_white, " damage!\n")
  3072. end
  3073. end
  3074. end
  3075.  
  3076. if (AB.set_Get("misc_log_dmg_snd") == 1) then
  3077. if (attacker == G.lcl_Ply:UserID()) then
  3078. G.snd_PlayFile("sound/hit_snd.wav", "", function(snd)
  3079. if (IsValid(snd)) then snd:Play() end
  3080. end)
  3081. end
  3082. end
  3083. end
  3084. G.Listen("player_hurt")
  3085.  
  3086. function AB.h_Adds.player_connect.Connect(data)
  3087. local name = data.name
  3088. local steamid = data.networkid
  3089. local ip = data.address
  3090. local index = data.index
  3091. AB.ch_AddText("common/null.wav", "Player ", Color(116, 187, 251), name, color_white, "(", Color(255, 93, 0), steamid, color_white, ") joined the server.")
  3092. end
  3093. G.Listen("player_connect")
  3094.  
  3095. function AB.h_Adds.player_disconnect.Disconnect(data)
  3096. local name = data.name
  3097. local steamid = data.networkid
  3098. local reason = data.reason
  3099. AB.ch_AddText("common/null.wav", "Player ", Color(116, 187, 251), name, color_white, "(", Color(255, 93, 0), steamid, color_white, ") left the server(" .. reason .. ")")
  3100. end
  3101. G.Listen("player_disconnect")
  3102.  
  3103. function AB.FakeAim(ply, pos, ang, fov, nearZ, farZ)
  3104. if (AB.set_Get("aim_silent") == 1 or AB.set_Get("aim_psilent") == 1 or AB.set_Get("aim_aa") == 1) then
  3105. local view = {}
  3106. view.origin = pos
  3107. view.angles = AB.aim_GetAng()
  3108. view.fov = fov
  3109. return view
  3110. end
  3111. end
  3112. AB.h_Add("CalcView", AB.FakeAim)
  3113.  
  3114. function AB.FixAim(wep, vm, oldPos, oldAng, pos, ang)
  3115. if (AB.set_Get("aim_silent") == 1 or AB.set_Get("aim_psilent") == 1 or AB.set_Get("aim_aa") == 1) then
  3116. return oldPos, AB.aim_GetAng()
  3117. end
  3118. end
  3119. AB.h_Add("CalcViewModelView", AB.FixAim)
  3120.  
  3121. function AB.h_Adds.Think.ColorUpdate()
  3122. AB.MColCvar = AB.set_Get("misc_theme_color")
  3123. AB.MCol = Color(unpack(G.str_Explode(",", AB.set_Get("misc_theme_color"))))
  3124. AB.Var = G.ma_abs(G.ma_sin( CurTime() * 3))
  3125. AB.DLTCol = Color(AB.MCol.r, AB.MCol.g, AB.MCol.b, AB.Var * AB.MCol.a)
  3126. end
  3127.  
  3128. function AB.h_Adds.Think.NoRecoil()
  3129. if (AB.set_Get("aim_norecoil") == 1) then
  3130. if (Valid(ActiveWeapon(G.lcl_Ply))) then
  3131. local Wep = ActiveWeapon(G.lcl_Ply)
  3132. if (Wep.Primary) then
  3133. Wep.Primary.CalcView = function(ply, origin, angles, fov) end
  3134. Wep.Primary.HipCone = 0
  3135. Wep.Primary.AimCone = 0
  3136. Wep.Primary.SpreadPerShot = 0
  3137. Wep.Primary.MaxSpreadInc = 0
  3138. Wep.Primary.SpreadCooldown = 0
  3139. Wep.Primary.VelocitySensitivity = 0
  3140. Wep.Primary.AimFOV = 0
  3141. Wep.Primary.ViewKick = 0
  3142. Wep.Primary.Recoil = 0
  3143. if (Wep.Primary.KickUp) then
  3144. Wep.Primary.KickUp = 0
  3145. Wep.Primary.KickDown = 0
  3146. Wep.Primary.KickHorizontal = 0
  3147. end
  3148. end
  3149. if (Wep.Secondary) then
  3150. Wep.Secondary.CalcView = function(ply, origin, angles, fov) end
  3151. Wep.Secondary.HipCone = 0
  3152. Wep.Secondary.AimCone = 0
  3153. Wep.Secondary.SpreadPerShot = 0
  3154. Wep.Secondary.MaxSpreadInc = 0
  3155. Wep.Secondary.SpreadCooldown = 0
  3156. Wep.Secondary.VelocitySensitivity = 0
  3157. Wep.Secondary.AimFOV = 0
  3158. Wep.Secondary.ViewKick = 0
  3159. Wep.Secondary.Recoil = 0
  3160. end
  3161. end
  3162. elseif Valid(ActiveWeapon(G.lcl_Ply)) then
  3163. local Wep = ActiveWeapon(G.lcl_Ply)
  3164. if (Wep.Primary) then
  3165. Wep.Primary.Recoil = Wep.OldRecoil or Wep.Primary.Recoil or Wep.Recoil
  3166. Wep.Recoil = Wep.OldRecoil or Wep.Recoil or Wep.Primary.Recoil
  3167. else
  3168. Wep.Recoil = Wep.OldRecoil or Wep.Recoil
  3169. end
  3170. end
  3171. end
  3172.  
  3173. function AB.h_Adds.Think.Spam()
  3174. if (AB.set_Get("misc_chatspam") == 1) then
  3175. G.run_CCmd("say", AB.set_Get("misc_chatspam_msg"))
  3176. end
  3177. if (AB.set_Get("misc_cmdspam") == 1) then
  3178. ConCMD(G.lcl_Ply, AB.set_Get("misc_cmdspam_msg"))
  3179. end
  3180. end
  3181.  
  3182. function AB.h_Adds.Think.Lights()
  3183. if (AB.set_Get("light_penabled") == 1) then
  3184. G.lcl_Ply = G.lcl_Ply
  3185. if (!Valid(G.lcl_Ply)) then
  3186. return
  3187. end
  3188. local PBrightness = AB.set_Get("light_pbrightness")
  3189. local PSize = AB.set_Get("light_psize")
  3190. for _, ply in G.loop, G.p_GetAll() do
  3191. if AB.check_Player(ply) then
  3192. local pLight = DynamicLight(ply:EntIndex())
  3193. if (pLight) then
  3194. local colour = G.t_GetCol(Team(ply))
  3195. pLight.Pos = GetPos(ply) + Vector(0, 0, 10)
  3196. pLight.r = colour.r
  3197. pLight.g = colour.g
  3198. pLight.b = colour.b
  3199. pLight.Brightness = PBrightness
  3200. pLight.Decay = PSize * 5
  3201. pLight.Size = PSize
  3202. pLight.DieTime = CurTime() + 1
  3203. end
  3204. end
  3205. end
  3206. end
  3207. end
  3208.  
  3209. AB.t_Create(1, 0, function()
  3210. for _, ply in G.loop, G.p_GetAll() do
  3211. if (GetModel(ply) == "models/error.mdl") then
  3212. SetModel(ply, "models/player/group01/female_02.mdl")
  3213. end
  3214. end
  3215. end)
  3216.  
  3217. AB.t_Create(1, 0, function()
  3218. if (AB.set_Get("misc_showspec") == 1) then
  3219. for _, v in G.loop, G.p_GetAll() do
  3220. if (Valid(ObserverTarget(v)) && IsPlayer(ObserverTarget(v)) && ObserverTarget(v) == G.lcl_Ply) then
  3221. if (not G.tbl_HasVal(AB.QTBL[7], v)) then
  3222. G.tbl_Insert(AB.QTBL[7], v)
  3223. AB.ch_AddText("npc/scanner/combat_scan3.wav", G.t_GetCol(Team(v)), Name(v), color_white, " is now spectating you.")
  3224. end
  3225. end
  3226. end
  3227. end
  3228.  
  3229. if (AB.set_Get("misc_showspec") == 1) then
  3230. for k, v in G.loop, AB.QTBL[7] do
  3231. if (not Valid(v) or not Valid(ObserverTarget(v)) or not IsPlayer(ObserverTarget(v)) or (ObserverTarget(v) ~= G.lcl_Ply)) then
  3232. G.tbl_Rem(AB.QTBL[7], k)
  3233. AB.ch_AddText("npc/scanner/combat_scan2.wav", Color(0, 201, 0), Name(v), color_white, " is no longer spectating you.")
  3234. end
  3235. end
  3236. end
  3237.  
  3238. if (AB.set_Get("misc_showadmins") == 1) then
  3239. for _, v in G.loop, G.p_GetAll() do
  3240. if (AB.check_Admin(v) && not G.tbl_HasVal(AB.QTBL[9], v)) then
  3241. G.tbl_Insert(AB.QTBL[9], v)
  3242. AB.ch_AddText("npc/scanner/combat_scan1.wav", color_white, "Admin ", G.t_GetCol(Team(v)), Name(v), color_white, " detected.")
  3243. elseif (AB.check_Super(v) && not G.tbl_HasVal(AB.QTBL[8], v)) then
  3244. G.tbl_Insert(AB.QTBL[8], v)
  3245. AB.ch_AddText("npc/scanner/combat_scan1.wav", color_white, "Super Admin ", G.t_GetCol(Team(v)), Name(v), color_white, " detected.")
  3246. elseif (AB.check_Mod(v) && not G.tbl_HasVal(AB.QTBL[10], v)) then
  3247. G.tbl_Insert(AB.QTBL[10], v)
  3248. AB.ch_AddText("npc/scanner/combat_scan1.wav", color_white, "Moderator ", G.t_GetCol(Team(v)), Name(v), color_white, " detected.")
  3249. end
  3250. end
  3251. end
  3252.  
  3253. for k, v in SortedPairs(AB.QTBL[10], true) do
  3254. if not Valid(v) then
  3255. G.tbl_Rem(AB.QTBL[10], k)
  3256. end
  3257. end
  3258.  
  3259. for k, v in SortedPairs(AB.QTBL[9], true) do
  3260. if not Valid(v) then
  3261. G.tbl_Rem(AB.QTBL[9], k)
  3262. end
  3263. end
  3264.  
  3265. for k, v in SortedPairs(AB.QTBL[8], true) do
  3266. if not Valid(v) then
  3267. G.tbl_Rem(AB.QTBL[8], k)
  3268. end
  3269. end
  3270. end)
  3271.  
  3272. AB.t_Create(2, 0, function()
  3273. if (AB.set_Get("misc_antiafk") == 1) then
  3274. local CMD1 = G.tbl_Rand(AB.QTBL[16])
  3275. local CMD2 = G.tbl_Rand(AB.QTBL[16])
  3276. G.t_Simple(1, function()
  3277. G.run_CCmd("+" .. CMD1)
  3278. G.run_CCmd("+" .. CMD2)
  3279. end)
  3280. G.t_Simple(2, function()
  3281. G.run_CCmd("-" .. CMD1)
  3282. G.run_CCmd("-" .. CMD2)
  3283. end)
  3284. end
  3285. end)
  3286.  
  3287. /*=============
  3288. Hook Adding End|
  3289. ===============*/
  3290.  
  3291. ---------------------
  3292.  
  3293. /*===================
  3294. Derma/GUI Menus Start|
  3295. =====================*/
  3296.  
  3297. function AB.ENTMenu()
  3298. local EntMe = G.vg_Create("DFrame")
  3299. EntMe:SetSize(400, 400)
  3300. EntMe:SetTitle("")
  3301. EntMe:Center()
  3302. EntMe.btnMaxim:Hide()
  3303. EntMe.btnMinim:Hide()
  3304. EntMe:MakePopup()
  3305. function EntMe:Paint()
  3306. G.sur_SetMat(Material("background.png", "noclamp"))
  3307. G.sur_SetDrawCol(AB.MCol)
  3308. G.sur_DrawTxtRectUV(0, 0, self:GetWide(), self:GetTall(), 0, 0, self:GetWide() / 32, self:GetTall() / 32)
  3309. G.sur_SetDrawCol(AB.MCol)
  3310. G.sur_DrawRect(0, 0, self:GetWide(), 22)
  3311. G.sur_SetDrawCol(AB.MCol)
  3312. G.sur_DrawOutRect(0, 0, self:GetWide(), self:GetTall())
  3313. end
  3314.  
  3315. local EntLi = G.vg_Create("DPanelList", EntMe)
  3316. EntLi:SetSize(EntMe:GetWide() - 20, EntMe:GetTall() - 30)
  3317. EntLi:SetPos(5, 50)
  3318. EntLi:SetSpacing(0)
  3319.  
  3320. local EntPa = G.vg_Create("DPanel", EntMe)
  3321. EntPa:SetSize(EntMe:GetWide() - 10, EntMe:GetTall() - 10)
  3322. EntPa.Paint = function()
  3323. G.dr_RoundBox(0, 0, 0, 0, 0, color_black)
  3324. end
  3325. EntLi:AddItem(EntPa)
  3326.  
  3327. local VisibleLi = {}
  3328. local NotVisibleLi = {}
  3329. local All = G.e_GetAll()
  3330. for k = 1, #All do
  3331. local v = All[k]
  3332. if G.tbl_HasVal(AB.QTBL[6], GetClass(v)) then
  3333. if not G.tbl_HasVal(VisibleLi, GetClass(v)) then
  3334. G.tbl_Insert(VisibleLi, GetClass(v))
  3335. end
  3336. elseif not G.tbl_HasVal(NotVisibleLi, GetClass(v)) then
  3337. G.tbl_Insert(NotVisibleLi, GetClass(v))
  3338. end
  3339. end
  3340.  
  3341. local NotVisible = G.vg_Create("DListView", EntPa)
  3342. local Visible = G.vg_Create("DListView", EntPa)
  3343. Visible:SetSize(150, 320)
  3344. Visible:SetPos(EntPa:GetWide() * 0.25 - Visible:GetWide() / 2, 0)
  3345. Visible:SetMultiSelect(false)
  3346. Visible:AddColumn("Visible")
  3347. for k = 1, #VisibleLi do
  3348. Visible:AddLine(VisibleLi[k])
  3349. end
  3350.  
  3351. Visible.DoDoubleClick = function(panel, index, line)
  3352. G.tbl_Insert(NotVisibleLi, VisibleLi[index])
  3353. G.tbl_Rem(VisibleLi, index)
  3354. Visible:Clear()
  3355. NotVisible:Clear()
  3356. for k = 1, #VisibleLi do
  3357. Visible:AddLine(VisibleLi[k])
  3358. end
  3359. for k = 1, #NotVisibleLi do
  3360. NotVisible:AddLine(NotVisibleLi[k])
  3361. end
  3362. AB.QTBL[6] = {}
  3363. for k = 1, #VisibleLi do
  3364. G.tbl_Insert(AB.QTBL[6], VisibleLi[k])
  3365. end
  3366. end
  3367.  
  3368. NotVisible:SetSize(150, 320)
  3369. NotVisible:SetPos(EntPa:GetWide() * 0.75 - NotVisible:GetWide() / 2, 0)
  3370. NotVisible:SetMultiSelect(false)
  3371. NotVisible:AddColumn("Not Visible")
  3372. for k = 1, #NotVisibleLi do
  3373. NotVisible:AddLine(NotVisibleLi[k])
  3374. end
  3375. NotVisible.DoDoubleClick = function(panel, index, line)
  3376. G.tbl_Insert(VisibleLi, NotVisibleLi[index])
  3377. G.tbl_Rem(NotVisibleLi, index)
  3378. Visible:Clear()
  3379. NotVisible:Clear()
  3380. for k = 1, #VisibleLi do
  3381. Visible:AddLine(VisibleLi[k])
  3382. end
  3383. for k = 1, #NotVisibleLi do
  3384. NotVisible:AddLine(NotVisibleLi[k])
  3385. end
  3386. AB.QTBL[6] = {}
  3387. for k = 1, #VisibleLi do
  3388. G.tbl_Insert(AB.QTBL[6], VisibleLi[k])
  3389. end
  3390. end
  3391. end
  3392.  
  3393. function AB.PLYMenu()
  3394. local PlyMe = G.vg_Create("DFrame")
  3395. PlyMe:SetSize(600, 400)
  3396. PlyMe:SetTitle("")
  3397. PlyMe:Center()
  3398. PlyMe.btnMaxim:Hide()
  3399. PlyMe.btnMinim:Hide()
  3400. PlyMe:MakePopup()
  3401. function PlyMe:Paint()
  3402. G.sur_SetMat(Material("background.png", "noclamp"))
  3403. G.sur_SetDrawCol(AB.MCol)
  3404. G.sur_DrawTxtRectUV(0, 0, self:GetWide(), self:GetTall(), 0, 0, self:GetWide() / 32, self:GetTall() / 32)
  3405. G.sur_SetDrawCol(AB.MCol)
  3406. G.sur_DrawRect(0, 0, self:GetWide(), 22)
  3407. G.sur_SetDrawCol(AB.MCol)
  3408. G.sur_DrawOutRect(0, 0, self:GetWide(), self:GetTall())
  3409. end
  3410.  
  3411. local PlyPanel = G.vg_Create("DPanelList", PlyMe)
  3412. PlyPanel:SetName("log_tab")
  3413. PlyPanel:SetPos(2, 27)
  3414. PlyPanel:SetSize(PlyMe:GetWide() - 4, PlyMe:GetTall() - 40)
  3415. PlyPanel:SetSpacing(10)
  3416. PlyPanel:EnableHorizontal(false)
  3417. PlyPanel:EnableVerticalScrollbar(false)
  3418.  
  3419. local PlyView = G.vg_Create("DListView", PlyPanel)
  3420. PlyView:SetPos(10, 2)
  3421. PlyView:SetMultiSelect(false)
  3422. PlyView:SetSize(PlyPanel:GetWide() - 20, PlyPanel:GetTall() - 5)
  3423. local line1 = PlyView:AddColumn("Name")
  3424. PlyView:AddColumn("Rank")
  3425. PlyView:AddColumn("SteamID")
  3426. PlyView:AddColumn("Kills")
  3427. PlyView:AddColumn("Deaths")
  3428. if AB.GMRP() then
  3429. PlyView:AddColumn("Job")
  3430. PlyView:AddColumn("Money")
  3431. end
  3432. local CPlys = G.tbl_Copy(G.p_GetAll())
  3433. for _, v in G.loop, CPlys do
  3434. local Money = v:GetNetworkedInt("money")
  3435. if v.DarkRPVars and v.DarkRPVars.money then
  3436. Money = v.DarkRPVars.money
  3437. end
  3438. PlyView:AddLine(Name(v), G.str_Lower(NetworkedString(v, "UserGroup")), SteamID(v), Frags(v), Deaths(v), team.GetName(Team(v)), "$" .. AB.ma_Format(Money), v)
  3439. end
  3440.  
  3441. PlyView.OnRowSelected = function(Par, Line)
  3442. local DFrame = DermaMenu()
  3443. local ply = PlyView:GetLine(Line):GetValue(8)
  3444. if not (G.tbl_HasVal(AB.QTBL[5], Name(ply))) then
  3445. DFrame:AddOption("Add to Friends(Aimbot)", function()
  3446. G.tbl_Insert(AB.QTBL[5], Name(ply))
  3447. AB.ch_AddText("common/null.wav", "Player ", Color(116, 187, 251), Name(ply), color_white, " added to friends list(aimbot).")
  3448. end):SetIcon("icon16/user_add.png")
  3449. end
  3450.  
  3451. local aaSubM, aaSubM_ = DFrame:AddSubMenu("AAA", function() end)
  3452. aaSubM_:SetIcon("icon16/arrow_in.png")
  3453.  
  3454. aaSubM:AddOption("None", function()
  3455. G.tbl_Rem(aaCenter, #PlyView:GetLine(Line):GetValue(1)[1])
  3456. G.tbl_Insert(aaNone, Name(ply))
  3457. AB.ch_AddText("common/null.wav", "AAA method 'none' applied to ", Color(116, 187, 251), Name(ply), color_white, ".")
  3458. end):SetIcon("icon16/cross.png")
  3459.  
  3460. aaSubM:AddOption("Default", function()
  3461. G.tbl_Rem(aaNone, #PlyView:GetLine(Line):GetValue(1)[1])
  3462. G.tbl_Rem(aaCenter, #PlyView:GetLine(Line):GetValue(1)[1])
  3463. AB.ch_AddText("common/null.wav", "AAA method 'default' applied to ", Color(116, 187, 251), Name(ply), color_white, ".")
  3464. end):SetIcon("icon16/arrow_rotate_clockwise.png")
  3465.  
  3466. aaSubM:AddOption("OBBCenter", function()
  3467. G.tbl_Rem(aaNone, #PlyView:GetLine(Line):GetValue(1)[1])
  3468. G.tbl_Insert(aaCenter, Name(ply))
  3469. AB.ch_AddText("common/null.wav", "AAA method 'OBBCenter' applied to ", Color(116, 187, 251), Name(ply), color_white, ".")
  3470. end):SetIcon("icon16/arrow_rotate_anticlockwise.png")
  3471.  
  3472. if (G.tbl_HasVal(AB.QTBL[5], PlyView:GetLine(Line):GetValue(1))) then
  3473. DFrame:AddOption("Remove From Friends(Aimbot)", function()
  3474. G.tbl_Rem(AB.QTBL[5], #PlyView:GetLine(Line):GetValue(1)[1])
  3475. AB.ch_AddText("common/null.wav", "Player ", Color(116, 187, 251), Name(ply), color_white, " removed from friends list(aimbot).")
  3476. end):SetIcon("icon16/user_delete.png")
  3477. end
  3478.  
  3479. DFrame:AddOption("Copy Name", function()
  3480. SetClipboardText(PlyView:GetLine(Line):GetValue(1))
  3481. AB.ch_AddText("common/null.wav", "Player name ", Color(116, 187, 251), Name(ply), color_white, " copied to clipboard.")
  3482. end):SetIcon("icon16/user_go.png")
  3483.  
  3484. DFrame:AddOption("Copy SteamID", function()
  3485. SetClipboardText(PlyView:GetLine(Line):GetValue(3))
  3486. AB.ch_AddText("common/null.wav", "Player ", Color(116, 187, 251), Name(ply), color_white, " SteamID ", Color(255, 93, 0), SteamID(ply), color_white, " copied to clipboard.")
  3487. end):SetIcon("icon16/table_go.png")
  3488.  
  3489. DFrame:AddOption("Open Profile", function()
  3490. ply:ShowProfile()
  3491. AB.ch_AddText("common/null.wav", "Opened ", Color(116, 187, 251), Name(ply), color_white, " Steam profile.")
  3492. end):SetIcon("icon16/world_link.png")
  3493.  
  3494. if (Muted(ply) == false) then
  3495. DFrame:AddOption("Mute", function()
  3496. SetMuted(ply, true)
  3497. AB.ch_AddText("common/null.wav", "Player ", Color(116, 187, 251), Name(ply), color_white, " has been muted.")
  3498. end):SetIcon("icon16/sound_mute.png")
  3499. end
  3500.  
  3501. if (Muted(ply) == true) then
  3502. DFrame:AddOption("Unmute", function()
  3503. SetMuted(ply, false)
  3504. AB.ch_AddText("common/null.wav", "Player ", Color(116, 187, 251), Name(ply), color_white, " has been unmuted.")
  3505. end):SetIcon("icon16/sound.png")
  3506. end
  3507.  
  3508. if (AB.GMRP()) then
  3509. DFrame:AddOption("Copy Money", function()
  3510. SetClipboardText(PlyView:GetLine(Line):GetValue(7))
  3511. AB.ch_AddText("common/null.wav", "Copied ", Color(116, 187, 251), Name(ply), color_white, " money of ", Color(0, 201, 0), PlyView:GetLine(Line):GetValue(7), color_white, " copied to clipboard.")
  3512. end):SetIcon("icon16/money.png")
  3513. end
  3514. DFrame:Open()
  3515. end
  3516. end
  3517.  
  3518. function AB.FrMenu()
  3519. local FriMe = G.vg_Create("DFrame")
  3520. FriMe:SetSize(400, 400)
  3521. FriMe:SetTitle("")
  3522. FriMe:Center()
  3523. FriMe.btnMaxim:Hide()
  3524. FriMe.btnMinim:Hide()
  3525. FriMe:MakePopup()
  3526. function FriMe:Paint()
  3527. G.sur_SetMat(Material("background.png", "noclamp"))
  3528. G.sur_SetDrawCol(AB.MCol)
  3529. G.sur_DrawTxtRectUV(0, 0, self:GetWide(), self:GetTall(), 0, 0, self:GetWide() / 32, self:GetTall() / 32)
  3530. G.sur_SetDrawCol(AB.MCol)
  3531. G.sur_DrawRect(0, 0, self:GetWide(), 22)
  3532. G.sur_SetDrawCol(AB.MCol)
  3533. G.sur_DrawOutRect(0, 0, self:GetWide(), self:GetTall())
  3534. end
  3535.  
  3536. local FriLi = G.vg_Create("DPanelList", FriMe)
  3537. FriLi:SetSize(FriMe:GetWide() - 20, FriMe:GetTall() - 30)
  3538. FriLi:SetPos(5, 50)
  3539. FriLi:SetSpacing(0)
  3540.  
  3541. local FriPa = G.vg_Create("DPanel", FriMe)
  3542. FriPa:SetSize(FriMe:GetWide() - 10, FriMe:GetTall() - 10)
  3543. FriPa.Paint = function()
  3544. G.dr_RoundBox(0, 0, 0, 0, 0, AB.MCol)
  3545. end
  3546. FriLi:AddItem(FriPa)
  3547.  
  3548. local Friends = {}
  3549. local Enemies = {}
  3550. for k = 1, #G.p_GetAll() do
  3551. local v = G.p_GetAll()[k]
  3552. if (G.tbl_HasVal(AB.QTBL[5], Name(v))) then
  3553. if not G.tbl_HasVal(Friends, Name(v)) then
  3554. G.tbl_Insert(Friends, Name(v))
  3555. end
  3556. elseif not (G.tbl_HasVal(Enemies, Name(v))) then
  3557. G.tbl_Insert(Enemies, Name(v))
  3558. end
  3559. end
  3560.  
  3561. local MEnemies = G.vg_Create("DListView", FriPa)
  3562. local MFriends = G.vg_Create("DListView", FriPa)
  3563. MFriends:SetSize(150, 320)
  3564. MFriends:SetPos(FriPa:GetWide() * 0.25 - MFriends:GetWide() / 2, 0)
  3565. MFriends:SetMultiSelect(false)
  3566. MFriends:AddColumn("Friends")
  3567. for k = 1, #Friends do
  3568. MFriends:AddLine(Friends[k])
  3569. end
  3570.  
  3571. MFriends.DoDoubleClick = function(panel, index, line)
  3572. G.tbl_Insert(Enemies, Friends[index])
  3573. G.tbl_Rem(Friends, index)
  3574. MFriends:Clear()
  3575. MEnemies:Clear()
  3576. for k = 1, #Friends do
  3577. MFriends:AddLine(Friends[k])
  3578. end
  3579. for k = 1, #Enemies do
  3580. MEnemies:AddLine(Enemies[k])
  3581. end
  3582. AB.QTBL[5] = {}
  3583. for k = 1, #Friends do
  3584. G.tbl_Insert(AB.QTBL[5], Friends[k])
  3585. end
  3586. end
  3587.  
  3588. MEnemies:SetSize(150, 320)
  3589. MEnemies:SetPos(FriPa:GetWide() * 0.75 - MEnemies:GetWide() / 2, 0)
  3590. MEnemies:SetMultiSelect(false)
  3591. MEnemies:AddColumn("Enemies")
  3592. for k = 1, #Enemies do
  3593. MEnemies:AddLine(Enemies[k])
  3594. end
  3595. MEnemies.DoDoubleClick = function(panel, index, line)
  3596. G.tbl_Insert(Friends, Enemies[index])
  3597. G.tbl_Rem(Enemies, index)
  3598. MFriends:Clear()
  3599. MEnemies:Clear()
  3600. for k = 1, #Friends do
  3601. MFriends:AddLine(Friends[k])
  3602. end
  3603. for k = 1, #Enemies do
  3604. MEnemies:AddLine(Enemies[k])
  3605. end
  3606. AB.QTBL[5] = {}
  3607. for k = 1, #Friends do
  3608. G.tbl_Insert(AB.QTBL[5], Friends[k])
  3609. end
  3610. end
  3611. end
  3612.  
  3613. function AB.FindMurder()
  3614. for _, ply in pairs (ents.GetAll()) do
  3615. local owner = ply.Owner
  3616. if IsValid(owner) then
  3617. if table.HasValue(AB.mknife, ply:GetClass()) then
  3618. AB.ch_AddText("common/null.wav", owner:GetNWString("bystanderName"), " is probably the murderer!")
  3619. end
  3620. end
  3621. end
  3622. end
  3623.  
  3624. function AB.LogMenu()
  3625. local LFrame = G.vg_Create("DFrame")
  3626. LFrame:SetSize(650, 360)
  3627. LFrame:SetTitle("")
  3628. LFrame:Center()
  3629. LFrame.btnMaxim:Hide()
  3630. LFrame.btnMinim:Hide()
  3631. LFrame:MakePopup()
  3632. function LFrame:Paint()
  3633. G.sur_SetMat(Material("background.png", "noclamp"))
  3634. G.sur_SetDrawCol(AB.MCol)
  3635. G.sur_DrawTxtRectUV(0, 0, LFrame:GetWide(), LFrame:GetTall(), 0, 0, LFrame:GetWide() / 32, LFrame:GetTall() / 32)
  3636. G.sur_SetDrawCol(AB.MCol)
  3637. G.sur_DrawRect(0, 0, LFrame:GetWide(), 22)
  3638. G.sur_SetDrawCol(AB.MCol)
  3639. G.sur_DrawOutRect(0, 0, LFrame:GetWide(), LFrame:GetTall())
  3640. end
  3641.  
  3642. local LogPanel = G.vg_Create("DPanelList", LFrame)
  3643. LogPanel:SetName("log_tab")
  3644. LogPanel:SetPos(2, 27)
  3645. LogPanel:SetSize(LFrame:GetWide() - 4, LFrame:GetTall() - 40)
  3646. LogPanel:SetSpacing(10)
  3647. LogPanel:EnableHorizontal(false)
  3648. LogPanel:EnableVerticalScrollbar(false)
  3649.  
  3650. local LogView = G.vg_Create("DListView", LogPanel)
  3651. LogView:SetPos(122, 2)
  3652. LogView:SetMultiSelect(false)
  3653. LogView:SetSize(LogPanel:GetWide() - 139, LogPanel:GetTall() - 3)
  3654. LogView:AddColumn("Time"):SetFixedWidth(80)
  3655. LogView:AddColumn("Logs (" .. G.tbl_Count(AB.QTBL[2]) .. ")")
  3656. for i = #AB.QTBL[2], 1, -1 do
  3657. LogView:AddLine(AB.QTBL[3][i], AB.QTBL[2][i])
  3658. end
  3659.  
  3660. LogView.OnRowSelected = function(Par, Line)
  3661. local DFrame = DermaMenu()
  3662. DFrame:AddOption("Copy Line", function()
  3663. SetClipboardText(LogView:GetLine(Line):GetValue(1) .. " " .. LogView:GetLine(Line):GetValue(2))
  3664. end)
  3665. DFrame:Open()
  3666. end
  3667.  
  3668. local Clear = G.vg_Create("DButton", LogPanel)
  3669. Clear:SetText("Clear")
  3670. Clear:SetSize(100, 20)
  3671. Clear:SetPos(10, 10)
  3672. Clear:SetTextColor(color_white)
  3673. Clear.DoClick = function()
  3674. G.sur_PlaySnd("UI/buttonclickrelease.wav")
  3675. LogView:Clear()
  3676. AB.QTBL[2] = {}
  3677. end
  3678. Clear.OnCursorEntered = function()
  3679. G.sur_PlaySnd("UI/buttonrollover.wav")
  3680. Clear:SetTextColor(Color(150, 150, 150, 255))
  3681. end
  3682. Clear.OnCursorExited = function()
  3683. Clear:SetTextColor(color_white)
  3684. end
  3685. Clear.Paint = function()
  3686. G.sur_SetDrawCol(AB.MCol)
  3687. G.sur_DrawRect(0, 0, Clear:GetWide(), Clear:GetTall())
  3688. end
  3689.  
  3690. local Update = G.vg_Create("DButton", LogPanel)
  3691. Update:SetText("Update")
  3692. Update:SetSize(100, 20)
  3693. Update:SetPos(10, 40)
  3694. Update:SetTextColor(color_white)
  3695. Update.DoClick = function()
  3696. G.sur_PlaySnd("UI/buttonclickrelease.wav")
  3697. LogView:Clear()
  3698. for i = #AB.QTBL[2], 1, -1 do
  3699. LogView:AddLine(AB.QTBL[3][i], AB.QTBL[2][i])
  3700. end
  3701. end
  3702. Update.OnCursorEntered = function()
  3703. G.sur_PlaySnd("UI/buttonrollover.wav")
  3704. Update:SetTextColor(Color(150, 150, 150, 255))
  3705. end
  3706. Update.OnCursorExited = function()
  3707. Update:SetTextColor(color_white)
  3708. end
  3709. Update.Paint = function()
  3710. G.sur_SetDrawCol(AB.MCol)
  3711. G.sur_DrawRect(0, 0, Update:GetWide(), Update:GetTall())
  3712. end
  3713. end
  3714.  
  3715. local MENU_TABS = {}
  3716. MENU_TABS[1] = "Aimbot"
  3717. MENU_TABS[2] = "Visuals"
  3718. MENU_TABS[3] = "Misc"
  3719. MENU_TABS[4] = "HvH"
  3720. MENU_TABS[5] = "Logging"
  3721. MENU_TABS[6] = "Design"
  3722.  
  3723. local MENU_ITEMS = {}
  3724. G.tbl_Insert(MENU_ITEMS, {tab = "Aimbot", convar = "aim_toggle", text = "Toggle", t = "checkbox"})
  3725. G.tbl_Insert(MENU_ITEMS, {tab = "Aimbot", convar = "aim_autofire", text = "Auto Fire", t = "checkbox"})
  3726. G.tbl_Insert(MENU_ITEMS, {tab = "Aimbot", convar = "aim_los", text = "Check LOS", t = "checkbox"})
  3727. G.tbl_Insert(MENU_ITEMS, {tab = "Aimbot", convar = "aim_trigger", text = "Trigger Bot", t = "checkbox"})
  3728. G.tbl_Insert(MENU_ITEMS, {tab = "Aimbot", convar = "aim_psilent", text = "Perfect Silent Aim", t = "checkbox"})
  3729. G.tbl_Insert(MENU_ITEMS, {tab = "Aimbot", convar = "aim_silent", text = "Silent Aim", t = "checkbox"})
  3730. G.tbl_Insert(MENU_ITEMS, {tab = "Aimbot", convar = "aim_norecoil", text = "No Recoil", t = "checkbox"})
  3731. G.tbl_Insert(MENU_ITEMS, {tab = "Aimbot", convar = "aim_nospread", text = "No Spread", t = "checkbox"})
  3732. G.tbl_Insert(MENU_ITEMS, {tab = "Aimbot", convar = "aim_players", text = "Ignore Players", t = "checkbox"})
  3733. G.tbl_Insert(MENU_ITEMS, {tab = "Aimbot", convar = "aim_npcs", text = "Ignore NPCs", t = "checkbox"})
  3734. G.tbl_Insert(MENU_ITEMS, {tab = "Aimbot", convar = "aim_friends", text = "Ignore Friends", t = "checkbox"})
  3735. G.tbl_Insert(MENU_ITEMS, {tab = "Aimbot", convar = "aim_team", text = "Ignore Teammates", t = "checkbox"})
  3736. G.tbl_Insert(MENU_ITEMS, {tab = "Aimbot", convar = "aim_spawnpro", text = "Ignore Spawn Protection", t = "checkbox"})
  3737. G.tbl_Insert(MENU_ITEMS, {tab = "Aimbot", convar = "aim_fov", text = "Field of View", t = "slider", deci = 1, min = 0, max = 360})
  3738. G.tbl_Insert(MENU_ITEMS, {tab = "Aimbot", convar = "aim_distance", text = "Distance", t = "slider", deci = 0, min = 0, max = 25650})
  3739. G.tbl_Insert(MENU_ITEMS, {tab = "Aimbot", func = AB.FrMenu, text = "Friends Menu", t = "dbutton"})
  3740. G.tbl_Insert(MENU_ITEMS, {tab = "Aimbot", text = "Aim Key", t = "label"})
  3741. G.tbl_Insert(MENU_ITEMS, {tab = "Aimbot", convar = "aim_key", text = "Aim Key", t = "combobox_keys", tbl = AB.QTBL[20]})
  3742. G.tbl_Insert(MENU_ITEMS, {tab = "Aimbot", text = "Bone Position", t = "label"})
  3743. G.tbl_Insert(MENU_ITEMS, {tab = "Aimbot", convar = "aim_targetspot", text = "Bone Position", t = "combobox", tbl = AB.QTBL[11]})
  3744. G.tbl_Insert(MENU_ITEMS, {tab = "Visuals", text = "Player Info", t = "label"})
  3745. G.tbl_Insert(MENU_ITEMS, {tab = "Visuals", convar = "esp", text = "Enable ESP", t = "checkbox"})
  3746. G.tbl_Insert(MENU_ITEMS, {tab = "Visuals", convar = "esp_info_rank", text = "Rank", t = "checkbox"})
  3747. G.tbl_Insert(MENU_ITEMS, {tab = "Visuals", convar = "esp_info_name", text = "Name", t = "checkbox"})
  3748. G.tbl_Insert(MENU_ITEMS, {tab = "Visuals", convar = "esp_info_health", text = "Health", t = "checkbox"})
  3749. G.tbl_Insert(MENU_ITEMS, {tab = "Visuals", convar = "esp_info_weapon", text = "Weapon", t = "checkbox"})
  3750. G.tbl_Insert(MENU_ITEMS, {tab = "Visuals", convar = "esp_info_distance", text = "Distance", t = "checkbox"})
  3751. G.tbl_Insert(MENU_ITEMS, {tab = "Visuals", convar = "esp_ents", text = "ENTs", t = "checkbox"})
  3752. G.tbl_Insert(MENU_ITEMS, {tab = "Visuals", convar = "esp_distance", text = "Distance", t = "slider", deci = 0, min = 0, max = 25650})
  3753. G.tbl_Insert(MENU_ITEMS, {tab = "Visuals", text = "Chams", t = "label"})
  3754. G.tbl_Insert(MENU_ITEMS, {tab = "Visuals", convar = "esp_chams_players", text = "Players", t = "checkbox"})
  3755. G.tbl_Insert(MENU_ITEMS, {tab = "Visuals", convar = "esp_chams_players_wpn", text = "Weapons", t = "checkbox"})
  3756. G.tbl_Insert(MENU_ITEMS, {tab = "Visuals", convar = "esp_chams_ents", text = "ENTs", t = "checkbox"})
  3757. G.tbl_Insert(MENU_ITEMS, {tab = "Visuals", convar = "esp_chams_xqz", text = "XQZ", t = "checkbox"})
  3758. G.tbl_Insert(MENU_ITEMS, {tab = "Visuals", convar = "esp_distance_chams", text = "Distance", t = "slider", deci = 0, min = 0, max = 25650})
  3759. G.tbl_Insert(MENU_ITEMS, {tab = "Visuals", text = "Lasers", t = "label"})
  3760. G.tbl_Insert(MENU_ITEMS, {tab = "Visuals", convar = "esp_barrel_laser", text = "Barrel Laser", t = "checkbox"})
  3761. G.tbl_Insert(MENU_ITEMS, {tab = "Visuals", convar = "esp_head_laser", text = "Head Laser", t = "checkbox"})
  3762. G.tbl_Insert(MENU_ITEMS, {tab = "Visuals", convar = "esp_ground_laser", text = "Ground Laser", t = "checkbox"})
  3763. G.tbl_Insert(MENU_ITEMS, {tab = "Visuals", text = "Lights", t = "label"})
  3764. G.tbl_Insert(MENU_ITEMS, {tab = "Visuals", convar = "light_penabled", text = "Dynamic Lights", t = "checkbox"})
  3765. G.tbl_Insert(MENU_ITEMS, {tab = "Visuals", convar = "light_psize", text = "Dynamic Lights Size", t = "slider", deci = 0, min = 0, max = 1000})
  3766. G.tbl_Insert(MENU_ITEMS, {tab = "Visuals", convar = "light_pbrightness", text = "Dynamic Lights Brightness", t = "slider", deci = 1, min = 0, max = 10})
  3767. G.tbl_Insert(MENU_ITEMS, {tab = "Visuals", text = "Misc", t = "label"})
  3768. G.tbl_Insert(MENU_ITEMS, {tab = "Visuals", convar = "esp_skeleton", text = "Skeleton", t = "checkbox"})
  3769. G.tbl_Insert(MENU_ITEMS, {tab = "Visuals", convar = "esp_hitbox", text = "Hitboxes", t = "checkbox"})
  3770. G.tbl_Insert(MENU_ITEMS, {tab = "Visuals", convar = "esp_2dbox", text = "2DBox", t = "checkbox"})
  3771. G.tbl_Insert(MENU_ITEMS, {tab = "Visuals", convar = "esp_2dbox_ent", text = "2DBox - ENTs", t = "checkbox"})
  3772. G.tbl_Insert(MENU_ITEMS, {tab = "Visuals", convar = "esp_hpbar", text = "HP-Bar", t = "checkbox"})
  3773. G.tbl_Insert(MENU_ITEMS, {tab = "Visuals", convar = "esp_distance_box", text = "Distance", t = "slider", deci = 0, min = 0, max = 25650})
  3774. G.tbl_Insert(MENU_ITEMS, {tab = "Visuals", func = AB.ENTMenu, text = "Entity Finder Menu", t = "dbutton"})
  3775. G.tbl_Insert(MENU_ITEMS, {tab = "Misc", text = "Radar", t = "label"})
  3776. G.tbl_Insert(MENU_ITEMS, {tab = "Misc", convar = "radar", text = "Enable Radar", t = "checkbox"})
  3777. G.tbl_Insert(MENU_ITEMS, {tab = "Misc", convar = "radar_x", text = "Position X", t = "slider", deci = 0, min = 0, max = ScrW() - 255})
  3778. G.tbl_Insert(MENU_ITEMS, {tab = "Misc", convar = "radar_y", text = "Position Y", t = "slider", deci = 0, min = 0, max = ScrH() - 255})
  3779. G.tbl_Insert(MENU_ITEMS, {tab = "Misc", convar = "radar_distance", text = "Distance", t = "slider", deci = 0, min = 0, max = 25650})
  3780. G.tbl_Insert(MENU_ITEMS, {tab = "Misc", text = "Speedhack", t = "label"})
  3781. G.tbl_Insert(MENU_ITEMS, {tab = "Misc", convar = "misc_sh_enable", text = "Speedhack", t = "checkbox"})
  3782. G.tbl_Insert(MENU_ITEMS, {tab = "Misc", convar = "misc_sh_key", text = "Speedhack Key", t = "combobox_keys", tbl = AB.QTBL[21]})
  3783. G.tbl_Insert(MENU_ITEMS, {tab = "Misc", convar = "misc_sh_speed", text = "Speedhack Speed", t = "slider", deci = 1, min = 1, max = 10})
  3784. G.tbl_Insert(MENU_ITEMS, {tab = "Misc", text = "Spam", t = "label"})
  3785. G.tbl_Insert(MENU_ITEMS, {tab = "Misc", convar = "misc_cmdspam", text = "Command Spam", t = "checkbox"})
  3786. G.tbl_Insert(MENU_ITEMS, {tab = "Misc", convar = "misc_cmdspam_msg", text = "Command Spam", t = "tentry"})
  3787. G.tbl_Insert(MENU_ITEMS, {tab = "Misc", convar = "misc_chatspam", text = "Chat Spam", t = "checkbox"})
  3788. G.tbl_Insert(MENU_ITEMS, {tab = "Misc", convar = "misc_chatspam_msg", text = "Chat Spam", t = "tentry"})
  3789. G.tbl_Insert(MENU_ITEMS, {tab = "Misc", text = "Other", t = "label"})
  3790. G.tbl_Insert(MENU_ITEMS, {tab = "Misc", convar = "misc_crosshair", text = "Crosshair", t = "checkbox"})
  3791. G.tbl_Insert(MENU_ITEMS, {tab = "Misc", convar = "misc_rapidfire", text = "Rapid Fire", t = "checkbox"})
  3792. G.tbl_Insert(MENU_ITEMS, {tab = "Misc", convar = "misc_log_dmg_snd", text = "Hit Sounds", t = "checkbox"})
  3793. G.tbl_Insert(MENU_ITEMS, {tab = "Misc", convar = "misc_nohands", text = "No Hands", t = "checkbox"})
  3794. G.tbl_Insert(MENU_ITEMS, {tab = "Misc", convar = "misc_bhop", text = "Bunnyhop", t = "checkbox"})
  3795. G.tbl_Insert(MENU_ITEMS, {tab = "Misc", convar = "misc_bhop_astrafe", text = "Autostrafe", t = "checkbox"})
  3796. G.tbl_Insert(MENU_ITEMS, {tab = "Misc", convar = "misc_showkills_say", text = "Say Kills", t = "checkbox"})
  3797. G.tbl_Insert(MENU_ITEMS, {tab = "Misc", convar = "misc_showkills_print", text = "Print Kills", t = "checkbox"})
  3798. G.tbl_Insert(MENU_ITEMS, {tab = "Misc", convar = "misc_antiafk", text = "Anti-AFK", t = "checkbox"})
  3799. G.tbl_Insert(MENU_ITEMS, {tab = "Misc", convar = "misc_speclist", text = "Display Spectators", t = "checkbox"})
  3800. G.tbl_Insert(MENU_ITEMS, {tab = "Misc", convar = "misc_showspec", text = "Spectator Alerts", t = "checkbox"})
  3801. G.tbl_Insert(MENU_ITEMS, {tab = "Misc", convar = "misc_showadmins", text = "Admin Alerts", t = "checkbox"})
  3802. G.tbl_Insert(MENU_ITEMS, {tab = "Misc", text = "Force CVar", t = "dbutton_cv"})
  3803. G.tbl_Insert(MENU_ITEMS, {tab = "Misc", func = AB.PLYMenu, text = "Player Info Menu", t = "dbutton"})
  3804. G.tbl_Insert(MENU_ITEMS, {tab = "Misc", func = AB.ServerStats, text = "Server Stats", t = "dbutton"})
  3805. G.tbl_Insert(MENU_ITEMS, {tab = "Misc", func = AB.FindMurder, text = "Find Murderer", t = "dbutton"})
  3806. G.tbl_Insert(MENU_ITEMS, {tab = "HvH", convar = "aim_fakelag", text = "Fake Lag", t = "checkbox"})
  3807. G.tbl_Insert(MENU_ITEMS, {tab = "HvH", convar = "aim_fakelag_rate", text = "Fake Lag Rate", t = "slider", deci = 0, min = 1, max = 100})
  3808. G.tbl_Insert(MENU_ITEMS, {tab = "HvH", convar = "aim_bone", text = "Target Bones", t = "checkbox"})
  3809. G.tbl_Insert(MENU_ITEMS, {tab = "HvH", convar = "aim_hitbox", text = "Target Hitboxes", t = "checkbox"})
  3810. G.tbl_Insert(MENU_ITEMS, {tab = "HvH", convar = "aim_bscan", text = "Bone Scan", t = "checkbox"})
  3811. G.tbl_Insert(MENU_ITEMS, {tab = "HvH", convar = "aim_aaaa", text = "Anti Anti Anti-Aim", t = "checkbox"})
  3812. G.tbl_Insert(MENU_ITEMS, {tab = "HvH", convar = "aim_aaa", text = "Anti Anti-Aim", t = "checkbox"})
  3813. G.tbl_Insert(MENU_ITEMS, {tab = "HvH", convar = "aim_aaa_fb", text = "Anti Anti-Aim - Fallback", t = "checkbox"})
  3814. G.tbl_Insert(MENU_ITEMS, {tab = "HvH", convar = "aim_aa", text = "Anti-Aim", t = "checkbox"})
  3815. G.tbl_Insert(MENU_ITEMS, {tab = "HvH", convar = "aim_aa_pitch", text = "Pitch", t = "slider", deci = 0, min = -360, max = 360})
  3816. G.tbl_Insert(MENU_ITEMS, {tab = "HvH", convar = "aim_aa_yaw", text = "Yaw", t = "slider", deci = 0, min = -360, max = 360})
  3817. G.tbl_Insert(MENU_ITEMS, {tab = "HvH", convar = "aim_aa_roll", text = "Roll", t = "slider", deci = 0, min = -360, max = 360})
  3818. G.tbl_Insert(MENU_ITEMS, {tab = "HvH", convar = "aim_aa_spin", text = "Spin Speed", t = "slider", deci = 0, min = 0, max = 500})
  3819. G.tbl_Insert(MENU_ITEMS, {tab = "HvH", text = "Anti-Aim Method", t = "label"})
  3820. G.tbl_Insert(MENU_ITEMS, {tab = "HvH", convar = "aim_aa_type", text = "Anti-Aim Method", t = "combobox_keys", tbl = AB.QTBL[15]})
  3821. G.tbl_Insert(MENU_ITEMS, {tab = "Logging", convar = "misc_chat_msgs", text = "Chat Notifications", t = "checkbox"})
  3822. G.tbl_Insert(MENU_ITEMS, {tab = "Logging", convar = "misc_logging", text = "Console Logging", t = "checkbox"})
  3823. G.tbl_Insert(MENU_ITEMS, {tab = "Logging", convar = "misc_logging_snd", text = "Console Logging Sounds", t = "checkbox"})
  3824. G.tbl_Insert(MENU_ITEMS, {tab = "Logging", convar = "misc_log_kills", text = "Kills", t = "checkbox"})
  3825. G.tbl_Insert(MENU_ITEMS, {tab = "Logging", convar = "misc_log_dmg", text = "Damage", t = "checkbox"})
  3826. G.tbl_Insert(MENU_ITEMS, {tab = "Logging", convar = "detour_fwrite", text = "file.Write", t = "checkbox"})
  3827. G.tbl_Insert(MENU_ITEMS, {tab = "Logging", convar = "detour_ftime", text = "file.Time", t = "checkbox"})
  3828. G.tbl_Insert(MENU_ITEMS, {tab = "Logging", convar = "detour_fappend", text = "file.Append", t = "checkbox"})
  3829. G.tbl_Insert(MENU_ITEMS, {tab = "Logging", convar = "detour_fsize", text = "file.Size", t = "checkbox"})
  3830. G.tbl_Insert(MENU_ITEMS, {tab = "Logging", convar = "detour_fopen", text = "file.Open", t = "checkbox"})
  3831. G.tbl_Insert(MENU_ITEMS, {tab = "Logging", convar = "detour_fread", text = "file.Read", t = "checkbox"})
  3832. G.tbl_Insert(MENU_ITEMS, {tab = "Logging", convar = "detour_fexistsex", text = "file.ExistsEx", t = "checkbox"})
  3833. G.tbl_Insert(MENU_ITEMS, {tab = "Logging", convar = "detour_fexists", text = "file.Exists", t = "checkbox"})
  3834. G.tbl_Insert(MENU_ITEMS, {tab = "Logging", convar = "detour_fisdir", text = "file.IsDir", t = "checkbox"})
  3835. G.tbl_Insert(MENU_ITEMS, {tab = "Logging", convar = "detour_concmd", text = ":ConCommand()", t = "checkbox"})
  3836. G.tbl_Insert(MENU_ITEMS, {tab = "Logging", convar = "detour_sendlua", text = ":SendLua()", t = "checkbox"})
  3837. G.tbl_Insert(MENU_ITEMS, {tab = "Logging", convar = "detour_ip", text = ":IPAddress()", t = "checkbox"})
  3838. G.tbl_Insert(MENU_ITEMS, {tab = "Logging", convar = "detour_rcc", text = "RunConsoleCommand", t = "checkbox"})
  3839. G.tbl_Insert(MENU_ITEMS, {tab = "Logging", convar = "detour_GetCVarnum", text = "GetConVarNum", t = "checkbox"})
  3840. G.tbl_Insert(MENU_ITEMS, {tab = "Logging", convar = "detour_GetCVarstr", text = "GetConVarString", t = "checkbox"})
  3841. G.tbl_Insert(MENU_ITEMS, {tab = "Logging", convar = "detour_cvars", text = "cvar.", t = "checkbox"})
  3842. G.tbl_Insert(MENU_ITEMS, {tab = "Logging", convar = "detour_cvars_num", text = "ConVar Number", t = "checkbox"})
  3843. G.tbl_Insert(MENU_ITEMS, {tab = "Logging", convar = "detour_cvars_str", text = "ConVar String", t = "checkbox"})
  3844. G.tbl_Insert(MENU_ITEMS, {tab = "Logging", convar = "detour_cvars_bool", text = "ConVar Bool", t = "checkbox"})
  3845. G.tbl_Insert(MENU_ITEMS, {tab = "Logging", convar = "detour_tcreate", text = "timer.Create", t = "checkbox"})
  3846. G.tbl_Insert(MENU_ITEMS, {tab = "Logging", convar = "detour_tsimple", text = "timer.Simple", t = "checkbox"})
  3847. G.tbl_Insert(MENU_ITEMS, {tab = "Logging", convar = "detour_hookadd", text = "hook.Add", t = "checkbox"})
  3848. G.tbl_Insert(MENU_ITEMS, {tab = "Logging", convar = "detour_hookrem", text = "hook.Remove", t = "checkbox"})
  3849. G.tbl_Insert(MENU_ITEMS, {tab = "Logging", convar = "detour_hookcall", text = "hook.Call", t = "checkbox"})
  3850. G.tbl_Insert(MENU_ITEMS, {tab = "Logging", convar = "detour_runstring", text = "RunString", t = "checkbox"})
  3851. G.tbl_Insert(MENU_ITEMS, {tab = "Logging", convar = "detour_compstring", text = "CompileString", t = "checkbox"})
  3852. G.tbl_Insert(MENU_ITEMS, {tab = "Logging", convar = "detour_nreceive", text = "net.Receive", t = "checkbox"})
  3853. G.tbl_Insert(MENU_ITEMS, {tab = "Logging", convar = "detour_nincoming", text = "net.Incoming", t = "checkbox"})
  3854. G.tbl_Insert(MENU_ITEMS, {tab = "Logging", convar = "detour_nsend", text = "net.Send", t = "checkbox"})
  3855. G.tbl_Insert(MENU_ITEMS, {tab = "Logging", convar = "detour_nstserver", text = "net.SendToServer", t = "checkbox"})
  3856. G.tbl_Insert(MENU_ITEMS, {tab = "Logging", convar = "detour_nstart", text = "net.Start", t = "checkbox"})
  3857. G.tbl_Insert(MENU_ITEMS, {tab = "Logging", convar = "detour_umsg", text = "usermessage.IncomingMessage", t = "checkbox"})
  3858. G.tbl_Insert(MENU_ITEMS, {tab = "Logging", func = AB.LogMenu, text = "Log Menu", t = "dbutton"})
  3859. G.tbl_Insert(MENU_ITEMS, {tab = "Design", text = "Theme Color", t = "label"})
  3860. G.tbl_Insert(MENU_ITEMS, {tab = "Design", convar = "misc_theme_color", text = "Theme Color", t = "cmixer"})
  3861. G.tbl_Insert(MENU_ITEMS, {tab = "Design", text = "Crosshair Color", t = "label"})
  3862. G.tbl_Insert(MENU_ITEMS, {tab = "Design", convar = "misc_crosshair_col", text = "Crosshair Color", t = "cmixer"})
  3863.  
  3864. local AOpen = false
  3865. function AB.Menu()
  3866. local Frame = G.vg_Create("DFrame")
  3867. Frame:SetPos(ScrW()/2 - 300, ScrH()/2 - 233)
  3868. Frame:SizeTo(600, 465, .3, 0, .3)
  3869. Frame:SetTitle("")
  3870. Frame:SetSizable(false)
  3871. Frame:SetDraggable(false)
  3872. Frame:ShowCloseButton(false)
  3873. Frame.btnMaxim:Hide()
  3874. Frame.btnMinim:Hide()
  3875. Frame:MakePopup()
  3876. function Frame:Paint()
  3877. G.sur_SetMat(Material("background.png", "noclamp"))
  3878. G.sur_SetDrawCol(AB.MCol)
  3879. G.sur_DrawTxtRectUV(0, 0, self:GetWide(), self:GetTall(), 0, 0, self:GetWide()/32, self:GetTall()/32)
  3880. G.sur_SetDrawCol(AB.MCol)
  3881. G.sur_DrawRect(0, 0, self:GetWide(), 22)
  3882. G.sur_SetDrawCol(AB.MCol)
  3883. G.sur_DrawOutRect(0, 0, self:GetWide(), self:GetTall())
  3884. end
  3885.  
  3886. G.t_Simple(.4, function()
  3887. local CloseB = G.vg_Create("DButton", Frame)
  3888. CloseB:SetPos(Frame:GetWide() - 35, 5)
  3889. CloseB:SetSize(30, 15)
  3890. CloseB:SetText("X")
  3891. CloseB:SetTextColor(color_white)
  3892. CloseB.DoClick = function(self)
  3893. G.sur_PlaySnd("UI/buttonclickrelease.wav")
  3894. Frame:SizeTo(0, 0, .2, 0, .2)
  3895. G.t_Simple(.3, function()
  3896. Frame:Close()
  3897. AOpen = false
  3898. end)
  3899. end
  3900. CloseB.OnCursorEntered = function()
  3901. G.sur_PlaySnd("UI/buttonrollover.wav")
  3902. CloseB:SetTextColor(Color(150, 150, 150, 255))
  3903. end
  3904. CloseB.OnCursorExited = function()
  3905. CloseB:SetTextColor(color_white)
  3906. end
  3907. CloseB.Paint = function()
  3908. local Col = AB.MCol
  3909. G.sur_SetDrawCol(Color(Col.r/2, Col.g/2, Col.b/2))
  3910. G.sur_DrawRect(0, 0, CloseB:GetWide(), CloseB:GetTall())
  3911. end
  3912.  
  3913. local Logo = G.vg_Create("DLabel", Frame)
  3914. Logo:SetFont("LogoF")
  3915. Logo:SetText("Ampris")
  3916. Logo:SetPos(35, 180)
  3917. Logo:SetSize(200, 200)
  3918. function Logo:Paint() // Only way for DLabels to be 'updated'
  3919. Logo:SetTextColor(AB.MCol)
  3920. end
  3921.  
  3922. local Cred = G.vg_Create("DLabel", Frame)
  3923. Cred:SetFont("Credits")
  3924. Cred:SetText("A private gLua cheat by Robby.")
  3925. Cred:SetPos(20, 210)
  3926. Cred:SetSize(200, 200)
  3927. function Cred:Paint()
  3928. Cred:SetTextColor(AB.MCol)
  3929. end
  3930.  
  3931. local TabList = G.vg_Create("DColumnSheet", Frame)
  3932. TabList:SetSize(Frame:GetWide() - 40, Frame:GetTall() - 30)
  3933. TabList:SetPos(10, 30)
  3934. TabList.ButtonOnly = true
  3935.  
  3936. function TabList.Content:Paint() end
  3937.  
  3938. for _, v in G.loop, MENU_TABS do
  3939. local Panel = G.vg_Create("DPanelList", TabList)
  3940. local p_Item = TabList:AddSheet(v, Panel , "models/effects/vol_light001")
  3941. Panel:SetSize(TabList:GetWide() - 200, TabList:GetTall() - 10)
  3942. Panel:EnableVerticalScrollbar(true)
  3943. Panel:SetSpacing(5)
  3944. Panel:SetPadding(5)
  3945. function Panel:Paint()
  3946. G.sur_SetDrawCol(Color(0, 0, 0, 102))
  3947. G.sur_DrawRect(0, 0, self:GetWide(), self:GetTall())
  3948. end
  3949.  
  3950. for _, _v in G.loop, MENU_ITEMS do
  3951. if (_v.tab == v) then
  3952. if (_v.t == "checkbox") then
  3953. local Item = G.vg_Create("DButton")
  3954. Item:SetText("")
  3955. Item:SetSize(15, 15)
  3956. if (AB.set_Get(_v.convar) == 1) then
  3957. Item:SetTextColor(color_white)
  3958. elseif (AB.set_Get(_v.convar) == 0) then
  3959. Item:SetTextColor(color_black)
  3960. end
  3961. Item.DoClick = function(self)
  3962. G.sur_PlaySnd("UI/buttonclickrelease.wav")
  3963. if (AB.set_Get(_v.convar) == 1) then
  3964. AB.set_Change(_v.convar, 0)
  3965. Item:SetTextColor(color_black)
  3966. elseif (AB.set_Get(_v.convar) == 0) then
  3967. AB.set_Change(_v.convar, 1)
  3968. Item:SetTextColor(color_white)
  3969. end
  3970. end
  3971. Item.Paint = function()
  3972. local Col = AB.MCol
  3973. G.dr_DrTxt(_v.text, "CBox", 0, 2, Color(255,255,255,255), TEXT_ALIGN_LEFT )
  3974. if (AB.set_Get(_v.convar) == 1) then
  3975. G.sur_SetDrawCol(AB.MCol)
  3976. G.sur_DrawRect(Panel:GetWide() - 50, 0, 15, 15)
  3977. G.sur_SetDrawCol(color_white)
  3978. G.sur_DrawOutRect(Panel:GetWide() - 50, 0, 15, 15)
  3979. elseif (AB.set_Get(_v.convar) == 0) then
  3980. G.sur_SetDrawCol(color_white)
  3981. G.sur_DrawRect(Panel:GetWide() - 50, 0, 15, 15)
  3982. G.sur_SetDrawCol(AB.MCol)
  3983. G.sur_DrawOutRect(Panel:GetWide() - 50, 0, 15, 15)
  3984. end
  3985. end
  3986. Item.OnCursorEntered = function()
  3987. if (AB.set_Get(_v.convar) == 1) then
  3988. Item:SetTextColor(color_black)
  3989. elseif (AB.set_Get(_v.convar) == 0) then
  3990. Item:SetTextColor(Color(150, 150, 150, 255))
  3991. end
  3992. Item.Paint = function()
  3993. local Col = AB.MCol
  3994. G.dr_DrTxt(_v.text, "CBox", 0, 2, Color(255,255,255,255), TEXT_ALIGN_LEFT )
  3995. if (AB.set_Get(_v.convar) == 1) then
  3996. G.sur_SetDrawCol(Color(Col.r/1.25, Col.g/1.25, Col.b/1.25))
  3997. G.sur_DrawRect(Panel:GetWide() - 50, 0, 15, 15)
  3998. G.sur_SetDrawCol(color_white)
  3999. G.sur_DrawOutRect(Panel:GetWide() - 50, 0, 15, 15)
  4000. elseif (AB.set_Get(_v.convar) == 0) then
  4001. G.sur_SetDrawCol(Color(255/1.25, 255/1.25, 255/1.25))
  4002. G.sur_DrawRect(Panel:GetWide() - 50, 0, 15, 15)
  4003. G.sur_SetDrawCol(AB.MCol)
  4004. G.sur_DrawOutRect(Panel:GetWide() - 50, 0, 15, 15)
  4005. end
  4006. end
  4007. end
  4008. Item.OnCursorExited = function()
  4009. if (AB.set_Get(_v.convar) == 1) then
  4010. Item:SetTextColor(color_white)
  4011. elseif (AB.set_Get(_v.convar) == 0) then
  4012. Item:SetTextColor(color_black)
  4013. end
  4014. Item.Paint = function()
  4015. G.dr_DrTxt(_v.text, "CBox", 0, 2, Color(255,255,255,255), TEXT_ALIGN_LEFT )
  4016. if (AB.set_Get(_v.convar) == 1) then
  4017. G.sur_SetDrawCol(AB.MCol)
  4018. G.sur_DrawRect(Panel:GetWide() - 50, 0, 15, 15)
  4019. G.sur_SetDrawCol(color_white)
  4020. G.sur_DrawOutRect(Panel:GetWide() - 50, 0, 15, 15)
  4021. elseif (AB.set_Get(_v.convar) == 0) then
  4022. G.sur_SetDrawCol(color_white)
  4023. G.sur_DrawRect(Panel:GetWide() - 50, 0, 15, 15)
  4024. G.sur_SetDrawCol(AB.MCol)
  4025. G.sur_DrawOutRect(Panel:GetWide() - 50, 0, 15, 15)
  4026. end
  4027. end
  4028. end
  4029. Panel:AddItem(Item)
  4030.  
  4031. elseif (_v.t == "dbutton") then
  4032. local Item = G.vg_Create("DButton")
  4033. Item:SetText(_v.text)
  4034. Item:SetTextColor(color_white)
  4035. Item.DoClick = function(self)
  4036. G.sur_PlaySnd("UI/buttonclickrelease.wav")
  4037. _v.func()
  4038. end
  4039. Item.OnCursorEntered = function()
  4040. G.sur_PlaySnd("UI/buttonrollover.wav")
  4041. Item:SetTextColor(Color(150, 150, 150, 255))
  4042. Item.Paint = function()
  4043. local Col = AB.MCol
  4044. G.sur_SetDrawCol(Color(Col.r/1.25, Col.g/1.25, Col.b/1.25))
  4045. G.sur_DrawRect(0, 0, Item:GetWide(), Item:GetTall())
  4046. end
  4047. end
  4048. Item.OnCursorExited = function()
  4049. Item:SetTextColor(color_white)
  4050. Item.Paint = function()
  4051. G.sur_SetDrawCol(AB.MCol)
  4052. G.sur_DrawRect(0, 0, Item:GetWide(), Item:GetTall())
  4053. end
  4054. end
  4055. Item.Paint = function()
  4056. G.sur_SetDrawCol(AB.MCol)
  4057. G.sur_DrawRect(0, 0, Item:GetWide(), Item:GetTall())
  4058. Item.Paint = function()
  4059. G.sur_SetDrawCol(AB.MCol)
  4060. G.sur_DrawRect(0, 0, Item:GetWide(), Item:GetTall())
  4061. end
  4062. end
  4063. Panel:AddItem(Item)
  4064.  
  4065. elseif (_v.t == "slider") then
  4066. local Item = G.vg_Create("DNumSlider")
  4067. Item:SetText(_v.text)
  4068. Item:SetMin(_v.min)
  4069. Item:SetMax(_v.max)
  4070. Item:SetDecimals(_v.deci)
  4071. Item.Slider.Knob:SetSize(15,8)
  4072. Item.Slider.Knob.Paint = function(self)
  4073. G.dr_RoundBox(0, 0, 0, self:GetWide(), self:GetTall(), AB.MCol)
  4074. G.dr_RoundBox(0, 1, 1, self:GetWide()-2, self:GetTall()-2, AB.MCol)
  4075. end
  4076.  
  4077. Item.Think = function(self)
  4078. self:SetValue(AB.set_Get(_v.convar))
  4079. end
  4080.  
  4081. Item.OnValueChanged = function(self, value)
  4082. AB.set_Change(_v.convar, value)
  4083. end
  4084.  
  4085. Panel:AddItem(Item)
  4086.  
  4087. elseif (_v.t == "combobox") then
  4088. local Item = G.vg_Create("DComboBox")
  4089. Item:SetText(tostring(AB.set_Get(_v.convar)))
  4090. for _, v in G.loop, _v.tbl do
  4091. Item:AddChoice(v)
  4092. end
  4093. Item.OnSelect = function(self)
  4094. AB.ch_AddText("buttons/button17.wav", color_white, "Set " .. _v.text .. " to ", Color(116, 187, 251), self:GetValue(), color_white, ".")
  4095. AB.set_Change(_v.convar, self:GetValue())
  4096. end
  4097. Panel:AddItem(Item)
  4098.  
  4099. elseif (_v.t == "combobox_keys") then
  4100. local Item = G.vg_Create("DComboBox")
  4101. Item:SetText(tostring(AB.set_Get(_v.convar)))
  4102. for k, v in G.loop, _v.tbl do
  4103. Item:AddChoice(k)
  4104. end
  4105. Item.OnSelect = function(self)
  4106. AB.ch_AddText("buttons/button17.wav", color_white, "Set " .. _v.text .. " to ", Color(116, 187, 251), self:GetValue(), color_white, ".")
  4107. AB.set_Change(_v.convar, self:GetValue())
  4108. end
  4109. Panel:AddItem(Item)
  4110.  
  4111. elseif (_v.t == "tentry") then
  4112. local Item = G.vg_Create("DTextEntry")
  4113. Item:SetText(tostring(AB.set_Get(_v.convar)))
  4114. Item:SetEnterAllowed(true)
  4115. Item.OnValueChange = function(self)
  4116. AB.set_Change(_v.convar, self:GetValue())
  4117. end
  4118. Panel:AddItem(Item)
  4119.  
  4120. cvar = cvar
  4121. value = value
  4122.  
  4123. elseif (_v.t == "dbutton_cv") then
  4124. local Item = G.vg_Create("DButton")
  4125. Item:SetText(_v.text)
  4126. Item:SetTextColor(color_white)
  4127. Item.DoClick = function(self)
  4128. G.sur_PlaySnd("UI/buttonclickrelease.wav")
  4129. local MRequest = DermaMenu()
  4130. MRequest:AddOption("Begin", function()
  4131. Derma_StringRequest("", "Please type a CVar in below:", nil,
  4132. function(choice1)
  4133. cvar = choice1
  4134. Derma_StringRequest("", "Please type a value in below:", nil,
  4135. function(choice2)
  4136. value = choice2
  4137. AB.mod_CVar_Force(cvar, value)
  4138. end,
  4139. function() end )
  4140. end,
  4141. function() end )
  4142. end):SetIcon("icon16/application_form_edit.png")
  4143. MRequest:Open()
  4144. end
  4145. Item.OnCursorEntered = function()
  4146. G.sur_PlaySnd("UI/buttonrollover.wav")
  4147. Item:SetTextColor(Color(150, 150, 150, 255))
  4148. end
  4149. Item.OnCursorExited = function()
  4150. Item:SetTextColor(color_white)
  4151. end
  4152. Item.Paint = function()
  4153. G.sur_SetDrawCol(AB.MCol)
  4154. G.sur_DrawRect(0, 0, Item:GetWide(), Item:GetTall())
  4155. end
  4156. Panel:AddItem(Item)
  4157.  
  4158. elseif (_v.t == "cmixer") then
  4159. local Item = G.vg_Create("DColorMixer")
  4160. Item:SetText(_v.text)
  4161. Item:SetAlphaBar(true)
  4162. Item:SetPalette(false)
  4163. Item:SetWangs(true)
  4164. Item:SetColor(Color(unpack(G.str_Explode(",", AB.set_Get(_v.convar)))))
  4165. Item:SetSize(30, 100)
  4166. Item.ValueChanged = function(self, color)
  4167. AB.set_Change(_v.convar, color.r .. "," .. color.g .. "," .. color.b .. "," .. color.a)
  4168. end
  4169. Panel:AddItem(Item)
  4170.  
  4171. elseif (_v.t == "label") then
  4172. local Item = G.vg_Create("DLabel")
  4173. Item:SetText(_v.text)
  4174. Item:SetFont("Items")
  4175. function Item:Paint()
  4176. Item:SetTextColor(AB.MCol)
  4177. end
  4178. Panel:AddItem(Item)
  4179. end
  4180. end
  4181. end
  4182. end
  4183.  
  4184. local function DrawGradientRectH(x, y, w, h, Col1, Col2)
  4185. local Seg = 1 / h
  4186.  
  4187. for i = 0, h do
  4188. local col = Color((Col1.r - (Col1.r - Col2.r) * Seg * i), (Col1.g - (Col1.g - Col2.g) * Seg * i), (Col1.b - (Col1.b - Col2.b) * Seg * i), (Col1.a - (Col1.a - Col2.a) * Seg * i))
  4189. G.sur_SetDrawCol(col)
  4190. G.sur_DrawLi(x, y + i, x + w, y + i)
  4191. end
  4192. end
  4193.  
  4194. local function DrawGradientRectH(x, y, w, h, Col1, Col2)
  4195. local Seg = 1 / h
  4196.  
  4197. for i = 0, h do
  4198. local col = Color((Col1.r - (Col1.r - Col2.r) * Seg * i), (Col1.g - (Col1.g - Col2.g) * Seg * i), (Col1.b - (Col1.b - Col2.b) * Seg * i), (Col1.a - (Col1.a - Col2.a) * Seg * i))
  4199. G.sur_SetDrawCol(col)
  4200. G.sur_DrawLi(x, y + i, x + w, y + i)
  4201. end
  4202. end
  4203.  
  4204. TabList.Navigation:SetWidth(180)
  4205. for _, v in G.loop, TabList.Items do
  4206. v.Button:SetHeight(30)
  4207. v.Button:SetFont("Items")
  4208. v.Button:DockMargin(0, 0, 0, 0)
  4209. v.Button:SetTextColor(color_white)
  4210. v.Button.OnCursorEntered = function()
  4211. G.sur_PlaySnd("UI/buttonrollover.wav")
  4212. v.Button:SetTextColor(Color(75, 75, 75, 255))
  4213. return false
  4214. end
  4215.  
  4216. v.Button.OnCursorExited = function()
  4217. v.Button:SetTextColor(color_white)
  4218. return false
  4219. end
  4220.  
  4221. if (v.Button.Image) then
  4222. v.Button.Image.SetImage = function() end
  4223. v.Button.Image.Paint = function() end
  4224. end
  4225.  
  4226. local bPress = true
  4227. function v.Button:Paint()
  4228. local Col = AB.MCol
  4229.  
  4230. if (TabList:GetActiveButton() == v.Button) then
  4231. Col = AB.DLTCol
  4232. end
  4233.  
  4234. if (self.Depressed && TabList:GetActiveButton() ~= v.Button) then
  4235. if (bPress == true) then
  4236. G.sur_PlaySnd("UI/buttonclickrelease.wav")
  4237. end
  4238. Col = Color(Col.r - (Col.r / 6), Col.g - (Col.g / 6), Col.b - (Col.b / 6), 255)
  4239. bPress = false
  4240. elseif (self.Hovered && TabList:GetActiveButton() ~= v.Button) then
  4241. Col = Color(Col.r + (Col.r / 6), Col.g + (Col.g / 6), Col.b + (Col.b / 6), 255)
  4242. bPress = true
  4243. end
  4244.  
  4245. DrawGradientRectH(0, 0, self:GetWide(), self:GetTall(), Col, Color(Col.r + (Col.r / 4), Col.g + (Col.g / 4), Col.b + (Col.b / 4), 25))
  4246. end
  4247. end
  4248. end)
  4249. end
  4250.  
  4251. function AB.h_Adds.CreateMove.MenuOpen()
  4252. if (G.inp_KeyPressed(74) && AOpen == false) then
  4253. AOpen = true
  4254. AB.Menu()
  4255. end
  4256. end
  4257.  
  4258. /*=================
  4259. Derma/GUI Menus End|
  4260. ===================*/
  4261.  
  4262. -------------------
  4263.  
  4264. function AB.Load()
  4265. local s
  4266. local e
  4267. for _, v in G.loop, AB.Library do
  4268. s, e = pcall(v)
  4269. end
  4270. //G.str_Run(en_Byp)
  4271. AB.ch_AddText("buttons/combine_button1.wav", color_white, "loaded successfully.")
  4272. end
  4273. if (G.str_Find(G.str_Lower(GetHostName()), G.str_Lower("United|Hosts"))) then
  4274. G.run_CCmd("disconnect")
  4275. else
  4276. AB.Load()
  4277. end
Advertisement
Add Comment
Please, Sign In to add comment