local player = game.Players.LocalPlayer local playerGui = player:WaitForChild("PlayerGui") local userInputService = game:GetService("UserInputService") local screenGui = Instance.new("ScreenGui", playerGui) local menuFrame = Instance.new("Frame", screenGui) menuFrame.Size = UDim2.new(0.3, 0, 0.4, 0) menuFrame.Position = UDim2.new(0.35, 0, 0.3, 0) menuFrame.BackgroundColor3 = Color3.new(0, 0, 0) -- local titleLabel = Instance.new("TextLabel", menuFrame) titleLabel.Size = UDim2.new(1, 0, 0.3, 0) titleLabel.Position = UDim2.new(0, 0, 0, 0) titleLabel.Text = "Teleport" titleLabel.TextColor3 = Color3.new(1, 1, 0) -- titleLabel.TextSize = 36 titleLabel.BackgroundTransparency = 1 local redLine = Instance.new("Frame", menuFrame) redLine.Size = UDim2.new(1, 0, 0.01, 0) redLine.Position = UDim2.new(0, 0, 0.3, 0) redLine.BackgroundColor3 = Color3.new(1, 0, 0) -- local teleportButton = Instance.new("TextButton", menuFrame) teleportButton.Size = UDim2.new(1, 0, 0.2, 0) teleportButton.Position = UDim2.new(0, 0, 0.35, 0) teleportButton.Text = "Teleport" teleportButton.BackgroundColor3 = Color3.new(1, 0, 0) -- local closeMenuText = Instance.new("TextLabel", menuFrame) closeMenuText.Size = UDim2.new(1, 0, 0.2, 0) closeMenuText.Position = UDim2.new(0, 0, 0.55, 0) closeMenuText.Text = "If you want to close this menu, click Ctrl" closeMenuText.TextColor3 = Color3.new(1, 1, 1) -- closeMenuText.TextSize = 20 closeMenuText.BackgroundTransparency = 1 local cautionText = Instance.new("TextLabel", menuFrame) cautionText.Size = UDim2.new(1, 0, 0.1, 0) cautionText.Position = UDim2.new(0, 0, 0.75, 0) cautionText.Text = "Caution: if you reset, this menu crashes" cautionText.TextColor3 = Color3.new(1, 1, 0) -- cautionText.TextSize = 15 cautionText.BackgroundTransparency = 1 local instructionLabel = Instance.new("TextLabel", screenGui) instructionLabel.Size = UDim2.new(0.5, 0, 0.1, 0) instructionLabel.Position = UDim2.new(0.25, 0, 0.9, 0) instructionLabel.Text = "Press G to teleport to your cursor point" instructionLabel.TextColor3 = Color3.new(1, 1, 1) -- instructionLabel.BackgroundTransparency = 1 instructionLabel.Visible = false -- local closeButton = Instance.new("TextButton", menuFrame) closeButton.Size = UDim2.new(0.1, 0, 0.1, 0) closeButton.Position = UDim2.new(0.9, 0, 0, 0) closeButton.Text = "X" closeButton.TextColor3 = Color3.new(1, 0, 0) -- closeButton.BackgroundColor3 = Color3.new(1, 1, 1) -- closeButton.BackgroundTransparency = 0.5 local teleportEnabled = false -- local menuVisible = true -- local function toggleMenu() menuVisible = not menuVisible menuFrame.Visible = menuVisible end local function onTeleportButtonClicked() teleportEnabled = true -- instructionLabel.Visible = true -- end local function onKeyPress(input) if input.KeyCode == Enum.KeyCode.G then if teleportEnabled then instructionLabel.Visible = false -- local mouse = player:GetMouse() if player.Character and player.Character:FindFirstChild("HumanoidRootPart") then player.Character.HumanoidRootPart.CFrame = CFrame.new(mouse.Hit.Position) -- end end end end teleportButton.MouseButton1Click:Connect(onTeleportButtonClicked) local function onInputBegan(input) if input.KeyCode == Enum.KeyCode.LeftControl or input.KeyCode == Enum.KeyCode.RightControl then toggleMenu() end end closeButton.MouseButton1Click:Connect(function() toggleMenu() end) userInputService.InputBegan:Connect(onInputBegan) userInputService.InputBegan:Connect(onKeyPress)