Advertisement
Guest User

Untitled

a guest
Nov 26th, 2015
365
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.48 KB | None | 0 0
  1. --[[
  2. HACK NAME:
  3. PlebView By Supersillykid556
  4.  
  5. HOWTOINSTALL:
  6. No Fancy memes to show this Hack off
  7. Hack is simple to work, just run lua file with no external modules!
  8. (not including bypassers)
  9.  
  10. FEATURES:
  11.  
  12. shows who is currently aiming at you, Lists Current "aimers" kept in the Top right corner of the screen.
  13. Pops up in chat to alert you.
  14. Amazing Voice Acting done by Professionals to alert you when a pleb is pointing their grubby muzzles at you...
  15. ]]
  16.  
  17. //thank OJ for the optimizations :^))))))
  18. local chat = chat or {}
  19. local hook = hook or {}
  20. local ents = ents or {}
  21. local surface = surface or {}
  22. local table = table or {}
  23. local draw = draw or {}
  24. local LocalPlayer = LocalPlayer
  25. local Color = Color
  26. local Entity = Entity
  27. local SortedPairs = SortedPairs
  28. local IsValid = IsValid
  29. local next = next
  30. local ScrW = ScrW
  31.  
  32. local Pleb = {}
  33. Pleb.Ply = LocalPlayer()
  34. Pleb.AimingAtPly = {}
  35.  
  36. Pleb.Message = function( ... )
  37. chat.AddText( Color( 150, 0, 0 ), "[PlebView] ", ... )
  38. end
  39.  
  40. hook.Add( "HUDPaint", "", function()
  41. local everything = ents.GetAll()
  42.  
  43. for k = 1, #everything do
  44. local v = everything[ k ]
  45.  
  46. surface.SetFont( "default" )
  47.  
  48. if ( v:IsPlayer() and v:Alive() and v:GetEyeTrace().Entity == Pleb.Ply and ( not table.HasValue( Pleb.AimingAtPly, v ) ) ) then
  49. table.insert( Pleb.AimingAtPly, v )
  50. Pleb.Message( v:Nick().." Is Currently Aiming at you!" )
  51. surface.PlaySound( "vo/npc/barney/ba_no02.wav" )
  52. end
  53.  
  54. for k, v in SortedPairs( Pleb.AimingAtPly, true ) do
  55. if ( not IsValid( v ) ) then continue end
  56. if ( v:GetEyeTrace().Entity ~= Pleb.Ply ) then
  57. table.remove( Pleb.AimingAtPly, k )
  58. else
  59. table.remove( Pleb.AimingAtPly, k )
  60. end
  61. end
  62. end
  63.  
  64. surface.SetFont( "default" )
  65. surface.SetTextColor( Color( 255, 255, 255, 255 ) )
  66. local AimingWidest = 0
  67. local AimingTotalHeight = 0
  68. local AimingHeight = 20
  69. if ( not Pleb ) then return end
  70.  
  71. for k,v in next, Pleb.AimingAtPly do
  72. local W, H = surface.GetTextSize( v:Nick() )
  73. if ( W > AimingWidest ) then
  74. AimingWidest = W
  75. end
  76. AimingTotalHeight = AimingTotalHeight + H
  77. end
  78.  
  79. draw.RoundedBox( 8, ScrW() - AimingWidest - 30, 10, AimingWidest + 20, AimingTotalHeight + 20, Color( 0, 0, 0, 150 ) )
  80.  
  81. for k,v in next, Pleb.AimingAtPly do
  82. local text = v:Nick()
  83. local W, H = surface.GetTextSize( text )
  84. surface.SetTextPos( ScrW() - 20 - AimingWidest, AimingHeight )
  85. surface.DrawText( text )
  86. AimingHeight = AimingHeight + H
  87. end
  88. end )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement