Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Script by TheeDeathCaster
- repeat wait(0)until game.Players.LocalPlayer and game.Players.LocalPlayer:FindFirstChild("PlayerGui")
- local PlaceId = 868252539 --Replace the 0's with the place ID you want the player to teleport two when player clicks on it
- for i,v in pairs(game.Players.LocalPlayer.PlayerGui:GetChildren()) do if v.Name == "Teleport" then v:Destroy() end end
- local scr = Instance.new("ScreenGui", game.Players.LocalPlayer.PlayerGui)
- scr.Name = "Teleport"
- local scr2 = Instance.new("TextButton", scr)
- scr2.Position = UDim2.new(1,-250,1,-42)
- scr2.Text = "Teleport"
- scr2.Name = "Teleportation"
- scr2.Size = UDim2.new(0,250,0,20)
- scr2.TextColor3 = Color3.new(0,0,0)
- scr2.BackgroundColor3 = Color3.new(1,1,1)
- scr2.MouseButton1Down:connect(function()
- for i,v in pairs(scr:GetChildren())do if v.Name == "Are you sure" or v.Name == "Cancel" then v:Destroy() end end
- local scr3 = Instance.new("TextButton", scr)
- scr3.Name = "Are you sure"
- scr3.Text = "Are you sure you want to teleport?"
- scr3.Position = UDim2.new(1,-600,1,-250)
- scr3.Size = UDim2.new(0,250,0,20)
- scr3.TextColor3 = Color3.new(0,0,0)
- scr3.BackgroundColor3 = Color3.new(1,1,1)
- local scr4 = Instance.new("TextButton", scr)
- scr4.Name = "Cancel"
- scr4.Text = "Cancel"
- scr4.Position = UDim2.new(1,-600,1,-220)
- scr4.Size = UDim2.new(0,250,0,20)
- scr4.TextColor3 = Color3.new(0,0,0)
- scr4.BackgroundColor3 = Color3.new(1,1,1)
- scr3.MouseButton1Down:connect(function()
- game:GetService("TeleportService"):Teleport(PlaceId, game.Players.LocalPlayer)
- end)
- scr4.MouseButton1Down:connect(function()
- scr3:Destroy()
- scr4:Destroy()
- end)
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement