Here is loading screen’s code:
local Main = script.Parent.bg
Main.Visible = true
script.Parent.skip.Visible = false
script.Parent.loadmore.Visible = false
local loaded = game.Players.LocalPlayer:WaitForChild("Load"):FindFirstChild("Loaded")
local ReplicatedFirst = game:GetService("ReplicatedFirst")
local ContentProvider = game:GetService("ContentProvider")
local TweenService = game:GetService("TweenService")
local Player = game:GetService("Players").LocalPlayer
local lll = Instance.new("IntValue", Player:WaitForChild("Load"))
local Holder = Main:WaitForChild("bar")
local CoreGui = game:GetService("StarterGui") --the service
CoreGui:SetCoreGuiEnabled(Enum.CoreGuiType.Health, false)
CoreGui:SetCoreGuiEnabled(Enum.CoreGuiType.Backpack, false)
CoreGui:SetCoreGuiEnabled(Enum.CoreGuiType.PlayerList, false)
CoreGui:SetCoreGuiEnabled(Enum.CoreGuiType.Chat, false)
CoreGui:SetCoreGuiEnabled(Enum.CoreGuiType.EmotesMenu, false)
CoreGui:SetCoreGuiEnabled(Enum.CoreGuiType.All, false)
local function fadeOutBackgroundAndElements()
CoreGui:SetCoreGuiEnabled(Enum.CoreGuiType.Health, true)
CoreGui:SetCoreGuiEnabled(Enum.CoreGuiType.Backpack, true)
CoreGui:SetCoreGuiEnabled(Enum.CoreGuiType.PlayerList, true)
CoreGui:SetCoreGuiEnabled(Enum.CoreGuiType.Chat, true)
CoreGui:SetCoreGuiEnabled(Enum.CoreGuiType.EmotesMenu, true)
CoreGui:SetCoreGuiEnabled(Enum.CoreGuiType.All, true)
local OutTI = TweenInfo.new(1, Enum.EasingStyle.Quint)
local ImageLabel = Main:FindFirstChild("ImageLabel")
local SkipButton = script.Parent:FindFirstChild("skip")
local morel = script.Parent:FindFirstChild("loadmore")
if morel then
TweenService:Create(morel, OutTI, {Transparency = 1}):Play()
end
if ImageLabel then
TweenService:Create(ImageLabel, OutTI, {ImageTransparency = 1}):Play()
end
if SkipButton then
TweenService:Create(SkipButton, OutTI, {TextTransparency = 1}):Play()
end
TweenService:Create(Main, OutTI, {ImageTransparency = 1}):Play()
for i, ui in pairs(Main:GetChildren()) do
if ui.ClassName == "Frame" then
TweenService:Create(ui, OutTI, {BackgroundTransparency = 1}):Play()
TweenService:Create(ui.filler, OutTI, {BackgroundTransparency = 1}):Play()
TweenService:Create(ui.loadingb, OutTI, {TextTransparency = 1}):Play()
elseif ui.ClassName == "TextLabel" then
TweenService:Create(ui, OutTI, {TextTransparency = 1}):Play()
end
if ui:FindFirstChildWhichIsA("UIStroke") then
local Stroke = ui:FindFirstChildWhichIsA("UIStroke")
TweenService:Create(Stroke, OutTI, {Transparency = 1}):Play()
end
end
end
loaded.Changed:Connect(function()
local loadingProgress = (loaded.Value / 25) * 100
Holder.loadingb.Text = "Loading Values.. (" .. loaded.Value .. "/25)"
TweenService:Create(Holder.filler, TweenInfo.new(0.1, Enum.EasingStyle.Quint, Enum.EasingDirection.Out), {Size = UDim2.fromScale(loadingProgress / 100, 1)}):Play()
-- Tarkista, onko lataus valmis
if loaded.Value == 25 then
wait(3) -- Odota hetki
fadeOutBackgroundAndElements() -- Kutsu funktiota, joka piilottaa elementit
wait(3)
Main.Parent = game.ReplicatedStorage
end
end)
script.Parent.skip.MouseButton1Click:Connect(function()
fadeOutBackgroundAndElements()
end)
while true do
if lll.Value == 1 then
script.Parent.Enabled = false
script.Parent:Destroy()
end
wait(0.5)
end
And here is from explorer: