Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local screenGui = Instance.new("ScreenGui")
- screenGui.Name = "KryptonLoadingScreen"
- screenGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
- screenGui.IgnoreGuiInset = true -- Ignore the top bar
- -- Create and set up the background frame
- local background = Instance.new("Frame")
- background.Name = "Background"
- background.Size = UDim2.new(1, 0, 1, 0)
- background.Position = UDim2.new(0, 0, 0, 0)
- background.BackgroundColor3 = Color3.fromRGB(27, 27, 27)
- background.Parent = screenGui
- -- Create and set up the TextLabel for the title
- local titleLabel = Instance.new("TextLabel")
- titleLabel.Name = "TitleLabel"
- titleLabel.Size = UDim2.new(0.8, 0, 0.05, 0)
- titleLabel.Position = UDim2.new(0.5, 0, 0.1, 0)
- titleLabel.AnchorPoint = Vector2.new(0.5, 0.5)
- titleLabel.BackgroundTransparency = 1
- titleLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
- titleLabel.Text = "KryptonReloaded"
- titleLabel.TextScaled = true
- titleLabel.Font = Enum.Font.SourceSansBold
- titleLabel.Parent = background
- -- Create and set up the TextLabel for the loading text
- local loadingLabel = Instance.new("TextLabel")
- loadingLabel.Name = "LoadingLabel"
- loadingLabel.Size = UDim2.new(0.2, 0, 0.05, 0)
- loadingLabel.Position = UDim2.new(0.5, 0, 0.55, 0)
- loadingLabel.AnchorPoint = Vector2.new(0.5, 0.5)
- loadingLabel.BackgroundTransparency = 1
- loadingLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
- loadingLabel.Text = "Loading..."
- loadingLabel.TextScaled = true
- loadingLabel.Font = Enum.Font.SourceSans
- loadingLabel.Parent = background
- -- Create and set up the Frame for the loading bar background
- local loadingBarBg = Instance.new("Frame")
- loadingBarBg.Name = "LoadingBarBackground"
- loadingBarBg.Size = UDim2.new(0.6, 0, 0.02, 0)
- loadingBarBg.Position = UDim2.new(0.5, 0, 0.65, 0)
- loadingBarBg.AnchorPoint = Vector2.new(0.5, 0.5)
- loadingBarBg.BackgroundColor3 = Color3.fromRGB(46, 46, 46)
- loadingBarBg.BorderSizePixel = 0
- loadingBarBg.Parent = background
- loadingBarBg.ClipsDescendants = true
- -- Create and set up the Frame for the loading bar progress
- local loadingBar = Instance.new("Frame")
- loadingBar.Name = "LoadingBar"
- loadingBar.Size = UDim2.new(0, 0, 1, 0)
- loadingBar.BackgroundColor3 = Color3.fromRGB(255, 87, 51)
- loadingBar.BorderSizePixel = 0
- loadingBar.Parent = loadingBarBg
- -- Add round corners to the loading bar background
- local uiCornerBg = Instance.new("UICorner")
- uiCornerBg.CornerRadius = UDim.new(0, 5)
- uiCornerBg.Parent = loadingBarBg
- -- Add round corners to the loading bar
- local uiCorner = Instance.new("UICorner")
- uiCorner.CornerRadius = UDim.new(0, 5)
- uiCorner.Parent = loadingBar
- -- Create and set up the TextLabel for the tip information
- local tipLabel = Instance.new("TextLabel")
- tipLabel.Name = "TipLabel"
- tipLabel.Size = UDim2.new(0.6, 0, 0.05, 0)
- tipLabel.Position = UDim2.new(0.5, 0, 0.75, 0)
- tipLabel.AnchorPoint = Vector2.new(0.5, 0.5)
- tipLabel.BackgroundTransparency = 1
- tipLabel.TextColor3 = Color3.fromRGB(255, 0, 0)
- tipLabel.TextScaled = true
- tipLabel.Font = Enum.Font.SourceSansItalic
- tipLabel.Parent = background
- -- Array of tips
- local tips = {
- "Tip: Always stay alert.",
- "Tip: Remember to save your progress.",
- "Tip: Explore every area for hidden items.",
- "Tip: Keep an eye on your health bar.",
- "Tip: Communicate with people.",
- "Tip: Upgrade your equipment regularly.",
- "Tip: Uh oh big error."
- }
- -- Function to set a random tip
- local function setRandomTip()
- local randomTip = tips[math.random(1, #tips)]
- tipLabel.Text = randomTip
- end
- -- Function to animate the loading bar
- local function animateLoadingBar()
- local TweenService = game:GetService("TweenService")
- local tweenInfo = TweenInfo.new(30, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut)
- local goal = {}
- goal.Size = UDim2.new(1, 0, 1, 0)
- local tween = TweenService:Create(loadingBar, tweenInfo, goal)
- tween:Play()
- tween.Completed:Connect(function()
- screenGui:Destroy() -- Remove the loading screen when loading is complete
- end)
- end
- -- Set a random tip and start the loading animation
- setRandomTip()
- animateLoadingBar()
Advertisement
Add Comment
Please, Sign In to add comment