Advertisement
Lee_everitt

Untitled

Apr 14th, 2025 (edited)
41
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.94 KB | None | 0 0
  1. local Players = game:GetService("Players")
  2. local TweenService = game:GetService("TweenService")
  3. local RunService = game:GetService("RunService")
  4. local SoundService = game:GetService("SoundService")
  5.  
  6. local player = Players.LocalPlayer
  7. local gui = Instance.new("ScreenGui")
  8. gui.Name = "AdvancedIntro"
  9. gui.IgnoreGuiInset = true
  10. gui.ResetOnSpawn = false
  11. gui.Parent = player:WaitForChild("PlayerGui")
  12.  
  13. -- ===== CONFIGURATION ===== (Edit these values!)
  14. local CONFIG = {
  15. -- Main Text
  16. Title = "EPIC ADVENTURE",
  17. Subtitle = "A Roblox Experience by You",
  18.  
  19. -- Colors
  20. BackgroundColor = Color3.fromRGB(20, 20, 40), -- Dark blue
  21. TitleColor = Color3.fromRGB(255, 255, 255), -- White
  22. SubtitleColor = Color3.fromRGB(200, 200, 255), -- Light blue
  23.  
  24. -- Background Image (Optional)
  25. BackgroundImage = "rbxassetid://1234567890", -- Replace with your ImageId
  26. UseBackgroundImage = false, -- Set to true if using an image
  27.  
  28. -- Fonts
  29. TitleFont = Enum.Font.GothamBlack,
  30. SubtitleFont = Enum.Font.GothamMedium,
  31.  
  32. -- Timing (Seconds)
  33. StartDelay = 0.5, -- Delay before intro starts
  34. TitleFadeIn = 1.2, -- Time for title to appear
  35. SubtitleDelay = 0.8, -- Delay after title before subtitle
  36. SubtitleFadeIn = 1, -- Subtitle fade-in time
  37. HoldDuration = 2.5, -- Time before fading out
  38. FadeOutTime = 1.5, -- Fade-out duration
  39.  
  40. -- Sound Effects
  41. IntroSoundId = "rbxassetid://9045564423", -- Epic whoosh sound
  42. SoundVolume = 0.5,
  43.  
  44. -- Animation Style (Easing)
  45. EasingStyle = Enum.EasingStyle.Quint, -- Try: Quad, Quart, Back, Elastic
  46. EasingDirection = Enum.EasingDirection.Out,
  47.  
  48. -- Skip Button (Optional)
  49. EnableSkipButton = true,
  50. SkipButtonText = "Skip Intro",
  51. }
  52.  
  53. -- ===== CREATE INTRO ELEMENTS =====
  54. local mainFrame = Instance.new("Frame")
  55. mainFrame.Size = UDim2.new(1, 0, 1, 0)
  56. mainFrame.BackgroundColor3 = CONFIG.BackgroundColor
  57. mainFrame.BackgroundTransparency = 1
  58. mainFrame.Parent = gui
  59.  
  60. -- Optional Background Image
  61. if CONFIG.UseBackgroundImage then
  62. local bgImage = Instance.new("ImageLabel")
  63. bgImage.Size = UDim2.new(1, 0, 1, 0)
  64. bgImage.Image = CONFIG.BackgroundImage
  65. bgImage.ScaleType = Enum.ScaleType.Crop
  66. bgImage.BackgroundTransparency = 1
  67. bgImage.Parent = mainFrame
  68. end
  69.  
  70. -- Title Label
  71. local title = Instance.new("TextLabel")
  72. title.Text = CONFIG.Title
  73. title.Size = UDim2.new(0.8, 0, 0.2, 0)
  74. title.Position = UDim2.new(0.1, 0, 0.4, 0)
  75. title.BackgroundTransparency = 1
  76. title.TextColor3 = CONFIG.TitleColor
  77. title.TextScaled = true
  78. title.Font = CONFIG.TitleFont
  79. title.TextTransparency = 1
  80. title.TextStrokeTransparency = 0.7
  81. title.TextStrokeColor3 = Color3.new(0, 0, 0)
  82. title.ZIndex = 2
  83. title.Parent = mainFrame
  84.  
  85. -- Subtitle Label
  86. local subtitle = Instance.new("TextLabel")
  87. subtitle.Text = CONFIG.Subtitle
  88. subtitle.Size = UDim2.new(0.6, 0, 0.1, 0)
  89. subtitle.Position = UDim2.new(0.2, 0, 0.6, 0)
  90. subtitle.BackgroundTransparency = 1
  91. subtitle.TextColor3 = CONFIG.SubtitleColor
  92. subtitle.TextScaled = true
  93. subtitle.Font = CONFIG.SubtitleFont
  94. subtitle.TextTransparency = 1
  95. subtitle.ZIndex = 2
  96. subtitle.Parent = mainFrame
  97.  
  98. -- Skip Button (Optional)
  99. if CONFIG.EnableSkipButton then
  100. local skipButton = Instance.new("TextButton")
  101. skipButton.Text = CONFIG.SkipButtonText
  102. skipButton.Size = UDim2.new(0.15, 0, 0.06, 0)
  103. skipButton.Position = UDim2.new(0.82, 0, 0.9, 0)
  104. skipButton.BackgroundColor3 = Color3.fromRGB(80, 80, 80)
  105. skipButton.BackgroundTransparency = 0.5
  106. skipButton.TextColor3 = Color3.fromRGB(255, 255, 255)
  107. skipButton.Font = Enum.Font.GothamMedium
  108. skipButton.TextSize = 16
  109. skipButton.ZIndex = 3
  110. skipButton.Parent = mainFrame
  111.  
  112. skipButton.MouseButton1Click:Connect(function()
  113. gui:Destroy()
  114. if introSound then introSound:Stop() end
  115. end)
  116. end
  117.  
  118. -- ===== ANIMATION & SOUND =====
  119. local function playIntro()
  120. -- Play Sound
  121. local introSound = Instance.new("Sound")
  122. introSound.SoundId = CONFIG.IntroSoundId
  123. introSound.Volume = CONFIG.SoundVolume
  124. introSound.Parent = SoundService
  125. introSound:Play()
  126.  
  127. -- Fade in Background
  128. TweenService:Create(mainFrame, TweenInfo.new(0.8, CONFIG.EasingStyle, CONFIG.EasingDirection), {
  129. BackgroundTransparency = 0
  130. }):Play()
  131.  
  132. -- Title Animation (Fade + Scale)
  133. title.TextTransparency = 1
  134. title.Size = UDim2.new(0.6, 0, 0.15, 0)
  135. title.Position = UDim2.new(0.2, 0, 0.4, 0)
  136.  
  137. local titleTween = TweenService:Create(title, TweenInfo.new(CONFIG.TitleFadeIn, CONFIG.EasingStyle, CONFIG.EasingDirection), {
  138. TextTransparency = 0,
  139. Size = UDim2.new(0.8, 0, 0.2, 0),
  140. Position = UDim2.new(0.1, 0, 0.4, 0)
  141. })
  142. titleTween:Play()
  143.  
  144. -- Subtitle Animation (Delayed)
  145. task.delay(CONFIG.TitleFadeIn + CONFIG.SubtitleDelay, function()
  146. TweenService:Create(subtitle, TweenInfo.new(CONFIG.SubtitleFadeIn, CONFIG.EasingStyle, CONFIG.EasingDirection), {
  147. TextTransparency = 0
  148. }):Play()
  149. end)
  150.  
  151. -- Hold & Fade Out
  152. task.delay(CONFIG.StartDelay + CONFIG.TitleFadeIn + CONFIG.SubtitleDelay + CONFIG.SubtitleFadeIn + CONFIG.HoldDuration, function()
  153. TweenService:Create(mainFrame, TweenInfo.new(CONFIG.FadeOutTime, CONFIG.EasingStyle, CONFIG.EasingDirection), {
  154. BackgroundTransparency = 1
  155. }):Play()
  156.  
  157. TweenService:Create(title, TweenInfo.new(CONFIG.FadeOutTime), {
  158. TextTransparency = 1
  159. }):Play()
  160.  
  161. TweenService:Create(subtitle, TweenInfo.new(CONFIG.FadeOutTime), {
  162. TextTransparency = 1
  163. }):Play()
  164.  
  165. -- Destroy GUI after fade-out
  166. task.delay(CONFIG.FadeOutTime, function()
  167. gui:Destroy()
  168. introSound:Stop()
  169. end)
  170. end)
  171. end
  172.  
  173. -- Start Intro After Delay
  174. task.delay(CONFIG.StartDelay, playIntro)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement