Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Scraatch hack --
- --TABLES--
- local concommand = concommand
- local cvars = cvars
- local debug = debug
- local ents = ents
- local file = file
- local hook = hook
- local math = math
- local spawnmenu = spawnmenu
- local string = string
- local surface = surface
- local table = table
- local timer = timer
- local util = util
- local vgui = vgui
- local Angle = Angle
- local CreateClientConVar = CreateClientConVar
- local CurTime = CurTime
- local ErrorNoHalt = ErrorNoHalt
- local FrameTime = FrameTime
- local GetConVarString = GetConVarString
- local GetViewEntity = GetViewEntity
- local include = include
- local ipairs = ipairs
- local LocalPlayer = LocalPlayer
- local pairs = pairs
- local pcall = pcall
- local print = print
- local RunConsoleCommand = RunConsoleCommand
- local ScrH = ScrH
- local ScrW = ScrW
- local tonumber = tonumber
- local type = type
- local unpack = unpack
- local ValidEntity = IsValid
- local Vector = Vector
- -- 180 --
- concommand.Add("sc_180", function()
- local ply = LocalPlayer()
- ply:SetEyeAngles(ply:EyeAngles() + Angle(-2 * ply:EyeAngles().p, 180, 0))
- end)
- -- Box --
- local function coordinates( ent )
- local min, max = ent:OBBMins(), ent:OBBMaxs()
- local corners = {
- Vector( min.x, min.y, min.z ),
- Vector( min.x, min.y, max.z ),
- Vector( min.x, max.y, min.z ),
- Vector( min.x, max.y, max.z ),
- Vector( max.x, min.y, min.z ),
- Vector( max.x, min.y, max.z ),
- Vector( max.x, max.y, min.z ),
- Vector( max.x, max.y, max.z )
- }
- local minX, minY, maxX, maxY = ScrW() * 2, ScrH() * 2, 0, 0
- for _, corner in pairs( corners ) do
- local onScreen = ent:LocalToWorld( corner ):ToScreen()
- minX, minY = math.min( minX, onScreen.x ), math.min( minY, onScreen.y )
- maxX, maxY = math.max( maxX, onScreen.x ), math.max( maxY, onScreen.y )
- end
- return minX, minY, maxX, maxY
- end
- hook.Add("HUDPaint", "Example", function()
- for k,v in pairs(player.GetAll()) do
- local x1,y1,x2,y2 = coordinates(v)
- print(tostring(team.GetColor(v:Team())))
- surface.SetDrawColor(color_white)
- surface.DrawLine( x1, y1, math.min( x1 + 5, x2 ), y1 )
- surface.DrawLine( x1, y1, x1, math.min( y1 + 5, y2 ) )
- surface.DrawLine( x2, y1, math.max( x2 - 5, x1 ), y1 )
- surface.DrawLine( x2, y1, x2, math.min( y1 + 5, y2 ) )
- surface.DrawLine( x1, y2, math.min( x1 + 5, x2 ), y2 )
- surface.DrawLine( x1, y2, x1, math.max( y2 - 5, y1 ) )
- surface.DrawLine( x2, y2, math.max( x2 - 5, x1 ), y2 )
- surface.DrawLine( x2, y2, x2, math.max( y2 - 5, y1 ) )
- end
- end)
- local struc = {}
- struc.pos = {}
- struc.pos[1] = 100 -- x pos
- struc.pos[2] = 200 -- y pos
- struc.color = Color(255,0,0,255) -- Red
- struc.text = "Hello World" -- Text
- struc.font = "DefaultFixed" -- Font
- struc.xalign = TEXT_ALIGN_CENTER -- Horizontal Alignment
- struc.yalign = TEXT_ALIGN_CENTER -- Vertical Alignment
- draw.Text( struc )
- -- ESP --
- CreateClientConVar( "sc_esp", 0, true, false)
- local function sc_esp()
- if tobool( GetConVar( "sc_esp" ) ) then
- for k,v in pairs( player.GetAll() ) do
- local pos = (v:GetShootPos() + Vector( 0, 0, 20 ) ) :ToScreen()
- draw.SimpleTextOutlined( v:Nick(), "Default", pos.x, pos.y, Color( 0, 0, 0, 255 ), 1, 1, 1, Color( 255, 255, 255 ) )
- if v:IsAdmin() then
- draw.SimpleTextOutlined( "Admin", "Default" , pos.x + 1, pos.y + 10 , Color( 0, 0, 0, 255 ), 1, 1, 1, Color( 255, 255, 255 ) )
- if v:IsSuperAdmin() then
- draw.SimpleTextOutlined( "SuperAdmin", "Default" , pos.x + 1, pos.y +10 , Color( 0, 0, 0, 255 ), 1, 1, 1, Color( 255, 255, 255 ) )
- end
- end
- end
- end
- end
- hook.Add( "HUDPaint", "sc_esp", sc_esp )
- -- Sneaky
- CreateClientConVar( "fag", 0, true, false )
- --Spectators--
- local showSpectators = true
- hook.Add("HUDPaint", "showspectators", function()
- if GetConVarNumber( "fag" ) <= 0 then return end
- local spectatePlayers = {}
- local x = 0
- for k,v in pairs(player.GetAll()) do
- if v:GetObserverTarget() == LocalPlayer() then
- table.insert(spectatePlayers, v:Name())
- if not v.spectateNotified then
- chat.AddText(Color(100, 100, 100), "[LESP] ", Color(0, 255, 255), "Admin " .. v:Nick() .. " is spectating you!!");
- surface.PlaySound("buttons/blip1.wav");
- v.spectateNotified = true
- end
- else
- v.spectateNotified = false
- end
- end
- local textLength = surface.GetTextSize(table.concat(spectatePlayers) ) / 3
- draw.RoundedBox(1, ScrW() - 180, ScrH() - ScrH() + 15, 150, 30 + textLength, Color(0,0,0,150))
- draw.SimpleText("Spectators", "default", ScrW() - 175, ScrH() - ScrH() + 17, Color(0, 0, 0, 150))
- draw.SimpleText("Spectators", "default", ScrW() - 175, ScrH() - ScrH() + 16, Color(0, 255, 0))
- for k, v in pairs(spectatePlayers) do
- draw.SimpleText(v, "default", ScrW() - 175, ScrH() - ScrH() + 35 + x, Color(255, 255, 255, 255))
- x = x + 15
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement