Advertisement
Guest User

Untitled

a guest
Sep 21st, 2017
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.35 KB | None | 0 0
  1. // Rorick's Simple Testicular ESP Of Fortitude V.3
  2.  
  3. local drawColor = Color( 150, 150, 150, 255)
  4. local hack_esp = CreateClientConVar( "hack_esp", 1, true, false )
  5.  
  6. function lenMod(name)
  7. if name:IsNPC() then
  8. local NPCLen = string.len(name:GetClass())
  9. return NPCLen*8
  10. elseif name:IsPlayer() then
  11. local PlyLen = string.len(name:GetName())
  12. return PlyLen*8
  13. end
  14. end
  15.  
  16. function espHack()
  17. if hack_esp:GetInt() == 1 then
  18.  
  19. for _, v in pairs(ents.GetAll()) do
  20.  
  21. local pPos = (v:GetPos() + Vector( 0,0,75 )):ToScreen()
  22.  
  23. if ( v:IsNPC() ) then
  24.  
  25. local drawColor = Color(255, 255, 255, 255)
  26.  
  27. draw.RoundedBox( 6, (pPos.x - lenMod(v)/2), (pPos.y - 10), lenMod(v), 20, Color( 0, 0, 0, 80))
  28.  
  29. txtD(v:GetClass(),drawColor,pPos)
  30.  
  31. elseif ( v:IsPlayer() and v:Health() > 0 and v:Alive() and v != LocalPlayer()) then
  32.  
  33. if ( v:GetFriendStatus() == "friend" ) then
  34.  
  35. espHelth(v, pPos)
  36.  
  37. local drawColor = Color(0, 255, 0, 255)
  38.  
  39. draw.RoundedBox( 6, (pPos.x - lenMod(v)/2), (pPos.y - 10), lenMod(v), 20, Color( 0, 0, 0, 80))
  40.  
  41. txtD(v:GetName(),drawColor,pPos)
  42.  
  43. else
  44.  
  45. local drawColor = team.GetColor(v:Team())
  46.  
  47. espHelth(v, pPos)
  48.  
  49. draw.RoundedBox( 6, (pPos.x - lenMod(v)/2), (pPos.y - 10), lenMod(v), 20, Color( 0, 0, 0, 80))
  50.  
  51. txtD(v:GetName(),drawColor,pPos)
  52. end
  53. end
  54. end
  55. end
  56. end
  57.  
  58. function espHelth(ply,pPos)
  59.  
  60. draw.RoundedBox( 4,pPos.x-50, pPos.y - 22, math.Clamp(ply:Health(),1,100), 8, Color( 255, 0, 0, 80))
  61.  
  62. if (ply:Health() > 100) then
  63. txtH("100+",Color(255,255,255,255),pPos)
  64. else
  65. txtH(ply:Health(),Color(255,255,255,255),pPos)
  66. end
  67. end
  68.  
  69. function txtD(printed,clr,pPos)
  70.  
  71. local text = {}
  72.  
  73. text.pos = {}
  74. text.pos[1] = pPos.x - string.len(printed)*3
  75. text.pos[2] = pPos.y
  76. text.color = clr
  77. text.text = printed
  78. text.font = "DefaultFixed"
  79. text.xalight = TEXT_ALIGN_CENTER
  80. text.yalign = TEXT_ALIGN_CENTER
  81. draw.Text( text)
  82.  
  83. end
  84.  
  85. function txtH(printed,clr,pPos)
  86.  
  87. local text = {}
  88.  
  89. text.pos = {}
  90. text.pos[1] = pPos.x - string.len(printed)*3
  91. text.pos[2] = pPos.y - 18
  92. text.color = clr
  93. text.text = printed
  94. text.font = "DefaultFixed"
  95. text.xalight = TEXT_ALIGN_CENTER
  96. text.yalign = TEXT_ALIGN_CENTER
  97. draw.Text( text)
  98.  
  99. end
  100.  
  101. hook.Add( "HUDPaint", "DrawESP", espHack );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement