Guest User

Untitled

a guest
Feb 21st, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.74 KB | None | 0 0
  1. include( 'shared.lua' );
  2. include( 'vgui/hud.lua' );
  3. include( 'vgui/extras.lua' );
  4. include( 'vgui/3d2dtexts.lua' );
  5. include( 'vgui/gmodlegs.lua' );
  6.  
  7.  
  8. -- Clientside only stuff goes here
  9. surface.CreateFont ("Myriad Pro", 70, 0, true, false, "IntroFontDork");
  10. surface.CreateFont ("Myriad Pro", 250, 0, true, false, "IntroductionRP");
  11. surface.CreateFont ("Myriad Pro", 20, 400, true, false, "IntroSmallCredits");
  12. surface.CreateFont ("Myriad Pro", 70, 0, true, false, "IntroBiglCredit");
  13.  
  14. local tex = surface.GetTextureID("pathtotexture") -- <<----EDIT ME!!!!!!!!
  15.  
  16. local fadeA = 50;
  17. local fadeB = 0;
  18. local introEnabled = true
  19.  
  20. local up = true;
  21.  
  22. hook.Add("HUDPaint","DrawMyIntroText",function()
  23.    
  24.     if introEnabled == true then
  25.         if fadeA < 255 and up then
  26.             fadeA = Lerp(0.05,fadeA,255);
  27.         elseif fadeB > 254 and not up then
  28.             fadeA = Lerp(0.1,fadeA,0);
  29.         end
  30.         if fadeA > 254 and up then
  31.             fadeB = Lerp(0.05,fadeB,255);
  32.         if fadeA < 1 and not up then
  33.             fadeB = Lerp(0.1,fadeB,0);
  34.         end
  35.  
  36.         if fadeB  < 1 and not up then
  37.             intoEnabled = false;
  38.         end
  39.  
  40.         surface.SetDrawColor(0,0,0,255);
  41.         surface.DrawRect(0,0,ScrW(),ScrH());
  42.  
  43.         if tex then
  44.             surface.SetTexture(tex);
  45.             surface.DrawTexturedRect(0,0,ScrW(),ScrH());
  46.         end
  47.  
  48.         draw.DrawText("Dork", "IntroFontDork", ScrW() / 2 - 60, ScrH() - 777, Color(0, 96, 255, fadeA),TEXT_ALIGN_CENTER)
  49.         draw.DrawText("RP", "IntroductionRP", ScrW() / 2 + 60, ScrH() - 822, Color(255, 255, 255, fadeA),TEXT_ALIGN_CENTER)
  50.         draw.DrawText("A Gamemode by", "IntroSmallCredits", ScrW() - 1400, ScrH() - 400, Color(255, 255, 255, fadeB),TEXT_ALIGN_CENTER)
  51.         draw.DrawText("Dorkslayz", "IntroBiglCredit", ScrW() - 1300, ScrH() - 370, Color(0, 96, 255, fadeB),TEXT_ALIGN_CENTER)
  52.     else
  53.     end
  54. end);
Add Comment
Please, Sign In to add comment