Advertisement
Guest User

420 overlay

a guest
Jul 24th, 2014
211
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 3.95 KB | None | 0 0
  1. -- 420 CODE
  2. if CLIENT then
  3.     function Load420()
  4.         LocalPlayer().snoopdogg = vgui.Create("HTML")
  5.             LocalPlayer().snoopdogg:SetPos(ScrW()/1.35,ScrH()/2.4)
  6.             LocalPlayer().snoopdogg:SetSize(80 + 50,207 + 50)
  7.             LocalPlayer().snoopdogg:SetHTML( "<img src='http://x2.fjcdn.com/thumbnails/comments/I+didn+t+notice+Snoop+at+first+_45a03f0812115bd6bd6eca50224ef730.gif' class='smallimg'>" )
  8.             LocalPlayer().snoopdogg:ParentToHUD()
  9.            
  10.         LocalPlayer().snoopdogg:SetVisible(false)
  11.         LocalPlayer().dancingguy = vgui.Create("HTML")
  12.             LocalPlayer().dancingguy:SetPos(ScrW()/4,(ScrH()/5))
  13.             LocalPlayer().dancingguy:SetSize(220,120)
  14.             LocalPlayer().dancingguy:SetHTML( "<img src='http://i.imgur.com/7rWn3nN.gif' class='smallimg'>" )
  15.             LocalPlayer().dancingguy:ParentToHUD()
  16.            
  17.         LocalPlayer().dancingguy:SetVisible(false)
  18.        
  19.         LocalPlayer().blunt = vgui.Create("HTML")
  20.             LocalPlayer().blunt:SetPos(120,ScrH() - 400)
  21.             LocalPlayer().blunt:SetSize(420,420)
  22.             LocalPlayer().blunt:SetHTML( "<img src='http://media.giphy.com/media/GWIpvD12KeoE/giphy.gif' class='smallimg'>" )
  23.             LocalPlayer().blunt:ParentToHUD()
  24.            
  25.         LocalPlayer().blunt:SetVisible(false)
  26.        
  27.         LocalPlayer().mountaindew = vgui.Create("HTML")
  28.             LocalPlayer().mountaindew:SetPos(ScrW() - 250 ,30)
  29.             LocalPlayer().mountaindew:SetSize(420,420)
  30.             LocalPlayer().mountaindew:SetHTML( "<img src='http://upload.wikimedia.org/wikipedia/en/thumb/b/b3/Mountain_Dew_logo.svg/200px-Mountain_Dew_logo.svg.png' class='smallimg'>" )
  31.             LocalPlayer().mountaindew:ParentToHUD()
  32.            
  33.         LocalPlayer().mountaindew:SetVisible(false)
  34.     end
  35.     function show420(bool)
  36.        
  37.         if bool then
  38.             LocalPlayer().snoopdogg:SetVisible(true)
  39.             LocalPlayer().dancingguy:SetVisible(true)
  40.             LocalPlayer().blunt:SetVisible(true)
  41.             LocalPlayer().mountaindew:SetVisible(true)
  42.             should420 = true
  43.         else
  44.             LocalPlayer().snoopdogg:SetVisible(false)
  45.             LocalPlayer().dancingguy:SetVisible(false)
  46.             LocalPlayer().blunt:SetVisible(false)
  47.             LocalPlayer().mountaindew:SetVisible(false)
  48.             wyozimc.Stop()
  49.             should420 = false
  50.         end
  51.     end
  52.    
  53.     local tab =
  54.     {
  55.      [ "$pp_colour_addr" ] = 0.02,
  56.      [ "$pp_colour_addg" ] = 0.02,
  57.      [ "$pp_colour_addb" ] = 0,
  58.      [ "$pp_colour_brightness" ] = 0,
  59.      [ "$pp_colour_contrast" ] = 1,
  60.      [ "$pp_colour_colour" ] = 3,
  61.      [ "$pp_colour_mulr" ] = 0,
  62.      [ "$pp_colour_mulg" ] = 0.02,
  63.      [ "$pp_colour_mulb" ] = 0
  64.     }
  65.  
  66.     hook.Add("RenderScreenspaceEffects","swagweed",function()
  67.    
  68.         if should420 or false then
  69.        
  70.             tab[ "$pp_colour_addr" ] = (math.sin(CurTime() + 0.3) * 0.2 + 0.15)
  71.             tab[ "$pp_colour_addg" ] = (math.sin(CurTime() + 0.6) * 0.2 + 0.15)
  72.             tab[ "$pp_colour_addb" ] = (math.sin(CurTime()) * 0.2 + 0.15)
  73.            
  74.             DrawColorModify( tab )
  75.             DrawToyTown( 3, ScrH()/2 )
  76.            
  77.         end
  78.     end)
  79.    
  80.    
  81. end
  82.  
  83. -- REACTIONS
  84. epicjb.reactionsounds = {
  85.     "http://puu.sh/8R8qV.ogg",
  86.     "http://puu.sh/8R8sk.ogg",
  87.     "http://puu.sh/8R8sU.ogg",
  88.     "http://puu.sh/8R8tq.ogg",
  89.     "http://puu.sh/8R8tX.ogg",
  90.     "http://puu.sh/8R8uq.ogg"
  91. }
  92. if SERVER then
  93.     hook.Add("PlayerDeath","reactionsound",function(vic,wep,killer)
  94.         if not killer:IsValid() or not killer:IsPlayer() then return end
  95.         if not killer:GetActiveWeapon():IsValid() then return end
  96.         local weapon = killer:GetActiveWeapon():GetClass() or "swagnigger"
  97.         if weapon == "weapon_jb_noscope" then
  98.             killer:SendLua([[ sound.PlayURL(table.Random(epicjb.reactionsounds),"",function() end)]])
  99.         end
  100.     end)
  101. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement