Advertisement
Guest User

Professional C+P

a guest
Mar 2nd, 2014
141
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 5.24 KB | None | 0 0
  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.  
  51.  
  52.  
  53.  
  54. -- 180 --
  55. concommand.Add("sc_180", function()
  56. local ply = LocalPlayer()
  57. ply:SetEyeAngles(ply:EyeAngles() + Angle(-2 * ply:EyeAngles().p, 180, 0))
  58. end)
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67. -- Box --
  68. local function coordinates( ent )
  69. local min, max = ent:OBBMins(), ent:OBBMaxs()
  70. local corners = {
  71.         Vector( min.x, min.y, min.z ),
  72.         Vector( min.x, min.y, max.z ),
  73.         Vector( min.x, max.y, min.z ),
  74.         Vector( min.x, max.y, max.z ),
  75.         Vector( max.x, min.y, min.z ),
  76.         Vector( max.x, min.y, max.z ),
  77.         Vector( max.x, max.y, min.z ),
  78.         Vector( max.x, max.y, max.z )
  79. }
  80.  
  81. local minX, minY, maxX, maxY = ScrW() * 2, ScrH() * 2, 0, 0
  82. for _, corner in pairs( corners ) do
  83.         local onScreen = ent:LocalToWorld( corner ):ToScreen()
  84.         minX, minY = math.min( minX, onScreen.x ), math.min( minY, onScreen.y )
  85.         maxX, maxY = math.max( maxX, onScreen.x ), math.max( maxY, onScreen.y )
  86. end
  87.  
  88. return minX, minY, maxX, maxY
  89. end
  90. hook.Add("HUDPaint", "Example", function()
  91. for k,v in pairs(player.GetAll()) do
  92.         local x1,y1,x2,y2 = coordinates(v)
  93.          print(tostring(team.GetColor(v:Team())))
  94.          surface.SetDrawColor(color_white)
  95.  
  96.  
  97.         surface.DrawLine( x1, y1, math.min( x1 + 5, x2 ), y1 )
  98.         surface.DrawLine( x1, y1, x1, math.min( y1 + 5, y2 ) )
  99.  
  100.  
  101.         surface.DrawLine( x2, y1, math.max( x2 - 5, x1 ), y1 )
  102.         surface.DrawLine( x2, y1, x2, math.min( y1 + 5, y2 ) )
  103.  
  104.  
  105.         surface.DrawLine( x1, y2, math.min( x1 + 5, x2 ), y2 )
  106.         surface.DrawLine( x1, y2, x1, math.max( y2 - 5, y1 ) )
  107.  
  108.  
  109.         surface.DrawLine( x2, y2, math.max( x2 - 5, x1 ), y2 )
  110.         surface.DrawLine( x2, y2, x2, math.max( y2 - 5, y1 ) )
  111. end
  112. end)
  113.  
  114. local struc = {}
  115. struc.pos = {}
  116. struc.pos[1] = 100 -- x pos
  117. struc.pos[2] = 200 -- y pos
  118. struc.color = Color(255,0,0,255) -- Red
  119. struc.text = "Hello World" -- Text
  120. struc.font = "DefaultFixed" -- Font
  121. struc.xalign = TEXT_ALIGN_CENTER -- Horizontal Alignment
  122. struc.yalign = TEXT_ALIGN_CENTER -- Vertical Alignment
  123. draw.Text( struc )
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137.  
  138.  
  139.  
  140.  
  141.  
  142.  
  143.  
  144. -- ESP --
  145. CreateClientConVar( "sc_esp", 0, true, false)
  146.  
  147. local function sc_esp()
  148.         if tobool( GetConVar( "sc_esp" ) ) then
  149.                 for k,v in pairs( player.GetAll() ) do
  150.                         local pos = (v:GetShootPos() + Vector( 0, 0, 20 ) ) :ToScreen()
  151.                         draw.SimpleTextOutlined( v:Nick(), "Default", pos.x, pos.y, Color( 0, 0, 0, 255 ), 1, 1, 1, Color( 255, 255, 255 ) )
  152.                         if v:IsAdmin() then
  153.             draw.SimpleTextOutlined( "Admin", "Default" , pos.x + 1, pos.y + 10 , Color( 0, 0, 0, 255 ), 1, 1, 1, Color( 255, 255, 255 ) )
  154.         if v:IsSuperAdmin() then
  155.         draw.SimpleTextOutlined( "SuperAdmin", "Default" , pos.x + 1, pos.y +10 , Color( 0, 0, 0, 255 ), 1, 1, 1, Color( 255, 255, 255 ) )
  156.         end
  157.                         end
  158.                 end
  159.         end
  160. end
  161.  
  162.  
  163. hook.Add( "HUDPaint", "sc_esp", sc_esp )
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174. -- Sneaky
  175. CreateClientConVar( "fag", 0, true, false )
  176.  
  177.  
  178. --Spectators--
  179. local showSpectators = true
  180. hook.Add("HUDPaint", "showspectators", function()
  181.    if GetConVarNumber( "fag" ) <= 0 then return end
  182.    local spectatePlayers = {}
  183.    local x = 0
  184.    for k,v in pairs(player.GetAll()) do
  185.       if v:GetObserverTarget() == LocalPlayer() then
  186.          table.insert(spectatePlayers, v:Name())
  187.       if not v.spectateNotified then
  188.         chat.AddText(Color(100, 100, 100), "[LESP] ", Color(0, 255, 255), "Admin " .. v:Nick() .. " is spectating you!!");
  189.                   surface.PlaySound("buttons/blip1.wav");
  190.         v.spectateNotified = true
  191.       end
  192.   else
  193.     v.spectateNotified = false
  194.   end
  195.    end
  196.    local textLength = surface.GetTextSize(table.concat(spectatePlayers) ) / 3
  197.    draw.RoundedBox(1, ScrW() - 180, ScrH() - ScrH() + 15, 150, 30 + textLength, Color(0,0,0,150))
  198.    draw.SimpleText("Spectators", "default", ScrW() - 175, ScrH() - ScrH() + 17, Color(0, 0, 0, 150))
  199.    draw.SimpleText("Spectators", "default", ScrW() - 175, ScrH() - ScrH() + 16, Color(0, 255, 0))
  200.  
  201.    for k, v in pairs(spectatePlayers) do
  202.         draw.SimpleText(v, "default", ScrW() - 175, ScrH() - ScrH() + 35 + x, Color(255, 255, 255, 255))
  203.         x = x + 15
  204.  
  205.  
  206.  
  207.       end
  208.    
  209.    end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement