Advertisement
Guest User

[TUTORIAL] Loading Screen Script

a guest
Sep 13th, 2020
1,377
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.65 KB | None | 0 0
  1. local gui = script.Parent
  2. local background = script.Parent.Background
  3. local logo = background.Logo
  4. local text = background.Text
  5.  
  6. local gradient = logo.UIGradient
  7.  
  8. local tweenService = game:GetService("TweenService")
  9.  
  10. local offset1 = Vector2.new(-5,0)
  11. local offset2 = Vector2.new(5,0)
  12.  
  13. gradient.Offset = offset1
  14.  
  15. local tweenInfo = TweenInfo.new(10, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut)
  16.  
  17. local tween = tweenService:Create(gradient, tweenInfo, {Offset = offset2})
  18.  
  19. gui.Enabled = true
  20. text.Text = "Loading"
  21.  
  22. game.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.All, false)
  23.  
  24. wait(5)
  25.  
  26. tween:Play()
  27.  
  28. text.Text = "Loading."
  29. wait(1)
  30. text.Text = "Loading.."
  31. wait(1)
  32. text.Text = "Loading..."
  33. wait(1)
  34. text.Text = "Loading"
  35. wait(1)
  36. text.Text = "Loading."
  37. wait(1)
  38. text.Text = "Loading.."
  39. wait(1)
  40. text.Text = "Loading..."
  41. wait(1)
  42. text.Text = "Loading"
  43. wait(1)
  44. text.Text = "Loading."
  45. wait(1)
  46. text.Text = "Loading.."
  47. wait(1)
  48. text.Text = "Loading..."
  49.  
  50.  
  51. wait(1)
  52.  
  53. text.Text = "Ready!"
  54.  
  55. wait(1)
  56.  
  57. text.Visible = false
  58. logo.Visible = false
  59.  
  60. game.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.All, true)
  61.  
  62. background.BackgroundTransparency = 0.1
  63. wait(0.05)
  64. background.BackgroundTransparency = 0.2
  65. wait(0.05)
  66. background.BackgroundTransparency = 0.3
  67. wait(0.05)
  68. background.BackgroundTransparency = 0.4
  69. wait(0.05)
  70. background.BackgroundTransparency = 0.5
  71. wait(0.05)
  72. background.BackgroundTransparency = 0.6
  73. wait(0.05)
  74. background.BackgroundTransparency = 0.7
  75. wait(0.05)
  76. background.BackgroundTransparency = 0.8
  77. wait(0.05)
  78. background.BackgroundTransparency = 0.9
  79. wait(0.05)
  80. background.BackgroundTransparency = 1
  81.  
  82. gui:Destroy()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement