Skip to content

Instantly share code, notes, and snippets.

@DuyNgao2306
Created May 1, 2026 17:07
Show Gist options
  • Select an option

  • Save DuyNgao2306/13e31bed04df97751098bc8984dd5b15 to your computer and use it in GitHub Desktop.

Select an option

Save DuyNgao2306/13e31bed04df97751098bc8984dd5b15 to your computer and use it in GitHub Desktop.
--// Loading Screen PRO
local TweenService = game:GetService("TweenService")
local loadingGui = Instance.new("ScreenGui", playerGui)
loadingGui.Name = "LoadingUI"
local bg = Instance.new("Frame", loadingGui)
bg.Size = UDim2.new(1,0,1,0)
bg.BackgroundColor3 = Color3.fromRGB(0,0,0)
-- Logo
local logo = Instance.new("ImageLabel", bg)
logo.Size = UDim2.new(0,100,0,100)
logo.Position = UDim2.new(0.5,-50,0.35,-50)
logo.BackgroundTransparency = 1
logo.Image = "rbxassetid://7120937379"
-- Tên
local title = Instance.new("TextLabel", bg)
title.Size = UDim2.new(1,0,0,40)
title.Position = UDim2.new(0,0,0.5,0)
title.BackgroundTransparency = 1
title.Text = "Crow"
title.TextColor3 = Color3.fromRGB(255,255,255)
title.Font = Enum.Font.GothamBold
title.TextScaled = true
-- Thanh nền
local barBg = Instance.new("Frame", bg)
barBg.Size = UDim2.new(0.4,0,0,20)
barBg.Position = UDim2.new(0.3,0,0.65,0)
barBg.BackgroundColor3 = Color3.fromRGB(50,50,50)
Instance.new("UICorner", barBg).CornerRadius = UDim.new(0,8)
-- Thanh load
local bar = Instance.new("Frame", barBg)
bar.Size = UDim2.new(0,0,1,0)
bar.BackgroundColor3 = Color3.fromRGB(0,170,255)
Instance.new("UICorner", bar).CornerRadius = UDim.new(0,8)
-- Text %
local percent = Instance.new("TextLabel", bg)
percent.Size = UDim2.new(1,0,0,30)
percent.Position = UDim2.new(0,0,0.7,0)
percent.BackgroundTransparency = 1
percent.TextColor3 = Color3.fromRGB(255,255,255)
percent.Font = Enum.Font.Gotham
percent.TextScaled = true
-- Sound khi load xong
local sound = Instance.new("Sound", bg)
sound.SoundId = "rbxassetid://140157883905209" -- đổi ID nếu muốn
sound.Volume = 1
-- Danh sách task "load thật"
local tasks = {
function() task.wait(0.5) end,
function() game:GetService("Players") end,
function() game:GetService("RunService") end,
function() task.wait(0.3) end,
function() game:IsLoaded() end,
function() task.wait(0.4) end,
}
local total = #tasks
local current = 0
-- Hiệu ứng màu + nhấp nháy
task.spawn(function()
while true do
local tween = TweenService:Create(bar, TweenInfo.new(0.5), {
BackgroundColor3 = Color3.fromRGB(
math.random(0,255),
math.random(0,255),
math.random(0,255)
)
})
tween:Play()
task.wait(0.5)
end
end)
-- Load thật
for i,taskFunc in ipairs(tasks) do
taskFunc()
current = i
local progress = current / total
-- Tween thanh load
TweenService:Create(bar, TweenInfo.new(0.3), {
Size = UDim2.new(progress,0,1,0)
}):Play()
percent.Text = "Loading... "..math.floor(progress*100).."%"
end
-- Đảm bảo lên 100%
percent.Text = "Loading... 100%"
TweenService:Create(bar, TweenInfo.new(0.3), {
Size = UDim2.new(1,0,1,0)
}):Play()
task.wait(0.3)
-- Phát sound
sound:Play()
-- Fade out
for i = 1,10 do
bg.BackgroundTransparency += 0.1
task.wait(0.05)
end
loadingGui:Destroy()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment