Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Player = game.Players.LocalPlayer
- local loadingMessages = { "Loading...", "Please wait...", "Initializing..." }
- local ScreenGui = Instance.new("ScreenGui")
- local Frame = Instance.new("Frame")
- local TextLabel = Instance.new("TextLabel")
- ScreenGui.Name = "LoadingScreen"
- ScreenGui.Parent = Player:WaitForChild("PlayerGui")
- Frame.Size = UDim2.new(1, 0, 1, 0)
- Frame.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
- Frame.BackgroundTransparency = 0.4
- Frame.Parent = ScreenGui
- TextLabel.Size = UDim2.new(0, 300, 0, 50)
- TextLabel.Position = UDim2.new(0.5, -150, 0.5, -25)
- TextLabel.BackgroundTransparency = 1
- TextLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
- TextLabel.Text = "Loading..."
- TextLabel.TextSize = 32
- TextLabel.Font = Enum.Font.SourceSansBold
- TextLabel.Parent = Frame
- local index = 1
- local function updateLoadingText()
- TextLabel.Text = loadingMessages[index]
- index = index % #loadingMessages + 1
- end
- game.Loaded:Connect(function()
- wait(2)
- Frame:TweenSizeAndPosition(
- UDim2.new(0, 0, 0, 0),
- UDim2.new(0.5, 0, 0.5, 0),
- Enum.EasingDirection.Out,
- Enum.EasingStyle.Quad,
- 1,
- true,
- function()
- ScreenGui:Destroy()
- end
- )
- end)
- while ScreenGui.Parent do
- updateLoadingText()
- wait(0.8)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement