Advertisement
Guest User

Untitled

a guest
Mar 3rd, 2014
160
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. -- Scraatch hack --
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12. --TABLES--
  13. local concommand = concommand
  14. local cvars = cvars
  15. local debug = debug
  16. local ents = ents
  17. local file = file
  18. local hook = hook
  19. local math = math
  20. local spawnmenu = spawnmenu
  21. local string = string
  22. local surface = surface
  23. local table = table
  24. local timer = timer
  25. local util = util
  26. local vgui = vgui
  27.  
  28. local Angle = Angle
  29. local CreateClientConVar = CreateClientConVar
  30. local CurTime = CurTime
  31. local ErrorNoHalt = ErrorNoHalt
  32. local FrameTime = FrameTime
  33. local GetConVarString = GetConVarString
  34. local GetViewEntity = GetViewEntity
  35. local include = include
  36. local ipairs = ipairs
  37. local LocalPlayer = LocalPlayer
  38. local pairs = pairs
  39. local pcall = pcall
  40. local print = print
  41. local RunConsoleCommand = RunConsoleCommand
  42. local ScrH = ScrH
  43. local ScrW = ScrW
  44. local tonumber = tonumber
  45. local type = type
  46. local unpack = unpack
  47. local ValidEntity = IsValid
  48. local Vector = Vector
  49.  
  50. -- 180 --
  51. concommand.Add("sc_180", function()
  52. local ply = LocalPlayer()
  53. ply:SetEyeAngles(ply:EyeAngles() + Angle(-2 * ply:EyeAngles().p, 180, 0))
  54. end)
  55.  
  56. -- Box --
  57. local function coordinates( ent )
  58. local min, max = ent:OBBMins(), ent:OBBMaxs()
  59. local corners = {
  60.         Vector( min.x, min.y, min.z ),
  61.         Vector( min.x, min.y, max.z ),
  62.         Vector( min.x, max.y, min.z ),
  63.         Vector( min.x, max.y, max.z ),
  64.         Vector( max.x, min.y, min.z ),
  65.         Vector( max.x, min.y, max.z ),
  66.         Vector( max.x, max.y, min.z ),
  67.         Vector( max.x, max.y, max.z )
  68. }
  69.  
  70. local minX, minY, maxX, maxY = ScrW() * 2, ScrH() * 2, 0, 0
  71. for _, corner in pairs( corners ) do
  72.         local onScreen = ent:LocalToWorld( corner ):ToScreen()
  73.         minX, minY = math.min( minX, onScreen.x ), math.min( minY, onScreen.y )
  74.         maxX, maxY = math.max( maxX, onScreen.x ), math.max( maxY, onScreen.y )
  75. end
  76.  
  77. return minX, minY, maxX, maxY
  78. end
  79. hook.Add("HUDPaint", "Example", function()
  80. for k,v in pairs(player.GetAll()) do
  81.         local x1,y1,x2,y2 = coordinates(v)
  82.          print(tostring(team.GetColor(v:Team())))
  83.          surface.SetDrawColor(color_white)
  84.  
  85.  
  86.         surface.DrawLine( x1, y1, math.min( x1 + 5, x2 ), y1 )
  87.         surface.DrawLine( x1, y1, x1, math.min( y1 + 5, y2 ) )
  88.  
  89.  
  90.         surface.DrawLine( x2, y1, math.max( x2 - 5, x1 ), y1 )
  91.         surface.DrawLine( x2, y1, x2, math.min( y1 + 5, y2 ) )
  92.  
  93.  
  94.         surface.DrawLine( x1, y2, math.min( x1 + 5, x2 ), y2 )
  95.         surface.DrawLine( x1, y2, x1, math.max( y2 - 5, y1 ) )
  96.  
  97.  
  98.         surface.DrawLine( x2, y2, math.max( x2 - 5, x1 ), y2 )
  99.         surface.DrawLine( x2, y2, x2, math.max( y2 - 5, y1 ) )
  100. end
  101. end)
  102.  
  103. -- ESP --
  104. CreateClientConVar( "sc_esp", 0, true, false)
  105.  
  106. local function sc_esp()
  107.         if tobool( GetConVar( "sc_esp" ) ) then
  108.                 for k,v in pairs( player.GetAll() ) do
  109.                         local pos = (v:GetShootPos() + Vector( 0, 0, 20 ) ) :ToScreen()
  110.                         draw.SimpleTextOutlined( v:Nick(), "Default", pos.x, pos.y, Color( 0, 0, 0, 255 ), 1, 1, 1, Color( 255, 255, 255 ) )
  111.                         if v:IsAdmin() then
  112.             draw.SimpleTextOutlined( "Admin", "Default" , pos.x + 1, pos.y + 10 , Color( 0, 0, 0, 255 ), 1, 1, 1, Color( 255, 255, 255 ) )
  113.         if v:IsSuperAdmin() then
  114.         draw.SimpleTextOutlined( "SuperAdmin", "Default" , pos.x + 1, pos.y +10 , Color( 0, 0, 0, 255 ), 1, 1, 1, Color( 255, 255, 255 ) )
  115.         end
  116.                         end
  117.                 end
  118.         end
  119. end
  120.  
  121.  
  122. hook.Add( "HUDPaint", "sc_esp", sc_esp )
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133. -- Sneaky
  134. CreateClientConVar( "fag", 0, true, false )
  135.  
  136.  
  137. --Spectators--
  138. local showSpectators = true
  139. hook.Add("HUDPaint", "showspectators", function()
  140.    if GetConVarNumber( "fag" ) <= 0 then return end
  141.    local spectatePlayers = {}
  142.    local x = 0
  143.    for k,v in pairs(player.GetAll()) do
  144.       if v:GetObserverTarget() == LocalPlayer() then
  145.          table.insert(spectatePlayers, v:Name())
  146.       if not v.spectateNotified then
  147.         chat.AddText(Color(100, 100, 100), "[LESP] ", Color(0, 255, 255), "Admin " .. v:Nick() .. " is spectating you!!");
  148.                   surface.PlaySound("buttons/blip1.wav");
  149.         v.spectateNotified = true
  150.       end
  151.   else
  152.     v.spectateNotified = false
  153.   end
  154.    end
  155.    local textLength = surface.GetTextSize(table.concat(spectatePlayers) ) / 3
  156.    draw.RoundedBox(1, ScrW() - 180, ScrH() - ScrH() + 15, 150, 30 + textLength, Color(0,0,0,150))
  157.    draw.SimpleText("Spectators", "default", ScrW() - 175, ScrH() - ScrH() + 17, Color(0, 0, 0, 150))
  158.    draw.SimpleText("Spectators", "default", ScrW() - 175, ScrH() - ScrH() + 16, Color(0, 255, 0))
  159.  
  160.    for k, v in pairs(spectatePlayers) do
  161.         draw.SimpleText(v, "default", ScrW() - 175, ScrH() - ScrH() + 35 + x, Color(255, 255, 255, 255))
  162.         x = x + 15
  163.  
  164.  
  165.  
  166.       end
  167.    
  168.    end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement