-- loading screen
local ReplicatedFirst = game:GetService("ReplicatedFirst")
ReplicatedFirst:RemoveDefaultLoadingScreen()
local StarterGui = game:GetService("StarterGui")
StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.All, false)
local Players = game:GetService("Players")
local Player = Players.LocalPlayer
local PlayerGui = Player.PlayerGui
local ScreenGui = ReplicatedFirst.Loading
ScreenGui.IgnoreGuiInset = true
ScreenGui.Parent = PlayerGui
-- check for items loaded
-- wait for game laod
if not game:IsLoaded() then
game.Loaded:Wait()
end
task.wait(5)
-- add player gui interface items
StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Chat, true)
StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Backpack, true)
-- destory the loading screen overlay
ScreenGui:Destroy()