Advertisement
Guest User

Client Script

a guest
Feb 11th, 2021
615
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.99 KB | None | 0 0
  1. local gui = script.Parent
  2. local background = gui:WaitForChild("Background")
  3. local bar = background:WaitForChild("Bar")
  4. local filler = bar:WaitForChild("Filler")
  5. local percentage = bar:WaitForChild("Percent")
  6.  
  7.  
  8. wait(5)
  9.  
  10. for i = 1, 100 do
  11.     wait(0.04)
  12.     percentage.Text = i.."%"
  13.    
  14.     local formula = i/100
  15.    
  16.     filler:TweenSize(UDim2.new(formula, 0, 1, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Linear, 0.1, true)
  17.    
  18.     if i == 34 or i == 67 or i == 88 then
  19.         wait(1)
  20.     end
  21. end
  22.  
  23. local tween = game.TweenService:Create(gui.Fade, TweenInfo.new(1.5, Enum.EasingStyle.Linear, Enum.EasingDirection.Out), {["BackgroundTransparency"] = 0})
  24. tween:Play()
  25. tween.Completed:wait()
  26.  
  27. gui.Background.Visible = false
  28. wait(2)
  29.  
  30. tween = game.TweenService:Create(gui.Fade, TweenInfo.new(1.5, Enum.EasingStyle.Linear, Enum.EasingDirection.Out), {["BackgroundTransparency"] = 1})
  31. tween:Play()
  32. tween.Completed:wait()
  33.  
  34. game.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.All, true)
  35.  
  36. wait(1)
  37. gui:Destroy()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement