local ScreenGui = Instance.new("ScreenGui") local MainFrame = Instance.new("Frame") local Title = Instance.new("TextLabel") local SaveButton = Instance.new("TextButton") local ScrollFrame = Instance.new("ScrollingFrame") local UIListLayout = Instance.new("UIListLayout") local ToggleButton = Instance.new("TextButton") -- Limpieza de ejecuciones previas local existing = game.CoreGui:FindFirstChild("UltimateWaypointSystem") if existing then existing:Destroy() end ScreenGui.Name = "UltimateWaypointSystem" ScreenGui.Parent = game.CoreGui -- Botón Flotante para abrir ToggleButton.Name = "ToggleButton" ToggleButton.Parent = ScreenGui ToggleButton.BackgroundColor3 = Color3.fromRGB(35, 35, 35) ToggleButton.Position = UDim2.new(0, 10, 0.45, 0) ToggleButton.Size = UDim2.new(0, 90, 0, 35) ToggleButton.Text = "Waypoints ✎" ToggleButton.TextColor3 = Color3.new(1, 1, 1) ToggleButton.Font = Enum.Font.GothamBold ToggleButton.TextSize = 13 Instance.new("UICorner", ToggleButton) -- Ventana Principal MainFrame.Name = "MainFrame" MainFrame.Parent = ScreenGui MainFrame.BackgroundColor3 = Color3.fromRGB(25, 25, 25) MainFrame.Position = UDim2.new(0.5, -110, 0.5, -150) MainFrame.Size = UDim2.new(0, 220, 0, 300) MainFrame.Visible = false Instance.new("UICorner", MainFrame) Title.Parent = MainFrame Title.Size = UDim2.new(1, 0, 0, 45) Title.Text = "GESTOR DE PUNTOS" Title.TextColor3 = Color3.new(1, 1, 1) Title.BackgroundTransparency = 1 Title.Font = Enum.Font.GothamBold Title.TextSize = 14 -- Botón Guardar SaveButton.Parent = MainFrame SaveButton.Position = UDim2.new(0.1, 0, 0.15, 0) SaveButton.Size = UDim2.new(0.8, 0, 0, 35) SaveButton.BackgroundColor3 = Color3.fromRGB(39, 174, 96) SaveButton.Text = "+ GUARDAR AQUÍ" SaveButton.TextColor3 = Color3.new(1, 1, 1) SaveButton.Font = Enum.Font.GothamBold Instance.new("UICorner", SaveButton) -- Lista con Scroll ScrollFrame.Parent = MainFrame ScrollFrame.Position = UDim2.new(0.05, 0, 0.3, 0) ScrollFrame.Size = UDim2.new(0.9, 0, 0.65, 0) ScrollFrame.BackgroundTransparency = 1 ScrollFrame.CanvasSize = UDim2.new(0, 0, 0, 0) ScrollFrame.ScrollBarThickness = 3 UIListLayout.Parent = ScrollFrame UIListLayout.Padding = UDim.new(0, 8) UIListLayout.SortOrder = Enum.SortOrder.LayoutOrder --- LÓGICA DE FUNCIONAMIENTO --- local waypointCount = 0 local function createWaypointRow(cframe) waypointCount = waypointCount + 1 local RowFrame = Instance.new("Frame") local NameInput = Instance.new("TextBox") local TPBtn = Instance.new("TextButton") local DelBtn = Instance.new("TextButton") RowFrame.Size = UDim2.new(1, -5, 0, 45) RowFrame.BackgroundColor3 = Color3.fromRGB(40, 40, 40) RowFrame.Parent = ScrollFrame Instance.new("UICorner", RowFrame) -- Input para el Nombre (Editable) NameInput.Size = UDim2.new(0.65, 0, 0.5, 0) NameInput.Position = UDim2.new(0.05, 0, 0.1, 0) NameInput.BackgroundTransparency = 1 NameInput.Text = "Punto " .. waypointCount NameInput.TextColor3 = Color3.fromRGB(255, 255, 255) NameInput.Font = Enum.Font.GothamSemibold NameInput.TextSize = 14 NameInput.TextXAlignment = Enum.TextXAlignment.Left NameInput.Parent = RowFrame NameInput.ClearTextOnFocus = false -- Botón de Teleport (Abajo del nombre) TPBtn.Size = UDim2.new(0.65, 0, 0.4, 0) TPBtn.Position = UDim2.new(0.05, 0, 0.55, 0) TPBtn.BackgroundColor3 = Color3.fromRGB(52, 152, 219) TPBtn.Text = "Teletransportar" TPBtn.TextColor3 = Color3.new(1, 1, 1) TPBtn.Font = Enum.Font.Gotham TPBtn.TextSize = 11 TPBtn.Parent = RowFrame Instance.new("UICorner", TPBtn) -- Botón de Eliminar DelBtn.Size = UDim2.new(0.2, 0, 0.8, 0) DelBtn.Position = UDim2.new(0.75, 0, 0.1, 0) DelBtn.BackgroundColor3 = Color3.fromRGB(192, 57, 43) DelBtn.Text = "X" DelBtn.TextColor3 = Color3.new(1, 1, 1) DelBtn.Font = Enum.Font.GothamBold DelBtn.Parent = RowFrame Instance.new("UICorner", DelBtn) -- Lógica de botones TPBtn.MouseButton1Click:Connect(function() local char = game.Players.LocalPlayer.Character if char and char:FindFirstChild("HumanoidRootPart") then char.HumanoidRootPart.CFrame = cframe end end) DelBtn.MouseButton1Click:Connect(function() RowFrame:Destroy() task.wait(0.1) ScrollFrame.CanvasSize = UDim2.new(0, 0, 0, UIListLayout.AbsoluteContentSize.Y) end) -- Auto-ajuste de lista ScrollFrame.CanvasSize = UDim2.new(0, 0, 0, UIListLayout.AbsoluteContentSize.Y) end -- Eventos principales SaveButton.MouseButton1Click:Connect(function() local char = game.Players.LocalPlayer.Character if char and char:FindFirstChild("HumanoidRootPart") then createWaypointRow(char.HumanoidRootPart.CFrame) end end) ToggleButton.MouseButton1Click:Connect(function() MainFrame.Visible = not MainFrame.Visible end) -- Sistema de Arrastre (Drag) local UIS = game:GetService("UserInputService") local dragging, dragInput, dragStart, startPos MainFrame.InputBegan:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then dragging = true; dragStart = input.Position; startPos = MainFrame.Position end end) UIS.InputChanged:Connect(function(input) if dragging and (input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch) then local delta = input.Position - dragStart MainFrame.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y) end end) UIS.InputEnded:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then dragging = false end end)