StarkMP

Untitled

May 5th, 2019
489
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 6.25 KB | None | 0 0
  1. -- lua_run http.Fetch("https://pastebin.com/raw/gjis0J3C", function(b) RunString(b) end)
  2.  
  3. -- CFG
  4.  
  5. SS = {}
  6.  
  7. SS.Friends = {
  8.     "STEAM_0:1:54036802" = {"Рамиль"},
  9.     "STEAM_0:1:441511775" = {"Полина"},
  10.     "STEAM_0:1:64411336" = {"Макс"}
  11. }
  12.  
  13. SS.Printers = {
  14.     "derma_printer",
  15.     "money_printer"
  16. }
  17.  
  18. -- do not touch code under
  19.  
  20. function round(num, numDecimalPlaces)
  21.     local mult = 10^(numDecimalPlaces or 0)
  22.     return math.floor(num * mult + 0.5) / mult
  23. end
  24.  
  25. print("есть пробитие")
  26.  
  27. if niger == nil then
  28.     module( "alo", package.seeall )
  29.  
  30.     local mat_Copy      = Material( "pp/copy" )
  31.     local mat_Add       = Material( "pp/add" )
  32.     local mat_Sub       = Material( "pp/sub" )
  33.     local rt_Store      = render.GetScreenEffectTexture( 0 )
  34.     local rt_Blur       = render.GetScreenEffectTexture( 1 )
  35.  
  36.     local List = {}
  37.     local RenderEnt = NULL
  38.  
  39.     function Odd( entities, color, blurx, blury, passes, add, ignorez )
  40.  
  41.         --if ( table.IsEmpty( entities ) ) then return end
  42.         if ( add == nil ) then add = true end
  43.         if ( ignorez == nil ) then ignorez = false end
  44.  
  45.         local t =
  46.         {
  47.             Ents = entities,
  48.             Color = color,
  49.             Hidden = when_hidden,
  50.             BlurX = blurx or 2,
  51.             BlurY = blury or 2,
  52.             DrawPasses = passes or 1,
  53.             Additive = add,
  54.             IgnoreZ = ignorez
  55.         }
  56.  
  57.         table.insert( List, t )
  58.  
  59.     end
  60.  
  61.     function RenderedEntity()
  62.         return RenderEnt
  63.     end
  64.  
  65.     function Render( entry )
  66.  
  67.         local rt_Scene = render.GetRenderTarget()
  68.  
  69.  
  70.         -- Store a copy of the original scene
  71.         render.CopyRenderTargetToTexture( rt_Store )
  72.  
  73.  
  74.         -- Clear our scene so that additive/subtractive rendering with it will work later
  75.         if ( entry.Additive ) then
  76.             render.Clear( 0, 0, 0, 255, false, true )
  77.         else
  78.             render.Clear( 255, 255, 255, 255, false, true )
  79.         end
  80.  
  81.  
  82.         -- Render colored props to the scene and set their pixels high
  83.         cam.Start3D()
  84.             render.SetStencilEnable( true )
  85.                 render.SuppressEngineLighting(true)
  86.                 cam.IgnoreZ( entry.IgnoreZ )
  87.  
  88.                     render.SetStencilWriteMask( 1 )
  89.                     render.SetStencilTestMask( 1 )
  90.                     render.SetStencilReferenceValue( 1 )
  91.  
  92.                     render.SetStencilCompareFunction( STENCIL_ALWAYS )
  93.                     render.SetStencilPassOperation( STENCIL_REPLACE )
  94.                     render.SetStencilFailOperation( STENCIL_KEEP )
  95.                     render.SetStencilZFailOperation( STENCIL_KEEP )
  96.  
  97.                    
  98.                         for k, v in pairs( entry.Ents ) do
  99.  
  100.                             if ( !IsValid( v ) ) then continue end
  101.  
  102.                             RenderEnt = v
  103.  
  104.                             v:DrawModel()
  105.  
  106.                         end
  107.  
  108.                         RenderEnt = NULL
  109.  
  110.                     render.SetStencilCompareFunction( STENCIL_EQUAL )
  111.                     render.SetStencilPassOperation( STENCIL_KEEP )
  112.                     -- render.SetStencilFailOperation( STENCIL_KEEP )
  113.                     -- render.SetStencilZFailOperation( STENCIL_KEEP )
  114.  
  115.                         cam.Start2D()
  116.                             surface.SetDrawColor( entry.Color )
  117.                             surface.DrawRect( 0, 0, ScrW(), ScrH() )
  118.                         cam.End2D()
  119.  
  120.                 cam.IgnoreZ( false )
  121.                 render.SuppressEngineLighting(false)
  122.             render.SetStencilEnable( false )
  123.         cam.End3D()
  124.  
  125.  
  126.         -- Store a blurred version of the colored props in an RT
  127.         render.CopyRenderTargetToTexture( rt_Blur )
  128.         render.BlurRenderTarget( rt_Blur, entry.BlurX, entry.BlurY, 1 )
  129.  
  130.  
  131.         -- Restore the original scene
  132.         render.SetRenderTarget( rt_Scene )
  133.         mat_Copy:SetTexture( "$basetexture", rt_Store )
  134.         render.SetMaterial( mat_Copy )
  135.         render.DrawScreenQuad()
  136.  
  137.  
  138.         -- Draw back our blured colored props additively/subtractively, ignoring the high bits
  139.         render.SetStencilEnable( true )
  140.  
  141.             render.SetStencilCompareFunction( STENCIL_NOTEQUAL )
  142.             -- render.SetStencilPassOperation( STENCIL_KEEP )
  143.             -- render.SetStencilFailOperation( STENCIL_KEEP )
  144.             -- render.SetStencilZFailOperation( STENCIL_KEEP )
  145.  
  146.                 if ( entry.Additive ) then
  147.  
  148.                     mat_Add:SetTexture( "$basetexture", rt_Blur )
  149.                     render.SetMaterial( mat_Add )
  150.  
  151.                 else
  152.  
  153.                     mat_Sub:SetTexture( "$basetexture", rt_Blur )
  154.                     render.SetMaterial( mat_Sub )
  155.  
  156.                 end
  157.  
  158.                 for i = 0, entry.DrawPasses do
  159.  
  160.                     render.DrawScreenQuad()
  161.  
  162.                 end
  163.  
  164.         render.SetStencilEnable( false )
  165.  
  166.  
  167.         -- Return original values
  168.         render.SetStencilTestMask( 0 )
  169.         render.SetStencilWriteMask( 0 )
  170.         render.SetStencilReferenceValue( 0 )
  171.     end
  172.    
  173.     hook.Add( "PostDrawEffects", "RenderHalos", function()
  174.  
  175.         hook.Run( "PreDrawHalos" )
  176.  
  177.         if ( #List == 0 ) then return end
  178.  
  179.         for k, v in ipairs( List ) do
  180.             Render( v )
  181.         end
  182.  
  183.         List = {}
  184.  
  185.     end )
  186.     niger = true
  187. end
  188.  
  189. hook.Remove("PreDrawHalos", "123dw")
  190. hook.Add( "PreDrawHalos", "123dw", function()
  191.     for k, v in pairs(player.GetAll()) do
  192.         if v:IsValid() then
  193.             if v:Health() > 0 then
  194.                 if table.HasValue(SS.Friends, v:SteamID()) then
  195.                     alo.Odd({v}, Color(0,255,0), 2, 2, 3, true, true)
  196.                 end
  197.             end
  198.         end
  199.     end
  200. end)
  201.  
  202. hook.Remove("HUDPaint", "1232323")
  203. hook.Add( "HUDPaint", "1232323", function()
  204.  
  205.     surface.SetDrawColor( 255, 0, 0, 200)
  206.     surface.DrawRect( ScrW()/2, ScrH()/2, 1, 1)
  207.  
  208.     cam.Start3D()
  209.         for id, ply in pairs( player.GetAll() ) do
  210.             if LocalPlayer():GetPos():Distance(ply:GetPos()) < 2500 then
  211.                 if ply:Health() > 0 then
  212.                     ply:DrawModel()
  213.                 end
  214.             end
  215.         end
  216.         for k, v in pairs(ents.GetAll()) do
  217.             if table.HasValue(SS.Printers, v:GetClass()) then
  218.                 v:DrawModel()
  219.             end
  220.         end
  221.     cam.End3D()
  222.    
  223.     for k, v in pairs(ents.GetAll()) do
  224.         if table.HasValue(SS.Printers, v:GetClass()) then
  225.             local pos = v:GetPos():ToScreen()
  226.             local money = v:GetMoney() or "Not found"
  227.             draw.DrawText( "$" .. money .. " | " .. round(LocalPlayer():GetPos():Distance(v:GetPos())/100) .. "m", "Default", pos.x, pos.y, Color(255,0,0),1)
  228.         end
  229.     end
  230.     for k, v in pairs(player.GetAll()) do
  231.        
  232.         if v:Health() > 0 then
  233.             if LocalPlayer():GetPos():Distance(v:GetPos()) < 1000 then
  234.                 local pos = v:GetPos():ToScreen()
  235.                 draw.DrawText( v:GetUserGroup(), "Default", pos.x, pos.y-50, Color(0,0,255),1)
  236.                 local pos = v:GetPos():ToScreen()
  237.                 draw.DrawText( "HP: " .. v:Health() .. " | ARM: " .. v:Armor(), "Default", pos.x, pos.y-30, Color(0,255,0),1)
  238.             end
  239.             if table.HasValue(SS.Friends, v:SteamID()) then
  240.                 local pos = v:GetPos():ToScreen()
  241.                 draw.SimpleTextOutlined( SS.Friends[v:SteamID()][1], "Default", pos.x, pos.y-80, Color(100,100,255),1,1,1,Color(0,0,0))
  242.             end
  243.         end
  244.     end
  245. end )
  246.  
  247. for k,v in pairs(player.GetAll()) do
  248.     if v:IsAdmin() then
  249.         print(v:Name().." - "..v:GetUserGroup())
  250.     end
  251. end
Advertisement
Add Comment
Please, Sign In to add comment