-- Script by: TheInfamousCash -- Create UI Elements local ScreenGui = Instance.new("ScreenGui") local Frame = Instance.new("Frame") local TextBox = Instance.new("TextBox") local Button = Instance.new("TextButton") local ToggleButton = Instance.new("TextButton") ScreenGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui") -- Main Teleport UI Frame.Parent = ScreenGui Frame.Size = UDim2.new(0, 250, 0, 150) Frame.Position = UDim2.new(0.5, -125, 0.3, 0) Frame.BackgroundColor3 = Color3.new(0, 0, 0.3) Frame.Visible = false -- Initially hidden TextBox.Parent = Frame TextBox.Size = UDim2.new(0.8, 0, 0.3, 0) TextBox.Position = UDim2.new(0.1, 0, 0.2, 0) TextBox.PlaceholderText = "Enter username" TextBox.Text = "" Button.Parent = Frame Button.Size = UDim2.new(0.8, 0, 0.3, 0) Button.Position = UDim2.new(0.1, 0, 0.6, 0) Button.Text = "Teleport" Button.BackgroundColor3 = Color3.new(0, 1, 0) -- Toggle UI Button ToggleButton.Parent = ScreenGui ToggleButton.Size = UDim2.new(0, 100, 0, 40) ToggleButton.Position = UDim2.new(0, 10, 0, 10) -- Top-left corner ToggleButton.Text = "Show UI" ToggleButton.BackgroundColor3 = Color3.new(0.2, 0.2, 0.2) -- Function to teleport player local function teleportToPlayer(targetName) local player = game.Players.LocalPlayer local targetPlayer = game.Players:FindFirstChild(targetName) if targetPlayer and targetPlayer.Character then local targetRoot = targetPlayer.Character:FindFirstChild("HumanoidRootPart") local myRoot = player.Character and player.Character:FindFirstChild("HumanoidRootPart") if targetRoot and myRoot then myRoot.CFrame = targetRoot.CFrame -- Instantly teleports to the target end end end -- Button Click Event Button.MouseButton1Click:Connect(function() teleportToPlayer(TextBox.Text) end) -- Toggle UI Visibility ToggleButton.MouseButton1Click:Connect(function() Frame.Visible = not Frame.Visible ToggleButton.Text = Frame.Visible and "Hide UI" or "Show UI" end)