Advertisement
Guest User

finished loading screen

a guest
Feb 22nd, 2020
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.48 KB | None | 0 0
  1. repeat wait() until game.Players.LocalPlayer
  2.  
  3. game.Lighting.Blur.Size = 24
  4. script.Parent.Enabled = true
  5.  
  6.  
  7. local content = game:GetService("ContentProvider")
  8. local tw = game:GetService("TweenService")
  9. --local amon = #game.ReplicatedStorage.AssetsToLoad:GetChildren()
  10.  
  11. script.Parent.Frame.amount:GetPropertyChangedSignal("Text"):Connect(function()
  12.     print("changed: "..script.Parent.Frame.amount.Text)
  13. end)
  14.  
  15.  
  16.  
  17. content:PreloadAsync(game.ReplicatedStorage.AssetsToLoad:GetChildren(), function()
  18.     local amon = content.RequestQueueSize
  19.     if amon <= 0 then
  20.         wait(0.5)
  21.         script.Parent.Frame.finished.Visible = true
  22.         tw:Create(script.Parent.Frame.AText, TweenInfo.new(0.4, Enum.EasingStyle.Back, Enum.EasingDirection.Out), {TextTransparency = 1}):Play()
  23.         tw:Create(script.Parent.Frame.amount, TweenInfo.new(0.4, Enum.EasingStyle.Back, Enum.EasingDirection.Out), {TextTransparency = 1}):Play()
  24.         tw:Create(script.Parent.Frame.finished, TweenInfo.new(1, Enum.EasingStyle.Back, Enum.EasingDirection.Out), {Position = UDim2.new(0.254, 0,0, 100)}):Play()
  25.         wait(1.5)
  26.         tw:Create(game.Lighting.Blur, TweenInfo.new(1, Enum.EasingStyle.Back, Enum.EasingDirection.Out), {Size = 0}):Play()
  27.         tw:Create(script.Parent.Frame, TweenInfo.new(1, Enum.EasingStyle.Back, Enum.EasingDirection.Out), {Position = UDim2.new(0.2, 0,1.078, 0)}):Play()
  28.         wait(1)
  29.         game.ReplicatedStorage.AssetsToLoad:ClearAllChildren()
  30.         script.Parent:Destroy()
  31.     else
  32.         script.Parent.Frame.amount.Text = tostring(amon)
  33.     end
  34. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement