Advertisement
ERROR_CODE

Are u Sure Script to place teleport

Nov 30th, 2023 (edited)
148
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 3.32 KB | None | 0 0
  1. if game.PlaceId ~= 15506075243 then
  2. local ScreenGui1 = Instance.new("ScreenGui")
  3. local QuestionFrame = Instance.new("Frame")
  4. local QuestionLabel = Instance.new("TextLabel")
  5. local QuestionLabelUICorner = Instance.new("UICorner")
  6. local QuestionFrameUICorner = Instance.new("UICorner")
  7. local TextLabel = Instance.new("TextLabel")
  8. local TextLabelUICorner = Instance.new("UICorner")
  9. local YesButton = Instance.new("TextButton")
  10. local YesButtonUICorner = Instance.new("UICorner")
  11. local NoButton = Instance.new("TextButton")
  12. local NoButtonUICorner = Instance.new("UICorner")
  13. local Blur = Instance.new("BlurEffect")
  14. Blur.Parent = game:GetService("Lighting")
  15.  
  16. Blur.Size = 100
  17.  
  18. ScreenGui1.Parent = game.CoreGui
  19.  
  20. QuestionFrame.Parent = ScreenGui1
  21. QuestionFrame.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
  22. QuestionFrame.Position = UDim2.new(0.3, 0, 0.2, 0)
  23. QuestionFrame.Size = UDim2.new(0, 400, 0, 250)
  24.  
  25. QuestionLabel.Name = "QuestionLabel"
  26. QuestionLabel.Parent = QuestionFrame
  27. QuestionLabel.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  28. QuestionLabel.Size = UDim2.new(0, 400, 0, 25)
  29. QuestionLabel.Font = Enum.Font.IndieFlower
  30. QuestionLabel.Text = "Teleport?"
  31. QuestionLabel.TextColor3 = Color3.fromRGB(0, 0, 0)
  32. QuestionLabel.TextSize = 30
  33.  
  34. QuestionFrameUICorner.Parent = QuestionFrame
  35.  
  36. QuestionLabelUICorner.Parent = QuestionLabel
  37.  
  38. TextLabel.Name = "TextLabel"
  39. TextLabel.Parent = QuestionFrame
  40. TextLabel.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
  41. TextLabel.Position = UDim2.new(0.05, 0, 0.1, 0)
  42. TextLabel.Size = UDim2.new(0, 350, 0, 150)
  43. TextLabel.Font = Enum.Font.IndieFlower
  44. TextLabel.Text = "When you click on the 'Yes' button, you will be teleported to the game 'For Visual Scripts'. After teleporting into the game, restart the script."
  45. TextLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
  46. TextLabel.TextSize = 30
  47. TextLabel.TextWrapped = true
  48. TextLabel.TextScaled = true
  49.  
  50. TextLabelUICorner.Parent = TextLabel
  51.  
  52. NoButton.Name = "NoButton"
  53. NoButton.Parent = QuestionFrame
  54. NoButton.BackgroundColor3 = Color3.fromRGB(255, 0, 0)
  55. NoButton.Position = UDim2.new(0.07, 0, 0.7, 0)
  56. NoButton.Size = UDim2.new(0, 125, 0, 50)
  57. NoButton.Font = Enum.Font.IndieFlower
  58. NoButton.Text = "No"
  59. NoButton.TextColor3 = Color3.fromRGB(0, 0, 0)
  60. NoButton.TextScaled = true
  61. NoButton.TextSize = 14.000
  62. NoButton.TextWrapped = true
  63. NoButton.MouseButton1Down:connect(function()
  64. ScreenGui1:Destroy()
  65. Blur.Size = 0
  66. end)
  67. NoButtonUICorner.Parent = NoButton
  68.  
  69. YesButton.Name = "YesButton"
  70. YesButton.Parent = QuestionFrame
  71. YesButton.BackgroundColor3 = Color3.fromRGB(0, 255, 0)
  72. YesButton.Position = UDim2.new(0.6, 0, 0.7, 0)
  73. YesButton.Size = UDim2.new(0, 125, 0, 50)
  74. YesButton.Font = Enum.Font.IndieFlower
  75. YesButton.Text = "Yes"
  76. YesButton.TextColor3 = Color3.fromRGB(0, 0, 0)
  77. YesButton.TextScaled = true
  78. YesButton.TextSize = 14.000
  79. YesButton.TextWrapped = true
  80. YesButton.MouseButton1Down:connect(function()
  81. local TeleportService = game:GetService("TeleportService")
  82. local PId = 15506075243
  83. game.Players.LocalPlayer:Kick("Joining")
  84. local Join = coroutine.create(function()
  85.     local Success, ErrorMessage = pcall(function()
  86.         TeleportService:Teleport(PId, game.Players.LocalPlayer)
  87.     end)
  88.  
  89.     if ErrorMessage and not Success then
  90.         warn(ErrorMessage)
  91.     end
  92. end)
  93. coroutine.resume(Join)
  94. end)
  95. YesButtonUICorner.Parent = YesButton
  96. else
  97. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement