Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- game:GetService('ReplicatedFirst'):RemoveDefaultLoadingScreen()
- local screen = script.Parent:WaitForChild('Loading'):Clone()
- screen.Parent = game:GetService('Players').LocalPlayer:WaitForChild('PlayerGui')
- local Ready = game.Workspace:WaitForChild("Ready", true)
- while (game.ContentProvider.RequestQueueSize > 0) do wait(0) end
- local fadein, fadeout, images = 2, 1, { }
- images[1] = screen:WaitForChild('ImageLabel1'),
- images[2] = screen:WaitForChild('ImageLabel2')
- function tweenImageTrans(image, inout)
- coroutine.resume(coroutine.create(function()
- if (inout == 'In') then
- for i = 1, 0.05, -0.05 do
- image.ImageTransparency = i
- wait(0)
- end
- image.ImageTransparency = 0
- elseif (inout == 'Out') then
- for i = 0.05, 1, 0.05 do
- image.ImageTransparency = i
- wait(0)
- end
- image.ImageTransparency = 1
- end
- end))
- end
- while (not Ready.Value) do
- if (fadein == 2) then
- fadein, fadeout = 1, 2
- elseif (fadein == 1) then
- fadein, fadeout = 2, 1
- end
- tweenImageTrans(images[fadeout], 'Out')
- delay(1, function()
- tweenImageTrans(images[fadein], 'In')
- end)
- wait(30)
- end
- repeat wait(0) until (Ready ~= nil and Ready.Value == true)
- screen:Destroy()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement