LynXS_

Loading

Jun 19th, 2024
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.12 KB | None | 0 0
  1. local screenGui = Instance.new("ScreenGui")
  2. screenGui.Name = "KryptonLoadingScreen"
  3. screenGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
  4. screenGui.IgnoreGuiInset = true -- Ignore the top bar
  5.  
  6. -- Create and set up the background frame
  7. local background = Instance.new("Frame")
  8. background.Name = "Background"
  9. background.Size = UDim2.new(1, 0, 1, 0)
  10. background.Position = UDim2.new(0, 0, 0, 0)
  11. background.BackgroundColor3 = Color3.fromRGB(27, 27, 27)
  12. background.Parent = screenGui
  13.  
  14. -- Create and set up the TextLabel for the title
  15. local titleLabel = Instance.new("TextLabel")
  16. titleLabel.Name = "TitleLabel"
  17. titleLabel.Size = UDim2.new(0.8, 0, 0.05, 0)
  18. titleLabel.Position = UDim2.new(0.5, 0, 0.1, 0)
  19. titleLabel.AnchorPoint = Vector2.new(0.5, 0.5)
  20. titleLabel.BackgroundTransparency = 1
  21. titleLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
  22. titleLabel.Text = "KryptonReloaded"
  23. titleLabel.TextScaled = true
  24. titleLabel.Font = Enum.Font.SourceSansBold
  25. titleLabel.Parent = background
  26.  
  27. -- Create and set up the TextLabel for the loading text
  28. local loadingLabel = Instance.new("TextLabel")
  29. loadingLabel.Name = "LoadingLabel"
  30. loadingLabel.Size = UDim2.new(0.2, 0, 0.05, 0)
  31. loadingLabel.Position = UDim2.new(0.5, 0, 0.55, 0)
  32. loadingLabel.AnchorPoint = Vector2.new(0.5, 0.5)
  33. loadingLabel.BackgroundTransparency = 1
  34. loadingLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
  35. loadingLabel.Text = "Loading..."
  36. loadingLabel.TextScaled = true
  37. loadingLabel.Font = Enum.Font.SourceSans
  38. loadingLabel.Parent = background
  39.  
  40. -- Create and set up the Frame for the loading bar background
  41. local loadingBarBg = Instance.new("Frame")
  42. loadingBarBg.Name = "LoadingBarBackground"
  43. loadingBarBg.Size = UDim2.new(0.6, 0, 0.02, 0)
  44. loadingBarBg.Position = UDim2.new(0.5, 0, 0.65, 0)
  45. loadingBarBg.AnchorPoint = Vector2.new(0.5, 0.5)
  46. loadingBarBg.BackgroundColor3 = Color3.fromRGB(46, 46, 46)
  47. loadingBarBg.BorderSizePixel = 0
  48. loadingBarBg.Parent = background
  49. loadingBarBg.ClipsDescendants = true
  50.  
  51. -- Create and set up the Frame for the loading bar progress
  52. local loadingBar = Instance.new("Frame")
  53. loadingBar.Name = "LoadingBar"
  54. loadingBar.Size = UDim2.new(0, 0, 1, 0)
  55. loadingBar.BackgroundColor3 = Color3.fromRGB(255, 87, 51)
  56. loadingBar.BorderSizePixel = 0
  57. loadingBar.Parent = loadingBarBg
  58.  
  59. -- Add round corners to the loading bar background
  60. local uiCornerBg = Instance.new("UICorner")
  61. uiCornerBg.CornerRadius = UDim.new(0, 5)
  62. uiCornerBg.Parent = loadingBarBg
  63.  
  64. -- Add round corners to the loading bar
  65. local uiCorner = Instance.new("UICorner")
  66. uiCorner.CornerRadius = UDim.new(0, 5)
  67. uiCorner.Parent = loadingBar
  68.  
  69. -- Create and set up the TextLabel for the tip information
  70. local tipLabel = Instance.new("TextLabel")
  71. tipLabel.Name = "TipLabel"
  72. tipLabel.Size = UDim2.new(0.6, 0, 0.05, 0)
  73. tipLabel.Position = UDim2.new(0.5, 0, 0.75, 0)
  74. tipLabel.AnchorPoint = Vector2.new(0.5, 0.5)
  75. tipLabel.BackgroundTransparency = 1
  76. tipLabel.TextColor3 = Color3.fromRGB(255, 0, 0)
  77. tipLabel.TextScaled = true
  78. tipLabel.Font = Enum.Font.SourceSansItalic
  79. tipLabel.Parent = background
  80.  
  81. -- Array of tips
  82. local tips = {
  83. "Tip: Always stay alert.",
  84. "Tip: Remember to save your progress.",
  85. "Tip: Explore every area for hidden items.",
  86. "Tip: Keep an eye on your health bar.",
  87. "Tip: Communicate with people.",
  88. "Tip: Upgrade your equipment regularly.",
  89. "Tip: Uh oh big error."
  90. }
  91.  
  92. -- Function to set a random tip
  93. local function setRandomTip()
  94. local randomTip = tips[math.random(1, #tips)]
  95. tipLabel.Text = randomTip
  96. end
  97.  
  98. -- Function to animate the loading bar
  99. local function animateLoadingBar()
  100. local TweenService = game:GetService("TweenService")
  101. local tweenInfo = TweenInfo.new(30, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut)
  102.  
  103. local goal = {}
  104. goal.Size = UDim2.new(1, 0, 1, 0)
  105.  
  106. local tween = TweenService:Create(loadingBar, tweenInfo, goal)
  107. tween:Play()
  108.  
  109. tween.Completed:Connect(function()
  110. screenGui:Destroy() -- Remove the loading screen when loading is complete
  111. end)
  112. end
  113.  
  114. -- Set a random tip and start the loading animation
  115. setRandomTip()
  116. animateLoadingBar()
  117.  
Advertisement
Add Comment
Please, Sign In to add comment