Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local teleporting = false
- local gui = Instance.new("ScreenGui")
- gui.Parent = game.Players[script.Parent.Name].PlayerGui
- local f = Instance.new("Frame")
- f.Parent = gui
- f.Position = UDim2.new(0,0,0,500)
- f.BackgroundColor3 = Color3.fromRGB(118,207,112)
- f.BorderColor3 = Color3.fromRGB(108,197,102)
- f.BorderSizePixel = 3
- f.Size = UDim2.new(0,200,0,70)
- local box = Instance.new("TextBox")
- box.Parent = f
- box.Size = UDim2.new(0,200,0,30)
- box.BackgroundColor3 = Color3.new(0,0,0)
- box.BackgroundTransparency = .5
- box.Font = Enum.Font.Arcade
- box.Text = "Place ID"
- box.TextColor3 = Color3.new(255,255,255)
- box.TextScaled = true
- local button = Instance.new("TextButton")
- button.Parent = f
- button.Position = UDim2.new(0,75,0,40)
- button.Size = UDim2.new(0,50,0,20)
- button.BackgroundColor3 = Color3.new(0,0,0)
- button.BackgroundTransparency = .5
- button.Text = "Teleport!"
- button.TextColor3 = Color3.new(255,255,255)
- function ActivateTeleport()
- teleporting = true
- end
- button.MouseButton1Down:connect(ActivateTeleport)
- function teleportPlace(hit)
- local p = game.Players:FindFirstChild(hit.Parent.Name)
- if p ~= nil and teleporting == true then
- game:GetService("TeleportService"):Teleport(box.Text,p)
- end
- end
- game.Workspace.Base.Touched:connect(teleportPlace)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement