Advertisement
Uuuuh

Auto rejoin

Nov 6th, 2024 (edited)
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.31 KB | Gaming | 0 0
  1. local Player = game.Players.LocalPlayer
  2. local loadingMessages = { "Loading...", "Please wait...", "Initializing..." }
  3. local ScreenGui = Instance.new("ScreenGui")
  4. local Frame = Instance.new("Frame")
  5. local TextLabel = Instance.new("TextLabel")
  6.  
  7. ScreenGui.Name = "LoadingScreen"
  8. ScreenGui.Parent = Player:WaitForChild("PlayerGui")
  9.  
  10. Frame.Size = UDim2.new(1, 0, 1, 0)
  11. Frame.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
  12. Frame.BackgroundTransparency = 0.4
  13. Frame.Parent = ScreenGui
  14.  
  15. TextLabel.Size = UDim2.new(0, 300, 0, 50)
  16. TextLabel.Position = UDim2.new(0.5, -150, 0.5, -25)
  17. TextLabel.BackgroundTransparency = 1
  18. TextLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
  19. TextLabel.Text = "Loading..."
  20. TextLabel.TextSize = 32
  21. TextLabel.Font = Enum.Font.SourceSansBold
  22. TextLabel.Parent = Frame
  23.  
  24. local index = 1
  25. local function updateLoadingText()
  26.     TextLabel.Text = loadingMessages[index]
  27.     index = index % #loadingMessages + 1
  28. end
  29.  
  30. game.Loaded:Connect(function()
  31.     wait(2)
  32.     Frame:TweenSizeAndPosition(
  33.         UDim2.new(0, 0, 0, 0),
  34.         UDim2.new(0.5, 0, 0.5, 0),
  35.         Enum.EasingDirection.Out,
  36.         Enum.EasingStyle.Quad,
  37.         1,
  38.         true,
  39.         function()
  40.             ScreenGui:Destroy()
  41.         end
  42.     )
  43. end)
  44.  
  45. while ScreenGui.Parent do
  46.     updateLoadingText()
  47.     wait(0.8)
  48. end
Tags: auto rejoin
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement