Advertisement
HowToRoblox

LoadingScript

Oct 8th, 2019
4,445
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.90 KB | None | 0 0
  1. local BarProgress = 0
  2.  
  3.  
  4. while wait() do
  5.    
  6.     BarProgress = BarProgress + 0.5
  7.    
  8.     script.Parent.Size = UDim2.new(BarProgress/100, 0, 0.1, 0)
  9.    
  10.     script.Parent.Parent.LoadingText.Text = ("Loading... "..math.floor(BarProgress*2).."%")
  11.    
  12.     if BarProgress == 50 then
  13.        
  14.         game.Workspace.Ding:Play()
  15.        
  16.         wait(1)
  17.        
  18.         while wait() do
  19.             script.Parent.BackgroundTransparency = script.Parent.BackgroundTransparency + 0.08
  20.             script.Parent.Parent.BarBackground.BackgroundTransparency = script.Parent.Parent.BarBackground.BackgroundTransparency + 0.08
  21.             script.Parent.Parent.LoadingText.TextTransparency = script.Parent.Parent.LoadingText.TextTransparency + 0.08
  22.             script.Parent.Parent.BackgroundTransparency = script.Parent.Parent.BackgroundTransparency + 0.072
  23.            
  24.             if script.Parent.BackgroundTransparency >= 1 then
  25.                
  26.                 script.Parent.Parent.Parent:Destroy()
  27.                 break  
  28.             end    
  29.         end
  30.     end
  31. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement