Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Players = game:GetService("Players")
- local TweenService = game:GetService("TweenService")
- local RunService = game:GetService("RunService")
- local SoundService = game:GetService("SoundService")
- local player = Players.LocalPlayer
- local gui = Instance.new("ScreenGui")
- gui.Name = "AdvancedIntro"
- gui.IgnoreGuiInset = true
- gui.ResetOnSpawn = false
- gui.Parent = player:WaitForChild("PlayerGui")
- -- ===== CONFIGURATION ===== (Edit these values!)
- local CONFIG = {
- -- Main Text
- Title = "EPIC ADVENTURE",
- Subtitle = "A Roblox Experience by You",
- -- Colors
- BackgroundColor = Color3.fromRGB(20, 20, 40), -- Dark blue
- TitleColor = Color3.fromRGB(255, 255, 255), -- White
- SubtitleColor = Color3.fromRGB(200, 200, 255), -- Light blue
- -- Background Image (Optional)
- BackgroundImage = "rbxassetid://1234567890", -- Replace with your ImageId
- UseBackgroundImage = false, -- Set to true if using an image
- -- Fonts
- TitleFont = Enum.Font.GothamBlack,
- SubtitleFont = Enum.Font.GothamMedium,
- -- Timing (Seconds)
- StartDelay = 0.5, -- Delay before intro starts
- TitleFadeIn = 1.2, -- Time for title to appear
- SubtitleDelay = 0.8, -- Delay after title before subtitle
- SubtitleFadeIn = 1, -- Subtitle fade-in time
- HoldDuration = 2.5, -- Time before fading out
- FadeOutTime = 1.5, -- Fade-out duration
- -- Sound Effects
- IntroSoundId = "rbxassetid://9045564423", -- Epic whoosh sound
- SoundVolume = 0.5,
- -- Animation Style (Easing)
- EasingStyle = Enum.EasingStyle.Quint, -- Try: Quad, Quart, Back, Elastic
- EasingDirection = Enum.EasingDirection.Out,
- -- Skip Button (Optional)
- EnableSkipButton = true,
- SkipButtonText = "Skip Intro",
- }
- -- ===== CREATE INTRO ELEMENTS =====
- local mainFrame = Instance.new("Frame")
- mainFrame.Size = UDim2.new(1, 0, 1, 0)
- mainFrame.BackgroundColor3 = CONFIG.BackgroundColor
- mainFrame.BackgroundTransparency = 1
- mainFrame.Parent = gui
- -- Optional Background Image
- if CONFIG.UseBackgroundImage then
- local bgImage = Instance.new("ImageLabel")
- bgImage.Size = UDim2.new(1, 0, 1, 0)
- bgImage.Image = CONFIG.BackgroundImage
- bgImage.ScaleType = Enum.ScaleType.Crop
- bgImage.BackgroundTransparency = 1
- bgImage.Parent = mainFrame
- end
- -- Title Label
- local title = Instance.new("TextLabel")
- title.Text = CONFIG.Title
- title.Size = UDim2.new(0.8, 0, 0.2, 0)
- title.Position = UDim2.new(0.1, 0, 0.4, 0)
- title.BackgroundTransparency = 1
- title.TextColor3 = CONFIG.TitleColor
- title.TextScaled = true
- title.Font = CONFIG.TitleFont
- title.TextTransparency = 1
- title.TextStrokeTransparency = 0.7
- title.TextStrokeColor3 = Color3.new(0, 0, 0)
- title.ZIndex = 2
- title.Parent = mainFrame
- -- Subtitle Label
- local subtitle = Instance.new("TextLabel")
- subtitle.Text = CONFIG.Subtitle
- subtitle.Size = UDim2.new(0.6, 0, 0.1, 0)
- subtitle.Position = UDim2.new(0.2, 0, 0.6, 0)
- subtitle.BackgroundTransparency = 1
- subtitle.TextColor3 = CONFIG.SubtitleColor
- subtitle.TextScaled = true
- subtitle.Font = CONFIG.SubtitleFont
- subtitle.TextTransparency = 1
- subtitle.ZIndex = 2
- subtitle.Parent = mainFrame
- -- Skip Button (Optional)
- if CONFIG.EnableSkipButton then
- local skipButton = Instance.new("TextButton")
- skipButton.Text = CONFIG.SkipButtonText
- skipButton.Size = UDim2.new(0.15, 0, 0.06, 0)
- skipButton.Position = UDim2.new(0.82, 0, 0.9, 0)
- skipButton.BackgroundColor3 = Color3.fromRGB(80, 80, 80)
- skipButton.BackgroundTransparency = 0.5
- skipButton.TextColor3 = Color3.fromRGB(255, 255, 255)
- skipButton.Font = Enum.Font.GothamMedium
- skipButton.TextSize = 16
- skipButton.ZIndex = 3
- skipButton.Parent = mainFrame
- skipButton.MouseButton1Click:Connect(function()
- gui:Destroy()
- if introSound then introSound:Stop() end
- end)
- end
- -- ===== ANIMATION & SOUND =====
- local function playIntro()
- -- Play Sound
- local introSound = Instance.new("Sound")
- introSound.SoundId = CONFIG.IntroSoundId
- introSound.Volume = CONFIG.SoundVolume
- introSound.Parent = SoundService
- introSound:Play()
- -- Fade in Background
- TweenService:Create(mainFrame, TweenInfo.new(0.8, CONFIG.EasingStyle, CONFIG.EasingDirection), {
- BackgroundTransparency = 0
- }):Play()
- -- Title Animation (Fade + Scale)
- title.TextTransparency = 1
- title.Size = UDim2.new(0.6, 0, 0.15, 0)
- title.Position = UDim2.new(0.2, 0, 0.4, 0)
- local titleTween = TweenService:Create(title, TweenInfo.new(CONFIG.TitleFadeIn, CONFIG.EasingStyle, CONFIG.EasingDirection), {
- TextTransparency = 0,
- Size = UDim2.new(0.8, 0, 0.2, 0),
- Position = UDim2.new(0.1, 0, 0.4, 0)
- })
- titleTween:Play()
- -- Subtitle Animation (Delayed)
- task.delay(CONFIG.TitleFadeIn + CONFIG.SubtitleDelay, function()
- TweenService:Create(subtitle, TweenInfo.new(CONFIG.SubtitleFadeIn, CONFIG.EasingStyle, CONFIG.EasingDirection), {
- TextTransparency = 0
- }):Play()
- end)
- -- Hold & Fade Out
- task.delay(CONFIG.StartDelay + CONFIG.TitleFadeIn + CONFIG.SubtitleDelay + CONFIG.SubtitleFadeIn + CONFIG.HoldDuration, function()
- TweenService:Create(mainFrame, TweenInfo.new(CONFIG.FadeOutTime, CONFIG.EasingStyle, CONFIG.EasingDirection), {
- BackgroundTransparency = 1
- }):Play()
- TweenService:Create(title, TweenInfo.new(CONFIG.FadeOutTime), {
- TextTransparency = 1
- }):Play()
- TweenService:Create(subtitle, TweenInfo.new(CONFIG.FadeOutTime), {
- TextTransparency = 1
- }):Play()
- -- Destroy GUI after fade-out
- task.delay(CONFIG.FadeOutTime, function()
- gui:Destroy()
- introSound:Stop()
- end)
- end)
- end
- -- Start Intro After Delay
- task.delay(CONFIG.StartDelay, playIntro)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement