Ima3ine

Rejoin Button

Apr 15th, 2023
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.87 KB | Gaming | 0 0
  1. --Auto execute highly recommended (use it)
  2. gui = game.CoreGui.RobloxPromptGui.promptOverlay:WaitForChild("ErrorPrompt")
  3.  
  4. gui.Size = UDim2.new(0, 400, 0, 230)
  5.  
  6. leave = gui.MessageArea.ErrorFrame.ButtonArea.LeaveButton
  7.  
  8. gui.MessageArea.MessageAreaPadding.PaddingTop = UDim.new(0,-20)
  9. gui.MessageArea.ErrorFrame.ErrorFrameLayout.Padding = UDim.new(0, 5)
  10.  
  11. gui.MessageArea.ErrorFrame.ButtonArea.ButtonLayout.CellPadding = UDim2.new(0, 0, 0, 5)
  12.  
  13. rejoin = leave:Clone()
  14. rejoin.Parent = leave.Parent
  15. rejoin.ButtonText.Text = "Rejoin"
  16.  
  17. Players = game:GetService("Players")
  18. TeleportService = game:GetService("TeleportService")
  19.  
  20. rejoin.MouseButton1Up:Connect(function()
  21. if #Players:GetPlayers() <= 1 then
  22. TeleportService:Teleport(game.PlaceId, Players.LocalPlayer)
  23. else
  24. TeleportService:TeleportToPlaceInstance(game.PlaceId, game.JobId, Players.LocalPlayer)
  25. end
  26. end)
Tags: #roblox #R64
Add Comment
Please, Sign In to add comment