local function Z(Z)clonedLoadingScreen.Frame.Pattern:TweenPosition(UDim2.new(1,0,.5,0),"\079\117\116","\076\105\110\101\097\114",20,false,Z)end local function Q(A)if A==Enum.TweenStatus.Completed then clonedLoadingScreen.Frame.Pattern.Position=UDim2.new(0,0,.5,0)Z(Q)end end Z(Q)skipButton.MouseButton1Down:Connect(function()hideLoadingScreen()end)frame.Visible=true local A=game:GetDescendants()local F=os.clock()for Z=1,#A,1 do local Q=A[Z]ContentProvider:PreloadAsync({Q})loadingPercentage.Text="\076\111\097\100\105\110\103 \101\120\112\101\114\105\101\110\099\101 - "..(Z..("\047"..#A))ResizeBar(Z/#A)end hideLoadingScreen()local b=os.clock()-F print(("\076\111\097\100\105\110\103 \099\111\109\112\108\101\116\101\044 \116\105\109\101\058 \037\046\050\102"):format(b))
-- Animate the Background
local function imageTween(whenTweenCompleted)
	clonedLoadingScreen.Frame.Pattern:TweenPosition(
		UDim2.new(1, 0, 0.5, 0),
		"Out",
		"Linear",
		20,
		false,
		whenTweenCompleted
	)
end
local function whenTweenCompleted(state)
	if state == Enum.TweenStatus.Completed then
		clonedLoadingScreen.Frame.Pattern.Position = UDim2.new(0, 0, 0.5, 0)
		imageTween(whenTweenCompleted)
	end
end
imageTween(whenTweenCompleted)

skipButton.MouseButton1Down:Connect(function()
	hideLoadingScreen()
end)

frame.Visible = true

local Assets = game:GetDescendants()

local startTime = os.clock()

for i = 1, #Assets do
	local asset = Assets[i]
	ContentProvider:PreloadAsync({ asset })
	loadingPercentage.Text = "Loading experience - " .. i .. "/" .. #Assets
	ResizeBar(i / #Assets)
end

hideLoadingScreen()

local deltaTime = os.clock() - startTime
print(("Loading complete, time: %.2f"):format(deltaTime))
