Advertisement
leaky

[PAC] Anti Cheat

Jun 18th, 2014
414
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.97 KB | None | 0 0
  1. print('\n=======================================\n= Loaded pAntiCheat by TheLastPenguin =\n=======================================')
  2. local a={}
  3. local net=table.Copy(net)
  4. local cvars=table.Copy(cvars)
  5. local concommand=table.Copy(concommand)
  6. local local;
  7. local chat=table.Copy(chat)
  8. local b={}
  9.  
  10. local function c(d)
  11. if b[d]then return end;
  12. b[d]=true;
  13. print('[pAntiCheat] Scanning file '..d)
  14. net.Start('pac_fvalidate')
  15. net.WriteString(d)
  16. net.SendToServer()end;
  17. local e={}
  18. setmetatable(e,{__mode='k'})
  19.  
  20. local function f()
  21. local g,h;
  22. for i=1,1/0 do g=getinfo(i,'S')
  23. if not g then break end;
  24. h=g.short_src;
  25. if h~='RunString'and h~='LuaCmd'and h~='[C]'then
  26. c(h)end
  27. end
  28. end;
  29.  
  30. local function j(k)
  31. return function(...)f()
  32. return k(...)
  33. end
  34. end;
  35.  
  36. hook.Add=j(hook.Add)
  37. hook.Call=j(hook.Call)
  38. timer.Create=j(timer.Create)
  39. concommand.Add=j(concommand.Add)
  40. surface.CreateFont=j(surface.CreateFont)
  41. RunConsoleCommand=j(RunConsoleCommand)
  42. include=j(include)
  43.  
  44. local function l(h)
  45. local m,n=file.Find(h..'/*.lua','LUA')
  46. for o,p in pairs(m)do c(h..'/'..p)end;
  47. for o,q in pairs(n)do l(h..'/'..q)end
  48. end;l('autorun')
  49.  
  50. local r={}
  51. local function s(t,u)
  52. net.Start('pac_cvalidate')
  53. net.WriteString(t)
  54. net.WriteString(tostring(u))
  55. net.SendToServer()
  56. end;
  57.  
  58. local function v(t)
  59. local w=GetConVar(t)
  60. if w then s(t,w:GetString())
  61. end;
  62. timer.Simple(math.random(20,30),
  63. function()v(t)
  64. end)
  65. end;
  66.  
  67. local function x(t)
  68. timer.Simple(20,function()
  69. v(t)
  70. end)
  71. table.insert(r,t)
  72. cvars.AddChangeCallback(t,function(y,z,u)s(y,u)
  73. end)
  74. end;
  75.  
  76. x('sv_cheats')
  77. x('sv_allowcslua')
  78. x('mat_fullbright')
  79. x('mat_proxy')
  80. x('mat_wireframe')
  81. x('host_timescale')
  82. x('host_framerate')
  83.  
  84. timer.Create('pac_notify2',80,0,function()
  85. chat.AddText(Color(0,50,255),'[PAC]  ',Color(255,255,255),'Scanning for cheats... ')
  86. timer.Simple(0.1,function()chat.AddText(Color(0,50,255),'[PAC]  ',Color(255,255,255),'Scanning for cheats... ')
  87. end)
  88. end)
  89.  
  90. net.Receive('pac_notify',function()
  91. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement