-- loop

local count = 0
local startTick = tick()
while true do 
	local timeElapsed = tick() - startTick
	-- if the game has loaded and the minimum time has elapsed then break the loop
	if game:IsLoaded() and timeElapsed > MIN_TIME and game.Workspace.Finish.Value==1 then
		break
	end

	-- animate the text 
	textLabel.Text = "Loading " .. string.rep(".",count)
	count = (count + 1) % 4

	wait(.3)
end

game.Workspace.Finish.Value=2

if not game:IsLoaded() then
	game.Loaded:Wait()
end