Created
May 1, 2026 17:16
-
-
Save DuyNgao2306/00aa27cf3cf99a9a3e42d482e5108295 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --// Services | |
| local Players = game:GetService("Players") | |
| local TweenService = game:GetService("TweenService") | |
| local player = Players.LocalPlayer | |
| local playerGui = player:WaitForChild("PlayerGui") | |
| -- Đợi game load | |
| if not game:IsLoaded() then | |
| game.Loaded:Wait() | |
| end | |
| --// GUI | |
| local loadingGui = Instance.new("ScreenGui") | |
| loadingGui.Name = "LoadingUI" | |
| loadingGui.Parent = playerGui | |
| 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 | |
| local sound = Instance.new("Sound", bg) | |
| sound.SoundId = "rbxassetid://6026984224" -- ID an toàn hơn | |
| sound.Volume = 1 | |
| -- Tasks load | |
| 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() task.wait(0.4) end, | |
| } | |
| local total = #tasks | |
| -- Hiệu ứng màu (có dừng) | |
| local running = true | |
| task.spawn(function() | |
| while running do | |
| TweenService:Create(bar, TweenInfo.new(0.4), { | |
| BackgroundColor3 = Color3.fromRGB( | |
| math.random(100,255), | |
| math.random(100,255), | |
| math.random(100,255) | |
| ) | |
| }):Play() | |
| task.wait(0.4) | |
| end | |
| end) | |
| -- Load | |
| for i,taskFunc in ipairs(tasks) do | |
| taskFunc() | |
| local progress = i / total | |
| TweenService:Create(bar, TweenInfo.new(0.3), { | |
| Size = UDim2.new(progress,0,1,0) | |
| }):Play() | |
| percent.Text = "Loading... "..math.floor(progress*100).."%" | |
| end | |
| -- Hoàn tất | |
| percent.Text = "Loading... 100%" | |
| bar.Size = UDim2.new(1,0,1,0) | |
| running = false | |
| task.wait(0.2) | |
| 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