UI/UX
Teleport Menu
Paste into StarterPlayerScripts as a LocalScript. Buttons teleport the player to Workspace parts whose names are in DESTINATIONS.
-- Paste into StarterPlayer > StarterPlayerScripts as a LocalScript.
-- Put parts in Workspace with the names listed in DESTINATIONS.
local Players = game:GetService("Players")
local DESTINATIONS = { "Lobby", "Map", "Shop" }
local player = Players.LocalPlayer
local gui = Instance.new("ScreenGui")
gui.Name = "TeleportMenu"
gui.ResetOnSpawn = false
gui.Parent = player:WaitForChild("PlayerGui")
local toggle = Instance.new("TextButton")
toggle.Position = UDim2.fromOffset(16, 68)
toggle.Size = UDim2.fromOffset(110, 36)
toggle.BackgroundColor3 = Color3.fromRGB(30, 35, 48)
toggle.Text = "Teleport"
toggle.TextColor3 = Color3.new(1, 1, 1)
toggle.Font = Enum.Font.GothamBold
toggle.TextSize = 15
toggle.Parent = gui
local panel = Instance.new("Frame")
panel.Position = UDim2.fromOffset(16, 112)
panel.Size = UDim2.fromOffset(180, 40 + #DESTINATIONS * 40)
panel.BackgroundColor3 = Color3.fromRGB(19, 22, 28)
panel.Visible = false
panel.Parent = gui
for index, name in ipairs(DESTINATIONS) do
local button = Instance.new("TextButton")
button.Position = UDim2.fromOffset(8, 8 + (index - 1) * 40)
button.Size = UDim2.new(1, -16, 0, 32)
button.BackgroundColor3 = Color3.fromRGB(30, 35, 48)
button.Text = name
button.TextColor3 = Color3.new(1, 1, 1)
button.Font = Enum.Font.GothamMedium
button.TextSize = 15
button.Parent = panel
button.MouseButton1Click:Connect(function()
local destination = workspace:FindFirstChild(name, true)
local character = player.Character
local root = character and character:FindFirstChild("HumanoidRootPart")
if destination and destination:IsA("BasePart") and root and root:IsA("BasePart") then
root.CFrame = destination.CFrame + Vector3.new(0, 4, 0)
end
end)
end
toggle.MouseButton1Click:Connect(function()
panel.Visible = not panel.Visible
end)