UI/UX
Loading Screen
Paste into ReplicatedFirst as a LocalScript. Replaces the default loading screen with a progress bar that finishes when the game has loaded.
-- Paste into ReplicatedFirst as a LocalScript.
local Players = game:GetService("Players")
local ReplicatedFirst = game:GetService("ReplicatedFirst")
local player = Players.LocalPlayer
local playerGui = player:WaitForChild("PlayerGui")
local gui = Instance.new("ScreenGui")
gui.Name = "LoadingScreen"
gui.IgnoreGuiInset = true
gui.ResetOnSpawn = false
gui.DisplayOrder = 100
gui.Parent = playerGui
local background = Instance.new("Frame")
background.Size = UDim2.fromScale(1, 1)
background.BackgroundColor3 = Color3.fromRGB(15, 17, 21)
background.BorderSizePixel = 0
background.Parent = gui
local title = Instance.new("TextLabel")
title.AnchorPoint = Vector2.new(0.5, 0.5)
title.Position = UDim2.fromScale(0.5, 0.46)
title.Size = UDim2.fromOffset(360, 40)
title.BackgroundTransparency = 1
title.Text = "Loading"
title.TextColor3 = Color3.new(1, 1, 1)
title.Font = Enum.Font.GothamBold
title.TextSize = 28
title.Parent = background
local barBack = Instance.new("Frame")
barBack.AnchorPoint = Vector2.new(0.5, 0.5)
barBack.Position = UDim2.fromScale(0.5, 0.56)
barBack.Size = UDim2.fromOffset(320, 14)
barBack.BackgroundColor3 = Color3.fromRGB(30, 35, 48)
barBack.BorderSizePixel = 0
barBack.Parent = background
local fill = Instance.new("Frame")
fill.Size = UDim2.fromScale(0, 1)
fill.BackgroundColor3 = Color3.fromRGB(99, 102, 241)
fill.BorderSizePixel = 0
fill.Parent = barBack
ReplicatedFirst:RemoveDefaultLoadingScreen()
local progress = 0
while progress < 1 do
if game:IsLoaded() then
progress = 1
else
progress = math.min(0.9, progress + 0.04)
end
fill.Size = UDim2.fromScale(progress, 1)
task.wait(0.08)
end
gui:Destroy()