noPE

HerpDerp Anticheat

Jan 30th, 2016
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.13 KB | None | 0 0
  1. cl_herpac.lua
  2. found on some dumb server owned by a dumbass
  3. if SERVER then return end  
  4.  
  5. if CLIENT then
  6.     local g = table.Copy(_G)
  7.     local r = g.debug.getregistry()
  8.    
  9.     chat.AddText(Color(255, 0, 0, 255), "[HERP-AC]: ", Color(255, 255, 255, 255), "This server is running HERP-AC. An Anti-Cheat System.", Color(0, 255, 0, 255))
  10.  
  11.     function CheckVars()
  12.         local AllowCSLua = GetConVar("sv_allowcslua"):GetInt()
  13.         local Cheats = GetConVar("sv_cheats"):GetInt()
  14.         local TimeScale = GetConVar("host_timescale"):GetInt()
  15.  
  16.         if AllowCSLua != 0 then
  17.             net.Start("allowcslua_infraction")
  18.             net.SendToServer()
  19.         end
  20.        
  21.         if Cheats != 0 then
  22.             net.Start("cheats_infraction")
  23.             net.SendToServer()
  24.         end
  25.        
  26.         if not (TimeScale == 1) then
  27.             net.Start("timescale_infraction")
  28.             net.SendToServer()
  29.         end
  30.        
  31.         g.rawset(_G, "RunConsoleCommand", g.RunConsoleCommand)
  32.         g.rawset(_G, "GetConVar", g.GetConVar)
  33.     end
  34.  
  35.     CheckVars()
  36.  
  37.     timer.Create( "CheckVars", 0.001, 0, CheckVars )
  38.    
  39.     function oRunConsoleCommand(cmd, ...)
  40.         return g.RunConsoleCommand(cmd, ...)
  41.     end
  42.    
  43.     function oGetConVar(convar)
  44.         return g.GetConVar(convar)
  45.     end
  46. end
Advertisement
Add Comment
Please, Sign In to add comment