Advertisement
Guest User

Untitled

a guest
Jul 25th, 2011
865
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 147.11 KB | None | 0 0
  1. //SOURCE FOR SETHHACK V3
  2. //MADE BY SETH
  3. local Hooks = {}
  4. local Commands = {
  5. cmds = {},
  6. help = {},
  7. auto = {},
  8. }
  9. local mod = {
  10. SetCVAR = _G.SH_SETVAR,
  11. UmsgSIZE = _G.SH_UMSGSIZE,
  12. ConCmd = _G.SH_CONCMD,
  13. oldRCC = RunConsoleCommand,
  14. globals = _G.SH_GLOBALS,
  15. }
  16. local CVARMETAGETINT = _R.ConVar.GetInt
  17. local svcheats = {}
  18. svcheats.cvar = GetConVar("sv_cheats")
  19. svcheats.enabled = false
  20. local print = print
  21. local cve = ConVarExists
  22. _G.SH_SETVAR = nil
  23. _G.SH_UMSGSIZE = nil
  24. _G.SH_CONCMD = nil
  25. _G.SH_GLOBALS = nil
  26. local oldCCCV = CreateClientConVar
  27. local created = {}
  28. CreateClientConVar = function(a, b, c, d)
  29. if created[a] != nil || Commands.cmds[a] != nil then
  30. return GetConVar(a)
  31. end
  32. created[a] = true
  33. return oldCCCV(a,b,c,d)
  34. end
  35. ConVarExists = function(c)
  36. if(c == "SethHack_Chams") then
  37. print("BB: exiled blocked")
  38. return false
  39. end
  40. return cve(c)
  41. end
  42. local PlayerListA = function() end
  43. local EListA = function() end
  44. local state = false
  45. local friendlyfire = CreateClientConVar( "SethHack_ff", 0, true, false )
  46. local target = nil
  47. local friendslist = {}
  48. local angles = Angle(0,0,0)
  49. local Chamo = CreateClientConVar( "SethHack_Chams", 0, true, false )
  50. local NPCo = CreateClientConVar( "SethHack_NPConly", 0, true, false )
  51. local Ento = CreateClientConVar( "SethHack_Entonly", 0, true, false )
  52. local Plyo= CreateClientConVar( "SethHack_Plyonly", 0, true, false )
  53. local LockY= CreateClientConVar( "SethHack_LockY", 0, true, false )
  54. local es = CreateClientConVar( "SethHack_Enemy_Compensation", 45, true, false )
  55. local ms = CreateClientConVar( "SethHack_Me_Compensation", 45, true, false )
  56. local bmw = CreateClientConVar( "SethHack_TMW", 1, true, false )
  57. local steamfriends = CreateClientConVar( "SethHack_Ignore_SteamFriends", 1, true, false )
  58. local ignoreadmins = CreateClientConVar( "SethHack_Ignore_Admins", 0, true, false )
  59. local lockonlist = {}
  60. local NPCfriends = {}
  61. local triggertoggle = CreateClientConVar( "SethHack_Trigger_Bot", 0, true, false )
  62. local attack = 0
  63. local fire_on = false
  64. local autofiretoggle = false
  65. local FOV_VALUE = CreateClientConVar("SethHack_RestrictFOV_Value", 180,true,false)
  66. local AimSmooth = CreateClientConVar( "SethHack_AimSmooth", 0, true, false )
  67. local Mod = CreateClientConVar("SethHack_Mode",1,true,false)
  68. local time = CurTime()
  69. local delay = 0.01
  70. local CL = LocalPlayer()
  71. local playeron = CreateClientConVar( "SethHack_espplayeron", 1, true, false )
  72. local unhideon = CreateClientConVar( "SethHack_espunhideon", 1, true, false )
  73. local mode = CreateClientConVar( "SethHack_espmode", 0, true, false )
  74. local cross = CreateClientConVar( "SethHack_espcross", 0, true, false )
  75. local itemon = CreateClientConVar( "SethHack_espitemon", 1, true, false )
  76. local vehicleon = CreateClientConVar( "SethHack_espvehicleon", 1, true, false )
  77. local npcon = CreateClientConVar( "SethHack_espnpcon", 1, true, false )
  78. local weaponon = CreateClientConVar( "SethHack_espweaponon", 1, true, false )
  79. local trans = CreateClientConVar( "SethHack_esptrans", 255, true, false )
  80. local ASSlist = {"*Owner*","*Super Admin*","*Admin*","*Temp Admin*","*Respected*"}
  81. local entlist = {}
  82. local InvisProps={}
  83. local adminlist = CreateClientConVar( "SethHack_adminlist", 1, true, false )
  84. local drawclassname = CreateClientConVar( "SethHack_drawclassname", 1, true, false )
  85. local showcmds = CreateClientConVar( "SethHack_showcmds", 1, true, false )
  86. local blacklistcmds = CreateClientConVar( "SethHack_blacklistcmds", "", true, false )
  87. local umsgshow = CreateClientConVar( "SethHack_showumsgs", 1, true, false )
  88. local autoreload = CreateClientConVar( "SethHack_autoreload", 0, true, false )
  89. local crosshair = CreateClientConVar( "SethHack_crosshair", 0, true, false )
  90. local chams2cvar = CreateClientConVar( "SethHack_chams2", 0, true, false )
  91. local bhop = CreateClientConVar( "SethHack_bhop", 0, true, false )
  92. local spinbot = CreateClientConVar( "SethHack_spinbot", 0, true, false )
  93. local chatspam = CreateClientConVar( "SethHack_chatspam", "SethHackBot_v4 Is Awesome Check It Out www.SimplexHacks.com", true, false )
  94. local chatspaminterval = CreateClientConVar( "SethHack_chatspam_interval", 0, true, false )
  95. local logfileread = CreateClientConVar( "SethHack_enable_filelogs", 1, true, false )
  96. local logsendlua = CreateClientConVar( "SethHack_enable_sendlualog", 1, true, false )
  97. local logips = CreateClientConVar( "SethHack_enable_iplogs", 1, true, false )
  98. local logds = CreateClientConVar( "SethHack_enable_dslogs", 0, true, false )
  99. local speedfactor = CreateClientConVar( "SethHack_speedfactor", 7, true, false )
  100. local gamemodeview = CreateClientConVar( "SethHack_gamemodeview", 0, true, false )
  101. local clientsidenoclip = CreateClientConVar( "SethHack_clientnoclip", 0, true, false )
  102. local alwaysnospread = CreateClientConVar( "SethHack_always_nospread", 0, true, false )
  103. local recording_mode = false
  104. local Sass = tobool(string.find(string.lower(GetConVarString("sv_gamemode")),"lobby"))
  105. surface.CreateFont("csd",20, 100, true, false, "Signs")
  106. surface.CreateFont( "coolvetica", 30, 500, true, false, "HealthFont" )
  107. surface.CreateFont( "Tahoma", 14, 700, true, false, "MiniFont" )
  108. svcheats.bypass = CreateClientConVar("SethHack_allow_cheats_default", 0, true, false )
  109. svcheats.allow = function()
  110. if svcheats.enabled or svcheats.bypass:GetBool() then
  111. return true
  112. elseif not svcheats.win then
  113. local win = vgui.Create("DFrame")
  114. win:SetSize(365, 90)
  115. win:SetPos(ScrW()/2 - win:GetWide()/2, ScrH()/2 - win:GetTall()/2)
  116. win:SetTitle("SethHackBot Anti-Detection Warning")
  117. local check = vgui.Create("DCheckBoxLabel", win)
  118. check:SetPos(10, 30)
  119. check:SetText("Enable KAC detectable features")
  120. check:SetValue(0)
  121. check:SizeToContents()
  122. local close = vgui.Create("DButton", win)
  123. close:SetText("Close")
  124. close:SetSize(100,25)
  125. close:SetPos(win:GetWide()/2 - close:GetWide()/2, 50)
  126. function close:DoClick()
  127. win:Remove()
  128. svcheats.win = nil
  129. if check:GetChecked() then
  130. svcheats.enabled = true
  131. end
  132. end
  133. win:SetVisible(true)
  134. win:MakePopup()
  135. svcheats.win = win
  136. end
  137. return false
  138. end
  139. local MMPan
  140. local SpawnVGUISPAM
  141. local SethHackMiniWindow
  142. local tblDB = {}
  143. local oldDerma_Install_Convar_Functions = Derma_Install_Convar_Functions
  144. function Derma_Install_Convar_Functions( PANEL )
  145. oldDerma_Install_Convar_Functions( PANEL )
  146. function PANEL:ConVarChanged( strNewValue )
  147. if ( !self.m_strConVar ) then return end
  148. mod.oldRCC( self.m_strConVar, tostring( strNewValue ) )
  149. end
  150. end
  151. Commands.cmds["SethHack_wallhack_wire"] = function() mod.SetCVAR(chams2cvar, chams2cvar:GetBool() and "0" or "1") end
  152. Commands.help["SethHack_wallhack_wire"] = "Toggles the SethHackBot wireframe wallhack"
  153. Commands.cmds["SethHack_wallhack_player"] = function() mod.SetCVAR(Chamo, Chamo:GetBool() and "0" or "1") end
  154. Commands.help["SethHack_wallhack_player"] = "Toggles the SethHackBot player wallhack"
  155. if !sql.TableExists("SethHack_Friends") then
  156. sql.Query("CREATE TABLE SethHack_Friends(ID int,Name varchar(255))")
  157. end
  158. if !sql.TableExists("SethHack_Ents") then
  159. sql.Query("CREATE TABLE SethHack_Ents(ID int,Name varchar(255))")
  160. end
  161. if !sql.TableExists("SethHack_ESPEnts") then
  162. sql.Query("CREATE TABLE SethHack_ESPEnts(ID int,Name varchar(255))")
  163. end
  164. //SethHack File Saving
  165. local BFS={}
  166. BFS.GetFriends=function() local Tbl={} local T=sql.Query( "SELECT Name FROM SethHack_Friends" ) if T && #T!=0 then Tbl=string.Explode("~",T[#T].Name or "") end return Tbl end
  167. BFS.GetEnts=function() local Tbl={} local T=sql.Query( "SELECT Name FROM SethHack_Ents" ) if T && #T!=0 then Tbl=string.Explode("~",T[#T].Name or "") end return Tbl end
  168. BFS.GetESPEnts=function() local Tbl={} local T=sql.Query( "SELECT Name FROM SethHack_ESPEnts" ) if T && #T!=0 then Tbl=string.Explode("~",T[#T].Name or "") end return Tbl end
  169. BFS.SetFriends=function(Data) if !Data || #Data==0 then sql.Query("DELETE FROM SethHack_Friends") return end sql.Query("INSERT INTO SethHack_Friends VALUES (1,'"..table.concat(Data,"~").."')") end
  170. BFS.SetEnts=function(Data) if !Data || #Data==0 then sql.Query("DELETE FROM SethHack_Ents") return end sql.Query("INSERT INTO SethHack_Ents VALUES (1,'"..table.concat(Data,"~").."')") end
  171. BFS.SetESPEnts=function(Data) if !Data || #Data==0 then sql.Query("DELETE FROM SethHack_ESPEnts") return end sql.Query("INSERT INTO SethHack_ESPEnts VALUES (1,'"..table.concat(Data,"~").."')") end
  172. Commands.cmds["SethHack_Clear_All"] = function() BFS.SetFriends({}) BFS.SetEnts({}) BFS.SetESPEnts({}) end
  173. //Commands.help["SethHack_Clear_All"] = "Clears set friends, entities, and ESP entities"
  174. local draw_DrawCircleOutline
  175. do
  176. local surface = surface
  177. local trigVals = {}
  178. for i=0, 90, .5 do
  179. table.insert(trigVals, math.sin(math.rad(i)))
  180. end
  181. draw_DrawCircleOutline = function (numX,numY,numRadius)
  182. for i=1, #trigVals-1 do
  183. surface.DrawLine(numX + numRadius * trigVals[#trigVals - (i - 1)], numY + numRadius * trigVals[i],
  184. numX + numRadius * trigVals[#trigVals - (i)], numY + numRadius * trigVals[i+1])
  185. surface.DrawLine(numX - numRadius * trigVals[#trigVals - (i - 1)], numY + numRadius * trigVals[i],
  186. numX - numRadius * trigVals[#trigVals - (i)], numY + numRadius * trigVals[i+1])
  187. surface.DrawLine(numX + numRadius * trigVals[#trigVals - (i - 1)], numY - numRadius * trigVals[i],
  188. numX + numRadius * trigVals[#trigVals - (i)], numY - numRadius * trigVals[i+1])
  189. surface.DrawLine(numX - numRadius * trigVals[#trigVals - (i - 1)], numY - numRadius * trigVals[i],
  190. numX - numRadius * trigVals[#trigVals - (i)], numY - numRadius * trigVals[i+1])
  191. end
  192. end
  193. end
  194. local function admincheck(ply)
  195. local ads
  196. if ply:IsAdmin() then
  197. ads="*Admin*"
  198. if ply:IsSuperAdmin() then
  199. ads="*Super Admin*"
  200. end
  201. else
  202. ads = ""
  203. end
  204. return ads
  205. end
  206. local function DrawCrosshair(ply)
  207. local cross = cross:GetInt()
  208. local gpos=ply:EyePos():ToScreen()
  209. if cross==0 then//Box
  210. local v=ply
  211. local center = v:LocalToWorld(v:OBBCenter())
  212. local min,max = v:WorldSpaceAABB()
  213. local dim = max-min
  214. local front = v:GetForward()*(dim.y/2)
  215. local right = v:GetRight()*(dim.x/2)
  216. local top = v:GetUp()*(dim.z/2)
  217. local back = (v:GetForward()*-1)*(dim.y/2)
  218. local left = (v:GetRight()*-1)*(dim.x/2)
  219. local bottom = (v:GetUp()*-1)*(dim.z/2)
  220. local FRT = center+front+right+top
  221. local BLB = center+back+left+bottom
  222. local FLT = center+front+left+top
  223. local BRT = center+back+right+top
  224. local BLT = center+back+left+top
  225. local FRB = center+front+right+bottom
  226. local FLB = center+front+left+bottom
  227. local BRB = center+back+right+bottom
  228. FRT = FRT:ToScreen()
  229. BLB = BLB:ToScreen()
  230. FLT = FLT:ToScreen()
  231. BRT = BRT:ToScreen()
  232. BLT = BLT:ToScreen()
  233. FRB = FRB:ToScreen()
  234. FLB = FLB:ToScreen()
  235. BRB = BRB:ToScreen()
  236. local xmax = math.max(FRT.x,BLB.x,FLT.x,BRT.x,BLT.x,FRB.x,FLB.x,BRB.x)
  237. local xmin = math.min(FRT.x,BLB.x,FLT.x,BRT.x,BLT.x,FRB.x,FLB.x,BRB.x)
  238. local ymax = math.max(FRT.y,BLB.y,FLT.y,BRT.y,BLT.y,FRB.y,FLB.y,BRB.y)
  239. local ymin = math.min(FRT.y,BLB.y,FLT.y,BRT.y,BLT.y,FRB.y,FLB.y,BRB.y)
  240. surface.SetDrawColor(0,255,0,255)
  241. surface.DrawLine(xmax,ymax,xmax,ymin)
  242. surface.DrawLine(xmax,ymin,xmin,ymin)
  243. surface.DrawLine(xmin,ymin,xmin,ymax)
  244. surface.DrawLine(xmin,ymax,xmax,ymax)
  245. elseif cross==1 then//Cross
  246. surface.SetDrawColor(0,255,0,255)
  247. surface.DrawLine(gpos.x,gpos.y+5,gpos.x,gpos.y-5)
  248. surface.DrawLine(gpos.x-5,gpos.y,gpos.x+5,gpos.y)
  249. else//L shape
  250. surface.SetDrawColor(0,255,0,255)
  251. surface.DrawLine(gpos.x,gpos.y,gpos.x,gpos.y-20)
  252. surface.DrawLine(gpos.x,gpos.y,gpos.x+20,gpos.y)
  253. end
  254. end
  255. local function check(ply)
  256. local ff=friendlyfire:GetBool()
  257. if ff == false then
  258. if ply:Team() == LocalPlayer():Team() then
  259. return false
  260. else
  261. return true
  262. end
  263. else
  264. if ply:Team() == LocalPlayer():Team() then
  265. return true
  266. else
  267. return true
  268. end
  269. end
  270. end
  271. local function afriend(ply)
  272. if ply:GetFriendStatus()=="friend" && steamfriends:GetBool() then return false end
  273. if ply:IsAdmin() and ignoreadmins:GetBool() then return false end
  274. for a,b in pairs(friendslist) do
  275. //Msg("1:"..string.Replace(string.Replace(ply:Name(),"[",""),"]","").."\n")
  276. //Msg(string.lower(b))
  277. if string.find(string.lower(ply:Name()),string.lower(b),0,true) then
  278. return false
  279. end
  280. end
  281. if #friendslist==0 then return true end
  282. return true
  283. end
  284. // box
  285. local lastboxtarget = nil
  286. local tracktime = 0
  287. local lastshot = 0
  288. local crosshairs = {
  289. {
  290. name = "Regular",
  291. enabled = CreateClientConVar("SethHack_crosshair_regular", 1, true, false),
  292. draw = function(x, y)
  293. local w = 7
  294. surface.DrawLine(x - w, y, x + w, y)
  295. surface.DrawLine(x, y - w, x, y + w)
  296. end
  297. },
  298. {
  299. name = "Diagonal",
  300. enabled = CreateClientConVar("SethHack_crosshair_diagonal", 0, true, false),
  301. draw = function(x, y)
  302. local w = 7
  303. surface.DrawLine(x - w, y - w, x + w, y + w)
  304. surface.DrawLine(x - w, y + w, x + w, y - w)
  305. end
  306. },
  307. {
  308. name = "Counter-Strike",
  309. enabled = CreateClientConVar("SethHack_crosshair_cstrike", 0, true, false),
  310. draw = function(x, y)
  311. local outer = 18
  312. local inner = 7
  313. surface.DrawLine(x - outer, y, x - inner, y)
  314. surface.DrawLine(x + outer, y, x + inner, y)
  315. surface.DrawLine(x, y - outer, x, y - inner)
  316. surface.DrawLine(x, y + outer, x, y + inner)
  317. end
  318. },
  319. {
  320. name = "Dot",
  321. enabled = CreateClientConVar("SethHack_crosshair_dot", 0, true, false),
  322. draw = function(x, y)
  323. for i=-1, 1, 1 do
  324. surface.DrawLine(x - 1, y + i, x + 1, y + i)
  325. end
  326. end
  327. },
  328. {
  329. name = "Circle",
  330. enabled = CreateClientConVar("SethHack_crosshair_circle", 0, true, false),
  331. draw = function(x, y)
  332. draw_DrawCircleOutline(x, y, 7)
  333. end
  334. },
  335. {
  336. name = "Spin when locked",
  337. enabled = CreateClientConVar("SethHack_crosshair_tspin", 1, true, false),
  338. draw = function(cx, cy, force)
  339. if not target and not force then return end
  340. local x1,y1 = math.cos(RealTime()*6), math.sin(RealTime()*6)
  341. local x2,y2 = math.cos(RealTime()*6 + math.pi/2), math.sin(RealTime()*6 + math.pi/2)
  342. local iR, oR = 7, 18
  343. surface.DrawLine(cx + (x1*iR), cy + (y1*iR), cx + (x1*oR), cy + (y1*oR))
  344. surface.DrawLine(cx - (x1*iR), cy - (y1*iR), cx - (x1*oR), cy - (y1*oR))
  345. surface.DrawLine(cx + (x2*iR), cy + (y2*iR), cx + (x2*oR), cy + (y2*oR))
  346. surface.DrawLine(cx - (x2*iR), cy - (y2*iR), cx - (x2*oR), cy - (y2*oR))
  347. end
  348. },
  349. }
  350. local function btraceattack(ply, dmginfo, dir, tr)
  351. lastshot = RealTime()
  352. end
  353. local LAST_CHANGE_FOVVALUE = 0
  354. local screensize = math.sqrt((ScrW()^2)+(ScrH()^2))*.5
  355. local cx, cy = ScrW()*.5, ScrH()*.5
  356. local terroristadverts = {}
  357. local function esp()
  358. if recording_mode then return end
  359. local trace = util.TraceLine({start=LocalPlayer():GetShootPos(),endpos=LocalPlayer():GetShootPos() + (LocalPlayer():GetAimVector() * 64000),filter={LocalPlayer()}})
  360. if (trace.Hit) && (trace.HitNonWorld) && drawclassname:GetBool() then draw.SimpleTextOutlined(trace.Entity:GetClass(), "HealthFont", ScrW()-20, 35, Color(0,255,0,255),2,3,2,Color(0,0,0,255)) end
  361. local playeron = playeron:GetInt()
  362. local itemon = itemon:GetInt()
  363. local unhideon = unhideon:GetInt()
  364. local vehicleon = vehicleon:GetInt()
  365. local npcon = npcon:GetInt()
  366. local weaponon = weaponon:GetInt()
  367. local trans = trans:GetInt()
  368. local mode = mode:GetInt()
  369. surface.SetDrawColor(0,255,0,100)
  370. if CurTime() - LAST_CHANGE_FOVVALUE < 3 then
  371. draw_DrawCircleOutline(cx,cy,screensize*(FOV_VALUE:GetInt()/45))
  372. end
  373. for k, v in pairs(player.GetAll()) do
  374. if v != LocalPlayer() && playeron == 1 then
  375. local mod = v:GetModel()
  376. local ateam = v:Team()
  377. local color = team.GetColor(ateam)
  378. local colora
  379. local weapon = "NONE"
  380. color.r, color.g, color.b, color.a = color.r, color.g, color.b, trans
  381. if v:InVehicle() then
  382. colora = Color(255,255,255,trans)
  383. else
  384. colora = color
  385. end
  386. if v:Alive() && !v:InVehicle() && v:GetActiveWeapon( ) && (!string.find(v:GetModel(),"Antlion") && !string.find(v:GetModel(),"player.mdl")) && !Sass then
  387. if v:Alive() && v:GetActiveWeapon():IsValid() then
  388. weapon=v:GetActiveWeapon( ):GetPrintName()
  389. weapon=string.Replace(weapon,"#HL2_","")
  390. weapon=string.Replace(weapon,"#GMOD_","")
  391. end
  392. else
  393. weapon="NONE"
  394. end
  395. local hp = v:Health()
  396. local name = v:Name()
  397. local gpos = v:EyePos():ToScreen()
  398. local dist = math.Round(v:EyePos():Distance(LocalPlayer():EyePos()))
  399. local ads = admincheck(v)
  400. if v.bb_traitor == true then
  401. ads = "(TRAITOR) " .. ads
  402. end
  403. local tn
  404. if mode==2 then
  405. tn=team.GetName(ateam)
  406. draw.SimpleText(hp.." W: "..weapon, "Default", gpos.x+15, gpos.y-32, colora,0,0)
  407. draw.SimpleText("F","Signs", gpos.x+1, gpos.y-30, colora,0,0)
  408. draw.SimpleText(""..name.."", "Default", gpos.x+3, gpos.y-43, colora,0,0)
  409. draw.SimpleText(""..tn.."","Default", gpos.x+3, gpos.y-12, colora,0,0)
  410. draw.SimpleText("Dist: "..math.Round(dist/16).."ft","Default", gpos.x+3, gpos.y-22, colora,0,0)
  411. draw.SimpleText(""..ads.."","Default", gpos.x+3, gpos.y-53, Color(255,0,0,trans),0,0)
  412. DrawCrosshair(v)
  413. elseif mode==0 then
  414. draw.SimpleText(""..name.."", "Default", gpos.x+3, gpos.y-23, colora,0,0)
  415. draw.SimpleText(hp,"Default", gpos.x+15, gpos.y-12, colora,0,0)
  416. draw.SimpleText("F","Signs", gpos.x+1, gpos.y-10, colora,0,0)
  417. draw.SimpleText(""..ads.."","Default", gpos.x+3, gpos.y-33, Color(255,0,0,trans),0,0)
  418. DrawCrosshair(v)
  419. else
  420. draw.SimpleText(""..name.."", "Default", gpos.x+3, gpos.y-33, colora,0,0)
  421. draw.SimpleText(hp, "Default", gpos.x+15, gpos.y-12, colora,0,0)
  422. draw.SimpleText("W: "..weapon, "Default", gpos.x+3, gpos.y-23, colora,0,0)
  423. draw.SimpleText("F","Signs", gpos.x+1, gpos.y-10, colora,0,0)
  424. draw.SimpleText(""..ads.."","Default", gpos.x+3, gpos.y-43, Color(255,0,0,trans),0,0)
  425. DrawCrosshair(v)
  426. end
  427. end
  428. end
  429. for j, e in pairs(ents.GetAll()) do
  430. if e:IsValid() then
  431. local Br,Bg,Bb,Ba=e:GetColor()
  432. if (e:IsValid()&&!string.find(e:GetClass(),"class")&&Ba<=50&&unhideon==1) then
  433. e:SetColor(Br,Bg,Bb,200)
  434. table.insert(InvisProps,{Ent=e,c={Br,Bg,Bb,Ba}})
  435. end
  436. if unhideon==0 && #InvisProps>0 then
  437. for h,e in pairs(InvisProps) do
  438. if e.Ent:IsValid() then
  439. e.Ent:SetColor(e.c[1],e.c[2],e.c[3],e.c[4])
  440. end
  441. end
  442. InvisProps={}
  443. end
  444. if e:IsWeapon() && e:GetMoveType()!=0 && weaponon == 1 then
  445. local wepn = e:GetClass()
  446. local wname = string.Replace(wepn,"weapon_","")
  447. wname = string.Replace(wname,"_"," ")
  448. wname = string.upper(wname)
  449. local wpos = e:GetPos():ToScreen()
  450. surface.SetDrawColor(255,0,0,trans)
  451. draw.SimpleText(""..wname.."", "Default", wpos.x+3, wpos.y-15, Color(255,0,0,trans),0,0)
  452. surface.DrawLine(wpos.x,wpos.y,wpos.x,wpos.y-20)
  453. surface.DrawLine(wpos.x,wpos.y,wpos.x+20,wpos.y)
  454. elseif e:IsNPC() && npcon == 1 && e:GetMoveType()!=0 then
  455. local amod = e:GetModel()
  456. local bname = e:GetClass()
  457. local aname = string.Replace(bname,"npc_","")
  458. aname = string.Replace(aname,"_"," ")
  459. aname = string.upper(aname)
  460. local agpos
  461. if amod == "models/headcrabclassic.mdl" || amod == "models/headcrab.mdl" || amod == "models/headcrabblack.mdl" then
  462. agpos = (e:GetPos()+Vector(0,0,6)):ToScreen()
  463. else
  464. if string.find(e:GetClass(),"crow") == nil && string.find(e:GetClass(),"antlion") == nil && string.find(e:GetClass(),"strider") == nil && string.find(e:GetClass(),"hunter") == nil && string.find(e:GetClass(),"pig") == nil && string.find(e:GetClass(),"mine") == nil && string.find(e:GetClass(),"sea") == nil && string.find(e:GetClass(),"furniture") == nil && string.find(e:GetClass(),"driver") == nil && e:GetAttachment(1) != nil then
  465. agpos = e:GetAttachment(1).Pos:ToScreen()
  466. else
  467. agpos = e:GetPos() + Vector(0,0,5)
  468. agpos = agpos:ToScreen()
  469. end
  470. end
  471. local nhp = e:Health()
  472. surface.SetDrawColor(255,200,0,trans)
  473. draw.SimpleText(""..aname.."", "Default", agpos.x+3, agpos.y-15, Color(255,200,0,trans),0,0)
  474. draw.SimpleText("NPC", "Default", agpos.x+3, agpos.y-25, Color(255,200,0,trans),0,0)
  475. surface.DrawLine(agpos.x,agpos.y,agpos.x,agpos.y-20)
  476. surface.DrawLine(agpos.x,agpos.y,agpos.x+20,agpos.y)
  477. elseif string.find(e:GetClass(),"item_") && itemon == 1 then
  478. local iname = e:GetClass()
  479. iname = string.Replace(iname,"item_","")
  480. iname = string.Replace(iname,"_"," ")
  481. iname = string.upper(iname)
  482. local ipos = e:GetPos():ToScreen()
  483. surface.SetDrawColor(255,0,0,trans)
  484. draw.SimpleText(""..iname.."", "Default", ipos.x+3, ipos.y-15, Color(255,0,0,trans),0,0)
  485. surface.DrawLine(ipos.x,ipos.y,ipos.x,ipos.y-20)
  486. surface.DrawLine(ipos.x,ipos.y,ipos.x+20,ipos.y)
  487. elseif string.find(e:GetClass(),"prop_vehicle_") != nil && vehicleon == 1 then
  488. local vname = e:GetClass()
  489. vname = string.Replace(vname,"prop_vehicle_","")
  490. vname = string.Replace(vname,"_"," ")
  491. vname = string.upper(vname)
  492. local vpos = e:GetPos():ToScreen()
  493. surface.SetDrawColor(255,0,0,trans)
  494. draw.SimpleText(""..vname.."", "Default", vpos.x+3, vpos.y-15, Color(255,0,0,trans),0,0)
  495. surface.DrawLine(vpos.x,vpos.y,vpos.x,vpos.y-20)
  496. surface.DrawLine(vpos.x,vpos.y,vpos.x+20,vpos.y)
  497. elseif table.HasValue(entlist, e:GetClass()) then
  498. local dpos = (e:GetPos()+e:OBBCenter()):ToScreen()
  499. local cename = e:GetClass()
  500. local cesname = string.Replace(cename,"weapon_","")
  501. cesname = string.Replace(cesname,"ent_","")
  502. if cesname ~= "prop_item" then cesname = string.Replace(cesname,"prop_","") end
  503. cesname = string.Replace(cesname,"item_","")
  504. cesname = string.Replace(cesname,"_"," ")
  505. cesname = string.upper(cesname)
  506. draw.SimpleText(""..cesname.."", "Default", dpos.x+3, dpos.y-15, Color(255,0,0,trans),0,0)
  507. surface.SetDrawColor(255,0,0,trans)
  508. surface.DrawLine(dpos.x,dpos.y,dpos.x,dpos.y-20)
  509. surface.DrawLine(dpos.x,dpos.y,dpos.x+20,dpos.y)
  510. elseif e:GetClass() == "prop_physics" && table.HasValue(entlist, string.Replace(string.Replace(string.GetFileFromFilename(e:GetModel()),"/",""),".mdl","")) then
  511. local dpos = (e:GetPos()+e:OBBCenter()):ToScreen()
  512. draw.SimpleText(""..string.Replace(string.Replace(string.GetFileFromFilename(e:GetModel()),"/",""),".mdl","").."", "Default", dpos.x+3, dpos.y-15, Color(255,0,0,trans),0,0)
  513. surface.SetDrawColor(255,0,0,trans)
  514. surface.DrawLine(dpos.x,dpos.y,dpos.x,dpos.y-20)
  515. surface.DrawLine(dpos.x,dpos.y,dpos.x+20,dpos.y)
  516. end
  517. end
  518. end
  519. surface.SetDrawColor(0, 255, 0, 255)
  520. local cx, cy = ScrW()/2, ScrH()/2
  521. for k,v in pairs(crosshairs) do
  522. if v.enabled:GetBool() then v.draw(cx, cy) end
  523. end
  524. if !adminlist:GetBool() then return end
  525. local num = 0
  526. local temptblf={}
  527. for k,v in pairs(player.GetAll()) do
  528. if admincheck(v)!="" then
  529. table.insert(temptblf,{ID=1,Ply=v})
  530. end
  531. end
  532. table.SortByMember(temptblf, "ID", function(a, b) return a > b end)
  533. draw.RoundedBox( 6, ScrW()-219, 103, 200, 8 + (math.Max(1, #temptblf) * 10), Color( 50, 50, 50, 155 ) )
  534. draw.SimpleText("Admins:", "Default", ScrW()-215, 105, Color(0,255,0,255),0,0)
  535. for i,b in ipairs(temptblf) do
  536. draw.SimpleText(b.Ply:Name(), "Default", ScrW()-175, 105+((i - 1) * 10), Color(0,255,0,255),0,0)
  537. end
  538. for i=#terroristadverts,1,-1 do
  539. if CurTime() - terroristadverts[i].time >= 3 then
  540. table.remove(terroristadverts, i)
  541. end
  542. end
  543. table.sort(terroristadverts, function(a,b) return a.time < b.time end)
  544. for i,v in ipairs(terroristadverts) do
  545. if CurTime() - v.time < 6 then
  546. draw.SimpleTextOutlined(v.text, "HealthFont", ScrW()/2, ScrH()/2 - (i * 35), v.color,1,0,2,Color(0,0,0,255))
  547. end
  548. end
  549. end
  550. local entityxsetmaterial = _R.Entity.SetMaterial
  551. local matWallHack = CreateMaterial("SH_wire2", "Wireframe", {
  552. ["$basetexture"] = "models/wireframe",
  553. ["$ignorez"] = 1,
  554. ["$model"] = 1,
  555. })
  556. local noDrawed = {}
  557. local function chams()
  558. if recording_mode then
  559. // SethHackbot is a giant heap of garbage
  560. // jesus christ
  561. cam.Start3D(EyePos(), EyeAngles())
  562. cam.End3D()
  563. return
  564. end
  565. local Chams_toggle=Chamo:GetBool()
  566. cam.Start3D(EyePos(), EyeAngles())
  567. for k, v in pairs(ents.GetAll()) do
  568. if v:IsValid() && v!=LocalPlayer() then
  569. if chams2cvar:GetBool() and ((v:IsPlayer() and v:Alive()) or v:IsNPC() or v:IsWeapon() or v:IsVehicle() or v:GetClass():find("vehicle") or v:GetClass() == "prop_physics" or v.Render) then
  570. if v:IsVehicle() then print(v) end
  571. render.SuppressEngineLighting( true )
  572. SetMaterialOverride(matWallHack)
  573. render.SetColorModulation( 20/255, 1, 1 )
  574. if not noDrawed[v] then v:SetNoDraw(true) noDrawed[v] = true end
  575. v:DrawModel()
  576. render.SetColorModulation( 1, 1, 1 )
  577. SetMaterialOverride(0)
  578. render.SuppressEngineLighting( false )
  579. elseif not chams2cvar:GetBool() then
  580. for k,v in pairs(noDrawed) do
  581. if IsValid(k) then k:SetNoDraw(false) end
  582. end
  583. noDrawed = {}
  584. end
  585. if Chams_toggle && (v:GetPos()-LocalPlayer():GetPos()):Length()<=2048 then
  586. if v:IsValid() && v:IsPlayer() && v:Alive() then
  587. if !afriend(v) then
  588. local mat = v:GetMaterial()
  589. local tc=team.GetColor(v:Team())
  590. render.SuppressEngineLighting( true )
  591. render.SetColorModulation( 0, (math.sin(CurTime()*2)+1)/2,0)
  592. v:SetModelScale(Vector(1.4,1.4,1))
  593. entityxsetmaterial(v, "SethHackBot/living")
  594. v:DrawModel()
  595. end
  596. local mat = v:GetMaterial()
  597. local tc=team.GetColor(v:Team())
  598. render.SuppressEngineLighting( true )
  599. render.SetColorModulation( (tc.r/255), (tc.g/255), (tc.b/255) )
  600. v:SetModelScale(Vector(1.1,1.1,1))
  601. entityxsetmaterial(v, "SethHackBot/living")
  602. v:DrawModel()
  603. render.SuppressEngineLighting( false )
  604. render.SetColorModulation( 1, 1, 1 )
  605. v:SetModelScale(Vector(1,1,1))
  606. entityxsetmaterial(v, mat)
  607. v:DrawModel()
  608. elseif v:IsValid() && v:GetClass() == "prop_physics" && table.HasValue(lockonlist, string.Replace(string.Replace(string.GetFileFromFilename(v:GetModel()),"/",""),".mdl","")) then
  609. local mat = v:GetMaterial()
  610. render.SuppressEngineLighting( true )
  611. render.SetColorModulation( 1, 0, 0)
  612. v:SetModelScale(Vector(1.1,1.1,1))
  613. entityxsetmaterial(v, "SethHackBot/living")
  614. v:DrawModel()
  615. render.SuppressEngineLighting( false )
  616. render.SetColorModulation( 1, 1, 1 )
  617. entityxsetmaterial(v, mat)
  618. v:SetModelScale(Vector(1,1,1))
  619. v:DrawModel()
  620. elseif v:IsValid() && (table.HasValue(lockonlist, v:GetClass()) || (v:IsNPC() && v:GetMoveType()!=0)) then
  621. local mat = v:GetMaterial()
  622. render.SuppressEngineLighting( true )
  623. render.SetColorModulation( 1, 0, 0)
  624. v:SetModelScale(Vector(1.1,1.1,1))
  625. entityxsetmaterial(v, "SethHackBot/living")
  626. v:DrawModel()
  627. render.SuppressEngineLighting( false )
  628. render.SetColorModulation( 1, 1, 1 )
  629. v:SetModelScale(Vector(1,1,1))
  630. entityxsetmaterial(v, mat)
  631. v:DrawModel()
  632. end
  633. end
  634. end
  635. end
  636. cam.End3D()
  637. end
  638. local PredictSpread = function() end
  639. local mysetupmove = function() end
  640. local Check = function() end
  641. local CL = LocalPlayer()
  642. local NoSpreadHere=false
  643. if #file.Find("../lua/includes/modules/gmcl_deco.dll")>=1 then
  644. NoSpreadHere=true
  645. // ANTI SPREAD SCRIPT
  646. local MoveSpeed = 1
  647. mysetupmove = function(objPl, move)
  648. if move then
  649. MoveSpeed = (move:GetVelocity():Length())/move:GetMaxSpeed()
  650. end
  651. end
  652. local ID_GAMETYPE = ID_GAMETYPE or -1
  653. local GameTypes = {
  654. {check=function ()
  655. return string.find(GAMEMODE.Name,"Garry Theft Auto") ~= nil
  656. end,getcone=function (wep,cone)
  657. if type(wep.Base) == "string" then
  658. if wep.Base == "civilian_base" then
  659. local scale = cone
  660. if CL:KeyDown(IN_DUCK) then
  661. scale = math.Clamp(cone/1.5,0,10)
  662. elseif CL:KeyDown(IN_WALK) then
  663. scale = cone
  664. elseif (CL:KeyDown(IN_SPEED) or CL:KeyDown(IN_JUMP)) then
  665. scale = cone + (cone*2)
  666. elseif (CL:KeyDown(IN_FORWARD) or CL:KeyDown(IN_BACK) or CL:KeyDown(IN_MOVELEFT) or CL:KeyDown(IN_MOVERIGHT)) then
  667. scale = cone + (cone*1.5)
  668. end
  669. scale = scale + (wep:GetNWFloat("Recoil",0)/3)
  670. return Vector(scale,0,0)
  671. end
  672. end
  673. return Vector(cone,cone,cone)
  674. end},
  675. {check=function ()
  676. return type(TEAM_ZOMBIE) == "number" and type(TEAM_SURVIVORS) == "number" and string.find(GAMEMODE.Name,"Zombie Survival") ~= nil and type(NUM_WAVES) == "number"
  677. end,getcone=function (wep,cone)
  678. if wep:GetNetworkedBool("Ironsights",false) then
  679. if CL:Crouching() then
  680. return wep.ConeIronCrouching or cone
  681. end
  682. return wep.ConeIron or cone
  683. elseif 25 < LocalPlayer():GetVelocity():Length() then
  684. return wep.ConeMoving or cone
  685. elseif CL:Crouching() then
  686. return wep.ConeCrouching or cone
  687. end
  688. return cone
  689. end},
  690. {check=function ()
  691. return type(TEAM_ZOMBIE) == "number" and type(TEAM_SURVIVORS) == "number" and string.find(GAMEMODE.Name,"Zombie Survival") ~= nil
  692. end,getcone=function (wep,cone)
  693. if CL:GetVelocity():Length() > 25 then
  694. return wep.ConeMoving or cone
  695. elseif CL:Crouching() then
  696. return wep.ConeCrouching or cone
  697. end
  698. return cone
  699. end},
  700. {check=function ()
  701. return type(gamemode.Get("ZombRP")) == "table" or type(gamemode.Get("DarkRP")) == "table"
  702. end,getcone=function (wep, cone)
  703. if type(wep.Base) == "string" and (wep.Base == "ls_snip_base" or wep.Base == "ls_snip_silencebase") then
  704. if CL:GetNWInt( "ScopeLevel", 0 ) > 0 then
  705. print("using scopecone")
  706. return wep.Primary.Cone
  707. end
  708. print("using unscoped cone")
  709. return wep.Primary.UnscopedCone
  710. end
  711. if type(wep.GetIronsights) == "function" and wep:GetIronsights() then
  712. return cone
  713. end
  714. return cone + .05
  715. end},
  716. {check=function ()
  717. return (GAMEMODE.Data == "falloutmod" and type(Music) == "table")
  718. end,getcone=function(wep,cone)
  719. if wep.Primary then
  720. local LastShootTime = wep.Weapon:GetNetworkedFloat( "LastShootTime", 0 )
  721. local lastshootmod = math.Clamp(wep.LastFireMax + 1 - math.Clamp( (CurTime() - LastShootTime) * wep.LastFireModifier, 0.0, wep.LastFireMax ), 1.0,wep.LastFireMaxMod)
  722. local accuracy = wep.Primary.Accuracy
  723. if CL:IsMoving() then accuracy = accuracy * wep.MoveModifier end
  724. if wep.Weapon:GetNetworkedBool( "Ironsights", false ) then accuracy = accuracy * 0.75 end
  725. accuracy = accuracy * ((16-(Skills.Marksman or 1))/11)
  726. if CL:KeyDown(IN_DUCK) then
  727. return accuracy*wep.CrouchModifier*lastshootmod
  728. else
  729. return accuracy*lastshootmod
  730. end
  731. end
  732. end}
  733. }
  734. Check = function()
  735. for k, v in pairs(GameTypes) do
  736. if v.check() then
  737. ID_GAMETYPE = k
  738. break
  739. end
  740. end
  741. end
  742. local tblNormalConeWepBases = {
  743. ["weapon_cs_base"] = true
  744. }
  745. local function GetCone(wep)
  746. local cone = wep.Cone
  747. if not cone and type(wep.Primary) == "table" and type(wep.Primary.Cone) == "number" then
  748. cone = wep.Primary.Cone
  749. end
  750. if not cone then cone = 0 end
  751. --CHeck if wep is HL2 then return corresponding cone
  752. if type(wep.Base) == "string" and tblNormalConeWepBases[wep.Base] then return cone end
  753. if wep:GetClass() == "ose_turretcontroller" then return 0 end
  754. if ID_GAMETYPE ~= -1 then return GameTypes[ID_GAMETYPE].getcone(wep,cone) end
  755. return cone or 0
  756. end
  757. mod.globals.require("deco")
  758. package.loaded.deco = nil
  759. local nospread = hl2_shotmanip
  760. local prediction = hl2_ucmd_getprediciton
  761. _G.hl2_shotmanip = nil
  762. _G.hl2_ucmd_getprediciton = nil
  763. local currentseed, cmd2, seed = currentseed or 0, 0, 0
  764. local wep, vecCone, valCone
  765. PredictSpread = function(cmd,aimAngle)
  766. if not alwaysnospread:GetBool() or not prediction then return aimAngle end
  767. cmd2, seed = prediction(cmd)
  768. if cmd2 ~= 0 then
  769. currentseed = seed
  770. end
  771. wep = LocalPlayer():GetActiveWeapon()
  772. vecCone = Vector(0,0,0)
  773. if wep and wep:IsValid() and type(wep.Initialize) == "function" then
  774. valCone = GetCone(wep)
  775. if type(valCone) == "number" then
  776. vecCone = Vector(-valCone,-valCone,-valCone)
  777. elseif type(valCone) == "Vector" then
  778. vecCone = -1*valCone
  779. end
  780. elseif wep and wep:IsValid() then
  781. local class = wep:GetClass()
  782. local spreads = {
  783. weapon_357 = Vector(0,0,0),
  784. weapon_smg1 = Vector(0.04362, 0.04362, 0.04362),
  785. weapon_ar2 = Vector(0.02618, 0.02618, 0.02618),
  786. weapon_pistol = Vector(0.00873, 0.00873, 0.00873),
  787. weapon_shotgun = Vector(0.08716, 0.08716, 0.08716),
  788. }
  789. if spreads[class] then vecCone = -1*spreads[class] end
  790. end
  791. return nospread(currentseed or 0, (aimAngle or CL:GetAimVector():Angle()):Forward(), vecCone):Angle()
  792. end
  793. //END OF ANTI SPREAD SCRIPT
  794. end
  795. local function ToNumFromBool(x)
  796. return x and 1 or 0
  797. end
  798. //RunConsoleCommand("cl_xfire","N/A ")
  799. local function trigger()
  800. if fire_on || autofiretoggle then
  801. if fire_on then
  802. mod.oldRCC("-attack")
  803. fire_on = false
  804. elseif CurTime()-time>=0 then
  805. mod.oldRCC("+attack")
  806. fire_on = true
  807. time = CurTime()+delay
  808. end
  809. end
  810. end
  811. local function triggerthis()
  812. local NPConly=NPCo:GetBool()
  813. local Entonly=Ento:GetBool()
  814. local PlyOnly=Plyo:GetBool()
  815. local Mode=Mod:GetInt()
  816. local toggle = tobool(triggertoggle:GetInt())
  817. local trdata = {}
  818. trdata.start=EyePos()
  819. angles.r=0
  820. local dest = Angle(0,0,0)
  821. if angles==Angle(0,0,0) then
  822. dest=EyeAngles()
  823. else
  824. dest=angles
  825. end
  826. trdata.endpos=EyePos()+(dest:Forward()*100000)
  827. trdata.filter={CL}
  828. trdata.mask=MASK_SHOT
  829. local trace = util.TraceLine(trdata).Entity
  830. if trace:IsValid() && trace:IsPlayer() && check(trace.Entity) && afriend(trace.Entity) && !NPConly && !Entonly then
  831. if toggle then
  832. if attack == 0 then
  833. autofiretoggle=!autofiretoggle
  834. attack = 1
  835. end
  836. end
  837. elseif trace:IsValid() && trace:IsNPC() && !table.HasValue(NPCfriends, trace.Entity:GetClass()) && !Entonly && !PlyOnly then
  838. if toggle then
  839. if attack == 0 then
  840. autofiretoggle=!autofiretoggle
  841. attack = 1
  842. end
  843. end
  844. elseif trace:IsValid() && (table.HasValue(lockonlist, string.Replace(string.Replace(string.GetFileFromFilename(trace:GetModel()),"/",""),".mdl","")) || table.HasValue(lockonlist, trace:GetClass())) && !NPConly && !PlyOnly then
  845. if toggle then
  846. if attack == 0 then
  847. autofiretoggle=!autofiretoggle
  848. attack = 1
  849. end
  850. end
  851. elseif !trace:IsValid() || !trace:IsPlayer() || !trace:IsNPC() || ((!table.HasValue(lockonlist, string.Replace(string.Replace(string.GetFileFromFilename(trace:GetModel()),"/",""),".mdl",""))) || !table.HasValue(lockonlist, trace:GetClass())) then
  852. if attack == 1 then
  853. autofiretoggle=!autofiretoggle
  854. attack = 0
  855. end
  856. end
  857. end
  858. local function ToggleHax()
  859. if state==false then
  860. state = true
  861. target = nil
  862. besttarget=LocalPlayer()
  863. else
  864. state = false
  865. target = nil
  866. besttarget=LocalPlayer()
  867. end
  868. end
  869. Commands.cmds["+SethHackToggle"] = function() state=true target=nil besttarget=LocalPlayer() end
  870. Commands.cmds["-SethHackToggle"] = function() state=false target=nil besttarget=LocalPlayer() end
  871. Commands.help["+SethHackToggle"] = "Activate aimbot (hold key down)"
  872. //Commands.help["-SethHackToggle"]
  873. local function SelectTarget()
  874. local LockedY=LockY:GetFloat()
  875. local NPConly=NPCo:GetBool()
  876. local Entonly=Ento:GetBool()
  877. local PlyOnly=Plyo:GetBool()
  878. local Mode=Mod:GetInt()
  879. if Mode==5 then
  880. if !besttarget:IsValid() || (besttarget!=LocalPlayer() && ((besttarget:IsPlayer() && (besttarget:GetMoveType()==5 || !besttarget:Alive())) || (besttarget:IsNPC() && besttarget:GetMoveType()==0))) then
  881. besttarget=LocalPlayer()
  882. else
  883. local trd = {}
  884. trd.start = LocalPlayer():EyePos()
  885. trd.endpos = LocalPlayer():EyePos()+(LocalPlayer():GetAimVector()*999999)
  886. local veha=LocalPlayer()
  887. if LocalPlayer():GetVehicle() then veha=LocalPlayer():GetVehicle() end
  888. trd.filter = {LocalPlayer(), veha}
  889. trd.mask = MASK_SHOT
  890. local tr = util.TraceLine(trd)
  891. v= tr.Entity
  892. if v:IsValid() && besttarget==LocalPlayer() then
  893. if v:IsPlayer() && !NPConly && !Entonly && v:Alive() && v!=LocalPlayer() && (check(v)) && afriend(v) && v:Health()>0 then
  894. besttarget=v
  895. elseif v:IsValid() && v:IsNPC() && !Entonly && !PlyOnly && !table.HasValue(NPCfriends, v:GetClass()) then
  896. besttarget=v
  897. else
  898. if v:IsValid() && v:GetClass() == "prop_physics" && !Entonly && !PlyOnly && table.HasValue(lockonlist, string.Replace(string.Replace(string.GetFileFromFilename(v:GetModel()),"/",""),".mdl","")) then
  899. besttarget=v
  900. elseif v:IsValid() && table.HasValue(lockonlist, v:GetClass()) && !PlyOnly then
  901. besttarget=v
  902. end
  903. end
  904. end
  905. end
  906. else
  907. besttarget = LocalPlayer()
  908. local tab = Plyo:GetInt() == 1 && player.GetAll() or ents.GetAll()
  909. for k, v in pairs(tab) do
  910. if v:IsPlayer() && v:IsValid() && !NPConly && !Entonly then
  911. if v:Alive() && v!=LocalPlayer() && (check(v)) && afriend(v) && v:Health()>0 then
  912. local EnPosa = 0
  913. local mod = v:LookupAttachment("eyes")
  914. if mod != 0 then
  915. EnPosa = v:GetAttachment(mod).Pos-Vector(0,0,LockedY)
  916. end
  917. if v:GetModel()=="models/zombie/fast.mdl" then
  918. EnPosa = v:GetAttachment(2).Pos-Vector(0,0,LockedY)
  919. end
  920. if string.find(string.lower(v:GetModel()),"crab") || string.find(string.lower(v:GetModel()),"crow") || string.find(string.lower(v:GetModel()),"pigeon") || string.find(string.lower(v:GetModel()),"roller") || string.find(string.lower(v:GetModel()),"seagull") || string.find(string.lower(v:GetModel()),"manhack") then
  921. EnPosa = v:GetPos() + Vector(0,0,6)
  922. end
  923. local trd = {}
  924. trd.start = LocalPlayer():EyePos()
  925. trd.endpos = EnPosa
  926. local veh=LocalPlayer()
  927. local veha=LocalPlayer()
  928. if v:GetVehicle() then veh=v:GetVehicle() end
  929. if LocalPlayer():GetVehicle() then veha=LocalPlayer():GetVehicle() end
  930. trd.filter = {LocalPlayer(),v, veh, veha}
  931. trd.mask = MASK_SHOT
  932. local tr = util.TraceLine(trd)
  933. if !tr.Hit then
  934. local a = 0
  935. local b = 0
  936. theirpos = (v:EyePos()-Vector(0,0,LockedY)):ToScreen()
  937. oldpos = (besttarget:EyePos()-Vector(0,0,LockedY)):ToScreen()
  938. if Mode==2 then
  939. a = (besttarget:EyePos()-Vector(0,0,LockedY)):Distance(LocalPlayer():EyePos())
  940. b = (v:EyePos()-Vector(0,0,LockedY)):Distance(LocalPlayer():EyePos())
  941. elseif Mode==1 then
  942. a = math.Dist(ScrW()/2,ScrH()/2,oldpos.x,oldpos.y)
  943. b = math.Dist(ScrW()/2,ScrH()/2,theirpos.x,theirpos.y)
  944. elseif Mode==3 then
  945. a = besttarget:Health()
  946. b = v:Health()
  947. elseif Mode==4 then
  948. local hmath=(((LocalPlayer():EyePos()-besttarget:GetShootPos()):GetNormal()):Angle())-besttarget:EyeAngles()
  949. a=((math.abs(hmath.p/2)+math.abs(hmath.y))-540*-1)
  950. local hmath=(((LocalPlayer():EyePos()-v:GetShootPos()):GetNormal()):Angle())-v:EyeAngles()
  951. b=((math.abs(hmath.p/2)+math.abs(hmath.y))-540*-1)
  952. end
  953. //638
  954. if (b <= a) && v:Health()>0 then
  955. besttarget = v
  956. elseif besttarget == LocalPlayer() then
  957. besttarget = v
  958. end
  959. end
  960. end
  961. elseif v:IsNPC() && !Entonly && !PlyOnly && !table.HasValue(NPCfriends, v:GetClass()) && v:GetMoveType()!=0 then
  962. local EnPosa = 0
  963. local mod = v:LookupAttachment("eyes")
  964. if mod != 0 then
  965. EnPosa = v:GetAttachment(mod).Pos-Vector(0,0,LockedY)
  966. end
  967. if v:GetModel()=="models/zombie/fast.mdl" || string.find(string.lower(v:GetModel()),"manhack") then
  968. EnPosa = v:GetAttachment(2).Pos-Vector(0,0,LockedY)
  969. end
  970. if string.find(string.lower(v:GetModel()),"crab") || string.find(string.lower(v:GetModel()),"crow") || string.find(string.lower(v:GetModel()),"pigeon") || string.find(string.lower(v:GetModel()),"roller") || string.find(string.lower(v:GetModel()),"seagull") then
  971. EnPosa = v:GetPos() + Vector(0,0,9)
  972. end
  973. if string.find(string.lower(v:GetModel()),"hunter") || string.find(string.lower(v:GetModel()),"antlionguard") then
  974. EnPosa = v:GetPos() + Vector(0,0,73)
  975. end
  976. if string.find(string.lower(v:GetModel()),"antlion") && !string.find(string.lower(v:GetModel()),"antlionguard") then
  977. EnPosa = v:GetPos() + Vector(0,0,25)
  978. end
  979. local trd = {}
  980. trd.start = LocalPlayer():EyePos()
  981. trd.endpos = EnPosa
  982. trd.filter = {LocalPlayer(),v}
  983. trd.mask = MASK_SHOT
  984. local tr = util.TraceLine(trd)
  985. if !tr.Hit && v:GetMoveType()!=0 then
  986. local a = 0
  987. local b = 0
  988. theirpos = (v:EyePos()-Vector(0,0,LockedY)):ToScreen()
  989. oldpos = (besttarget:EyePos()-Vector(0,0,LockedY)):ToScreen()
  990. if Mode==2 then
  991. a = (besttarget:EyePos()-Vector(0,0,LockedY)):Distance(LocalPlayer():EyePos())
  992. b = (v:EyePos()-Vector(0,0,LockedY)):Distance(LocalPlayer():EyePos())
  993. else
  994. a = math.Dist(ScrW()/2,ScrH()/2,oldpos.x,oldpos.y)
  995. b = math.Dist(ScrW()/2,ScrH()/2,theirpos.x,theirpos.y)
  996. end
  997. if (b <= a) then
  998. besttarget = v
  999. elseif besttarget == LocalPlayer() then
  1000. besttarget = v
  1001. end
  1002. end
  1003. else
  1004. if v:IsValid() && v:GetClass() == "prop_physics" && !NPConly && !PlyOnly && table.HasValue(lockonlist, string.Replace(string.Replace(string.GetFileFromFilename(v:GetModel()),"/",""),".mdl","")) then
  1005. local EnPosa = v:GetPos()+v:OBBCenter()
  1006. local trd = {}
  1007. trd.start = LocalPlayer():EyePos()
  1008. trd.endpos = EnPosa
  1009. trd.filter = {LocalPlayer(),v}
  1010. local tr = util.TraceLine(trd)
  1011. if !tr.Hit then
  1012. local a = 0
  1013. local b = 0
  1014. theirpos = v:EyePos():ToScreen()
  1015. oldpos = besttarget:EyePos():ToScreen()
  1016. if Mode==2 then
  1017. a = besttarget:EyePos():Distance(LocalPlayer():EyePos())
  1018. b = v:EyePos():Distance(LocalPlayer():EyePos())
  1019. else
  1020. a = math.Dist(ScrW()/2,ScrH()/2,oldpos.x,oldpos.y)
  1021. b = math.Dist(ScrW()/2,ScrH()/2,theirpos.x,theirpos.y)
  1022. end
  1023. if (b <= a) then
  1024. besttarget = v
  1025. elseif besttarget == LocalPlayer() then
  1026. besttarget = v
  1027. end
  1028. end
  1029. elseif v:IsValid() && table.HasValue(lockonlist, v:GetClass()) && !NPConly && !PlyOnly then
  1030. if v:GetMoveType()!=0 || v:GetClass()=="ph_prop" then
  1031. local EnPosa = v:GetPos()+v:OBBCenter()
  1032. local trd = {}
  1033. trd.start = LocalPlayer():EyePos()
  1034. trd.endpos = EnPosa
  1035. trd.filter = {LocalPlayer(),v}
  1036. local tr = util.TraceLine(trd)
  1037. if !tr.Hit then
  1038. local a = 0
  1039. local b = 0
  1040. theirpos = v:EyePos():ToScreen()
  1041. oldpos = besttarget:EyePos():ToScreen()
  1042. if Mode==2 then
  1043. a = besttarget:EyePos():Distance(LocalPlayer():EyePos())
  1044. b = v:EyePos():Distance(LocalPlayer():EyePos())
  1045. else
  1046. a = math.Dist(ScrW()/2,ScrH()/2,oldpos.x,oldpos.y)
  1047. b = math.Dist(ScrW()/2,ScrH()/2,theirpos.x,theirpos.y)
  1048. end
  1049. if (b <= a) then
  1050. besttarget = v
  1051. elseif besttarget == LocalPlayer() then
  1052. besttarget = v
  1053. end
  1054. end
  1055. end
  1056. end
  1057. end
  1058. end
  1059. end
  1060. return besttarget
  1061. end
  1062. local function AngleDifference(self,ang)
  1063. return Angle(math.AngleDifference(ang.p,self.p),math.AngleDifference(ang.y,self.y),math.AngleDifference(ang.r,self.r))
  1064. end
  1065. local function AimbotThink()
  1066. if state && SelectTarget()!=LocalPlayer() then
  1067. local LockedY=LockY:GetFloat()
  1068. local s1 = es:GetInt()
  1069. local s2 = ms:GetInt()
  1070. target = SelectTarget()
  1071. if target:IsNPC() || target:IsPlayer() then
  1072. local mod = target:LookupAttachment("eyes")
  1073. if mod != 0 then
  1074. EnPosa = target:GetAttachment(mod).Pos + target:GetVelocity()/s1 - LocalPlayer():GetVelocity()/s2 -Vector(0,0,LockedY)
  1075. end
  1076. if string.find(string.lower(target:GetModel()),"zombie/fast") || string.find(string.lower(target:GetModel()),"manhack") then
  1077. EnPosa = target:GetAttachment(2).Pos + (target:GetVelocity()/s1) - LocalPlayer():GetVelocity()/s2
  1078. end
  1079. if string.find(string.lower(target:GetModel()),"crab") || string.find(string.lower(target:GetModel()),"crow") || string.find(string.lower(target:GetModel()),"pigeon") || string.find(string.lower(target:GetModel()),"roller") || string.find(string.lower(target:GetModel()),"seagull") then
  1080. EnPosa = target:GetPos() + Vector(0,0,9) + target:GetVelocity()/s1 - LocalPlayer():GetVelocity()/s2
  1081. end
  1082. if string.find(string.lower(target:GetModel()),"hunter") || string.find(string.lower(target:GetModel()),"antlionguard") then
  1083. EnPosa = target:GetPos() + Vector(0,0,73) + target:GetVelocity()/s1 - LocalPlayer():GetVelocity()/s2
  1084. end
  1085. if string.find(string.lower(target:GetModel()),"antlion") && !string.find(string.lower(target:GetModel()),"antlionguard") then
  1086. EnPosa = target:GetPos() + Vector(0,0,25)
  1087. end
  1088. if EnPosa == nil then
  1089. EnPosa = target:GetPos() + target:OBBCenter()
  1090. end
  1091. else
  1092. EnPosa = target:GetPos()+target:OBBCenter()
  1093. end
  1094. if EnPosa == nil then return end
  1095. local testa=(EnPosa-LocalPlayer():GetShootPos()):Angle()
  1096. local dotproduct = LocalPlayer():EyeAngles():Forward():DotProduct((EnPosa-LocalPlayer():GetShootPos()):Normalize())
  1097. local fov=FOV_VALUE:GetInt()
  1098. if math.cos(math.Deg2Rad(fov)) <= dotproduct then
  1099. local AimSmoothFactor = AimSmooth:GetFloat()
  1100. testa.p=math.NormalizeAngle(testa.p)
  1101. testa.y=math.NormalizeAngle(testa.y)
  1102. testb=LocalPlayer():EyeAngles()
  1103. local cur, want = testb.y, testa.y
  1104. if math.Max(testb.y, testa.y) - math.Min(testb.y, testa.y) > 180 then
  1105. if want < 0 then want = want + 360 else cur = cur + 360 end
  1106. end
  1107. testb.p = math.Approach(testb.p, testa.p, 2.5 / ( AimSmoothFactor / 2 ))
  1108. testb.y = math.Approach(cur, want, 2.5 / ( AimSmoothFactor / 2 ))
  1109. testb.r=0
  1110. angles=testb
  1111. end
  1112. else
  1113. angles=Angle(0,0,0)
  1114. end
  1115. end
  1116. Commands.cmds["SethHackToggle"] = ToggleHax
  1117. Commands.help["SethHackToggle"] = "Toggle SethHackBot"
  1118. Commands.cmds["SethHack_AddNPCfriend"] = function(ply, cmd, arg)
  1119. table.insert(NPCfriends, arg[1])
  1120. end
  1121. Commands.cmds["SethHack_TriggerBotDelay"] = function(ply, cmd, arg)
  1122. arg[1]=tonumber(arg[1])
  1123. if arg[1] && arg[1]>-0.1 && arg[1]<11 then
  1124. delay = arg[1]
  1125. else
  1126. Msg("Invalid Number. Please use a number inbetween 0-10.\n Current Delay is "..delay.." seconds.\n")
  1127. end
  1128. end
  1129. local iZoom = 0
  1130. local iZoomAdd = 0
  1131. local function In()
  1132. iZoomAdd = iZoomAdd + 1
  1133. end
  1134. local function Out()
  1135. iZoomAdd = iZoomAdd - 1
  1136. end
  1137. Commands.cmds["+zoom_in"] = In
  1138. Commands.cmds["-zoom_out"] = In
  1139. Commands.cmds["+zoom_out"] = Out
  1140. Commands.cmds["-zoom_in"] = Out
  1141. Commands.cmds["zoom_reset"] = function() iZoom = 0 end
  1142. Commands.help["+zoom_in"] = "Zoom in (hold key down)"
  1143. Commands.help["+zoom_out"] = "Zoom out (hold key down)"
  1144. //Commands.help["zoom_reset"] = "Reset zoom level"
  1145. local SetViewAngles = _R.CUserCmd.SetViewAngles
  1146. local clear = 0xFFFF - IN_JUMP
  1147. local spinangle = Angle(0,0,0)
  1148. local ucorrected = Angle(0,0,0)
  1149. local ghostpos = nil
  1150. local SetButtons = _R.CUserCmd.SetButtons
  1151. local function bcmove(cmd)
  1152. if state && angles!=Angle(0,0,0) then
  1153. local MouseFixUp = AimSmooth:GetFloat() != 0 and Angle(cmd:GetMouseY() * GetConVarNumber("m_pitch"), cmd:GetMouseX() * -GetConVarNumber("m_yaw")) or Angle(0,0,0)
  1154. angles = angles + MouseFixUp
  1155. angles.r=0
  1156. ucorrected = angles
  1157. ucorrected.p = math.NormalizeAngle(ucorrected.p)
  1158. ucorrected.y = math.NormalizeAngle(ucorrected.y)
  1159. if NoSpreadHere and (cmd:GetButtons() & IN_ATTACK > 0) then
  1160. local AntiSpread = PredictSpread(cmd,angles)
  1161. AntiSpread.p = math.NormalizeAngle(AntiSpread.p)
  1162. AntiSpread.y = math.NormalizeAngle(AntiSpread.y)
  1163. SetViewAngles(cmd,AntiSpread)
  1164. else
  1165. SetViewAngles(cmd,angles)
  1166. end
  1167. else
  1168. local correct = 1
  1169. if iZoom != 0 then
  1170. correct = ( 1 - ( iZoom / 100 ) )
  1171. end
  1172. if !(IsValid(LocalPlayer():GetActiveWeapon()) && LocalPlayer():GetActiveWeapon():GetClass() == "weapon_physgun" && (cmd:GetButtons() & IN_USE) > 0) then
  1173. ucorrected.y = math.NormalizeAngle(ucorrected.y + (cmd:GetMouseX() * -0.022 * correct))
  1174. ucorrected.p = math.Clamp(ucorrected.p + (cmd:GetMouseY() * 0.022 * correct), -89, 90)
  1175. end
  1176. if !clientsidenoclip:GetBool() || ghostpos == nil then
  1177. if (cmd:GetButtons() & IN_ATTACK > 0) and not IsValid(LocalPlayer():GetVehicle()) then
  1178. if NoSpreadHere and alwaysnospread:GetBool() then
  1179. local ang = PredictSpread(cmd, ucorrected)
  1180. ang.p = math.NormalizeAngle(ang.p)
  1181. ang.y = math.NormalizeAngle(ang.y)
  1182. SetViewAngles(cmd, ang)
  1183. else
  1184. SetViewAngles(cmd, ucorrected)
  1185. end
  1186. else
  1187. SetViewAngles(cmd, ucorrected)
  1188. end
  1189. end
  1190. end
  1191. if clientsidenoclip:GetBool() && ghostpos != nil then
  1192. local add = Vector( 0, 0, 0 )
  1193. local ang = ucorrected
  1194. if ( cmd:KeyDown( IN_FORWARD ) ) then add = add + ang:Forward() end
  1195. if ( cmd:KeyDown( IN_BACK ) ) then add = add - ang:Forward() end
  1196. if ( cmd:KeyDown( IN_MOVERIGHT ) ) then add = add + ang:Right() end
  1197. if ( cmd:KeyDown( IN_MOVELEFT ) ) then add = add - ang:Right() end
  1198. if ( cmd:KeyDown( IN_JUMP ) ) then add = add + ang:Up() end
  1199. if ( cmd:KeyDown( IN_DUCK ) ) then add = add - ang:Up() end
  1200. add = add:GetNormal() * FrameTime() * 500
  1201. if ( cmd:KeyDown( IN_SPEED ) ) then add = add * 2 end
  1202. ghostpos = ghostpos + add
  1203. cmd:SetForwardMove( 0 )
  1204. cmd:SetSideMove( 0 )
  1205. cmd:SetUpMove( 0 )
  1206. SetButtons( cmd, 0 )
  1207. end
  1208. if bhop:GetBool() && !LocalPlayer():InVehicle() && (cmd:GetButtons() & IN_JUMP) > 0 then
  1209. if LocalPlayer():IsOnGround() then
  1210. SetButtons(cmd, cmd:GetButtons() | IN_JUMP)
  1211. else
  1212. SetButtons(cmd, cmd:GetButtons() & clear)
  1213. end
  1214. end
  1215. if spinbot:GetBool() && (cmd:GetButtons() & (IN_ATTACK | IN_ATTACK2)) == 0 then
  1216. local view = cmd:GetViewAngles()
  1217. spinangle.y = spinangle.y + 20
  1218. SetViewAngles(cmd, spinangle)
  1219. local diff = math.Deg2Rad(math.NormalizeAngle(spinangle.y - view.y))
  1220. local absf = math.Clamp(cmd:GetForwardMove(), -1, 1)
  1221. local abss = math.Clamp(cmd:GetSideMove(), -1, 1)
  1222. cmd:SetForwardMove(-1000 * math.sin(diff) * abss)
  1223. cmd:SetSideMove(1000 * math.sin(diff) * absf)
  1224. end
  1225. end
  1226. local function bcalcview( ply, origin, angl, fov )
  1227. if IsValid(ply:GetVehicle()) or gamemodeview:GetBool() or recording_mode then return end
  1228. if clientsidenoclip:GetBool() && ghostpos != nil then
  1229. local view = {}
  1230. view.origin = ghostpos
  1231. return view
  1232. end
  1233. ghostpos = origin
  1234. iZoom = math.Clamp( iZoom + ( iZoomAdd * 140 * FrameTime() ), 0, 80 )
  1235. if state && angles!=Angle(0,0,0) then
  1236. local view={}
  1237. if iZoom > 0 then
  1238. view.fov = 90 - iZoom
  1239. end
  1240. angles.r=0
  1241. view.angles= angles
  1242. return view
  1243. end
  1244. local view={}
  1245. if iZoom > 0 then
  1246. view.fov = 90 - iZoom
  1247. end
  1248. view.angles=ucorrected
  1249. return view
  1250. end
  1251. // auto-reload
  1252. local time = 0
  1253. local function bautoreload()
  1254. if LocalPlayer():GetActiveWeapon() && time-CurTime()<=0 then
  1255. if LocalPlayer():Alive() && LocalPlayer():GetActiveWeapon():IsValid() then
  1256. local ammo = LocalPlayer():GetActiveWeapon():Clip1()
  1257. if ammo == 0 then
  1258. time = CurTime()+4
  1259. mod.oldRCC("+reload")
  1260. timer.Simple(.01, mod.oldRCC, "-reload")
  1261. end
  1262. end
  1263. end
  1264. end
  1265. //**********************************************************___START OF VGUI FOR SethHack BOT___**********************************************************
  1266. local FriendListL = nil
  1267. local PlayerListL = nil
  1268. local EntityListL = nil
  1269. local EListL = nil
  1270. local Mode=Mod:GetInt()
  1271. local MouseX=ScrW()/2
  1272. local MouseY=ScrH()/2
  1273. local MPan
  1274. local SKIN = setmetatable({}, {
  1275. __index = function(t, k)
  1276. return derma.GetDefaultSkin()[k]
  1277. end,
  1278. })
  1279. local function SethHackBotMenu()
  1280. //START OF INIT
  1281. gui.SetMousePos(MouseX,MouseY)
  1282. MPan = vgui.Create( "DPropertySheet" )
  1283. function MPan:GetSkin()
  1284. return SKIN
  1285. end
  1286. MPan:SetPos( ScrW()/2-185,ScrH()/2-133 )
  1287. MPan:SetSize( 370, 267 )
  1288. MPan:MakePopup()
  1289. //END OF INIT
  1290. local NOnlyC
  1291. local EOnlyC
  1292. local POnlyC
  1293. //SPACE DIVIDER!!!!!!!!__________________________________________________________________________________________________________________________________
  1294. local function CheckShit(x)
  1295. if x==1 then
  1296. NOnlyC:SetValue(0)
  1297. EOnlyC:SetValue(0)
  1298. elseif x==2 then
  1299. POnlyC:SetValue(0)
  1300. EOnlyC:SetValue(0)
  1301. elseif x==3 then
  1302. NOnlyC:SetValue(0)
  1303. POnlyC:SetValue(0)
  1304. end
  1305. end
  1306. //START OF GENERAL
  1307. local AnchorPointC = vgui.Create( "DLabel", MPan )
  1308. AnchorPointC:SetPos(0,0)
  1309. AnchorPointC:SetText("")
  1310. MPan:AddSheet( "Aimbot", AnchorPointC, "SethHackBot/general", false, false, "Aimbot Settings" )
  1311. local Icona = vgui.Create("DImage", AnchorPointC)
  1312. Icona:SetMaterial(Material("SethHackBot/BBBackground.vtf"))
  1313. Icona:SetPos(0,0)
  1314. Icona:SetSize(370,267)
  1315. local TListT = vgui.Create( "DLabel", AnchorPointC)
  1316. TListT:SetPos(4,0)
  1317. TListT:SetText("-Target Selection-")
  1318. TListT:SetTextColor(Color(0,70,225,255))
  1319. TListT:SizeToContents()
  1320. POnlyC = vgui.Create("DCheckBox", AnchorPointC)
  1321. POnlyC:SetPos(10,14)
  1322. POnlyC:SetValue(ToNumFromBool(Plyo:GetBool()))
  1323. POnlyC.DoClick=function()
  1324. POnlyC:SetValue(ToNumFromBool(!Plyo:GetBool()))
  1325. CheckShit(1)
  1326. mod.oldRCC("SethHack_Plyonly",ToNumFromBool(!Plyo:GetBool()))
  1327. mod.oldRCC("SethHack_Entonly",0)
  1328. mod.oldRCC("SethHack_NPConly",0)
  1329. end
  1330. local POnlyT = vgui.Create( "DLabel", AnchorPointC)
  1331. POnlyT:SetPos(26,10)
  1332. POnlyT:SetText("Player Only")
  1333. POnlyT:SetTextColor(Color(225,225,225,225))
  1334. NOnlyC = vgui.Create("DCheckBox", AnchorPointC)
  1335. NOnlyC:SetPos(10,28)
  1336. NOnlyC:SetValue(ToNumFromBool(NPCo:GetBool()))
  1337. NOnlyC.DoClick=function()
  1338. NOnlyC:SetValue(ToNumFromBool(!NPCo:GetBool()))
  1339. CheckShit(2)
  1340. mod.oldRCC("SethHack_NPConly",ToNumFromBool(!NPCo:GetBool()))
  1341. mod.oldRCC("SethHack_Entonly",0)
  1342. mod.oldRCC("SethHack_Plyonly",0)
  1343. end
  1344. local NOnlyT = vgui.Create( "DLabel", AnchorPointC)
  1345. NOnlyT:SetPos(26,24)
  1346. NOnlyT:SetText("NPC Only")
  1347. NOnlyT:SetTextColor(Color(225,225,225,225))
  1348. EOnlyC = vgui.Create("DCheckBox", AnchorPointC)
  1349. EOnlyC:SetPos(10,42)
  1350. EOnlyC:SetValue(ToNumFromBool(Ento:GetBool()))
  1351. EOnlyC.DoClick=function()
  1352. CheckShit(3)
  1353. EOnlyC:SetValue(ToNumFromBool(!Ento:GetBool()))
  1354. mod.oldRCC("SethHack_Entonly",ToNumFromBool(!Ento:GetBool()))
  1355. mod.oldRCC("SethHack_NPConly",0)
  1356. mod.oldRCC("SethHack_Plyonly",0)
  1357. end
  1358. local EOnlyT = vgui.Create( "DLabel", AnchorPointC)
  1359. EOnlyT:SetPos(26,38)
  1360. EOnlyT:SetText("Entity Only")
  1361. EOnlyT:SetTextColor(Color(225,225,225,225))
  1362. local FFC = vgui.Create("DCheckBoxLabel", AnchorPointC)
  1363. FFC:SetPos(10,56)
  1364. FFC:SetConVar( "SethHack_ff" )
  1365. FFC:SetValue(friendlyfire:GetInt())
  1366. local FFT = vgui.Create( "DLabel", AnchorPointC)
  1367. FFT:SetPos(26,52)
  1368. FFT:SetText("Friendly Fire")
  1369. FFT:SetTextColor(Color(225,225,225,225))
  1370. local SFC = vgui.Create("DCheckBoxLabel", AnchorPointC)
  1371. SFC:SetPos(10,71)
  1372. SFC:SetConVar( "SethHack_ignore_steamfriends" )
  1373. local SFT = vgui.Create( "DLabel", AnchorPointC)
  1374. SFT:SetPos(26,70)
  1375. SFT:SetText("Ignore Steam Friends")
  1376. SFT:SizeToContents()
  1377. SFT:SetTextColor(Color(225,225,225,225))
  1378. local ADC = vgui.Create("DCheckBoxLabel", AnchorPointC)
  1379. ADC:SetPos(10,86)
  1380. ADC:SetConVar( "SethHack_ignore_admins" )
  1381. local ADT = vgui.Create( "DLabel", AnchorPointC)
  1382. ADT:SetPos(26,85)
  1383. ADT:SetText("Ignore Admins")
  1384. ADT:SizeToContents()
  1385. ADT:SetTextColor(Color(225,225,225,225))
  1386. -- anti detect
  1387. local TListT = vgui.Create( "DLabel", AnchorPointC)
  1388. TListT:SetPos(260,78)
  1389. TListT:SetText("-Anti-Detection-")
  1390. TListT:SetTextColor(Color(0,200,40,255))
  1391. TListT:SizeToContents()
  1392. --Pcwizdan copyright USA 2010-2999 (C) DERP-DERP-DURP inc
  1393. do
  1394. local AntiFOV_SLIDER = vgui.Create('DNumSlider',AnchorPointC)
  1395. AntiFOV_SLIDER:SetText('Field of View')
  1396. AntiFOV_SLIDER:SetPos(238,93)
  1397. AntiFOV_SLIDER:SetMinMax(1,180)
  1398. AntiFOV_SLIDER:SetWide(120)
  1399. AntiFOV_SLIDER:SetMouseInputEnabled(true)
  1400. AntiFOV_SLIDER:SetValue(math.Round(FOV_VALUE:GetInt()))
  1401. AntiFOV_SLIDER:SetConVar("SethHack_RestrictFOV_Value")
  1402. AntiFOV_SLIDER.ValueChanged = function (pnl,val)
  1403. LAST_CHANGE_FOVVALUE = CurTime()
  1404. end
  1405. local AimSmooth_Slider = vgui.Create('DNumSlider',AnchorPointC)
  1406. AimSmooth_Slider:SetText('Smoothing')
  1407. AimSmooth_Slider:SetPos(238,130)
  1408. AimSmooth_Slider:SetMinMax(0,10)
  1409. AimSmooth_Slider:SetWide(120)
  1410. AimSmooth_Slider:SetMouseInputEnabled(true)
  1411. AimSmooth_Slider:SetValue(AimSmooth:GetFloat())
  1412. AimSmooth_Slider:SetConVar("SethHack_AimSmooth")
  1413. end
  1414. -- Misc Checkboxes --
  1415. local MiscT = vgui.Create( "DLabel", AnchorPointC)
  1416. MiscT:SetPos(4,100)
  1417. MiscT:SetText("-Miscellaneous Scripts-")
  1418. MiscT:SetTextColor(Color(255,10,10,255))
  1419. MiscT:SizeToContents()
  1420. local TBC = vgui.Create("DCheckBoxLabel", AnchorPointC)
  1421. TBC:SetPos(4,115)
  1422. TBC:SetConVar( "SethHack_Trigger_Bot" )
  1423. TBC:SetValue(triggertoggle:GetInt())
  1424. local TBT = vgui.Create( "DLabel", AnchorPointC)
  1425. TBT:SetPos(20,111)
  1426. TBT:SetText("Trigger-Bot")
  1427. TBT:SetTextColor(Color(225,225,225,225))
  1428. local TAR = vgui.Create("DCheckBoxLabel", AnchorPointC)
  1429. TAR:SetPos(4,130)
  1430. TAR:SetConVar( "SethHack_autoreload" )
  1431. TAR:SetValue(autoreload:GetInt())
  1432. local TART = vgui.Create( "DLabel", AnchorPointC)
  1433. TART:SetPos(20,126)
  1434. TART:SetText("Auto Reload")
  1435. TART:SetTextColor(Color(225,225,225,225))
  1436. local SPINBOTGUI = vgui.Create("DCheckBoxLabel", AnchorPointC)
  1437. SPINBOTGUI:SetPos(4,145)
  1438. SPINBOTGUI:SetConVar( "SethHack_spinbot" )
  1439. local SPINBOTGUIL = vgui.Create( "DLabel", AnchorPointC)
  1440. SPINBOTGUIL:SetPos(20,144)
  1441. SPINBOTGUIL:SetText("Spinbot")
  1442. SPINBOTGUIL:SizeToContents()
  1443. SPINBOTGUIL:SetTextColor(Color(225,225,225,225))
  1444. local ThirdPerson = vgui.Create("DCheckBoxLabel", AnchorPointC)
  1445. ThirdPerson:SetPos(4,160)
  1446. ThirdPerson:SetValue(IsValid(LocalPlayer()) and LocalPlayer():EyePos() != EyePos())
  1447. function ThirdPerson:OnChange()
  1448. if not svcheats.allow() then return false end
  1449. if self:GetChecked() then mod.SetCVAR(svcheats.cvar, "1") end
  1450. mod.oldRCC((self:GetChecked() and "third" or "first").."person")
  1451. end
  1452. local ThirdPersonL = vgui.Create( "DLabel", AnchorPointC)
  1453. ThirdPersonL:SetPos(20,159)
  1454. ThirdPersonL:SetText("Third Person")
  1455. ThirdPersonL:SizeToContents()
  1456. ThirdPersonL:SetTextColor(Color(225,225,225,225))
  1457. local nospread = vgui.Create("DCheckBoxLabel", AnchorPointC)
  1458. nospread:SetPos(94,115)
  1459. nospread:SetConVar( "SethHack_always_nospread" )
  1460. local nospread = vgui.Create( "DLabel", AnchorPointC)
  1461. nospread:SetPos(110,114)
  1462. nospread:SetText("Nospread")
  1463. nospread:SizeToContents()
  1464. nospread:SetTextColor(Color(225,225,225,225))
  1465. local BHOPGUI = vgui.Create("DCheckBoxLabel", AnchorPointC)
  1466. BHOPGUI:SetPos(94,130)
  1467. BHOPGUI:SetConVar( "SethHack_bhop" )
  1468. local BHOPL = vgui.Create( "DLabel", AnchorPointC)
  1469. BHOPL:SetPos(110,126)
  1470. BHOPL:SetText("Bunny Hop")
  1471. BHOPL:SetTextColor(Color(225,225,225,225))
  1472. local CLIENTNOCLIPGUI = vgui.Create("DCheckBoxLabel", AnchorPointC)
  1473. CLIENTNOCLIPGUI:SetPos(94,145)
  1474. CLIENTNOCLIPGUI:SetConVar( "SethHack_clientnoclip" )
  1475. CLIENTNOCLIPGUI:SetValue(clientsidenoclip:GetInt())
  1476. local CLIENTNOCLIPGUIL = vgui.Create( "DLabel", AnchorPointC)
  1477. CLIENTNOCLIPGUIL:SetPos(110,144)
  1478. CLIENTNOCLIPGUIL:SetText("Client Spectate")
  1479. CLIENTNOCLIPGUIL:SizeToContents()
  1480. CLIENTNOCLIPGUIL:SetTextColor(Color(225,225,225,225))
  1481. local BypassCheck = vgui.Create("DCheckBoxLabel", AnchorPointC)
  1482. BypassCheck:SetPos(94,160)
  1483. BypassCheck:SetConVar( "SethHack_allow_cheats_default" )
  1484. BypassCheck:SetValue(svcheats.bypass:GetInt())
  1485. local BypassCheckLabel = vgui.Create( "DLabel", AnchorPointC)
  1486. BypassCheckLabel:SetPos(110,159)
  1487. BypassCheckLabel:SetText("Disable sv_cheats warning")
  1488. BypassCheckLabel:SizeToContents()
  1489. BypassCheckLabel:SetTextColor(Color(225,225,225,225))
  1490. local BMWGUI = vgui.Create("DCheckBox", AnchorPointC)
  1491. BMWGUI:SetPos(270,170)
  1492. BMWGUI:SetConVar( "SethHack_TMW" )
  1493. BMWGUI:SetValue(bmw:GetInt())
  1494. local BMWGUIL = vgui.Create( "DLabel", AnchorPointC)
  1495. BMWGUIL:SetPos(286,169)
  1496. BMWGUIL:SetText("Mini Window")
  1497. BMWGUIL:SizeToContents()
  1498. BMWGUIL:SetTextColor(Color(225,225,225,225))
  1499. BMWGUI.DoClick=function(pnl)
  1500. pnl:Toggle()
  1501. if pnl:GetChecked() then
  1502. SethHackMiniWindow()
  1503. else
  1504. MMPan:Remove()
  1505. end
  1506. end
  1507. local LOCKL = vgui.Create( "DLabel", AnchorPointC )
  1508. LOCKL:SetPos( 5, 195 )
  1509. LOCKL:SetText("-Targeting Priority-")
  1510. LOCKL:SizeToContents()
  1511. LOCKL:SetTextColor(Color(255,204,80,225))
  1512. local LockOnL
  1513. local function LockOnListA()
  1514. local types = {"Crosshair", "Distance", "Lowest HP", "Deadliest", "Aim Assistance"}
  1515. LockOnL = vgui.Create("DButton", AnchorPointC )
  1516. LockOnL:SetText( types[Mod:GetInt()] )
  1517. LockOnL:SetPos( 5, 210 )
  1518. LockOnL:SetSize( 90, 20 )
  1519. LockOnL.DoClick = function ( btn )
  1520. local MenuButtonOptions = DermaMenu()
  1521. MenuButtonOptions:AddOption("Crosshair", function() mod.oldRCC("SethHack_Mode",1) LockOnL:SetText( types[1] ) end )
  1522. MenuButtonOptions:AddOption("Distance", function() mod.oldRCC("SethHack_Mode",2) LockOnL:SetText( types[2] ) end )
  1523. MenuButtonOptions:AddOption("Lowest HP", function() mod.oldRCC("SethHack_Mode",3) LockOnL:SetText( types[3] ) end )
  1524. MenuButtonOptions:AddOption("Deadliest", function() mod.oldRCC("SethHack_Mode",4) LockOnL:SetText( types[4] ) end )
  1525. MenuButtonOptions:AddOption("Aim Assistance", function() mod.oldRCC("SethHack_Mode",5) LockOnL:SetText( types[5] ) end )
  1526. MenuButtonOptions:Open()
  1527. end
  1528. end
  1529. LockOnListA()
  1530. local Icon = vgui.Create("DImage", AnchorPointC)
  1531. Icon:SetMaterial(Material("SethHackBot/Logo"))
  1532. Icon:SetPos(147,15)
  1533. Icon:SetSize(211,53)
  1534. local HEIGHTL = vgui.Create( "DLabel", AnchorPointC )
  1535. HEIGHTL:SetPos( 116,175 )
  1536. HEIGHTL:SetText("-Aimbot Targeting Area-")
  1537. HEIGHTL:SizeToContents()
  1538. HEIGHTL:SetTextColor(Color(225,100,20,225))
  1539. local SetHeight = vgui.Create( "DNumSlider", AnchorPointC )
  1540. SetHeight:SetPos( 100,190 )
  1541. SetHeight:SetSize( 150, 100 ) -- Keep the second number at 100
  1542. SetHeight:SetText( " <Head - Nuts>" )
  1543. SetHeight:SetMin( 0 ) -- Minimum number of the slider
  1544. SetHeight:SetMax( 33 ) -- Maximum number of the slider
  1545. SetHeight:SetDecimals( 1 ) -- Sets a decimal. Zero means its a whole number
  1546. SetHeight:SetConVar( "SethHack_lockY" ) -- Set the convar
  1547. local cheatsbutton = vgui.Create( "DButton", AnchorPointC )
  1548. cheatsbutton:SetPos(255,210)
  1549. cheatsbutton:SetText("Toggle sv_cheats")
  1550. cheatsbutton:SetSize(100,20)
  1551. cheatsbutton.DoClick = function()
  1552. if not svcheats.allow() then return end
  1553. if CVARMETAGETINT(svcheats.cvar) != 0 then
  1554. mod.SetCVAR(svcheats.cvar, "0")
  1555. print("sv_cheats turned off")
  1556. else
  1557. mod.SetCVAR(svcheats.cvar, "1")
  1558. print("sv_cheats turned on")
  1559. end
  1560. end
  1561. local spambutton = vgui.Create( "DButton", AnchorPointC )
  1562. spambutton:SetPos(255,190)
  1563. spambutton:SetText("BB Spammer")
  1564. spambutton:SetSize(100,20)
  1565. spambutton.DoClick = function()
  1566. SpawnVGUISPAM()
  1567. end
  1568. local Title = vgui.Create("DLabel",AnchorPointC)
  1569. Title:SetPos(165,220)
  1570. Title:SetText("")
  1571. Title:SizeToContents()
  1572. //END OF GENERAL
  1573. //SPACE DIVIDER!!!!!!!!__________________________________________________________________________________________________________________________________
  1574. //START OF FRIENDS LIST!!!!!!
  1575. local AnchorPointA = vgui.Create( "DLabel", MPan )
  1576. AnchorPointA:SetPos(0,0)
  1577. AnchorPointA:SetText("")
  1578. MPan:AddSheet( "Friends", AnchorPointA, "SethHackBot/friends", false, false, "Aimbot Friends" )
  1579. local Icona = vgui.Create("DImage", AnchorPointA)
  1580. Icona:SetMaterial(Material("SethHackBot/BBBackground.vtf"))
  1581. Icona:SetPos(0,0)
  1582. Icona:SetSize(370,267)
  1583. local FriendListT = vgui.Create( "DLabel", AnchorPointA )
  1584. FriendListT:SetPos(40,5)
  1585. FriendListT:SetText("Friends - Current")
  1586. FriendListT:SizeToContents()
  1587. FriendListT:SetTextColor(Color(255,255,255,255))
  1588. local FriendListL
  1589. local function FriendsListA()
  1590. FriendListL = vgui.Create( "DComboBox", AnchorPointA )
  1591. FriendListL:SetPos( 10, 25 )
  1592. FriendListL:SetSize( 150, 190 )
  1593. FriendListL:SetMultiple(true) -- Dont use this unless you know extensive knowledge about tables
  1594. if BFS.GetFriends() then friendslist=BFS.GetFriends() else friendslist={} end
  1595. for k,v in pairs(friendslist) do
  1596. FriendListL:AddItem(v) -- Add our options
  1597. end
  1598. end
  1599. FriendsListA()
  1600. local FriendListB = vgui.Create( "DButton", AnchorPointA )
  1601. FriendListB:SetPos(20,215)
  1602. FriendListB:SetText("Remove from friends")
  1603. FriendListB:SetSize(120,20)
  1604. FriendListB.DoClick = function()
  1605. local temptable = {}
  1606. if #FriendListL:GetSelectedItems()==0 then LocalPlayer():ChatPrint("Please select one or more items please.") return end
  1607. for a,b in pairs(FriendListL:GetSelectedItems()) do
  1608. for c,d in pairs(friendslist) do
  1609. if b:GetValue()==d then
  1610. if #friendslist==0 then friendslist={} end
  1611. table.remove(friendslist,c)
  1612. table.insert(temptable,b:GetValue())
  1613. end
  1614. end
  1615. end
  1616. BFS.SetFriends(friendslist)
  1617. LocalPlayer():ChatPrint("Removed: "..table.concat(temptable,", "))
  1618. PlayerListA()
  1619. FriendsListA()
  1620. end
  1621. local PlayerListT = vgui.Create( "DLabel", AnchorPointA )
  1622. PlayerListT:SetPos(250,5)
  1623. PlayerListT:SetText("Players List")
  1624. PlayerListT:SizeToContents()
  1625. PlayerListT:SetTextColor(Color(255,255,255,255))
  1626. local PlayerListL
  1627. PlayerListA = function()
  1628. PlayerListL = vgui.Create( "DComboBox", AnchorPointA )
  1629. PlayerListL:SetPos( 200, 25 )
  1630. PlayerListL:SetSize( 150, 190 )
  1631. PlayerListL:SetMultiple(true)
  1632. for k,v in pairs(player.GetAll()) do
  1633. if !table.HasValue(friendslist,v:Name()) && v!=LocalPlayer() then
  1634. PlayerListL:AddItem(v:Name()) -- Add our options
  1635. end
  1636. end
  1637. end
  1638. PlayerListA()
  1639. local PlayerListB = vgui.Create( "DButton", AnchorPointA )
  1640. PlayerListB:SetPos(240,215)
  1641. PlayerListB:SetSize(80,20)
  1642. PlayerListB:SetText("Add to friends")
  1643. PlayerListB.DoClick = function()
  1644. local temptable = {}
  1645. if #PlayerListL:GetSelectedItems()==0 then LocalPlayer():ChatPrint("Please select one or more items please.") return end
  1646. for a,b in pairs(PlayerListL:GetSelectedItems()) do
  1647. table.insert(friendslist,b:GetValue())
  1648. table.insert(temptable,b:GetValue())
  1649. end
  1650. BFS.SetFriends(friendslist)
  1651. LocalPlayer():ChatPrint("Added: "..table.concat(temptable,", "))
  1652. PlayerListA()
  1653. FriendsListA()
  1654. end
  1655. //END OF FRIENDS LIST!!!!!!
  1656. //SPACE DIVIDER!!!!!!!!__________________________________________________________________________________________________________________________________
  1657. //START OF ENTITIES LIST!!!!!!
  1658. local AnchorPointB = vgui.Create( "DLabel", MPan )
  1659. AnchorPointA:SetPos(0,0)
  1660. AnchorPointA:SetText("")
  1661. MPan:AddSheet( "Aim Ents", AnchorPointB, "SethHackBot/ent_add", false, false, "Aimbot Entities" )
  1662. local Icona = vgui.Create("DImage", AnchorPointB)
  1663. Icona:SetMaterial(Material("SethHackBot/BBBackground.vtf"))
  1664. Icona:SetPos(0,0)
  1665. Icona:SetSize(370,267)
  1666. local EntityListT = vgui.Create( "DLabel", AnchorPointB )
  1667. EntityListT:SetPos(40,5)
  1668. EntityListT:SetText("Entities - Current")
  1669. EntityListT:SizeToContents()
  1670. EntityListT:SetTextColor(Color(255,255,255,255))
  1671. local EntityListL
  1672. local function EntityListA()
  1673. EntityListL = vgui.Create( "DComboBox", AnchorPointB )
  1674. EntityListL:SetPos( 10, 25 )
  1675. EntityListL:SetSize( 150, 190 )
  1676. EntityListL:SetMultiple(true) -- Dont use this unless you know extensive knowledge about tables
  1677. if BFS.GetEnts() then lockonlist=BFS.GetEnts() else lockonlist={} end
  1678. for k,v in pairs(lockonlist) do
  1679. EntityListL:AddItem(v) -- Add our options
  1680. end
  1681. end
  1682. EntityListA()
  1683. local EntityListB = vgui.Create( "DButton", AnchorPointB )
  1684. EntityListB:SetPos(20,215)
  1685. EntityListB:SetText("Remove from entities")
  1686. EntityListB:SetSize(120,20)
  1687. EntityListB.DoClick = function()
  1688. local temptable = {}
  1689. if #EntityListL:GetSelectedItems()==0 then LocalPlayer():ChatPrint("Please select one or more items please.") return end
  1690. for a,b in pairs(EntityListL:GetSelectedItems()) do
  1691. for c,d in pairs(lockonlist) do
  1692. if string.lower(b:GetValue())==string.lower(d) then
  1693. local lost=table.remove(lockonlist,c)
  1694. table.insert(temptable,lost)
  1695. end
  1696. end
  1697. end
  1698. BFS.SetEnts(lockonlist)
  1699. LocalPlayer():ChatPrint("Removed: "..table.concat(temptable,", "))
  1700. EntityListA()
  1701. EListA()
  1702. end
  1703. local EListT = vgui.Create( "DLabel", AnchorPointB )
  1704. EListT:SetPos(235,5)
  1705. EListT:SetText("Active Entities List")
  1706. EListT:SizeToContents()
  1707. EListT:SetTextColor(Color(255,255,255,255))
  1708. local EListL
  1709. EListA = function()
  1710. EListL = vgui.Create( "DComboBox", AnchorPointB )
  1711. EListL:SetPos( 200, 25 )
  1712. EListL:SetSize( 150, 190 )
  1713. EListL:SetMultiple(true)
  1714. local tempents = {}
  1715. for k,v in pairs(ents.GetAll()) do
  1716. if IsValid(v) && !table.HasValue(tempents,v:GetClass()) && !table.HasValue(lockonlist,v:GetClass()) then
  1717. table.insert(tempents,v:GetClass())
  1718. end
  1719. end
  1720. for g,h in pairs(tempents) do
  1721. if h=="prop_physics" then
  1722. ThePropList=EListL:AddItem(h)
  1723. ThePropList.OnMousePressed=function(a,b)
  1724. if b==108 then
  1725. local MenuButtonOptions = DermaMenu()
  1726. local temptablec = {}
  1727. local temptabled = {}
  1728. for k,v in pairs(ents.FindByClass("prop_physics")) do
  1729. if !table.HasValue(temptablec,string.Replace(string.Replace(string.GetFileFromFilename(v:GetModel()),"/",""),".mdl","")) && !table.HasValue(lockonlist,string.Replace(string.Replace(string.GetFileFromFilename(v:GetModel()),"/",""),".mdl","")) then
  1730. table.insert(temptablec, string.Replace(string.Replace(string.GetFileFromFilename(v:GetModel()),"/",""),".mdl",""))
  1731. table.insert(temptabled,v:GetModel())
  1732. end
  1733. end
  1734. for i,c in pairs(temptablec) do
  1735. local mover = vgui.Create( "DMenuOption", MenuButtonOptions)
  1736. mover:SetText(c)
  1737. local icon
  1738. mover.OnCursorEntered=function() icon=vgui.Create("SpawnIcon") icon:SetModel(temptabled[i]) icon.DoClick=function() icon:Remove() end local c,d = mover:GetPos() local a,b = MenuButtonOptions:GetPos() icon:SetPos(a+mover:GetWide(),b+d) end
  1739. mover.OnCursorExited=function() icon:Remove() end
  1740. mover.DoRightClick=function() icon:Remove() end
  1741. mover.DoClick=function()
  1742. table.insert(lockonlist,c)
  1743. BFS.SetEnts(lockonlist)
  1744. EListA()
  1745. EntityListA()
  1746. LocalPlayer():ChatPrint("Added: "..c)
  1747. icon:Remove()
  1748. end
  1749. MenuButtonOptions:AddPanel(mover)
  1750. end
  1751. MenuButtonOptions:Open()
  1752. else
  1753. EListL:SelectByName( "prop_physics" )
  1754. end
  1755. end
  1756. else
  1757. EListL:AddItem(h) -- Add our options
  1758. end
  1759. end
  1760. end
  1761. EListA()
  1762. local EListB = vgui.Create( "DButton", AnchorPointB )
  1763. EListB:SetPos(240,215)
  1764. EListB:SetSize(80,20)
  1765. EListB:SetText("Add to entities")
  1766. EListB.DoClick = function()
  1767. local temptable = {}
  1768. if #EListL:GetSelectedItems()==0 then LocalPlayer():ChatPrint("Please select one or more items please.") return end
  1769. for a,b in pairs(EListL:GetSelectedItems()) do
  1770. table.insert(lockonlist,b:GetValue())
  1771. table.insert(temptable,b:GetValue())
  1772. end
  1773. BFS.SetEnts(lockonlist)
  1774. LocalPlayer():ChatPrint("Added: "..table.concat(temptable,", "))
  1775. EListA()
  1776. EntityListA()
  1777. end
  1778. //END OF ENTITIES LIST!!!!!!
  1779. //SPACE DIVIDER!!!!!!!!__________________________________________________________________________________________________________________________________
  1780. //START OF ESP TAB!!!!!!
  1781. local AnchorPointD = vgui.Create( "DLabel", MPan )
  1782. AnchorPointD:SetPos(0,0)
  1783. AnchorPointD:SetText("")
  1784. MPan:AddSheet( "ESP", AnchorPointD, "SethHackBot/radar", false, false, "ESP Menu" )
  1785. local Icona = vgui.Create("DImage", AnchorPointD)
  1786. Icona:SetMaterial(Material("SethHackBot/BBBackground.vtf"))
  1787. Icona:SetPos(0,0)
  1788. Icona:SetSize(370,267)
  1789. local CheckBoxThing = vgui.Create( "DCheckBoxLabel", AnchorPointD)
  1790. CheckBoxThing:SetPos( 10, 30 )
  1791. CheckBoxThing:SetConVar( "SethHack_espplayeron" )
  1792. CheckBoxThing:SetValue( playeron:GetInt() )
  1793. local CheckBoxThing2 = vgui.Create( "DLabel", AnchorPointD)
  1794. CheckBoxThing2:SetPos( 26, 29 )
  1795. CheckBoxThing2:SetText( "Players" )
  1796. CheckBoxThing2:SetTextColor(Color(225,225,225,225))
  1797. CheckBoxThing2:SizeToContents()
  1798. local MenuButton = vgui.Create("DButton", AnchorPointD)
  1799. MenuButton:SetText( "Mode >" )
  1800. MenuButton:SetPos(10, 10)
  1801. MenuButton:SetSize(50, 15)
  1802. MenuButton.DoClick = function ( btn )
  1803. local MenuButtonOptions = DermaMenu() // Creates the menu
  1804. MenuButtonOptions:AddOption("Simple", function() mod.oldRCC("SethHack_espmode","0") end ) // Add options to the menu
  1805. MenuButtonOptions:AddOption("Normal", function() mod.oldRCC("SethHack_espmode","1") end )
  1806. MenuButtonOptions:AddOption("Advanced", function() mod.oldRCC("SethHack_espmode","2") end )
  1807. MenuButtonOptions:Open() // Open the menu AFTER adding your options
  1808. end
  1809. local MenuButton = vgui.Create("DButton", AnchorPointD)
  1810. MenuButton:SetText( "ESP Crosshair >" )
  1811. MenuButton:SetPos(10, 170)
  1812. MenuButton:SetSize(100, 15)
  1813. MenuButton.DoClick = function ( btn )
  1814. local MenuButtonOptions = DermaMenu() // Creates the menu
  1815. MenuButtonOptions:AddOption("Box", function() mod.oldRCC("SethHack_espcross","0") end ) // Add options to the menu
  1816. MenuButtonOptions:AddOption("Cross", function() mod.oldRCC("SethHack_espcross","1") end )
  1817. MenuButtonOptions:AddOption("|_", function() mod.oldRCC("SethHack_espcross","2") end )
  1818. MenuButtonOptions:Open() // Open the menu AFTER adding your options
  1819. end
  1820. local CheckBoxThing = vgui.Create( "DCheckBoxLabel", AnchorPointD)
  1821. CheckBoxThing:SetPos(10, 50)
  1822. CheckBoxThing:SetConVar("SethHack_espitemon")
  1823. CheckBoxThing:SetValue(itemon:GetInt())
  1824. local CheckBoxThing2 = vgui.Create( "DLabel", AnchorPointD)
  1825. CheckBoxThing2:SetPos(26, 49)
  1826. CheckBoxThing2:SetTextColor(Color(225,225,225,225))
  1827. CheckBoxThing2:SetText("Items")
  1828. CheckBoxThing2:SizeToContents()
  1829. local CheckBoxThing = vgui.Create( "DCheckBoxLabel", AnchorPointD)
  1830. CheckBoxThing:SetPos( 10,70 )
  1831. CheckBoxThing:SetConVar( "SethHack_espvehicleon" )
  1832. CheckBoxThing:SetValue( vehicleon:GetInt() )
  1833. local CheckBoxThing2 = vgui.Create( "DLabel", AnchorPointD)
  1834. CheckBoxThing2:SetPos( 26,69 )
  1835. CheckBoxThing2:SetText( "Vehicles" )
  1836. CheckBoxThing2:SetTextColor(Color(225,225,225,225))
  1837. CheckBoxThing2:SizeToContents()
  1838. local CheckBoxThing = vgui.Create( "DCheckBoxLabel", AnchorPointD)
  1839. CheckBoxThing:SetPos( 10,90 )
  1840. CheckBoxThing:SetConVar( "SethHack_espnpcon" )
  1841. CheckBoxThing:SetValue( npcon:GetInt() )
  1842. local CheckBoxThing2 = vgui.Create( "DLabel", AnchorPointD)
  1843. CheckBoxThing2:SetPos( 26,89 )
  1844. CheckBoxThing2:SetText( "NPCs" )
  1845. CheckBoxThing2:SetTextColor(Color(225,225,225,225))
  1846. CheckBoxThing2:SizeToContents()
  1847. local CheckBoxThing = vgui.Create( "DCheckBoxLabel", AnchorPointD)
  1848. CheckBoxThing:SetPos( 10,110 )
  1849. CheckBoxThing:SetConVar( "SethHack_espweaponon" )
  1850. CheckBoxThing:SetValue( weaponon:GetInt() )
  1851. local CheckBoxThing2 = vgui.Create( "DLabel", AnchorPointD)
  1852. CheckBoxThing2:SetPos( 26,109 )
  1853. CheckBoxThing2:SetText( "Weapons" )
  1854. CheckBoxThing2:SetTextColor(Color(225,225,225,225))
  1855. CheckBoxThing2:SizeToContents()
  1856. local CheckBoxThing = vgui.Create( "DCheckBoxLabel", AnchorPointD)
  1857. CheckBoxThing:SetPos( 10,130 )
  1858. CheckBoxThing:SetConVar( "SethHack_espunhideon" )
  1859. CheckBoxThing:SetValue( unhideon:GetInt() )
  1860. local CheckBoxThing2 = vgui.Create( "DLabel", AnchorPointD)
  1861. CheckBoxThing2:SetPos( 26,129 )
  1862. CheckBoxThing2:SetText( "Show Invisble Props" )
  1863. CheckBoxThing2:SetTextColor(Color(225,225,225,225))
  1864. CheckBoxThing2:SizeToContents()
  1865. local CheckBoxThing = vgui.Create( "DCheckBoxLabel", AnchorPointD)
  1866. CheckBoxThing:SetPos( 10,150 )
  1867. CheckBoxThing:SetConVar( "SethHack_drawclassname" )
  1868. CheckBoxThing:SetValue( drawclassname:GetInt() )
  1869. local CheckBoxThing2 = vgui.Create( "DLabel", AnchorPointD)
  1870. CheckBoxThing2:SetPos( 26,149 )
  1871. CheckBoxThing2:SetText( "Item Type Display" )
  1872. CheckBoxThing2:SetTextColor(Color(225,225,225,225))
  1873. CheckBoxThing2:SizeToContents()
  1874. local Icon = vgui.Create("DModelPanel", AnchorPointD)
  1875. Icon:SetModel(LocalPlayer():GetModel())
  1876. Icon:SetAnimated(true)
  1877. Icon:SetPos(157,36)
  1878. Icon:SetSize(175,175)
  1879. Icon.Entity:SetPos(Icon.Entity:GetPos()+Vector(-10,0,0))
  1880. local Painted = vgui.Create("DLabel", AnchorPointD)
  1881. Painted:SetPos(115,0)
  1882. Painted:SetSize(250,250)
  1883. Painted:SetText("")
  1884. Painted.Paint=function()
  1885. local x=140
  1886. local y=55
  1887. local MMode=cross:GetInt()
  1888. local playeron = playeron:GetInt()
  1889. local itemon = itemon:GetInt()
  1890. local vehicleon = vehicleon:GetInt()
  1891. local npcon = npcon:GetInt()
  1892. local weaponon = weaponon:GetInt()
  1893. local trans = trans:GetInt()
  1894. local mode = mode:GetInt()
  1895. surface.SetDrawColor(0,255,0,255)
  1896. if (MMode==0) then
  1897. surface.DrawLine(x-40,y-15,x+40,y-15)
  1898. surface.DrawLine(x-40,y-15,x-40,y+150)
  1899. surface.DrawLine(x-40,y+150,x+40,y+150)
  1900. surface.DrawLine(x+40,y-15,x+40,y+150)
  1901. elseif (MMode==1) then
  1902. surface.DrawLine(x,y-5,x,y+5)
  1903. surface.DrawLine(x-5,y,x+5,y)
  1904. else
  1905. surface.DrawLine(x,y,x,y-20)
  1906. surface.DrawLine(x,y,x+20,y)
  1907. end
  1908. v=LocalPlayer()
  1909. local mod = v:GetModel()
  1910. ateam = v:Team()
  1911. color = team.GetColor(ateam)
  1912. color.r, color.g, color.b, color.a = color.r, color.g, color.b, trans
  1913. if v:InVehicle() then
  1914. colora = Color(255,255,255,trans)
  1915. else
  1916. colora = color
  1917. end
  1918. local weapon="NONE"
  1919. if v:Alive() && !v:InVehicle() && v:GetActiveWeapon( ) && (!string.find(v:GetModel(),"Antlion") && !string.find(v:GetModel(),"player.mdl")) && !Sass then
  1920. if v:Alive() && v:GetActiveWeapon():IsValid() then
  1921. weapon=v:GetActiveWeapon( ):GetPrintName()
  1922. weapon=string.Replace(weapon,"#HL2_","")
  1923. weapon=string.Replace(weapon,"#GMOD_","")
  1924. end
  1925. else
  1926. weapon="NONE"
  1927. end
  1928. hp = v:Health()
  1929. name = v:Name()
  1930. gpos = v:EyePos():ToScreen()
  1931. dist = math.Round(v:EyePos():Distance(LocalPlayer():EyePos()))
  1932. local ads = admincheck(v)
  1933. if mode==2 then
  1934. tn=team.GetName(ateam)
  1935. draw.SimpleText(hp.." W: "..weapon, "Default", x+15, y-32, colora,0,0)
  1936. draw.SimpleText("F","Signs", x+1, y-30, colora,0,0)
  1937. draw.SimpleText(""..name.."", "Default", x+3, y-43, colora,0,0)
  1938. draw.SimpleText(""..tn.."","Default", x+3, y-12, colora,0,0)
  1939. draw.SimpleText("Dist: 1337","Default", x+3, y-22, colora,0,0)
  1940. draw.SimpleText(""..ads.."","Default", x+3, y-53, Color(255,0,0,trans),0,0)
  1941. DrawCrosshair(v)
  1942. elseif mode==0 then
  1943. draw.SimpleText(""..name.."", "Default", x+3, y-23, colora,0,0)
  1944. draw.SimpleText(hp,"Default", x+15, y-12, colora,0,0)
  1945. draw.SimpleText("F","Signs", x+1, y-10, colora,0,0)
  1946. draw.SimpleText(""..ads.."","Default", x+3, y-33, Color(255,0,0,trans),0,0)
  1947. DrawCrosshair(v)
  1948. else
  1949. draw.SimpleText(""..name.."", "Default", x+3, y-33, colora,0,0)
  1950. draw.SimpleText(hp, "Default", x+15, y-12, colora,0,0)
  1951. draw.SimpleText("W: "..weapon, "Default", x+3, y-23, colora,0,0)
  1952. draw.SimpleText("F","Signs", x+1, y-10, colora,0,0)
  1953. draw.SimpleText(""..ads.."","Default", x+3, y-43, Color(255,0,0,trans),0,0)
  1954. DrawCrosshair(v)
  1955. end
  1956. end
  1957. local NumSliderThingy = vgui.Create( "DNumSlider", AnchorPointD )
  1958. NumSliderThingy:SetPos( 10,190 )
  1959. NumSliderThingy:SetSize( 150, 100 ) -- Keep the second number at 100
  1960. NumSliderThingy:SetText( "ESP Transparency" )
  1961. NumSliderThingy:SetMin( 100 ) -- Minimum number of the slider
  1962. NumSliderThingy:SetMax( 255 ) -- Maximum number of the slider
  1963. NumSliderThingy:SetDecimals( 0 ) -- Sets a decimal. Zero means its a whole number
  1964. NumSliderThingy:SetConVar( "SethHack_esptrans" )
  1965. local TBC = vgui.Create("DCheckBoxLabel", AnchorPointD)
  1966. TBC:SetPos(90,30)
  1967. TBC:SetConVar( "SethHack_Chams" )
  1968. local TBT = vgui.Create( "DLabel", AnchorPointD)
  1969. TBT:SetPos(106,29)
  1970. TBT:SetText("Player Wallhack")
  1971. TBT:SizeToContents()
  1972. TBT:SetTextColor(Color(225,225,225,225))
  1973. local CHAMS2C = vgui.Create("DCheckBoxLabel", AnchorPointD)
  1974. CHAMS2C:SetPos(90, 50)
  1975. CHAMS2C:SetConVar( "SethHack_chams2" )
  1976. local CHAMS2L = vgui.Create( "DLabel", AnchorPointD)
  1977. CHAMS2L:SetPos(106, 49)
  1978. CHAMS2L:SetWide(CHAMS2L:GetWide() + 20)
  1979. CHAMS2L:SetText("Wireframe Wallhack")
  1980. CHAMS2L:SizeToContents()
  1981. CHAMS2L:SetTextColor(Color(225,225,225,225))
  1982. local ALC = vgui.Create("DCheckBoxLabel", AnchorPointD)
  1983. ALC:SetPos(90,70)
  1984. ALC:SetConVar( "SethHack_adminlist" )
  1985. local ALT = vgui.Create( "DLabel", AnchorPointD)
  1986. ALT:SetPos(106,66)
  1987. ALT:SetText("Admin List")
  1988. ALT:SetTextColor(Color(225,225,225,225))
  1989. local FB = vgui.Create("DCheckBoxLabel", AnchorPointD)
  1990. FB:SetPos(90,90)
  1991. FB:SetValue(GetConVar("mat_fullbright"):GetBool())
  1992. function FB:OnChange()
  1993. mod.SetCVAR(GetConVar("mat_fullbright"), self:GetChecked() and "1" or "0")
  1994. end
  1995. local FBL = vgui.Create( "DLabel", AnchorPointD)
  1996. FBL:SetPos(106,86)
  1997. FBL:SetWide(FBL:GetWide() + 5)
  1998. FBL:SetText("Fullbright")
  1999. FBL:SetTextColor(Color(225,225,225,225))
  2000. //END OF ESP TAB!!!!!!!
  2001. //START OF ESP ENTITIES LIST!!!!!!!!
  2002. local AnchorPointE = vgui.Create( "DLabel", MPan )
  2003. AnchorPointA:SetPos(0,0)
  2004. AnchorPointA:SetText("")
  2005. MPan:AddSheet( "ESP Ents", AnchorPointE, "SethHackBot/esp_list", false, false, "ESP Entities" )
  2006. local Icona = vgui.Create("DImage", AnchorPointE)
  2007. Icona:SetMaterial(Material("SethHackBot/BBBackground.vtf"))
  2008. Icona:SetPos(0,0)
  2009. Icona:SetSize(370,267)
  2010. Icona.Think = function (self)
  2011. end
  2012. local ESPEntityListT = vgui.Create( "DLabel", AnchorPointE )
  2013. ESPEntityListT:SetPos(40,5)
  2014. ESPEntityListT:SetText("Entities - Current")
  2015. ESPEntityListT:SizeToContents()
  2016. ESPEntityListT:SetTextColor(Color(255,255,255,255))
  2017. local ESPEntityListL
  2018. local function ESPEntityListA()
  2019. ESPEntityListL = vgui.Create( "DComboBox", AnchorPointE )
  2020. ESPEntityListL:SetPos( 10, 25 )
  2021. ESPEntityListL:SetSize( 150, 190 )
  2022. ESPEntityListL:SetMultiple(true) -- Dont use this unless you know extensive knowledge about tables
  2023. if BFS.GetESPEnts() then entlist=BFS.GetESPEnts() else entlist={} end
  2024. for k,v in pairs(entlist) do
  2025. ESPEntityListL:AddItem(v) -- Add our options
  2026. end
  2027. end
  2028. ESPEntityListA()
  2029. local ESPEntityListB = vgui.Create( "DButton", AnchorPointE )
  2030. ESPEntityListB:SetPos(20,215)
  2031. ESPEntityListB:SetText("Remove from entities")
  2032. ESPEntityListB:SetSize(120,20)
  2033. ESPEntityListB.DoClick = function()
  2034. local temptable = {}
  2035. if #ESPEntityListL:GetSelectedItems()==0 then LocalPlayer():ChatPrint("Please select one or more items please.") return end
  2036. for a,b in pairs(ESPEntityListL:GetSelectedItems()) do
  2037. for c,d in pairs(entlist) do
  2038. if string.lower(b:GetValue())==string.lower(d) then
  2039. local lost=table.remove(entlist,c)
  2040. table.insert(temptable,lost)
  2041. end
  2042. end
  2043. end
  2044. BFS.SetESPEnts(entlist)
  2045. LocalPlayer():ChatPrint("Removed: "..table.concat(temptable,", "))
  2046. ESPEntityListA()
  2047. EListA()
  2048. end
  2049. local EListT = vgui.Create( "DLabel", AnchorPointE )
  2050. EListT:SetPos(235,5)
  2051. EListT:SetText("Active Entities List")
  2052. EListT:SizeToContents()
  2053. EListT:SetTextColor(Color(255,255,255,255))
  2054. local EESPListL
  2055. local function EESPListA()
  2056. EESPListL = vgui.Create( "DComboBox", AnchorPointE )
  2057. EESPListL:SetPos( 200, 25 )
  2058. EESPListL:SetSize( 150, 190 )
  2059. EESPListL:SetMultiple(true)
  2060. local tempents = {}
  2061. for k,v in pairs(ents.GetAll()) do
  2062. if IsValid(v) && !table.HasValue(tempents,v:GetClass()) && !table.HasValue(entlist,v:GetClass()) then
  2063. table.insert(tempents,v:GetClass())
  2064. end
  2065. end
  2066. for g,h in pairs(tempents) do
  2067. if h=="prop_physics" then
  2068. ThePropList=EESPListL:AddItem(h)
  2069. ThePropList.OnMousePressed=function(a,b)
  2070. if b==108 then
  2071. local MenuButtonOptions = DermaMenu()
  2072. local temptablec = {}
  2073. local temptabled = {}
  2074. for k,v in pairs(ents.FindByClass("prop_physics")) do
  2075. if !table.HasValue(temptablec,string.Replace(string.Replace(string.GetFileFromFilename(v:GetModel()),"/",""),".mdl","")) && !table.HasValue(entlist,string.Replace(string.Replace(string.GetFileFromFilename(v:GetModel()),"/",""),".mdl","")) then
  2076. table.insert(temptablec, string.Replace(string.Replace(string.GetFileFromFilename(v:GetModel()),"/",""),".mdl",""))
  2077. table.insert(temptabled,v:GetModel())
  2078. end
  2079. end
  2080. for i,c in pairs(temptablec) do
  2081. local mover = vgui.Create( "DMenuOption", MenuButtonOptions)
  2082. mover:SetText(c)
  2083. local icon
  2084. mover.OnCursorEntered=function() icon=vgui.Create("SpawnIcon") icon:SetModel(temptabled[i]) icon.DoClick=function() icon:Remove() end local c,d = mover:GetPos() local a,b = MenuButtonOptions:GetPos() icon:SetPos(a+mover:GetWide(),b+d) end
  2085. mover.OnCursorExited=function() icon:Remove() end
  2086. mover.DoRightClick=function() icon:Remove() end
  2087. mover.DoClick=function()
  2088. table.insert(entlist,c)
  2089. BFS.SetESPEnts(entlist)
  2090. EESPListA()
  2091. ESPEntityListA()
  2092. LocalPlayer():ChatPrint("Added: "..c)
  2093. icon:Remove()
  2094. end
  2095. MenuButtonOptions:AddPanel(mover)
  2096. end
  2097. MenuButtonOptions:Open()
  2098. else
  2099. EESPListL:SelectByName( "prop_physics" )
  2100. end
  2101. end
  2102. else
  2103. EESPListL:AddItem(h) -- Add our options
  2104. end
  2105. end
  2106. end
  2107. EESPListA()
  2108. local EListB = vgui.Create( "DButton", AnchorPointE )
  2109. EListB:SetPos(240,215)
  2110. EListB:SetSize(80,20)
  2111. EListB:SetText("Add to entities")
  2112. EListB.DoClick = function()
  2113. local temptable = {}
  2114. if #EESPListL:GetSelectedItems()==0 then LocalPlayer():ChatPrint("Please select one or more items please.") return end
  2115. for a,b in pairs(EESPListL:GetSelectedItems()) do
  2116. table.insert(entlist,b:GetValue())
  2117. table.insert(temptable,b:GetValue())
  2118. end
  2119. BFS.SetESPEnts(entlist)
  2120. LocalPlayer():ChatPrint("Added: "..table.concat(temptable,", "))
  2121. EESPListA()
  2122. ESPEntityListA()
  2123. end
  2124. //END OF ESP ENTITIES LIST!!!!!!
  2125. //START OF MISC
  2126. local MiscAnchor = vgui.Create( "DLabel", MPan )
  2127. MiscAnchor:SetPos(0,0)
  2128. MiscAnchor:SetText("")
  2129. local background = vgui.Create("DImage", MiscAnchor)
  2130. background:SetMaterial(Material("SethHackBot/BBBackground.vtf"))
  2131. background:SetPos(0,0)
  2132. background:SetSize(370,267)
  2133. MPan:AddSheet( "Misc.", MiscAnchor, "SethHackBot/misc", false, false, "Everything else" )
  2134. local label = vgui.Create( "DLabel", MiscAnchor)
  2135. label:SetPos(12,5)
  2136. label:SetText("-Crosshairs-")
  2137. label:SetTextColor(Color(225,0,70,255))
  2138. label:SizeToContents()
  2139. for i,v in ipairs(crosshairs) do
  2140. local check = vgui.Create( "DCheckBoxLabel", MiscAnchor)
  2141. check:SetPos(10, 20 + (i-1)*18)
  2142. check:SetConVar(v.enabled:GetName())
  2143. check:SetValue(v.enabled:GetInt())
  2144. check:SetText(v.name)
  2145. check:SizeToContents()
  2146. end
  2147. local label = vgui.Create( "DLabel", MiscAnchor)
  2148. label:SetPos(118,5)
  2149. label:SetText("-Preview-")
  2150. label:SetTextColor(Color(225,0,70,255))
  2151. label:SizeToContents()
  2152. local preview = vgui.Create("Panel", MiscAnchor)
  2153. preview:SetPos(120, 20)
  2154. preview:SetSize(40, 40)
  2155. function preview:Paint()
  2156. local cx, cy = self:GetWide()/2, self:GetTall()/2
  2157. surface.SetDrawColor(0, 255, 0, 255)
  2158. surface.DrawLine(0, 0, self:GetWide(), 0)
  2159. surface.DrawLine(0, 0, 0, self:GetTall())
  2160. surface.DrawLine(0, self:GetTall()-1, self:GetWide(), self:GetTall()-1)
  2161. surface.DrawLine(self:GetWide()-1, 0, self:GetWide()-1, self:GetTall())
  2162. for k,v in pairs(crosshairs) do
  2163. if v.enabled:GetBool() then
  2164. v.draw(cx, cy, true)
  2165. end
  2166. end
  2167. end
  2168. local label = vgui.Create( "DLabel", MiscAnchor)
  2169. label:SetPos(118, 64)
  2170. label:SetText("-Camera-")
  2171. label:SetTextColor(Color(225,0,70,255))
  2172. label:SizeToContents()
  2173. local check = vgui.Create( "DCheckBoxLabel", MiscAnchor)
  2174. check:SetPos(118, 79)
  2175. check:SetConVar(gamemodeview:GetName())
  2176. check:SetValue(gamemodeview:GetInt())
  2177. check:SetText("Thirdperson GM Fix" )
  2178. check:SizeToContents()
  2179. local check = vgui.Create( "DCheckBoxLabel", MiscAnchor)
  2180. check:SetPos(118, 94)
  2181. check:SetValue(recording_mode)
  2182. check:SetText("Panic Mode (Hides HUD/ESP/Chams)")
  2183. check:SizeToContents()
  2184. function check.Button:DoClick()
  2185. self:Toggle()
  2186. recording_mode = not recording_mode
  2187. if self:GetChecked() then
  2188. MMPan:Remove()
  2189. else
  2190. if bmw:GetBool() then
  2191. SethHackMiniWindow()
  2192. end
  2193. end
  2194. end
  2195. local label = vgui.Create( "DLabel", MiscAnchor)
  2196. label:SetPos(12,175)
  2197. label:SetText("-IP Logging-")
  2198. label:SetTextColor(Color(225,0,70,255))
  2199. label:SizeToContents()
  2200. local check = vgui.Create( "DCheckBoxLabel", MiscAnchor)
  2201. check:SetPos(10, 190)
  2202. check:SetConVar(logips:GetName())
  2203. check:SetValue(logips:GetInt())
  2204. check:SetText("Enable IP Logging")
  2205. check:SizeToContents()
  2206. local ipbutton = vgui.Create( "DButton", MiscAnchor)
  2207. ipbutton:SetPos(10, 208)
  2208. ipbutton:SetText("IP Log Viewer")
  2209. ipbutton:SetSize(109,20)
  2210. ipbutton.DoClick = function()
  2211. local win = vgui.Create("DFrame")
  2212. function win:GetSkin()
  2213. return SKIN
  2214. end
  2215. win:SetSize(300, 365)
  2216. win:SetPos(ScrW()/2 + 300, ScrH()/2 - 180)
  2217. win:SetVisible(true)
  2218. win:MakePopup()
  2219. win:SetTitle("SethHackBot IP Viewer")
  2220. local bg = vgui.Create("DImage", win)
  2221. bg:SetMaterial(Material("SethHackBot/BBBackground.vtf"))
  2222. bg:SetPos(0, 22)
  2223. bg:SetSize(450, 300)
  2224. local searchName = vgui.Create("DTextEntry", win)
  2225. searchName:SetPos(3, 25)
  2226. searchName:SetSize(125, 20)
  2227. local bindButton = vgui.Create("DButton", win)
  2228. bindButton:SetPos(133, 25)
  2229. bindButton:SetSize(40, 20)
  2230. bindButton:SetText("Search")
  2231. local clearButton = vgui.Create("DButton", win)
  2232. clearButton:SetSize(50, 20)
  2233. clearButton:SetPos(win:GetWide() - clearButton:GetWide() - 3,25)
  2234. clearButton:SetText("Clear DB")
  2235. local ipList = vgui.Create("DListView", win)
  2236. ipList:SetPos(0, 47)
  2237. ipList:SetSize(300, 318)
  2238. ipList:SetMultiSelect(false)
  2239. local col1 = ipList:AddColumn( "Name" )
  2240. col1:SetMinWidth(150)
  2241. col1:SetMaxWidth(150)
  2242. local col2 = ipList:AddColumn( "IP Address" )
  2243. for k,v in pairs(tblDB) do
  2244. ipList:AddLine(k, v)
  2245. end
  2246. ipList:SortByColumn(1, false)
  2247. function bindButton:DoClick()
  2248. ipList:Clear()
  2249. for k,v in pairs(tblDB) do
  2250. if k:lower():find(searchName:GetValue():gsub("%[", "%%%["):gsub("%]", "%%%]"):gsub("%%", "%%%%"):lower()) then
  2251. ipList:AddLine(k, v)
  2252. end
  2253. end
  2254. end
  2255. function clearButton:DoClick()
  2256. ipList:Clear()
  2257. mod.ConCmd("log_clear")
  2258. end
  2259. function ipList:OnRowRightClick(line)
  2260. local menu = DermaMenu()
  2261. menu:AddOption("Copy", function()
  2262. SetClipboardText(self:GetLine(line):GetValue(2))
  2263. end)
  2264. menu:Open()
  2265. end
  2266. end
  2267. local label = vgui.Create( "DLabel", MiscAnchor)
  2268. label:SetPos(130,175)
  2269. label:SetText("-Speedhack-")
  2270. label:SetTextColor(Color(225,0,70,255))
  2271. label:SizeToContents()
  2272. local AimSmooth_Slider = vgui.Create('DNumSlider',MiscAnchor)
  2273. AimSmooth_Slider:SetText('Speed Factor')
  2274. AimSmooth_Slider:SetPos(130, 190)
  2275. AimSmooth_Slider:SetMinMax(1,10)
  2276. AimSmooth_Slider:SetWide(120)
  2277. AimSmooth_Slider:SetMouseInputEnabled(true)
  2278. AimSmooth_Slider:SetValue(speedfactor:GetFloat())
  2279. AimSmooth_Slider:SetConVar(speedfactor:GetName())
  2280. //END OF MISC
  2281. //START OF BIND MENU LIST
  2282. // 370, 267
  2283. local BindAnchor = vgui.Create( "DLabel", MPan )
  2284. BindAnchor:SetPos(0,0)
  2285. BindAnchor:SetText("")
  2286. local background = vgui.Create("DImage", BindAnchor)
  2287. background:SetMaterial(Material("SethHackBot/BBBackground.vtf"))
  2288. background:SetPos(0,0)
  2289. background:SetSize(370,267)
  2290. MPan:AddSheet( "Binds", BindAnchor, "SethHackBot/bind", false, false, "Bind Menu" )
  2291. local keyChoice = ""
  2292. local keys = {
  2293. {
  2294. name = "Letters/Num",
  2295. keys = {
  2296. "A", "B", "C", "D",
  2297. "E", "F", "G", "H",
  2298. "I", "J", "K", "L",
  2299. "M", "N", "O", "P",
  2300. "Q", "R", "S", "T",
  2301. "U", "V", "W", "X",
  2302. "Y", "Z", "1", "2",
  2303. "3", "4", "5", "6",
  2304. "7", "8", "9", "0",
  2305. },
  2306. },
  2307. {
  2308. name = "Other",
  2309. keys = {
  2310. "ALT", "SHIFT","CAPSLOCK","-",
  2311. "=", "[", "]", "\\",
  2312. ";", "'", ",", ".",
  2313. "/", "F5", "F6", "F7",
  2314. "F8", "F9", "F10", "F11",
  2315. "F12", "INS", "DEL", "HOME",
  2316. "END", "PGUP", "PGDN",
  2317. },
  2318. },
  2319. {
  2320. name = "Mouse",
  2321. keys = {
  2322. "MOUSE3",
  2323. "MOUSE4",
  2324. "MOUSE5",
  2325. "MWHEELUP",
  2326. "MWHEELDOWN",
  2327. },
  2328. },
  2329. }
  2330. local keyList = vgui.Create("DTextEntry", BindAnchor)
  2331. keyList:SetPos(3, 3)
  2332. keyList:SetWidth(45)
  2333. function keyList:OnMousePressed(code)
  2334. if code ~= MOUSE_LEFT then return true end
  2335. if self.Menu then self.Menu:Remove() end
  2336. self.Menu = DermaMenu()
  2337. for _,v in ipairs(keys) do
  2338. local sub = self.Menu:AddSubMenu(v.name)
  2339. for _, iv in ipairs(v.keys) do
  2340. sub:AddOption(iv, function()
  2341. if not IsValid(self) then return end
  2342. keyChoice = iv
  2343. self:SetText(iv)
  2344. end)
  2345. end
  2346. end
  2347. self.Menu:Open()
  2348. end
  2349. local commandName = vgui.Create("DTextEntry", BindAnchor)
  2350. commandName:SetPos(53, 3)
  2351. commandName:SetSize(125, 20)
  2352. commandName:SetEditable(false)
  2353. local errorLabel = vgui.Create("DLabel", BindAnchor)
  2354. errorLabel:SetPos(228, 3)
  2355. errorLabel:SetSize(150, 20)
  2356. errorLabel:SetText("")
  2357. errorLabel:SetColor(Color(255, 0, 0))
  2358. local bindButton = vgui.Create("DButton", BindAnchor)
  2359. bindButton:SetPos(183, 3)
  2360. bindButton:SetSize(40, 20)
  2361. bindButton:SetText("Bind!")
  2362. function bindButton:DoClick()
  2363. if keyChoice == "" or commandName:GetValue() == "" then
  2364. errorLabel:SetText("Specify key and command!")
  2365. timer.Simple(3, function() if IsValid(errorLabel) then errorLabel:SetText("") end end)
  2366. else
  2367. local cmd = "bind \""..tostring(keyChoice).."\" \""..tostring(commandName:GetValue()).."\""
  2368. mod.ConCmd(cmd)
  2369. print(cmd)
  2370. errorLabel:SetText("")
  2371. end
  2372. end
  2373. local cmdList = vgui.Create("DListView", BindAnchor)
  2374. cmdList:SetPos(0, 25)
  2375. cmdList:SetSize(360, 232)
  2376. cmdList:SetMultiSelect(false)
  2377. function cmdList:OnRowSelected(LineID, Line)
  2378. commandName:SetValue(Line:GetColumnText(1))
  2379. end
  2380. local col1 = cmdList:AddColumn( "Command" )
  2381. col1:SetMinWidth(125)
  2382. col1:SetMaxWidth(125)
  2383. local col2 = cmdList:AddColumn( "Description" )
  2384. for k,v in pairs(Commands.help) do
  2385. cmdList:AddLine(k:lower(), v)
  2386. end
  2387. table.Copy( cmdList.Sorted, cmdList.Lines )
  2388. table.sort( cmdList.Sorted, function( a, b )
  2389. if (!IsValid( a )) then return true end
  2390. if (!IsValid( b )) then return false end
  2391. local cmd1 = a:GetColumnText(1):lower()
  2392. local cmd2 = b:GetColumnText(1):lower()
  2393. if ( cmd1 != cmd2 ) then
  2394. if cmd1:gsub("+", ""):sub(1,1) == cmd2:gsub("+", ""):sub(1,1) then
  2395. return cmd1 < cmd2
  2396. else
  2397. return cmd1:gsub("+", "") < cmd2:gsub("+", "")
  2398. end
  2399. end
  2400. return true
  2401. end )
  2402. cmdList:SetDirty( true )
  2403. cmdList:InvalidateLayout()
  2404. end
  2405. local spamchat = false
  2406. -- Coded by seth, if you take this line out you're a fucking nigger
  2407. local propamount = CreateClientConVar( "SethHack_data_prop", 0, true, false )
  2408. local swepamount = CreateClientConVar( "SethHack_data_swep", 0, true, false )
  2409. local sentamount = CreateClientConVar( "SethHack_data_sent", 0, true, false )
  2410. local propmodel = "Prop Model"
  2411. local swepmodel = "SWEP Name"
  2412. local vehiclemodel = "Vehicle Name"
  2413. local npcmodel = "NPC Name"
  2414. local sentmodel = "SENT Name"
  2415. local function sentspam()
  2416. local sents = sentamount:GetInt() -1
  2417. for i=0,sents do
  2418. mod.oldRCC("gm_spawnsent",sentmodel)
  2419. end
  2420. end
  2421. local function propspam()
  2422. local props = propamount:GetInt() -1
  2423. for i=0,props do
  2424. mod.oldRCC("gm_spawn",propmodel)
  2425. end
  2426. end
  2427. local function swepspam()
  2428. local sweps = swepamount:GetInt() -1
  2429. for i=0,sweps do
  2430. mod.oldRCC("gm_spawnswep",swepmodel)
  2431. end
  2432. end
  2433. SpawnVGUISPAM = function( )
  2434. local DFrame = vgui.Create( "DFrame");
  2435. function DFrame:GetSkin()
  2436. return SKIN
  2437. end
  2438. DFrame:SetSize( 265, 375 );
  2439. DFrame:SetPos( ScrW()/2,ScrH()/2 );
  2440. DFrame:SetVisible( true );
  2441. DFrame:MakePopup( );
  2442. DFrame:SetTitle("Spam Here :D")
  2443. local DermaText = vgui.Create( "DTextEntry", DFrame )
  2444. DermaText:SetPos( 15,45 )
  2445. DermaText:SetTall(15)
  2446. DermaText:SetWide(225)
  2447. DermaText:SetValue(propmodel)
  2448. DermaText:SetEnterAllowed( true )
  2449. DermaText.OnTextChanged = function()
  2450. propmodel=DermaText:GetValue()
  2451. end
  2452. local NumSliderThingy = vgui.Create( "DNumSlider", DFrame )
  2453. NumSliderThingy:SetPos( 15,65 )
  2454. NumSliderThingy:SetSize( 225, 100 ) -- Keep the second number at 100
  2455. NumSliderThingy:SetText( "Prop Amount" )
  2456. NumSliderThingy:SetMin( 0 ) -- Minimum number of the slider
  2457. NumSliderThingy:SetMax( 100 ) -- Maximum number of the slider
  2458. NumSliderThingy:SetDecimals( 0 ) -- Sets a decimal. Zero means it's a whole number
  2459. NumSliderThingy:SetConVar( "SethHack_data_prop" )
  2460. NumSliderThingy:SetValue( 0 )
  2461. local DermaText = vgui.Create( "DTextEntry", DFrame )
  2462. DermaText:SetPos( 15,120 )
  2463. DermaText:SetTall(15)
  2464. DermaText:SetWide(225)
  2465. DermaText:SetValue(swepmodel)
  2466. DermaText:SetEnterAllowed( true )
  2467. DermaText.OnTextChanged = function()
  2468. swepmodel=DermaText:GetValue()
  2469. end
  2470. local NumSliderThingy = vgui.Create( "DNumSlider", DFrame )
  2471. NumSliderThingy:SetPos( 15,140 )
  2472. NumSliderThingy:SetSize( 225, 100 ) -- Keep the second number at 100
  2473. NumSliderThingy:SetText( "SWEP Amount" )
  2474. NumSliderThingy:SetMin( 0 ) -- Minimum number of the slider
  2475. NumSliderThingy:SetMax( 100 ) -- Maximum number of the slider
  2476. NumSliderThingy:SetDecimals( 0 ) -- Sets a decimal. Zero means it's a whole number
  2477. NumSliderThingy:SetConVar( "SethHack_data_swep" )
  2478. NumSliderThingy:SetValue( 0 )
  2479. local DermaText = vgui.Create( "DTextEntry", DFrame )
  2480. DermaText:SetPos( 15, 195 )
  2481. DermaText:SetTall(15)
  2482. DermaText:SetWide(225)
  2483. DermaText:SetValue(sentmodel)
  2484. DermaText:SetEnterAllowed( true )
  2485. DermaText.OnTextChanged = function()
  2486. sentmodel=DermaText:GetValue()
  2487. end
  2488. local NumSliderThingy = vgui.Create( "DNumSlider", DFrame )
  2489. NumSliderThingy:SetPos( 15,215 )
  2490. NumSliderThingy:SetSize( 225, 100 ) -- Keep the second number at 100
  2491. NumSliderThingy:SetText( "SENT Amount" )
  2492. NumSliderThingy:SetMin( 0 ) -- Minimum number of the slider
  2493. NumSliderThingy:SetMax( 100 ) -- Maximum number of the slider
  2494. NumSliderThingy:SetDecimals( 0 ) -- Sets a decimal. Zero means it's a whole number
  2495. NumSliderThingy:SetConVar( "SethHack_data_sent" )
  2496. NumSliderThingy:SetValue( 0 )
  2497. local DermaText = vgui.Create( "DTextEntry", DFrame )
  2498. DermaText:SetPos( 15, 265 )
  2499. DermaText:SetTall(15)
  2500. DermaText:SetWide(225)
  2501. DermaText:SetValue(chatspam:GetString())
  2502. DermaText:SetEnterAllowed( true )
  2503. DermaText.OnTextChanged = function()
  2504. mod.oldRCC("SethHack_chatspam", DermaText:GetValue())
  2505. end
  2506. local NumSliderThingy = vgui.Create( "DNumSlider", DFrame )
  2507. NumSliderThingy:SetPos( 15,285 )
  2508. NumSliderThingy:SetSize( 225, 100 ) -- Keep the second number at 100
  2509. NumSliderThingy:SetText( "Chat Spam Interval" )
  2510. NumSliderThingy:SetMin( 0 ) -- Minimum number of the slider
  2511. NumSliderThingy:SetMax( 100 ) -- Maximum number of the slider
  2512. NumSliderThingy:SetDecimals( 0 ) -- Sets a decimal. Zero means it's a whole number
  2513. NumSliderThingy:SetConVar( "SethHack_chatspam_interval" )
  2514. NumSliderThingy:SetValue( 0 )
  2515. local MenuButton = vgui.Create("DButton")
  2516. MenuButton:SetParent( DFrame )
  2517. MenuButton:SetText( "Spam" )
  2518. MenuButton:SetPos(93, 325)
  2519. MenuButton:SetSize( 65, 35 )
  2520. MenuButton.DoClick = function ( btn )
  2521. local MenuButtonOptions = DermaMenu()
  2522. MenuButtonOptions:AddOption("Props", function() propspam() end )
  2523. MenuButtonOptions:AddOption("SWEPs", function() swepspam() end )
  2524. MenuButtonOptions:AddOption("SENTs", function() sentspam() end )
  2525. local x = "Off"
  2526. if spamchat then
  2527. x = "On"
  2528. end
  2529. MenuButtonOptions:AddOption("Chat (Currently " .. x .. ")", function() spamchat = !spamchat end )
  2530. MenuButtonOptions:Open()
  2531. end
  2532. end
  2533. Commands.cmds["SpamTime"] = SpawnVGUISPAM
  2534. Commands.cmds["+SethHack_Menu"] = SethHackBotMenu
  2535. Commands.cmds["-SethHack_Menu"] = function() MouseX,MouseY=gui.MousePos() if MPan then MPan:Remove() end end
  2536. Commands.help["+SethHack_Menu"] = "Open SethHackBot menu (hold key down)"
  2537. local hosttimescale = GetConVar("host_timescale")
  2538. local function SetSpeedHack(ply, cmd, cargs)
  2539. if not svcheats.allow() then return end
  2540. local speed = speedfactor:GetFloat()
  2541. if CVARMETAGETINT(svcheats.cvar) != 1 then
  2542. mod.SetCVAR(svcheats.cvar, "1")
  2543. end
  2544. mod.SetCVAR(hosttimescale, tostring(speed))
  2545. end
  2546. Commands.cmds["+SethHack_Speed"] = SetSpeedHack
  2547. Commands.cmds["-SethHack_Speed"] = function() mod.SetCVAR(hosttimescale, "1") end
  2548. Commands.help["+SethHack_Speed"] = "Speedhack; adjust under Misc."
  2549. local SethHackModeIcon
  2550. local SethHackActiveIcon
  2551. local SethHackTriggerIcon
  2552. local SethHackRRIcon
  2553. local SethHackFFIcon
  2554. SethHackMiniWindow = function()
  2555. MMPan = vgui.Create( "DPanel" ) -- Creates the frame itself
  2556. MMPan:SetPos( ScrW()/2-65,30 ) -- Position on the players screen
  2557. MMPan:SetSize( 130, 100 ) -- Size of the frame
  2558. MMPan.Paint = function() -- Paint function
  2559. surface.SetDrawColor( 50, 50, 50, 155 ) -- Set our rect color below us; we do this so you can see items added to this panel
  2560. surface.DrawRect( 0, 0, MMPan:GetWide(), MMPan:GetTall() ) -- Draw the rect
  2561. draw.SimpleText("Aimbot:", "MiniFont",15,10, Color(255,255,255,155),0,0)
  2562. draw.SimpleText("Friendly Fire:", "MiniFont",15,30, Color(255,255,255,155),0,0)
  2563. draw.SimpleText("Trigger Bot:", "MiniFont",15,50, Color(255,255,255,155),0,0)
  2564. draw.SimpleText("Mode:", "MiniFont",15,70, Color(255,255,255,155),0,0)
  2565. for i=0,5 do
  2566. surface.SetDrawColor(i/5*255,0,0,155)
  2567. surface.DrawOutlinedRect(0+i,0+i,MMPan:GetWide()-i-i, MMPan:GetTall()-i-i)
  2568. end
  2569. for i=0,5 do
  2570. surface.SetDrawColor(((5-i)/5)*255,0,0,155)
  2571. surface.DrawOutlinedRect(0+i+5,0+i+5,MMPan:GetWide()-i-i-10, MMPan:GetTall()-i-i-10)
  2572. end
  2573. end
  2574. local toggle = tobool(triggertoggle:GetInt())
  2575. local olda = Mod:GetInt()
  2576. local oldb = tostring(state)
  2577. local oldc = tostring(toggle)
  2578. local oldd = tostring(friendlyfire:GetBool())
  2579. SethHackModeIcon = vgui.Create("DImage", MMPan)
  2580. SethHackModeIcon:SetMaterial(Material("SethHackBot/mode_"..Mod:GetInt()))
  2581. SethHackModeIcon:SetPos(60,72)
  2582. SethHackModeIcon:SetSize(32,16)
  2583. SethHackModeIcon:SetImageColor(Color(255,255,255,155))
  2584. SethHackModeIcon.Think=function()
  2585. if olda!=Mod:GetInt() then
  2586. olda=Mod:GetInt()
  2587. SethHackModeIcon:SetMaterial(Material("SethHackBot/mode_"..Mod:GetInt()))
  2588. end
  2589. end
  2590. SethHackActiveIcon = vgui.Create("DImage", MMPan)
  2591. SethHackActiveIcon:SetMaterial(Material("SethHackBot/"..tostring(state)))
  2592. SethHackActiveIcon:SetPos(70,12)
  2593. SethHackActiveIcon:SetSize(16,16)
  2594. SethHackActiveIcon:SetImageColor(Color(255,255,255,155))
  2595. SethHackActiveIcon.Think=function()
  2596. if oldb!=tostring(state) then
  2597. oldb=tostring(state)
  2598. SethHackActiveIcon:SetMaterial(Material("SethHackBot/"..tostring(state)))
  2599. end
  2600. end
  2601. SethHackTriggerIcon = vgui.Create("DImage", MMPan)
  2602. SethHackTriggerIcon:SetMaterial(Material("SethHackBot/"..tostring(toggle)))
  2603. SethHackTriggerIcon:SetPos(95,52)
  2604. SethHackTriggerIcon:SetSize(16,16)
  2605. SethHackTriggerIcon:SetImageColor(Color(255,255,255,155))
  2606. SethHackTriggerIcon.Think=function()
  2607. local toggle = tobool(triggertoggle:GetInt())
  2608. if oldc!=tostring(toggle) then
  2609. oldc=tostring(toggle)
  2610. SethHackTriggerIcon:SetMaterial(Material("SethHackBot/"..tostring(toggle)))
  2611. end
  2612. end
  2613. SethHackFFIcon = vgui.Create("DImage", MMPan)
  2614. SethHackFFIcon:SetMaterial(Material("SethHackBot/"..tostring(friendlyfire:GetBool())))
  2615. SethHackFFIcon:SetPos(100,32)
  2616. SethHackFFIcon:SetSize(16,16)
  2617. SethHackFFIcon:SetImageColor(Color(255,255,255,155))
  2618. SethHackFFIcon.Think=function()
  2619. if oldd!=tostring(friendlyfire:GetBool()) then
  2620. oldd=tostring(friendlyfire:GetBool())
  2621. SethHackFFIcon:SetMaterial(Material("SethHackBot/"..tostring(friendlyfire:GetBool())))
  2622. end
  2623. end
  2624. end
  2625. // player_connect ip logger
  2626. if not file.Exists("db_steamid_ip.txt") then file.Write("db_steamid_ip.txt","") end
  2627. local fr = file.Read
  2628. local fw = file.Write
  2629. local function SaveDB()
  2630. local s = ""
  2631. for k,v in pairs(tblDB) do
  2632. s = s..k.."="..v.."\n"
  2633. end
  2634. if logips:GetBool() then
  2635. fw("db_steamid_ip.txt",s)
  2636. end
  2637. end
  2638. local function LoadDB()
  2639. local tbl = string.Explode("\n",fr("db_steamid_ip.txt"))
  2640. tblDB = {}
  2641. for k,v in pairs(tbl) do
  2642. local sep = string.Explode("=",v)
  2643. if sep and table.getn(sep) == 2 then
  2644. tblDB[sep[1]] = sep[2]
  2645. end
  2646. end
  2647. end
  2648. LoadDB()
  2649. local function PlayerConnect(name, ip)
  2650. tblDB[string.gsub(name,"=","")] = ip
  2651. print("Recorded ip " .. ip .. " for player " .. name)
  2652. SaveDB()
  2653. end
  2654. Commands.cmds["log_getbyname"] = function(ply, cmd, arg)
  2655. LoadDB()
  2656. if arg[1] then
  2657. local strF = string.lower(arg[1])
  2658. for k, v in pairs(tblDB) do
  2659. if string.find(string.lower(k),strF) then
  2660. print(k.." = "..v)
  2661. end
  2662. end
  2663. end
  2664. end
  2665. Commands.cmds["log_list"] = function()
  2666. LoadDB()
  2667. for k,v in pairs(tblDB) do
  2668. print(k.." = "..v)
  2669. end
  2670. end
  2671. Commands.cmds["log_clear"] = function()
  2672. tblDB = {}
  2673. SaveDB()
  2674. print("Client data (mah) harvester logs deleted!")
  2675. end
  2676. Commands.cmds["SethHack_Toggle_Mini_Window"] = function()
  2677. if !bmw:GetBool() then
  2678. SethHackMiniWindow()
  2679. mod.oldRCC("SethHack_TMW",1)
  2680. else
  2681. MMPan:Remove()
  2682. mod.oldRCC("SethHack_TMW",0)
  2683. end
  2684. end
  2685. //Commands.cmds["deathrun_qq"] = function() SetGlobalBool("DJMode", true) print("qq") end
  2686. local function InitShit()
  2687. if MMPan then MMPan:Remove() end
  2688. if bmw:GetBool() then
  2689. SethHackMiniWindow()
  2690. end
  2691. end
  2692. Commands.cmds["SethHack_triggerbot_toggle"] = function() mod.oldRCC("SethHack_trigger_bot",ToNumFromBool(!tobool(triggertoggle:GetInt()))) end
  2693. Commands.cmds["SethHack_ff_toggle"] = function() mod.oldRCC("SethHack_ff",ToNumFromBool(!friendlyfire:GetBool())) end
  2694. Commands.help["SethHack_triggerbot_toggle"] = "Toggle triggerbot"
  2695. Commands.help["SethHack_ff_toggle"] = "Toggle friendly fire"
  2696. local lastspam = 0
  2697. local function ThinkGate()
  2698. _G.NAUGHTY_PLAYER = false
  2699. trigger()
  2700. triggerthis()
  2701. AimbotThink()
  2702. if !IsValid(CL) && IsValid(LocalPlayer()) then
  2703. CL = LocalPlayer()
  2704. end
  2705. if autoreload:GetBool() then
  2706. bautoreload()
  2707. end
  2708. local intv = chatspaminterval:GetInt()
  2709. if spamchat && ( intv > 0 && RealTime() >= (lastspam + intv) ) then
  2710. local spamstr = chatspam:GetString()
  2711. mod.oldRCC("say", spamstr)
  2712. lastspam = RealTime()
  2713. end
  2714. end
  2715. if NoSpreadHere then
  2716. Hooks["Initialize"] = {false, Check}
  2717. Hooks["SetupMove"] = {false, mysetupmove}
  2718. end
  2719. Hooks["CalcView"] = {false, bcalcview}
  2720. Hooks["CreateMove"] = {false, bcmove}
  2721. Hooks["Think"] = {false, ThinkGate}
  2722. Hooks["RenderScreenspaceEffects"] = {false, chams}
  2723. Hooks["HUDPaint"] = {false, esp}
  2724. --Hooks["PostRenderVGUI"] = {false,PaintOverVGUI}
  2725. Hooks["InitPostEntity"] = {false, InitShit}
  2726. Hooks["PlayerTraceAttack"] = {false, btraceattack}
  2727. Hooks["PlayerConnect"] = {false, PlayerConnect}
  2728. Commands.cmds["SethHack_panic"] = function()
  2729. recording_mode = not recording_mode
  2730. if recording_mode then
  2731. MMPan:Remove()
  2732. else
  2733. if bmw:GetBool() then
  2734. SethHackMiniWindow()
  2735. end
  2736. end
  2737. end
  2738. Commands.help["SethHack_panic"] = "Hide ESP/HUD/Chams for screenshots"
  2739. Commands.cmds["SethHack_lua_run"] = function(_, _, a) RunString(table.concat(a, " ")) end
  2740. Commands.cmds["SethHack_lua_openscript"] = function(p, cmd, l_File)
  2741. if (l_File[1] == nil) then return end
  2742. local filePath = "../lua/"..l_File[1]
  2743. if (file.Exists(filePath)) then
  2744. print("Running script "..l_File[1].."...")
  2745. RunStringEx(file.Read(filePath), filePath)
  2746. else
  2747. Msg("Couldn't include file '"..l_File[1].."' (File not found)\n")
  2748. end
  2749. end
  2750. Commands.auto["SethHack_lua_openscript"] = function(cmd, args)
  2751. if (args == nil) then return end
  2752. local m_Ret = {}
  2753. local args = string.Right(args, string.len(args)-1)
  2754. local searchStr = ""
  2755. if (args != " ") then
  2756. searchStr = args
  2757. end
  2758. for k, v in pairs(file.FindInLua(searchStr.."*")) do
  2759. if ( (v != ".") and (v != "..") ) then
  2760. table.insert(m_Ret, cmd.." "..string.GetPathFromFilename(args)..v)
  2761. end
  2762. end
  2763. return m_Ret
  2764. end
  2765. do
  2766. local cmds = {}
  2767. for k,v in pairs(Commands.cmds) do
  2768. local low = string.lower(k)
  2769. cmds[low] = v
  2770. AddConsoleCommand(low)
  2771. end
  2772. Commands.cmds = cmds
  2773. end
  2774. local function bindPressOverride(ply, bind, pressed)
  2775. local bind = string.lower(bind)
  2776. for k,v in pairs(Commands.cmds) do
  2777. if string.find(bind, string.lower(k)) then
  2778. return true
  2779. end
  2780. end
  2781. return false
  2782. end
  2783. local ha = hook.Add
  2784. local ps = surface.PlaySound
  2785. hook.Add = function(t,u,f)
  2786. //print("hookadd:", t, u)
  2787. if(u == "PERPSettingsRDL" || u == "PERPCarMovement" || string.find(u, "AntiBB") || (string.find(u, "block_") && t == "HUDPaint")) then
  2788. print("BB: Anticheat hook.add blocked")
  2789. return
  2790. end
  2791. return ha(t,u,f)
  2792. end
  2793. surface.PlaySound = function(fp)
  2794. if(fp == "vo/npc/male01/hacks01.wav") then
  2795. return
  2796. end
  2797. return ps(fp)
  2798. end
  2799. local origHookCall = hook.Call
  2800. local oldHookCall = hook.Call
  2801. local recurse = {}
  2802. local function newHookCall( name, gm, ... )
  2803. local myHook = Hooks[name]
  2804. if name == "SendLua" then
  2805. local lua = unpack({...}, 1)
  2806. if logsendlua:GetBool() || string.find(lua, "Create") || string.find(lua, "ConCommand") || string.find(lua, "RunConsole") then
  2807. print("SendLua", lua)
  2808. end
  2809. return
  2810. end
  2811. if name == "PlayerBindPress" && bindPressOverride(...) then
  2812. return false
  2813. end
  2814. local rA, rB, rC, rD, rE, rF, rG, rH
  2815. if recurse[name] then
  2816. rA, rB, rC, rD, rE, rF, rG, rH = origHookCall(name, gm, ...)
  2817. else
  2818. recurse[name] = true
  2819. rA, rB, rC, rD, rE, rF, rG, rH = oldHookCall(name, gm, ...)
  2820. recurse[name] = nil
  2821. end
  2822. if myHook then
  2823. if rA != nil && myHook[1] then
  2824. local rA, rB, rC, rD, rE, rF, rG, rH = myHook[2](rA, rB, rC, rD, rE, rF, rG, rH)
  2825. if rA != nil then
  2826. return rA, rB, rC, rD, rE, rF, rG, rH
  2827. end
  2828. else
  2829. local rA, rB, rC, rD, rE, rF, rG, rH = myHook[2](...)
  2830. if rA != nil then
  2831. return rA, rB, rC, rD, rE, rF, rG, rH
  2832. end
  2833. end
  2834. end
  2835. return rA, rB, rC, rD, rE, rF, rG, rH
  2836. end
  2837. do
  2838. local info = mod.globals.debug.getinfo
  2839. hook.Call = nil
  2840. local oldHookMeta = mod.globals.debug.getmetatable(hook)
  2841. mod.globals.debug.setmetatable(hook, {
  2842. __index = function(t, k)
  2843. if k == "Call" then
  2844. return newHookCall
  2845. end
  2846. if oldHookMeta and oldHookMeta.__index then
  2847. return oldHookMeta.__index(t, k)
  2848. end
  2849. end,
  2850. __newindex = function(t, k, v)
  2851. if k == "Call" then
  2852. oldHookCall = v
  2853. return
  2854. end
  2855. if oldHookMeta and oldHookMeta.__newindex then
  2856. return oldHookMeta.__newindex(t, k, v)
  2857. else
  2858. return rawset(t, k, v)
  2859. end
  2860. end,
  2861. })
  2862. local oldEngineConsoleCommand = engineConsoleCommand
  2863. local function myEngineConsoleCommand( player, command, arguments )
  2864. if Commands.cmds[string.lower(command)] then
  2865. Commands.cmds[string.lower(command)](player, command, arguments)
  2866. return true
  2867. end
  2868. return oldEngineConsoleCommand( player, command, arguments )
  2869. end
  2870. engineConsoleCommand = nil
  2871. local oldEngineCommandComplete = engineCommandComplete
  2872. local function myEngineCommandComplete( command, arguments )
  2873. if Commands.auto[string.lower(command)] then
  2874. return Commands.auto[string.lower(command)](command, arguments)
  2875. end
  2876. return oldEngineCommandComplete(command, arguments)
  2877. end
  2878. engineCommandComplete = nil
  2879. local oldGMeta = mod.globals.debug.getmetatable(_G)
  2880. mod.globals.debug.setmetatable(_G, {
  2881. __index = function(t, k)
  2882. if k == "engineConsoleCommand" then
  2883. local safe, info = pcall(info, 3)
  2884. if safe and info then
  2885. return oldEngineConsoleCommand
  2886. else
  2887. return myEngineConsoleCommand
  2888. end
  2889. elseif k == "engineCommandComplete" then
  2890. local safe, info = pcall(info, 3)
  2891. if safe and info then
  2892. return oldEngineCommandComplete
  2893. else
  2894. return myEngineCommandComplete
  2895. end
  2896. elseif k == "hook" and oldGMeta then
  2897. local ret = oldGMeta.__index(t, k)
  2898. if ret.Call then
  2899. oldHookCall = ret.Call
  2900. end
  2901. ret.Call = newHookCall
  2902. return ret
  2903. end
  2904. if oldGMeta and oldGMeta != _G and oldGMeta.__index then
  2905. return oldGMeta.__index(t, k)
  2906. end
  2907. end,
  2908. __newindex = function(t, k, v)
  2909. if k == "engineConsoleCommand" then
  2910. oldEngineConsoleCommand = v
  2911. elseif k == "engineCommandComplete" then
  2912. oldEngineCommandComplete = v
  2913. else
  2914. if oldGMeta and oldGMeta.__newindex then
  2915. return oldGMeta.__newindex(t, k, v)
  2916. else
  2917. rawset(t, k, v)
  2918. end
  2919. end
  2920. end,
  2921. })
  2922. local oldCVC = cvars.OnConVarChanged
  2923. local function myCVC(name, old, new)
  2924. if string.find(name, "SethHack_") then return end
  2925. return oldCVC(name, old, new)
  2926. end
  2927. cvars.OnConVarChanged = nil
  2928. mod.globals.debug.setmetatable(_G.cvars, {
  2929. __index = function(t, k)
  2930. if k == "OnConVarChanged" then
  2931. local safe, info = pcall(info, 3)
  2932. if safe and info then
  2933. return oldCVC
  2934. else
  2935. return myCVC
  2936. end
  2937. end
  2938. end,
  2939. __newindex = function(t, k, v)
  2940. if k == "OnConVarChanged" then
  2941. oldCVC = v
  2942. else
  2943. rawset(t, k, v)
  2944. end
  2945. end,
  2946. })
  2947. local oldSetMetaTable = setmetatable
  2948. function setmetatable(t, m)
  2949. if t == _G then
  2950. oldGMeta = m
  2951. elseif t == hook then
  2952. oldHookMeta = m
  2953. else
  2954. oldSetMetaTable(t, m)
  2955. end
  2956. return t
  2957. end
  2958. local oldGetMetaTable = getmetatable
  2959. function getmetatable(t)
  2960. if t == _G then
  2961. return oldGMeta
  2962. elseif t == hook then
  2963. return oldHookMeta
  2964. else
  2965. return oldGetMetaTable(t)
  2966. end
  2967. end
  2968. _G.debug.setmetatable = setmetatable
  2969. _G.debug.getmetatable = getmetatable
  2970. end
  2971. _G.debug.getinfo = function()
  2972. print("DEBUG.GETINFO CALLED", mod.globals.debug.traceback())
  2973. end
  2974. _G.debug.getupvalue = function(func, level)
  2975. if func == usermessage.IncomingMessage then
  2976. func = oldincoming
  2977. end
  2978. return mod.globals.debug.getupvalue(func, level)
  2979. end
  2980. local block = {"SH", "gmcl_deco", "SethHackbot", "sv_cheats", "host_timescale", "SethHack_toggle", "db_steamid_ip", "materials/SethHackbot"}
  2981. local block_cmd = {"st_ghosting", "kcheatfound", "achievementRefresh", "_command", "gw_iamacheater", "FFFFFFFFFFFF"}
  2982. RunConsoleCommand = function(str, ...)
  2983. if showcmds:GetBool() || str == "perp_ug" then
  2984. print("RCC", str, ...)
  2985. end
  2986. local whole = str
  2987. for k,x in pairs({...}) do
  2988. whole = whole .. " " .. tostring(x)
  2989. end
  2990. for k,v in pairs(Commands.cmds) do
  2991. if string.find(whole, k) then
  2992. print("Blocked RCC", str, ...)
  2993. return
  2994. end
  2995. end
  2996. for k,v in pairs(block) do
  2997. if string.find(whole, v) then
  2998. print("Blocked RCC", str, ...)
  2999. return
  3000. end
  3001. end
  3002. for k,v in pairs(block_cmd) do
  3003. if(str == v) then
  3004. print("BB: RCC Blocked ("..str..")")
  3005. return
  3006. end
  3007. end
  3008. if str == "debug_init_callback" then
  3009. local c, e = select(1, ...)
  3010. local fixed = e:gsub(util.CRC(c .. "includes/modules/gm_SH.dll"), util.CRC(c .. "tired_of_dealing_with_this_shit" .. tostring(math.random())))
  3011. return mod.oldRCC(str, c, fixed)
  3012. end
  3013. for k,v in pairs(string.Explode(",", blacklistcmds:GetString())) do
  3014. if string.lower(str) == "cc" || string.lower(str) == "_____varwat" || string.lower(str) == "_log_hook" || string.lower(str) == "_blacklistedhook" || string.lower(str) == "_material" || string.lower(str) == string.lower(v) then
  3015. print("Blocked RCC", str, ...)
  3016. return
  3017. end
  3018. end
  3019. return mod.oldRCC(str, ...)
  3020. end
  3021. local plymeta = _R.Player
  3022. local emeta = _R.Entity
  3023. local oldGetMaterial = emeta.GetMaterial
  3024. function emeta.GetMaterial(ply)
  3025. local mat = oldGetMaterial(ply)
  3026. if string.lower(mat) == "SethHackbot/living" then return "" end
  3027. return mat
  3028. end
  3029. local oldGetInfo = plymeta.GetInfo
  3030. function plymeta.GetInfo(ply, str)
  3031. local lower = string.lower(str)
  3032. if lower == "sv_cheats" then
  3033. return 0
  3034. end
  3035. return oldGetInfo(ply, str)
  3036. end
  3037. local oldCC = plymeta.ConCommand
  3038. function plymeta.ConCommand(ply, str)
  3039. if showcmds:GetBool() then
  3040. print("ConCommand", str)
  3041. end
  3042. for k,v in pairs(Commands.cmds) do
  3043. if string.find(str, k) then
  3044. print("Blocked ConCommand", str)
  3045. return
  3046. end
  3047. end
  3048. for k,v in pairs(string.Explode(",", blacklistcmds:GetString())) do
  3049. if #v > 1 && string.find(string.lower(str), string.lower(v)) then
  3050. print("Blocked ConCommand", str)
  3051. return
  3052. end
  3053. end
  3054. return oldCC(ply, str)
  3055. end
  3056. function plymeta.Remove(ply)
  3057. return
  3058. end
  3059. local ttt = {
  3060. weps = {
  3061. "weapon_ttt_sipistol",
  3062. "weapon_ttt_flaregun",
  3063. "weapon_ttt_phammer",
  3064. "weapon_ttt_knife",
  3065. "weapon_ttt_push",
  3066. "weapon_ttt_radio",
  3067. "weapon_ttt_teleport",
  3068. },
  3069. GetWeapons = FindMetaTable("Player").GetWeapons,
  3070. }
  3071. local function TestTraitor(v)
  3072. for kw,vw in pairs(ttt.GetWeapons(v) or {}) do
  3073. for i = 1, #ttt.weps do
  3074. if vw:GetClass() == ttt.weps[i] then
  3075. if vw.bb_used_traitor_weapon ~= v then
  3076. chat.AddText(
  3077. Color(100, 100, 100), "[DW] ",
  3078. Color(255, 0, 0), v:Name(),
  3079. vw.bb_used_traitor_weapon and Color(100, 255, 100) or Color(255, 100, 0),
  3080. " HAS "..(vw.bb_initial_traited and "USED " or "").."TRAITOR WEAPON: ",
  3081. Color(255, 255, 0), vw:GetTable().PrintName,
  3082. Color(255, 0, 0), "!"
  3083. )
  3084. table.insert(terroristadverts, { time = CurTime(), color = vw.bb_used_traitor_weapon and Color(100, 255, 100) or Color(255, 100, 0),
  3085. text = v:Name() .. " HAS " .. (vw.bb_initial_traited and "USED " or "").."TRAITOR WEAPON: "..vw:GetTable().PrintName.."!"}
  3086. )
  3087. if not vw.bb_used_traitor_weapon then
  3088. v.bb_traitor = true
  3089. v.bb_spotted = CurTime()
  3090. vw.bb_initial_traited = true
  3091. end
  3092. vw.bb_used_traitor_weapon = v -- So you know when they buy /another/ traitor weapon
  3093. end
  3094. break
  3095. end
  3096. end
  3097. end
  3098. end
  3099. local hastt_timer = false
  3100. local function TestTraitors()
  3101. if WIN_TRAITOR == nil then return end
  3102. hastt_timer = true
  3103. for k,v in pairs(player.GetAll()) do
  3104. TestTraitor(v)
  3105. end
  3106. timer.Simple(1, TestTraitors)
  3107. end
  3108. timer.Simple(1, TestTraitors)
  3109. do
  3110. local oldincoming = usermessage.IncomingMessage
  3111. usermessage.IncomingMessage = function(msgn, umsg)
  3112. if umsgshow:GetBool() then
  3113. local size = "??"
  3114. if mod.UmsgSIZE then
  3115. size = mod.UmsgSIZE(umsg)
  3116. end
  3117. print( "umsg incoming: " .. msgn, "size: " .. tostring(size) )
  3118. end
  3119. if msgn == "DSPacket" && logds:GetBool() then
  3120. local id = umsg:ReadLong()
  3121. local data = umsg:ReadString()
  3122. umsg:Reset()
  3123. filex.Append("dslog.txt", data .. "\r\n")
  3124. print("DSPacket", data)
  3125. elseif msgn == "ttt_role" then
  3126. for k,v in pairs(player.GetAll()) do
  3127. v.bb_traitor = false
  3128. end
  3129. if hastt_timer == false then
  3130. TestTraitors()
  3131. end
  3132. end
  3133. oldincoming(msgn, umsg)
  3134. end
  3135. local CvarMeta = _R.ConVar
  3136. local oldConVarGetBool = _R.ConVar.GetBool
  3137. _R.ConVar.GetBool = function(cvar)
  3138. if cvar:GetName() == "sv_cheats" then
  3139. return false
  3140. end
  3141. return oldConVarGetBool(cvar)
  3142. end
  3143. local oldConVarGetInt = _R.ConVar.GetInt
  3144. _R.ConVar.GetInt = function(cvar)
  3145. if cvar:GetName() == "sv_cheats" then
  3146. return 0
  3147. elseif cvar:GetName() == "host_timescale" then
  3148. return 1
  3149. end
  3150. return oldConVarGetInt(cvar)
  3151. end
  3152. local oldGetConVar = GetConVar
  3153. GetConVar = function(cvar)
  3154. if cvars[string.lower(cvar)] then return end
  3155. return oldGetConVar(cvar)
  3156. end
  3157. local oldGetConVarNumber = GetConVarNumber
  3158. GetConVarNumber = function(cvar)
  3159. if cvars[string.lower(cvar)] then return 0 end
  3160. if string.lower(cvar) == "sv_cheats" then return 0 end
  3161. if string.lower(cvar) == "host_timescale" then return 1 end
  3162. return oldGetConVarNumber(cvar)
  3163. end
  3164. local oldGetConVarString = GetConVarString
  3165. GetConVarString = function(cvar)
  3166. if cvars[cvar] then return "" end
  3167. if string.lower(cvar) == "sv_cheats" then return "0" end
  3168. if string.lower(cvar) == "host_timescale" then return "1" end
  3169. return oldGetConVarString(cvar)
  3170. end
  3171. local createdBlockedFiles = {}
  3172. local oldFileWrite = file.Write
  3173. file.Write = function(name, contents)
  3174. ret = oldFileWrite(name, contents)
  3175. for k,v in pairs(block) do
  3176. if string.find(string.lower(name), v) then
  3177. createdBlockedFiles[string.lower(name)] = true
  3178. end
  3179. end
  3180. return ret
  3181. end
  3182. local oldFileTime = file.Time
  3183. file.Time = function(file)
  3184. print("file.Time", file)
  3185. for k,v in pairs(block) do
  3186. if string.find(string.lower(file), v) then
  3187. return
  3188. end
  3189. end
  3190. return oldFileTime(file)
  3191. end
  3192. local oldFileExistsEx = file.ExistsEx
  3193. file.ExistsEx = function(file)
  3194. if logfileread:GetBool() then
  3195. print("file.ExistsEx", file)
  3196. end
  3197. if not createdBlockedFiles[string.lower(file)] then
  3198. for k,v in pairs(block) do
  3199. if string.find(string.lower(file), v) then
  3200. return false
  3201. end
  3202. end
  3203. end
  3204. return oldFileExistsEx(file)
  3205. end
  3206. local oldFileExists = file.Exists
  3207. file.Exists = function(file)
  3208. if logfileread:GetBool() then
  3209. print("file.Exists", file)
  3210. end
  3211. if not createdBlockedFiles[string.lower(file)] then
  3212. for k,v in pairs(block) do
  3213. if string.find(string.lower(file), v) then
  3214. return false
  3215. end
  3216. end
  3217. end
  3218. return oldFileExists(file)
  3219. end
  3220. local oldFileSize = file.Size
  3221. file.Size = function(file)
  3222. if logfileread:GetBool() then
  3223. print("file.Size", file)
  3224. end
  3225. if not createdBlockedFiles[string.lower(file)] then
  3226. for k,v in pairs(block) do
  3227. if string.find(string.lower(file), v) then
  3228. return
  3229. end
  3230. end
  3231. end
  3232. return oldFileSize(file)
  3233. end
  3234. local oldFileRead = file.Read
  3235. file.Read = function(file)
  3236. if logfileread:GetBool() then
  3237. print("file.Read", file)
  3238. end
  3239. if not createdBlockedFiles[string.lower(file)] then
  3240. for k,v in pairs(block) do
  3241. if string.find(string.lower(file), v) then
  3242. return
  3243. end
  3244. end
  3245. end
  3246. return oldFileRead(file)
  3247. end
  3248. local oldFileFind = file.Find
  3249. file.Find = function(file)
  3250. if logfileread:GetBool() then
  3251. print("file.Find", file)
  3252. end
  3253. for k,v in pairs(block) do
  3254. if string.find(string.lower(file), v) then
  3255. return {}
  3256. end
  3257. end
  3258. local tableq = oldFileFind(file)
  3259. local nt = {}
  3260. for k, v in pairs(tableq) do
  3261. local found = false
  3262. for x,y in pairs(block) do
  3263. if string.find(string.lower(v), y) then
  3264. print("Blocked file.Find", v)
  3265. found = true
  3266. end
  3267. end
  3268. if !found then
  3269. table.insert(nt, v)
  3270. end
  3271. end
  3272. return nt
  3273. end
  3274. local oldFileTFind = file.TFind
  3275. file.TFind = function(file, callback)
  3276. print("file.TFind", file)
  3277. for k,v in pairs(block) do
  3278. if string.find(string.lower(file), v) then
  3279. callback({})
  3280. end
  3281. end
  3282. oldFileTFind(file, function(a, tableq)
  3283. local nt = {}
  3284. for k,v in pairs(tableq) do
  3285. local found = false
  3286. for x,y in pairs(block) do
  3287. if string.find(string.lower(v), y) then
  3288. print("Blocked file.TFind", v)
  3289. found = true
  3290. end
  3291. if !found then
  3292. table.insert(nt, v)
  3293. end
  3294. end
  3295. end
  3296. callback(a, nt)
  3297. end)
  3298. end
  3299. local datastreamsend
  3300. local function ndata(h,d,cb,acb)
  3301. if logfileread:GetBool() then
  3302. print("datastream sent", h)
  3303. end
  3304. if(string.find(h, "GWCheatNotify")) then
  3305. print("ds blocked");
  3306. return
  3307. end
  3308. return datastreamsend(h, d, cb, acb)
  3309. end
  3310. local oldReq = require
  3311. require = function(a)
  3312. if string.lower(a) == "datastream" && (datastream && datastream.StreamToServer != ndata) then
  3313. local ret = {oldReq(a)}
  3314. datastreamsend = datastream.StreamToServer
  3315. datastream.StreamToServer = ndata
  3316. return unpack(ret)
  3317. end
  3318. if string.lower(a) == "deco" then
  3319. return
  3320. end
  3321. return oldReq(a)
  3322. end
  3323. localquery = sql.Query
  3324. function sql.Query(q, ...)
  3325. -- that's right, this is an ugly hack. nothing short of a complete rewrite could 'fix'
  3326. -- SethHackbot. since this is my last update (since i'm quitting--thank god) it's unlikely
  3327. -- that whatever you do next will ever get patched. cheers spacetech.
  3328. if q:lower():find("sqlite_master") and q:lower():find("SethHack") then return false end
  3329. if q:lower():find("SethHack_pass2") then return false end
  3330. return localquery(q, ...)
  3331. end
  3332. local oldsqlexists = sql.TableExists
  3333. sql.TableExists = function(tbl)
  3334. if string.lower(tbl) == "SethHack_pass" then return false end
  3335. if string.lower(tbl) == "SethHack_pass2" then return false end
  3336. if string.lower(tbl) == "SethHack_changelog" then return false end
  3337. if string.lower(tbl) == "SethHack_espents" then return false end
  3338. return oldsqlexists(tbl)
  3339. end
  3340. oldrunstring = RunString
  3341. RunString = function(str)
  3342. if logsendlua:GetBool() then
  3343. print("RunString", str)
  3344. filex.Append("runlog.txt", str)
  3345. end
  3346. oldrunstring(str)
  3347. end
  3348. oldrunstringex = RunStringEx
  3349. RunStringEx = function(str, f)
  3350. if logsendlua:GetBool() then
  3351. print("RunStringEx", f, str)
  3352. filex.Append("runlog.txt", str)
  3353. end
  3354. oldrunstringex(str, f)
  3355. end
  3356. end
  3357. surface.CreateFont("DejaVu Sans",13,500,true,false,"QDefault")
  3358. surface.CreateFont("DejaVu Sans",11,400,true,false,"QDefaultSmall")
  3359. surface.CreateFont("DejaVu Sans",15,400,true,false,"QDefaultLarge")
  3360. surface.CreateFont("DejaVu Sans",13,800,true,false,"QTabLarge")
  3361. SKIN.BrightText = Color( 243, 245, 239, 255 )
  3362. SKIN.NormalText = Color( 226, 231, 218, 255 )
  3363. SKIN.DarkText = Color( 188, 198, 166, 255 )
  3364. SKIN.VeryDarkText = Color( 33, 37, 24, 255 )
  3365. SKIN.BrightPBrown = Color( 243, 245, 239, 255 )
  3366. SKIN.NormalPBrown = Color( 103, 67, 79, 255 )
  3367. SKIN.DarkPBrown = Color( 67, 44, 51, 255 )
  3368. SKIN.VeryDarkPBrown = Color( 37, 24, 29, 255 )
  3369. SKIN.BrightRed = Color( 226, 69, 113, 255 )
  3370. SKIN.NormalRed = Color( 165, 26, 65, 255)
  3371. SKIN.DarkRed = Color( 100, 44, 51, 255 )
  3372. SKIN.VeryDarkRed = Color( 37, 24, 29, 255 )
  3373. SKIN.BrightPurple = Color( 107, 63, 124, 255 )
  3374. SKIN.NormalPurple = Color( 49, 29, 57, 255)
  3375. SKIN.DarkPurple = Color( 34, 20, 39, 255 )
  3376. SKIN.BrightGray = Color( 197, 189, 180, 255 )
  3377. SKIN.NormalGray = Color( 155, 142, 126, 255)
  3378. SKIN.DarkGray = Color( 95, 85, 73, 255 )
  3379. -- Fuckaton of different corners, keypad, buttons, scrollbar, yadda yadda
  3380. SKIN.ButtonCornerLines=SKIN.BrightRed
  3381. SKIN.ButtonCornerLinesHighlight=SKIN.DarkRed
  3382. SKIN.bg_color_bright = Color( 150, 150, 150, 175 )
  3383. SKIN.control_color = Color( 40, 40, 40, 255 )
  3384. SKIN.colButtonBorder = Color( 20, 20, 20, 255 )
  3385. SKIN.bg_color = Color( 50, 50, 50, 155 )
  3386. SKIN.control_color_bright = Color( 138, 170, 255, 235 )
  3387. // Text entry and drop down
  3388. SKIN.colTextEntryText = SKIN.BrightText
  3389. SKIN.colTextEntryBG = SKIN.NormalGray
  3390. SKIN.colTextEntryTextHighlight = Color( 255, 255, 255, 200 )
  3391. // List hover
  3392. SKIN.listview_hover = SKIN.BrightRed
  3393. SKIN.listview_selected = SKIN.NormalRed
  3394. SKIN.combobox_selected = SKIN.listview_selected
  3395. SKIN.colOutline = Color( 225, 225, 235, 200 )
  3396. -- Unused?
  3397. SKIN.text_bright = SKIN.BrightText
  3398. --??
  3399. SKIN.colButtonBorderHighlight = Color( 255, 255, 255, 50 )
  3400. // Pretty much all buttons
  3401. SKIN.control_color_active = Color( 66, 140, 223, 245 )
  3402. SKIN.control_color_dark = Color( 60, 0, 0, 255 )
  3403. SKIN.control_color_highlight = Color( 120, 0, 0, 200 )
  3404. SKIN.colCategoryText = SKIN.NormalText
  3405. SKIN.fontCategoryHeader = "QTabLarge"
  3406. --??
  3407. SKIN.panel_transback = Color( 255, 255, 255, 50 )
  3408. SKIN.text_highlight = Color( 200, 200, 225, 255 )
  3409. SKIN.colTextEntryBorder = Color( 20, 20, 20, 255 )
  3410. SKIN.colButtonTextDisabled = Color( 25, 25, 25, 255 )
  3411. SKIN.bg_color_sleep = Color( 50, 50, 50, 100 )
  3412. -- Tab buttons
  3413. -- We can do this here without sacrificing performance.
  3414. SKIN.colTab = Color(SKIN.BrightRed.r,SKIN.BrightRed.g,SKIN.BrightRed.b,150)
  3415. SKIN.colTabText = SKIN.BrightText
  3416. SKIN.colTabInactive = SKIN.NormalPBrown
  3417. SKIN.colTabTextInactive = SKIN.DarkText
  3418. -- Dont change, ita a very lame shadow :s
  3419. SKIN.colTabShadow = Color(SKIN.BrightRed.r,SKIN.BrightRed.g,SKIN.BrightRed.b,50)
  3420. SKIN.colPropertySheet = Color( 50, 50, 50, 200 )
  3421. SKIN.colNumberWangBG = Color( 255, 240, 150, 255 )
  3422. -- For example the lines in tools list
  3423. SKIN.colCollapsibleCategory = Color( 255, 255, 255, 20 )
  3424. SKIN.bg_alt2 = Color( 55, 55, 55, 255 )
  3425. SKIN.colMenuBG = Color(SKIN.DarkRed.r,SKIN.DarkRed.g,SKIN.DarkRed.b,230)
  3426. SKIN.colMenuBorder = Color(SKIN.BrightRed.r,SKIN.BrightRed.g,SKIN.BrightRed.b,200)
  3427. SKIN.colButtonBorderShadow = Color( 5, 20, 50, 100 )
  3428. -- yeah, tooltip..
  3429. SKIN.tooltip = SKIN.BrightPBrown
  3430. SKIN.text_dark = Color( 150, 150, 150, 255 )
  3431. SKIN.text_normal = Color( 255, 255, 255, 255 )
  3432. SKIN.bg_alt1 = Color( 50, 50, 50, 255 )
  3433. -- A lot of buttons
  3434. SKIN.colButtonText = Color( 255, 255, 255, 255 )
  3435. SKIN.bg_color_dark = Color( 25, 25, 25, 155 )
  3436. SKIN.colCategoryTextInactive = Color( 150, 150, 240, 255 )
  3437. SKIN.texGradient = Material( "gui/gradient" )
  3438. SKIN.BGGradient = Material( "VGUI/hsv-brightness" ) -- lol :s TODO: Make own
  3439. SKIN.texGradientUp = Material( "gui/gradient_up" )
  3440. SKIN.texGradientDown = Material( "gui/gradient_down" )
  3441. SKIN.fontButton = "QDefaultSmall"
  3442. SKIN.fontTab = "QDefaultSmall"
  3443. SKIN.fontButton = "QDefaultSmall"
  3444. SKIN.fontFrame = "QDefaultSmall"
  3445. -------------------------------------------------
  3446. -------------------------------------------------
  3447. -------------------------------------------------
  3448. /*---------------------------------------------------------
  3449. DrawGenericBackground
  3450. ---------------------------------------------------------*/
  3451. function SKIN:DrawGenericBackground( x, y, w, h, color )
  3452. surface.SetDrawColor( color )
  3453. --draw.RoundedBox( 2, x, y, w, h, color )
  3454. surface.DrawRect( x, y, w, h )
  3455. end
  3456. /*---------------------------------------------------------
  3457. DrawButtonBorder
  3458. ---------------------------------------------------------*/
  3459. function SKIN:DrawButtonBorder( x, y, w, h, depressed )
  3460. if ( !depressed ) then
  3461. surface.SetDrawColor(self.ButtonCornerLinesHighlight)
  3462. else
  3463. surface.SetDrawColor(self.ButtonCornerLines)
  3464. end
  3465. surface.DrawOutlinedRect( x+1,y+1,w-2,h-2 )
  3466. end
  3467. /*---------------------------------------------------------
  3468. DrawDisabledButtonBorder
  3469. ---------------------------------------------------------*/
  3470. function SKIN:DrawDisabledButtonBorder( x, y, w, h, depressed )
  3471. surface.SetDrawColor( 0, 0, 0, 150 )
  3472. surface.DrawOutlinedRect( x, y, w, h )
  3473. end
  3474. /*---------------------------------------------------------
  3475. Frame
  3476. ---------------------------------------------------------*/
  3477. function SKIN:PaintFrame( panel )
  3478. local color = self.bg_color
  3479. self:DrawGenericBackground( 0, 0, panel:GetWide(), panel:GetTall(), color )
  3480. surface.SetDrawColor( 0, 0, 0, 200 )
  3481. surface.DrawRect( 0, 0, panel:GetWide(), 23 )
  3482. end
  3483. function SKIN:LayoutFrame( panel )
  3484. panel.lblTitle:SetFont( self.fontFrame )
  3485. panel.btnClose:SetPos( panel:GetWide() - 22, 4 )
  3486. panel.btnClose:SetSize( 18, 18 )
  3487. panel.lblTitle:SetPos( 8, 2 )
  3488. panel.lblTitle:SetSize( panel:GetWide() - 25, 20 )
  3489. end
  3490. /*---------------------------------------------------------
  3491. Button
  3492. ---------------------------------------------------------*/
  3493. function SKIN:PaintButton( panel )
  3494. local w, h = panel:GetSize()
  3495. if ( panel.m_bBackground ) then
  3496. local col = self.control_color
  3497. if ( panel:GetDisabled() ) then
  3498. col = self.control_color_dark
  3499. elseif ( panel.Depressed || panel:GetSelected() ) then
  3500. col = self.control_color_active
  3501. elseif ( panel.Hovered ) then
  3502. col = self.control_color_highlight
  3503. end
  3504. surface.SetDrawColor( col.r, col.g, col.b, col.a )
  3505. panel:DrawFilledRect()
  3506. end
  3507. end
  3508. function SKIN:PaintOverButton( panel )
  3509. local w, h = panel:GetSize()
  3510. if ( panel.m_bBorder ) then
  3511. if ( panel:GetDisabled() ) then
  3512. self:DrawDisabledButtonBorder( 0, 0, w, h )
  3513. else
  3514. self:DrawButtonBorder( 0, 0, w, h, panel.Depressed || panel:GetSelected() )
  3515. end
  3516. end
  3517. end
  3518. function SKIN:SchemeButton( panel )
  3519. panel:SetFont( self.fontButton )
  3520. if ( panel:GetDisabled() ) then
  3521. panel:SetTextColor( self.colButtonTextDisabled )
  3522. else
  3523. panel:SetTextColor( self.colButtonText )
  3524. end
  3525. DLabel.ApplySchemeSettings( panel )
  3526. end
  3527. /*---------------------------------------------------------
  3528. SysButton
  3529. ---------------------------------------------------------*/
  3530. function SKIN:PaintPanel( panel )
  3531. if ( panel.m_bPaintBackground ) then
  3532. local w, h = panel:GetSize()
  3533. self:DrawGenericBackground( 0, 0, w, h, panel.m_bgColor or self.panel_transback )
  3534. end
  3535. end
  3536. /*---------------------------------------------------------
  3537. SysButton
  3538. ---------------------------------------------------------*/
  3539. function SKIN:PaintSysButton( panel )
  3540. self:PaintButton( panel )
  3541. self:PaintOverButton( panel ) // Border
  3542. end
  3543. function SKIN:SchemeSysButton( panel )
  3544. panel:SetFont( "Marlett" )
  3545. DLabel.ApplySchemeSettings( panel )
  3546. end
  3547. /*---------------------------------------------------------
  3548. ImageButton
  3549. ---------------------------------------------------------*/
  3550. function SKIN:PaintImageButton( panel )
  3551. self:PaintButton( panel )
  3552. end
  3553. /*---------------------------------------------------------
  3554. ImageButton
  3555. ---------------------------------------------------------*/
  3556. function SKIN:PaintOverImageButton( panel )
  3557. self:PaintOverButton( panel )
  3558. end
  3559. function SKIN:LayoutImageButton( panel )
  3560. if ( panel.m_bBorder ) then
  3561. panel.m_Image:SetPos( 1, 1 )
  3562. panel.m_Image:SetSize( panel:GetWide()-2, panel:GetTall()-2 )
  3563. else
  3564. panel.m_Image:SetPos( 0, 0 )
  3565. panel.m_Image:SetSize( panel:GetWide(), panel:GetTall() )
  3566. end
  3567. end
  3568. /*---------------------------------------------------------
  3569. PaneList
  3570. ---------------------------------------------------------*/
  3571. function SKIN:PaintPanelList( panel )
  3572. if ( panel.m_bBackground ) then
  3573. draw.RoundedBox( 4, 0, 0, panel:GetWide(), panel:GetTall(), self.bg_color_dark )
  3574. end
  3575. end
  3576. /*---------------------------------------------------------
  3577. ScrollBar
  3578. ---------------------------------------------------------*/
  3579. function SKIN:PaintVScrollBar( panel )
  3580. surface.SetDrawColor( self.bg_color.r, self.bg_color.g, self.bg_color.b, self.bg_color.a )
  3581. surface.DrawRect( 0, 0, panel:GetWide(), panel:GetTall() )
  3582. end
  3583. function SKIN:LayoutVScrollBar( panel )
  3584. local Wide = panel:GetWide()
  3585. local Scroll = panel:GetScroll() / panel.CanvasSize
  3586. local BarSize = math.max( panel:BarScale() * (panel:GetTall() - (Wide * 2)), 10 )
  3587. local Track = panel:GetTall() - (Wide * 2) - BarSize
  3588. Track = Track + 1
  3589. Scroll = Scroll * Track
  3590. panel.btnGrip:SetPos( 0, Wide + Scroll )
  3591. panel.btnGrip:SetSize( Wide, BarSize )
  3592. panel.btnUp:SetPos( 0, 0, Wide, Wide )
  3593. panel.btnUp:SetSize( Wide, Wide )
  3594. panel.btnDown:SetPos( 0, panel:GetTall() - Wide, Wide, Wide )
  3595. panel.btnDown:SetSize( Wide, Wide )
  3596. end
  3597. /*---------------------------------------------------------
  3598. ScrollBarGrip
  3599. ---------------------------------------------------------*/
  3600. function SKIN:PaintScrollBarGrip( panel )
  3601. surface.SetDrawColor( self.control_color.r, self.control_color.g, self.control_color.b, self.control_color.a )
  3602. surface.DrawRect( 0, 0, panel:GetWide(), panel:GetTall() )
  3603. self:DrawButtonBorder( 0, 0, panel:GetWide(), panel:GetTall() )
  3604. end
  3605. /*---------------------------------------------------------
  3606. ScrollBar
  3607. ---------------------------------------------------------*/
  3608. function SKIN:PaintMenu( panel )
  3609. surface.SetDrawColor( self.colMenuBG )
  3610. panel:DrawFilledRect( 0, 0, w, h )
  3611. end
  3612. function SKIN:PaintOverMenu( panel )
  3613. surface.SetDrawColor( self.colMenuBorder )
  3614. panel:DrawOutlinedRect( 0, 0, w, h )
  3615. end
  3616. function SKIN:LayoutMenu( panel )
  3617. local w = panel:GetMinimumWidth()
  3618. // Find the widest one
  3619. for k, pnl in pairs( panel.Panels ) do
  3620. pnl:PerformLayout()
  3621. w = math.max( w, pnl:GetWide() )
  3622. end
  3623. panel:SetWide( w )
  3624. local y = 0
  3625. for k, pnl in pairs( panel.Panels ) do
  3626. pnl:SetWide( w )
  3627. pnl:SetPos( 0, y )
  3628. pnl:InvalidateLayout( true )
  3629. y = y + pnl:GetTall()
  3630. end
  3631. panel:SetTall( y )
  3632. end
  3633. /*---------------------------------------------------------
  3634. ScrollBar
  3635. ---------------------------------------------------------*/
  3636. function SKIN:PaintMenuOption( panel )
  3637. if ( panel.m_bBackground && panel.Hovered ) then
  3638. local col = nil
  3639. if ( panel.Depressed ) then
  3640. col = self.control_color_bright
  3641. else
  3642. col = self.control_color_active
  3643. end
  3644. surface.SetDrawColor( col.r, col.g, col.b, col.a )
  3645. surface.DrawRect( 0, 0, panel:GetWide(), panel:GetTall() )
  3646. end
  3647. end
  3648. function SKIN:LayoutMenuOption( panel )
  3649. // This is totally messy. :/
  3650. panel:SizeToContents()
  3651. panel:SetWide( panel:GetWide() + 30 )
  3652. local w = math.max( panel:GetParent():GetWide(), panel:GetWide() )
  3653. panel:SetSize( w, 18 )
  3654. if ( panel.SubMenuArrow ) then
  3655. panel.SubMenuArrow:SetSize( panel:GetTall(), panel:GetTall() )
  3656. panel.SubMenuArrow:CenterVertical()
  3657. panel.SubMenuArrow:AlignRight()
  3658. end
  3659. end
  3660. function SKIN:SchemeMenuOption( panel )
  3661. panel:SetFGColor( 255, 255, 255, 255 )
  3662. end
  3663. /*---------------------------------------------------------
  3664. TextEntry
  3665. ---------------------------------------------------------*/
  3666. function SKIN:PaintTextEntry( panel )
  3667. if ( panel.m_bBackground ) then
  3668. surface.SetDrawColor( self.colTextEntryBG )
  3669. --local htall=panel:GetTall()/2
  3670. --surface.DrawRect( 0, 0, panel:GetWide(),htall )
  3671. --surface.SetDrawColor( self.TextEntryBGDown )
  3672. --surface.DrawRect( 0, htall, panel:GetWide(), htall )
  3673. surface.SetMaterial( self.BGGradient )
  3674. --surface.SetDrawColor( self.colTabInactive )
  3675. surface.DrawTexturedRect( 0, 0, panel:GetWide(), panel:GetTall() )
  3676. end
  3677. panel:DrawTextEntryText( panel.m_colText, panel.m_colHighlight, panel.m_colCursor )
  3678. if ( panel.m_bBorder ) then
  3679. surface.SetDrawColor( self.colTextEntryBorder )
  3680. surface.DrawOutlinedRect( 0, 0, panel:GetWide(), panel:GetTall() )
  3681. end
  3682. end
  3683. function SKIN:SchemeTextEntry( panel )
  3684. panel:SetTextColor( self.colTextEntryText )
  3685. panel:SetHighlightColor( self.colTextEntryTextHighlight )
  3686. panel:SetCursorColor( Color( 0, 0, 100, 255 ) )
  3687. end
  3688. /*---------------------------------------------------------
  3689. Label
  3690. ---------------------------------------------------------*/
  3691. function SKIN:PaintLabel( panel )
  3692. return false
  3693. end
  3694. function SKIN:SchemeLabel( panel )
  3695. local col = nil
  3696. if ( panel.Hovered && panel:GetTextColorHovered() ) then
  3697. col = panel:GetTextColorHovered()
  3698. else
  3699. col = panel:GetTextColor()
  3700. end
  3701. if ( col ) then
  3702. panel:SetFGColor( col.r, col.g, col.b, col.a )
  3703. else
  3704. panel:SetFGColor( 200, 200, 200, 255 )
  3705. end
  3706. end
  3707. function SKIN:LayoutLabel( panel )
  3708. panel:ApplySchemeSettings()
  3709. if ( panel.m_bAutoStretchVertical ) then
  3710. panel:SizeToContentsY()
  3711. end
  3712. end
  3713. /*---------------------------------------------------------
  3714. CategoryHeader
  3715. ---------------------------------------------------------*/
  3716. function SKIN:PaintCategoryHeader( panel )
  3717. end
  3718. function SKIN:SchemeCategoryHeader( panel )
  3719. panel:SetTextInset( 5 )
  3720. panel:SetFont( self.fontCategoryHeader )
  3721. if ( panel:GetParent():GetExpanded() ) then
  3722. panel:SetTextColor( self.colCategoryText )
  3723. else
  3724. panel:SetTextColor( self.colCategoryTextInactive )
  3725. end
  3726. end
  3727. /*---------------------------------------------------------
  3728. CategoryHeader
  3729. ---------------------------------------------------------*/
  3730. function SKIN:PaintCollapsibleCategory( panel )
  3731. draw.RoundedBox( 4, 0, 0, panel:GetWide(), panel:GetTall(), self.colCollapsibleCategory )
  3732. end
  3733. /*---------------------------------------------------------
  3734. Tab
  3735. ---------------------------------------------------------*/
  3736. function SKIN:PaintTab( panel )
  3737. // This adds a little shadow to the right which helps define the tab shape..
  3738. draw.RoundedBox( 0, 0, 0, panel:GetWide(), panel:GetTall() + 8, self.colTabShadow )
  3739. if ( panel:GetPropertySheet():GetActiveTab() == panel ) then
  3740. draw.RoundedBox( 0, 1, 0, panel:GetWide()-2, panel:GetTall() + 8, self.colTab )
  3741. else
  3742. -- local halftall=(panel:GetTall() + 8)/2
  3743. --draw.RoundedBox( 0, 0, 0, panel:GetWide()-1, panel:GetTall() + halftall, self.colTabInactive )
  3744. --draw.RoundedBox( 0, 0, halftall, panel:GetWide()-1, halftall, self.colTabInactiveBottom )
  3745. surface.SetMaterial( self.BGGradient )
  3746. surface.SetDrawColor( self.colTabInactive )
  3747. surface.DrawTexturedRect( 0, 0, panel:GetWide()-1, panel:GetTall() + 8 )
  3748. end
  3749. end
  3750. function SKIN:SchemeTab( panel )
  3751. panel:SetFont( self.fontTab )
  3752. local ExtraInset = 10
  3753. if ( panel.Image ) then
  3754. ExtraInset = ExtraInset + panel.Image:GetWide()
  3755. end
  3756. panel:SetTextInset( ExtraInset )
  3757. panel:SizeToContents()
  3758. panel:SetSize( panel:GetWide() + 10, panel:GetTall() + 8 )
  3759. local Active = panel:GetPropertySheet():GetActiveTab() == panel
  3760. if ( Active ) then
  3761. panel:SetTextColor( self.colTabText )
  3762. else
  3763. panel:SetTextColor( self.colTabTextInactive )
  3764. end
  3765. panel.BaseClass.ApplySchemeSettings( panel )
  3766. end
  3767. function SKIN:LayoutTab( panel )
  3768. panel:SetTall( 22 )
  3769. if ( panel.Image ) then
  3770. local Active = panel:GetPropertySheet():GetActiveTab() == panel
  3771. local Diff = panel:GetTall() - panel.Image:GetTall()
  3772. panel.Image:SetPos( 7, Diff * 0.6 )
  3773. if ( !Active ) then
  3774. panel.Image:SetImageColor( Color( 170, 170, 170, 155 ) )
  3775. else
  3776. panel.Image:SetImageColor( Color( 255, 255, 255, 255 ) )
  3777. end
  3778. end
  3779. end
  3780. /*---------------------------------------------------------
  3781. PropertySheet
  3782. ---------------------------------------------------------*/
  3783. function SKIN:PaintPropertySheet( panel )
  3784. local ActiveTab = panel:GetActiveTab()
  3785. local Offset = 0
  3786. if ( ActiveTab ) then Offset = ActiveTab:GetTall() end
  3787. // This adds a little shadow to the right which helps define the tab shape..
  3788. draw.RoundedBox( 4, 0, Offset, panel:GetWide(), panel:GetTall()-Offset, self.colPropertySheet )
  3789. end
  3790. /*---------------------------------------------------------
  3791. ListView
  3792. ---------------------------------------------------------*/
  3793. function SKIN:PaintListView( panel )
  3794. if ( panel.m_bBackground ) then
  3795. surface.SetDrawColor( 50, 50, 50, 255 )
  3796. panel:DrawFilledRect()
  3797. end
  3798. end
  3799. /*---------------------------------------------------------
  3800. ListViewLine
  3801. ---------------------------------------------------------*/
  3802. function SKIN:PaintListViewLine( panel )
  3803. local Col = nil
  3804. if ( panel:IsSelected() ) then
  3805. Col = self.listview_selected
  3806. elseif ( panel.Hovered ) then
  3807. Col = self.listview_hover
  3808. elseif ( panel.m_bAlt ) then
  3809. Col = self.bg_alt2
  3810. else
  3811. return
  3812. end
  3813. surface.SetDrawColor( Col.r, Col.g, Col.b, Col.a )
  3814. surface.SetMaterial(self.texGradient)
  3815. surface.DrawTexturedRect( 0, 1, panel:GetWide(), panel:GetTall() -2)
  3816. end
  3817. /*---------------------------------------------------------
  3818. ListViewLabel
  3819. ---------------------------------------------------------*/
  3820. function SKIN:SchemeListViewLabel( panel )
  3821. panel:SetTextInset( 3 )
  3822. panel:SetTextColor( Color( 255, 255, 255, 255 ) )
  3823. end
  3824. /*---------------------------------------------------------
  3825. ListViewLabel
  3826. ---------------------------------------------------------*/
  3827. local Dark=Color( 0, 0, 0, 255 )
  3828. local Bright=Color( 255, 255, 255, 255 )
  3829. function SKIN:PaintListViewLabel( panel )
  3830. local Col = nil
  3831. if ( panel:GetParent():IsSelected() ) then
  3832. panel:SetTextColor( Bright )
  3833. elseif ( panel:GetParent().Hovered ) then
  3834. panel:SetTextColor( Bright )
  3835. else
  3836. panel:SetTextColor( Bright )
  3837. end
  3838. end
  3839. /*---------------------------------------------------------
  3840. Form
  3841. ---------------------------------------------------------*/
  3842. function SKIN:PaintForm( panel )
  3843. local color = self.bg_color_sleep
  3844. self:DrawGenericBackground( 0, 9, panel:GetWide(), panel:GetTall()-9, self.bg_color )
  3845. end
  3846. function SKIN:SchemeForm( panel )
  3847. panel.Label:SetFont( "TabLarge" )
  3848. panel.Label:SetTextColor( Color( 255, 255, 255, 255 ) )
  3849. end
  3850. function SKIN:LayoutForm( panel )
  3851. end
  3852. /*---------------------------------------------------------
  3853. MultiChoice
  3854. ---------------------------------------------------------*/
  3855. function SKIN:LayoutMultiChoice( panel )
  3856. panel.TextEntry:SetSize( panel:GetWide(), panel:GetTall() )
  3857. panel.DropButton:SetSize( panel:GetTall(), panel:GetTall() )
  3858. panel.DropButton:SetPos( panel:GetWide() - panel:GetTall(), 0 )
  3859. panel.DropButton:SetZPos( 1 )
  3860. panel.DropButton:SetDrawBackground( false )
  3861. panel.DropButton:SetDrawBorder( false )
  3862. panel.DropButton:SetTextColor( Color( 30, 100, 200, 255 ) )
  3863. panel.DropButton:SetTextColorHovered( Color( 50, 150, 255, 255 ) )
  3864. end
  3865. /*
  3866. NumberWangIndicator
  3867. */
  3868. function SKIN:DrawNumberWangIndicatorText( panel, wang, x, y, number, alpha )
  3869. local alpha = math.Clamp( alpha ^ 0.5, 0, 1 ) * 255
  3870. local col = self.text_dark
  3871. // Highlight round numbers
  3872. local dec = (wang:GetDecimals() + 1) * 10
  3873. if ( number / dec == math.ceil( number / dec ) ) then
  3874. col = self.text_highlight
  3875. end
  3876. draw.SimpleText( number, "Default", x, y, Color( col.r, col.g, col.b, alpha ) )
  3877. end
  3878. function SKIN:PaintNumberWangIndicator( panel )
  3879. /*
  3880. Please excuse the crudeness of this code.
  3881. */
  3882. if ( panel.m_bTop ) then
  3883. surface.SetMaterial( self.texGradientUp )
  3884. else
  3885. surface.SetMaterial( self.texGradientDown )
  3886. end
  3887. surface.SetDrawColor( self.colNumberWangBG )
  3888. surface.DrawTexturedRect( 0, 0, panel:GetWide(), panel:GetTall() )
  3889. local wang = panel:GetWang()
  3890. local CurNum = math.floor( wang:GetFloatValue() )
  3891. local Diff = CurNum - wang:GetFloatValue()
  3892. local InsetX = 3
  3893. local InsetY = 5
  3894. local Increment = wang:GetTall()
  3895. local Offset = Diff * Increment
  3896. local EndPoint = panel:GetTall()
  3897. local Num = CurNum
  3898. local NumInc = 1
  3899. if ( panel.m_bTop ) then
  3900. local Min = wang:GetMin()
  3901. local Start = panel:GetTall() + Offset
  3902. local End = Increment * -1
  3903. CurNum = CurNum + NumInc
  3904. for y = Start, Increment * -1, End do
  3905. CurNum = CurNum - NumInc
  3906. if ( CurNum < Min ) then break end
  3907. self:DrawNumberWangIndicatorText( panel, wang, InsetX, y + InsetY, CurNum, y / panel:GetTall() )
  3908. end
  3909. else
  3910. local Max = wang:GetMax()
  3911. for y = Offset - Increment, panel:GetTall(), Increment do
  3912. self:DrawNumberWangIndicatorText( panel, wang, InsetX, y + InsetY, CurNum, 1 - ((y+Increment) / panel:GetTall()) )
  3913. CurNum = CurNum + NumInc
  3914. if ( CurNum > Max ) then break end
  3915. end
  3916. end
  3917. end
  3918. function SKIN:LayoutNumberWangIndicator( panel )
  3919. panel.Height = 200
  3920. local wang = panel:GetWang()
  3921. local x, y = wang:LocalToScreen( 0, wang:GetTall() )
  3922. if ( panel.m_bTop ) then
  3923. y = y - panel.Height - wang:GetTall()
  3924. end
  3925. panel:SetPos( x, y )
  3926. panel:SetSize( wang:GetWide() - wang.Wanger:GetWide(), panel.Height)
  3927. end
  3928. /*---------------------------------------------------------
  3929. CheckBox
  3930. ---------------------------------------------------------*/
  3931. function SKIN:PaintCheckBox( panel )
  3932. local w, h = panel:GetSize()
  3933. surface.SetDrawColor( 255, 255, 255, 255 )
  3934. surface.DrawRect( 1, 1, w-2, h-2 )
  3935. surface.SetDrawColor( 30, 30, 30, 255 )
  3936. //=
  3937. surface.DrawRect( 1, 0, w-2, 1 )
  3938. surface.DrawRect( 1, h-1, w-2, 1 )
  3939. //||
  3940. surface.DrawRect( 0, 1, 1, h-2 )
  3941. surface.DrawRect( w-1, 1, 1, h-2 )
  3942. surface.DrawRect( 1, 1, 1, 1 )
  3943. surface.DrawRect( w-2, 1, 1, 1 )
  3944. surface.DrawRect( 1, h-2, 1, 1 )
  3945. surface.DrawRect( w-2, h-2, 1, 1 )
  3946. end
  3947. function SKIN:SchemeCheckBox( panel )
  3948. panel:SetTextColor( Color( 255, 0, 0, 255 ) )
  3949. DSysButton.ApplySchemeSettings( panel )
  3950. end
  3951. /*---------------------------------------------------------
  3952. Slider
  3953. ---------------------------------------------------------*/
  3954. function SKIN:PaintSlider( panel )
  3955. end
  3956. /*---------------------------------------------------------
  3957. NumSlider
  3958. ---------------------------------------------------------*/
  3959. function SKIN:PaintNumSlider( panel )
  3960. local w, h = panel:GetSize()
  3961. self:DrawGenericBackground( 0, 0, w, h, Color( 255, 255, 255, 20 ) )
  3962. surface.SetDrawColor( 0, 0, 0, 200 )
  3963. surface.DrawRect( 3, h/2, w-6, 1 )
  3964. end
  3965. /*---------------------------------------------------------
  3966. NumSlider
  3967. ---------------------------------------------------------*/
  3968. function SKIN:SchemeSlider( panel )
  3969. panel.Knob:SetImageColor( Color(200,54,230,255) )
  3970. end
  3971. /*---------------------------------------------------------
  3972. NumSlider
  3973. ---------------------------------------------------------*/
  3974. function SKIN:PaintComboBoxItem( panel )
  3975. if ( panel:GetSelected() ) then
  3976. local col = self.combobox_selected
  3977. surface.SetDrawColor( col.r, col.g, col.b, col.a )
  3978. panel:DrawFilledRect()
  3979. end
  3980. end
  3981. function SKIN:SchemeComboBoxItem( panel )
  3982. panel:SetTextColor( Color( 0, 0, 30, 255 ) )
  3983. end
  3984. /*---------------------------------------------------------
  3985. ComboBox
  3986. ---------------------------------------------------------*/
  3987. function SKIN:PaintComboBox( panel )
  3988. surface.SetDrawColor( 255, 255, 255, 255 )
  3989. panel:DrawFilledRect()
  3990. surface.SetDrawColor( 0, 0, 0, 255 )
  3991. panel:DrawOutlinedRect()
  3992. end
  3993. /*---------------------------------------------------------
  3994. ScrollBar
  3995. ---------------------------------------------------------*/
  3996. function SKIN:PaintBevel( panel )
  3997. local w, h = panel:GetSize()
  3998. surface.SetDrawColor( 255, 255, 255, 255 )
  3999. surface.DrawOutlinedRect( 0, 0, w-1, h-1)
  4000. surface.SetDrawColor( 0, 0, 0, 255 )
  4001. surface.DrawOutlinedRect( 1, 1, w-1, h-1)
  4002. end
  4003. /*---------------------------------------------------------
  4004. Tree
  4005. ---------------------------------------------------------*/
  4006. function SKIN:PaintTree( panel )
  4007. if ( panel.m_bBackground ) then
  4008. surface.SetDrawColor( self.bg_color_bright.r, self.bg_color_bright.g, self.bg_color_bright.b, self.bg_color_bright.a )
  4009. panel:DrawFilledRect()
  4010. end
  4011. end
  4012. /*---------------------------------------------------------
  4013. TinyButton
  4014. ---------------------------------------------------------*/
  4015. function SKIN:PaintTinyButton( panel )
  4016. if ( panel.m_bBackground ) then
  4017. surface.SetDrawColor( 255, 255, 255, 255 )
  4018. panel:DrawFilledRect()
  4019. end
  4020. if ( panel.m_bBorder ) then
  4021. surface.SetDrawColor( 0, 0, 0, 255 )
  4022. panel:DrawOutlinedRect()
  4023. end
  4024. end
  4025. function SKIN:SchemeTinyButton( panel )
  4026. panel:SetFont( "Default" )
  4027. if ( panel:GetDisabled() ) then
  4028. panel:SetTextColor( Color( 0, 100, 150, 50 ) )
  4029. else
  4030. panel:SetTextColor( Color( 0, 100, 200, 255 ) )
  4031. end
  4032. DLabel.ApplySchemeSettings( panel )
  4033. panel:SetFont( "DefaultSmall" )
  4034. end
  4035. /*---------------------------------------------------------
  4036. TinyButton
  4037. ---------------------------------------------------------*/
  4038. function SKIN:PaintTreeNodeButton( panel )
  4039. if ( panel.m_bSelected ) then
  4040. surface.SetDrawColor( 50, 200, 255, 150 )
  4041. panel:DrawFilledRect()
  4042. elseif ( panel.Hovered ) then
  4043. surface.SetDrawColor( 255, 255, 255, 100 )
  4044. panel:DrawFilledRect()
  4045. end
  4046. end
  4047. function SKIN:SchemeTreeNodeButton( panel )
  4048. DLabel.ApplySchemeSettings( panel )
  4049. end
  4050. /*---------------------------------------------------------
  4051. Tooltip
  4052. ---------------------------------------------------------*/
  4053. function SKIN:PaintTooltip( panel )
  4054. local w, h = panel:GetSize()
  4055. self:DrawGenericBackground( 0, 0, w, h, self.tooltip )
  4056. panel:DrawArrow( 0, 0 )
  4057. end
  4058. /*---------------------------------------------------------
  4059. VoiceNotify
  4060. ---------------------------------------------------------*/
  4061. function SKIN:PaintVoiceNotify( panel )
  4062. local w, h = panel:GetSize()
  4063. self:DrawGenericBackground( 0, 0, w, h, panel.Color )
  4064. self:DrawGenericBackground( 1, 1, w-2, h-2, Color( 60, 60, 60, 240 ) )
  4065. end
  4066. function SKIN:SchemeVoiceNotify( panel )
  4067. panel.LabelName:SetFont( "TabLarge" )
  4068. panel.LabelName:SetContentAlignment( 4 )
  4069. panel.LabelName:SetColor( color_white )
  4070. panel:InvalidateLayout()
  4071. end
  4072. function SKIN:LayoutVoiceNotify( panel )
  4073. panel:SetSize( 200, 40 )
  4074. panel.Avatar:SetPos( 4, 4 )
  4075. panel.Avatar:SetSize( 32, 32 )
  4076. panel.LabelName:SetPos( 44, 0 )
  4077. panel.LabelName:SizeToContents()
  4078. panel.LabelName:CenterVertical()
  4079. end
  4080. -- Do not remove this empty comment, SethHackbot must have it.
  4081. //
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement