Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if not game or not game:IsLoaded() then game.Loaded:Wait() end
- -- Serviços
- local Players = game:GetService("Players")
- local HttpService = game:GetService("HttpService")
- local TweenService = game:GetService("TweenService")
- local UserInputService = game:GetService("UserInputService")
- local plr = Players.LocalPlayer
- local chr = plr.Character or plr.CharacterAdded:Wait()
- local humanoidRoot = chr:WaitForChild("HumanoidRootPart")
- -- Estado
- local savedPositions = {}
- local maxSaves = 50 -- ALTERADO: 5 páginas × 10 slots
- local slotsPerPage = 10 -- NOVO: Slots por página
- local maxPages = 5 -- NOVO: Máximo de páginas
- local currentPage = 1 -- NOVO: Página atual
- local currentSaveSlot = 1
- local mainPosition = nil
- -- Helpers de FS
- local hasWrite = (type(writefile) == "function")
- local hasRead = (type(readfile) == "function")
- local hasFS = (hasWrite and hasRead)
- local hasFolder = (type(isfolder) == "function" and type(makefolder) == "function")
- local hasIsFile = (type(isfile) == "function")
- local hasDelFile = (type(delfile) == "function")
- -- Sistema de diretórios
- local SAVE_DIR = "SaveLocate_NickZ"
- local GAME_DIR = tostring(game.PlaceId)
- -- Criar estrutura de pastas
- if hasFolder then
- if not isfolder(SAVE_DIR) then
- pcall(makefolder, SAVE_DIR)
- end
- if not isfolder(SAVE_DIR .. "/" .. GAME_DIR) then
- pcall(makefolder, SAVE_DIR .. "/" .. GAME_DIR)
- end
- end
- -- Nomes de arquivo
- local BASE_NAME = string.format("Saves_%s.json", plr.UserId)
- local MAIN_NAME = string.format("MainPos_%s.json", plr.UserId)
- local BASE_BAK = string.format("Saves_%s.bak", plr.UserId)
- local MAIN_BAK = string.format("MainPos_%s.bak", plr.UserId)
- -- Caminhos completos
- local SAVE_FILE = SAVE_DIR .. "/" .. GAME_DIR .. "/" .. BASE_NAME
- local MAIN_FILE = SAVE_DIR .. "/" .. GAME_DIR .. "/" .. MAIN_NAME
- local SAVE_BAK_FILE = SAVE_DIR .. "/" .. GAME_DIR .. "/" .. BASE_BAK
- local MAIN_BAK_FILE = SAVE_DIR .. "/" .. GAME_DIR .. "/" .. MAIN_BAK
- -- Fallback para executors sem suporte a pastas
- if not hasFolder then
- SAVE_FILE = string.format("SaveLocate_%d_%s.json", game.PlaceId, plr.UserId)
- MAIN_FILE = string.format("MainPos_%d_%s.json", game.PlaceId, plr.UserId)
- SAVE_BAK_FILE = string.format("SaveLocate_%d_%s.bak", game.PlaceId, plr.UserId)
- MAIN_BAK_FILE = string.format("MainPos_%d_%s.bak", game.PlaceId, plr.UserId)
- end
- -- Codificação/decodificação de CFrame
- local function encodeCFrame(cf)
- local x,y,z,R00,R01,R02,R10,R11,R12,R20,R21,R22 = cf:GetComponents()
- return {x=x,y=y,z=z,R00=R00,R01=R01,R02=R02,R10=R10,R11=R11,R12=R12,R20=R20,R21=R21,R22=R22}
- end
- local function decodeCFrame(t)
- if type(t)=="table" and t.x and t.R00 then
- return CFrame.new(t.x,t.y,t.z, t.R00,t.R01,t.R02, t.R10,t.R11,t.R12, t.R20,t.R21,t.R22)
- end
- return nil
- end
- -- Função de leitura
- local function tryRead(path)
- if not hasFS or type(path) ~= "string" then return nil end
- local success, content = pcall(readfile, path)
- if success and type(content) == "string" and #content > 0 then
- return content
- end
- return nil
- end
- -- Caminhos para compatibilidade
- local function candidateSavePaths()
- local list = {}
- table.insert(list, SAVE_FILE)
- table.insert(list, SAVE_BAK_FILE)
- if hasFolder then
- table.insert(list, "SkyTP/" .. string.format("Saves_%d_%d.json", game.PlaceId, plr.UserId))
- table.insert(list, "SkyTP/" .. string.format("Saves_%d_%d.bak", game.PlaceId, plr.UserId))
- end
- table.insert(list, string.format("Saves_%d_%d.json", game.PlaceId, plr.UserId))
- table.insert(list, string.format("Saves_%d_%d.bak", game.PlaceId, plr.UserId))
- return list
- end
- local function candidateMainPaths()
- local list = {}
- table.insert(list, MAIN_FILE)
- table.insert(list, MAIN_BAK_FILE)
- if hasFolder then
- table.insert(list, "SkyTP/" .. string.format("MainPos_%d_%d.json", game.PlaceId, plr.UserId))
- table.insert(list, "SkyTP/" .. string.format("MainPos_%d_%d.bak", game.PlaceId, plr.UserId))
- end
- table.insert(list, string.format("MainPos_%d_%d.json", game.PlaceId, plr.UserId))
- table.insert(list, string.format("MainPos_%d_%d.bak", game.PlaceId, plr.UserId))
- return list
- end
- local function firstExistingContent(paths)
- for _, p in ipairs(paths) do
- if type(p) == "string" then
- local content = tryRead(p)
- if content then
- return content, p
- end
- end
- end
- return nil, nil
- end
- -- Persistência
- local function saveMainPosition()
- if not hasFS or not mainPosition then return end
- local data = {
- position = encodeCFrame(mainPosition.position),
- name = mainPosition.name,
- timestamp = mainPosition.timestamp,
- gameId = game.PlaceId,
- gameName = game.Name
- }
- local ok, encoded = pcall(function() return HttpService:JSONEncode(data) end)
- if ok and encoded then
- pcall(writefile, MAIN_FILE, encoded)
- pcall(writefile, MAIN_BAK_FILE, encoded)
- end
- end
- local function loadMainPosition()
- if not hasFS then return end
- local content, usedPath = firstExistingContent(candidateMainPaths())
- if not content then return end
- local ok, data = pcall(function() return HttpService:JSONDecode(content) end)
- if not ok or type(data) ~= "table" then return end
- if data.gameId and data.gameId ~= game.PlaceId then return end
- local cf = decodeCFrame(data.position)
- if cf then
- mainPosition = {
- position = cf,
- name = data.name or "Posição Principal",
- timestamp = data.timestamp or os.date("%Y-%m-%d %H:%M:%S")
- }
- if usedPath ~= MAIN_FILE then
- saveMainPosition()
- end
- end
- end
- local function saveToDisk()
- if not hasFS then return end
- local out = {
- gameId = game.PlaceId,
- gameName = game.Name,
- userId = plr.UserId,
- userName = plr.Name,
- saveDate = os.date("%Y-%m-%d %H:%M:%S"),
- positions = {}
- }
- for slot, data in pairs(savedPositions) do
- if type(slot)=="number" and slot>=1 and slot<=maxSaves and typeof(data.position)=="CFrame" then
- out.positions[tostring(slot)] = {
- name = data.name or ("Slot "..slot),
- timestamp = data.timestamp or os.date("%Y-%m-%d %H:%M:%S"),
- position = encodeCFrame(data.position)
- }
- end
- end
- local ok, encoded = pcall(function() return HttpService:JSONEncode(out) end)
- if ok and encoded then
- pcall(writefile, SAVE_FILE, encoded)
- pcall(writefile, SAVE_BAK_FILE, encoded)
- end
- saveMainPosition()
- end
- local function loadFromDisk()
- if not hasFS then return end
- local content, usedPath = firstExistingContent(candidateSavePaths())
- if not content then
- loadMainPosition()
- return
- end
- local ok, data = pcall(function() return HttpService:JSONDecode(content) end)
- if not ok or type(data) ~= "table" then
- loadMainPosition()
- return
- end
- local positions = data.positions or data
- if data.gameId and data.gameId ~= game.PlaceId then
- loadMainPosition()
- return
- end
- for k,v in pairs(positions) do
- local slot = tonumber(k)
- if slot and slot >= 1 and slot <= maxSaves and type(v) == "table" then
- local cf = decodeCFrame(v.position)
- if cf then
- savedPositions[slot] = {
- position = cf,
- name = v.name or ("Slot "..slot),
- timestamp = v.timestamp or os.date("%Y-%m-%d %H:%M:%S")
- }
- end
- end
- end
- if usedPath ~= SAVE_FILE then
- saveToDisk()
- end
- loadMainPosition()
- end
- --================================================================================
- -- [SISTEMA DE TELEPORT MELHORADO - ANTI-BUG DE ANIMAÇÕES]
- --================================================================================
- local function safeTeleport(cframe)
- if not humanoidRoot or not cframe then return false end
- local humanoid = chr:FindFirstChildOfClass("Humanoid")
- -- Para TODAS as animações em execução
- if humanoid then
- pcall(function()
- for _, track in pairs(humanoid:GetPlayingAnimationTracks()) do
- track:Stop(0)
- end
- end)
- -- Reseta estados que podem interferir
- pcall(function() humanoid.PlatformStand = false end)
- pcall(function() humanoid.Sit = false end)
- pcall(function() humanoid.AutoRotate = true end)
- end
- -- Limpa todas as velocidades do HumanoidRootPart
- if humanoidRoot:IsA("BasePart") then
- pcall(function()
- humanoidRoot.Velocity = Vector3.new(0, 0, 0)
- humanoidRoot.RotVelocity = Vector3.new(0, 0, 0)
- humanoidRoot.AssemblyLinearVelocity = Vector3.new(0, 0, 0)
- humanoidRoot.AssemblyAngularVelocity = Vector3.new(0, 0, 0)
- end)
- end
- -- Limpa velocidades de todas as partes do personagem (para dinossauros e modelos complexos)
- pcall(function()
- for _, part in pairs(chr:GetDescendants()) do
- if part:IsA("BasePart") then
- part.Velocity = Vector3.new(0, 0, 0)
- part.RotVelocity = Vector3.new(0, 0, 0)
- if part:IsA("MeshPart") or part:IsA("Part") then
- part.AssemblyLinearVelocity = Vector3.new(0, 0, 0)
- part.AssemblyAngularVelocity = Vector3.new(0, 0, 0)
- end
- end
- end
- end)
- -- Ancora temporariamente para garantir teleport instantâneo
- local wasAnchored = humanoidRoot.Anchored
- humanoidRoot.Anchored = true
- -- Executa o teleport
- humanoidRoot.CFrame = cframe
- -- Aguarda 2 frames para garantir que o CFrame foi aplicado
- task.wait()
- task.wait()
- -- Desancora
- humanoidRoot.Anchored = wasAnchored
- -- Força atualização de física
- if humanoid then
- pcall(function()
- humanoid:ChangeState(Enum.HumanoidStateType.Landed)
- end)
- end
- return true
- end
- -- Função de teleport original (mantida para compatibilidade)
- local function teleportTo(cframe)
- return safeTeleport(cframe)
- end
- --================================================================================
- -- [UI OTIMIZADA COM SISTEMA DE PÁGINAS]
- --================================================================================
- local function AnimateHover(button, a, b)
- button.MouseEnter:Connect(function()
- TweenService:Create(button, TweenInfo.new(0.2), {BackgroundColor3 = a}):Play()
- end)
- button.MouseLeave:Connect(function()
- TweenService:Create(button, TweenInfo.new(0.2), {BackgroundColor3 = b}):Play()
- end)
- end
- local ScreenGui = Instance.new("ScreenGui")
- ScreenGui.Name = "Save Locate (NickZ)"
- ScreenGui.ResetOnSpawn = false
- ScreenGui.Parent = game:GetService("CoreGui")
- local MainFrame = Instance.new("Frame")
- MainFrame.Size = UDim2.new(0, 600, 0, 470) -- AUMENTADO para acomodar navegação de páginas
- MainFrame.Position = UDim2.new(0.5, -300, 0.5, -235)
- MainFrame.BackgroundColor3 = Color3.fromRGB(20, 18, 28)
- MainFrame.BackgroundTransparency = 0.2
- MainFrame.BorderSizePixel = 0
- MainFrame.AnchorPoint = Vector2.new(0.5, 0.5)
- MainFrame.Active = true
- MainFrame.Draggable = true
- MainFrame.ClipsDescendants = true
- MainFrame.Parent = ScreenGui
- local UICorner = Instance.new("UICorner", MainFrame)
- UICorner.CornerRadius = UDim.new(0, 8)
- local UIStroke = Instance.new("UIStroke", MainFrame)
- UIStroke.Color = Color3.fromRGB(120, 90, 255)
- UIStroke.Thickness = 1.5
- local UIGradient_BG = Instance.new("UIGradient", MainFrame)
- UIGradient_BG.Color = ColorSequence.new({
- ColorSequenceKeypoint.new(0, Color3.fromRGB(25, 22, 38)),
- ColorSequenceKeypoint.new(1, Color3.fromRGB(45, 40, 65))
- })
- UIGradient_BG.Rotation = 90
- local TopBar = Instance.new("Frame", MainFrame)
- TopBar.Size = UDim2.new(1, 0, 0, 40)
- TopBar.BackgroundTransparency = 1
- local TitleLabel = Instance.new("TextLabel", TopBar)
- TitleLabel.Size = UDim2.new(1, -45, 1, 0)
- TitleLabel.Position = UDim2.new(0, 15, 0, 0)
- TitleLabel.BackgroundTransparency = 1
- TitleLabel.Text = "✧ Save Locate (NickZ) - 50 Slots"
- TitleLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
- TitleLabel.Font = Enum.Font.GothamSemibold
- TitleLabel.TextSize = 18
- TitleLabel.TextXAlignment = Enum.TextXAlignment.Left
- local CloseBtn = Instance.new("TextButton", TopBar)
- CloseBtn.Size = UDim2.new(0, 30, 0, 30)
- CloseBtn.Position = UDim2.new(1, -35, 0.5, -15)
- CloseBtn.BackgroundColor3 = Color3.fromRGB(45, 40, 65)
- CloseBtn.Text = "✕"
- CloseBtn.Font = Enum.Font.GothamBold
- CloseBtn.TextSize = 16
- CloseBtn.TextColor3 = Color3.fromRGB(255, 120, 120)
- local C1 = Instance.new("UICorner", CloseBtn)
- C1.CornerRadius = UDim.new(0, 6)
- AnimateHover(CloseBtn, Color3.fromRGB(255, 100, 100), Color3.fromRGB(45, 40, 65))
- CloseBtn.MouseButton1Click:Connect(function() MainFrame.Visible = false end)
- local OpenBtn = Instance.new("TextButton", ScreenGui)
- OpenBtn.Size = UDim2.new(0, 45, 0, 45)
- OpenBtn.Position = UDim2.new(0, 15, 0.5, -22.5)
- OpenBtn.BackgroundColor3 = Color3.fromRGB(20, 18, 28)
- OpenBtn.Text = "✧"
- OpenBtn.Font = Enum.Font.GothamBold
- OpenBtn.TextSize = 24
- OpenBtn.TextColor3 = Color3.fromRGB(120, 90, 255)
- OpenBtn.Visible = false
- local C2 = Instance.new("UICorner", OpenBtn)
- C2.CornerRadius = UDim.new(0, 8)
- local S2 = Instance.new("UIStroke", OpenBtn)
- S2.Color = Color3.fromRGB(120, 90, 255)
- S2.Thickness = 1.5
- OpenBtn.MouseButton1Click:Connect(function() MainFrame.Visible = true end)
- MainFrame:GetPropertyChangedSignal("Visible"):Connect(function() OpenBtn.Visible = not MainFrame.Visible end)
- -- Botão principal (mantido igual)
- local MainPosContainer = Instance.new("Frame", ScreenGui)
- MainPosContainer.Size = UDim2.new(0, 50, 0, 50)
- MainPosContainer.Position = UDim2.new(1, -60, 0, 10)
- MainPosContainer.BackgroundTransparency = 1
- MainPosContainer.Visible = false
- MainPosContainer.Active = true
- MainPosContainer.Draggable = true
- local MainPosBtn = Instance.new("TextButton", MainPosContainer)
- MainPosBtn.Size = UDim2.new(1, 0, 1, 0)
- MainPosBtn.Position = UDim2.new(0, 0, 0, 0)
- MainPosBtn.BackgroundColor3 = Color3.fromRGB(25, 22, 38)
- MainPosBtn.BackgroundTransparency = 0.1
- MainPosBtn.Text = "🚀"
- MainPosBtn.Font = Enum.Font.GothamBold
- MainPosBtn.TextSize = 24
- MainPosBtn.TextColor3 = Color3.new(1, 1, 1)
- local MP_Corner = Instance.new("UICorner", MainPosBtn)
- MP_Corner.CornerRadius = UDim.new(0.5, 0)
- local MP_Stroke = Instance.new("UIStroke", MainPosBtn)
- MP_Stroke.Color = Color3.fromRGB(120, 90, 255)
- MP_Stroke.Thickness = 2
- local MP_Tooltip = Instance.new("TextLabel", MainPosBtn)
- MP_Tooltip.Size = UDim2.new(0, 150, 0, 30)
- MP_Tooltip.Position = UDim2.new(-3.2, 0, 0.5, -15)
- MP_Tooltip.BackgroundColor3 = Color3.fromRGB(20, 18, 28)
- MP_Tooltip.BackgroundTransparency = 0.1
- MP_Tooltip.Text = ""
- MP_Tooltip.TextColor3 = Color3.fromRGB(255, 255, 255)
- MP_Tooltip.Font = Enum.Font.Gotham
- MP_Tooltip.TextSize = 12
- MP_Tooltip.Visible = false
- MP_Tooltip.ZIndex = 2
- local Tooltip_Corner = Instance.new("UICorner", MP_Tooltip)
- Tooltip_Corner.CornerRadius = UDim.new(0, 6)
- local Tooltip_Stroke = Instance.new("UIStroke", MP_Tooltip)
- Tooltip_Stroke.Color = Color3.fromRGB(120, 90, 255)
- Tooltip_Stroke.Thickness = 1
- local MP_RemoveBtn = Instance.new("TextButton", MainPosBtn)
- MP_RemoveBtn.Size = UDim2.new(0, 20, 0, 20)
- MP_RemoveBtn.Position = UDim2.new(1, -5, 0, -5)
- MP_RemoveBtn.BackgroundColor3 = Color3.fromRGB(200, 80, 80)
- MP_RemoveBtn.Text = "×"
- MP_RemoveBtn.Font = Enum.Font.GothamBold
- MP_RemoveBtn.TextSize = 14
- MP_RemoveBtn.TextColor3 = Color3.new(1, 1, 1)
- MP_RemoveBtn.Visible = false
- MP_RemoveBtn.ZIndex = 3
- local Remove_Corner = Instance.new("UICorner", MP_RemoveBtn)
- Remove_Corner.CornerRadius = UDim.new(0.5, 0)
- MainPosBtn.MouseButton1Click:Connect(function()
- if mainPosition and safeTeleport(mainPosition.position) then
- MainPosBtn.Text = "✅"
- TweenService:Create(MainPosBtn, TweenInfo.new(0.2), {BackgroundColor3 = Color3.fromRGB(80, 200, 120)}):Play()
- task.wait(1)
- if MainPosBtn.Parent then
- MainPosBtn.Text = "🚀"
- TweenService:Create(MainPosBtn, TweenInfo.new(0.2), {BackgroundColor3 = Color3.fromRGB(25, 22, 38)}):Play()
- end
- end
- end)
- MainPosBtn.MouseEnter:Connect(function()
- if mainPosition then
- MP_Tooltip.Text = mainPosition.name or "Principal"
- MP_Tooltip.Visible = true
- MP_RemoveBtn.Visible = true
- end
- TweenService:Create(MainPosBtn, TweenInfo.new(0.2), {Size = UDim2.new(1.1, 0, 1.1, 0)}):Play()
- TweenService:Create(MP_Stroke, TweenInfo.new(0.2), {Thickness = 3}):Play()
- end)
- MainPosBtn.MouseLeave:Connect(function()
- MP_Tooltip.Visible = false
- MP_RemoveBtn.Visible = false
- TweenService:Create(MainPosBtn, TweenInfo.new(0.2), {Size = UDim2.new(1, 0, 1, 0)}):Play()
- TweenService:Create(MP_Stroke, TweenInfo.new(0.2), {Thickness = 2}):Play()
- end)
- -- Controles superiores
- local ControlsFrame = Instance.new("Frame", MainFrame)
- ControlsFrame.Size = UDim2.new(1, -20, 0, 90)
- ControlsFrame.Position = UDim2.new(0, 10, 0, 45)
- ControlsFrame.BackgroundTransparency = 1
- local SaveButton = Instance.new("TextButton", ControlsFrame)
- SaveButton.Text = "Salvar Posição"
- SaveButton.Size = UDim2.new(0.5, -5, 1, -50)
- SaveButton.Position = UDim2.new(0, 0, 0, 0)
- SaveButton.BackgroundColor3 = Color3.fromRGB(60, 180, 120)
- SaveButton.Font = Enum.Font.GothamSemibold
- SaveButton.TextSize = 16
- SaveButton.TextColor3 = Color3.new(1, 1, 1)
- local C3 = Instance.new("UICorner", SaveButton)
- C3.CornerRadius = UDim.new(0, 6)
- AnimateHover(SaveButton, Color3.fromRGB(80, 220, 140), Color3.fromRGB(60, 180, 120))
- local NameField = Instance.new("TextBox", ControlsFrame)
- NameField.PlaceholderText = "Nome da Posição..."
- NameField.Size = UDim2.new(1, 0, 0, 40)
- NameField.Position = UDim2.new(0, 0, 0, 50)
- NameField.BackgroundColor3 = Color3.fromRGB(30, 28, 42)
- NameField.TextColor3 = Color3.new(1, 1, 1)
- NameField.Font = Enum.Font.Gotham
- NameField.TextSize = 14
- NameField.PlaceholderColor3 = Color3.fromRGB(150,150,150)
- local C4 = Instance.new("UICorner", NameField)
- C4.CornerRadius = UDim.new(0, 6)
- local S4 = Instance.new("UIStroke", NameField)
- S4.Color = Color3.fromRGB(80, 70, 130)
- S4.Thickness = 1
- local SaveSlotLabel = Instance.new("TextLabel", ControlsFrame)
- SaveSlotLabel.Size = UDim2.new(0.5, -5, 0, 20)
- SaveSlotLabel.Position = UDim2.new(0.5, 5, 0, 5)
- SaveSlotLabel.BackgroundTransparency = 1
- SaveSlotLabel.TextColor3 = Color3.fromRGB(200, 200, 255)
- SaveSlotLabel.Font = Enum.Font.Gotham
- SaveSlotLabel.TextSize = 14
- SaveSlotLabel.Text = "Slot Atual: " .. currentSaveSlot
- SaveSlotLabel.TextXAlignment = Enum.TextXAlignment.Left
- local SlotPrev = Instance.new("TextButton", ControlsFrame)
- SlotPrev.Text = "<"
- SlotPrev.Size = UDim2.new(0, 35, 0, 30)
- SlotPrev.Position = UDim2.new(0.5, 5, 0, 22)
- SlotPrev.BackgroundColor3 = Color3.fromRGB(80, 70, 130)
- SlotPrev.Font = Enum.Font.GothamBold
- SlotPrev.TextSize = 16
- SlotPrev.TextColor3 = Color3.new(1, 1, 1)
- local C5 = Instance.new("UICorner", SlotPrev)
- C5.CornerRadius = UDim.new(0, 6)
- AnimateHover(SlotPrev, Color3.fromRGB(100, 90, 150), Color3.fromRGB(80, 70, 130))
- local SlotNext = Instance.new("TextButton", ControlsFrame)
- SlotNext.Text = ">"
- SlotNext.Size = UDim2.new(0, 35, 0, 30)
- SlotNext.Position = UDim2.new(0.5, 45, 0, 22)
- SlotNext.BackgroundColor3 = Color3.fromRGB(80, 70, 130)
- SlotNext.Font = Enum.Font.GothamBold
- SlotNext.TextSize = 16
- SlotNext.TextColor3 = Color3.new(1, 1, 1)
- local C6 = Instance.new("UICorner", SlotNext)
- C6.CornerRadius = UDim.new(0, 6)
- AnimateHover(SlotNext, Color3.fromRGB(100, 90, 150), Color3.fromRGB(80, 70, 130))
- --================================================================================
- -- [NOVO: SISTEMA DE NAVEGAÇÃO DE PÁGINAS]
- --================================================================================
- local PageNavigationFrame = Instance.new("Frame", MainFrame)
- PageNavigationFrame.Size = UDim2.new(1, -20, 0, 35)
- PageNavigationFrame.Position = UDim2.new(0, 10, 0, 135)
- PageNavigationFrame.BackgroundTransparency = 1
- local PageLabel = Instance.new("TextLabel", PageNavigationFrame)
- PageLabel.Size = UDim2.new(0, 150, 1, 0)
- PageLabel.Position = UDim2.new(0.5, -75, 0, 0)
- PageLabel.BackgroundTransparency = 1
- PageLabel.TextColor3 = Color3.fromRGB(200, 200, 255)
- PageLabel.Font = Enum.Font.GothamBold
- PageLabel.TextSize = 16
- PageLabel.Text = string.format("Página %d/%d", currentPage, maxPages)
- local PagePrevBtn = Instance.new("TextButton", PageNavigationFrame)
- PagePrevBtn.Text = "◀"
- PagePrevBtn.Size = UDim2.new(0, 40, 0, 30)
- PagePrevBtn.Position = UDim2.new(0, 0, 0, 2.5)
- PagePrevBtn.BackgroundColor3 = Color3.fromRGB(80, 70, 130)
- PagePrevBtn.Font = Enum.Font.GothamBold
- PagePrevBtn.TextSize = 14
- PagePrevBtn.TextColor3 = Color3.new(1, 1, 1)
- local PPB_Corner = Instance.new("UICorner", PagePrevBtn)
- PPB_Corner.CornerRadius = UDim.new(0, 6)
- AnimateHover(PagePrevBtn, Color3.fromRGB(100, 90, 150), Color3.fromRGB(80, 70, 130))
- local PageNextBtn = Instance.new("TextButton", PageNavigationFrame)
- PageNextBtn.Text = "▶"
- PageNextBtn.Size = UDim2.new(0, 40, 0, 30)
- PageNextBtn.Position = UDim2.new(1, -40, 0, 2.5)
- PageNextBtn.BackgroundColor3 = Color3.fromRGB(80, 70, 130)
- PageNextBtn.Font = Enum.Font.GothamBold
- PageNextBtn.TextSize = 14
- PageNextBtn.TextColor3 = Color3.new(1, 1, 1)
- local PNB_Corner = Instance.new("UICorner", PageNextBtn)
- PNB_Corner.CornerRadius = UDim.new(0, 6)
- AnimateHover(PageNextBtn, Color3.fromRGB(100, 90, 150), Color3.fromRGB(80, 70, 130))
- -- Botões de página rápida (1-5)
- local QuickPageFrame = Instance.new("Frame", PageNavigationFrame)
- QuickPageFrame.Size = UDim2.new(0, 200, 0, 25)
- QuickPageFrame.Position = UDim2.new(0.5, -100, 0, 35)
- QuickPageFrame.BackgroundTransparency = 1
- local quickPageButtons = {}
- for i = 1, maxPages do
- local btn = Instance.new("TextButton", QuickPageFrame)
- btn.Text = tostring(i)
- btn.Size = UDim2.new(0, 35, 0, 25)
- btn.Position = UDim2.new(0, (i-1) * 40, 0, 0)
- btn.BackgroundColor3 = Color3.fromRGB(60, 55, 80)
- btn.Font = Enum.Font.GothamBold
- btn.TextSize = 13
- btn.TextColor3 = Color3.new(1, 1, 1)
- local qp_corner = Instance.new("UICorner", btn)
- qp_corner.CornerRadius = UDim.new(0, 5)
- AnimateHover(btn, Color3.fromRGB(90, 80, 120), Color3.fromRGB(60, 55, 80))
- quickPageButtons[i] = btn
- end
- -- Container de slots (agora mostra apenas a página atual)
- local SlotsContainer = Instance.new("Frame", MainFrame)
- SlotsContainer.Size = UDim2.new(1, -20, 1, -220) -- AJUSTADO para acomodar navegação
- SlotsContainer.Position = UDim2.new(0, 10, 0, 210) -- AJUSTADO
- SlotsContainer.BackgroundTransparency = 1
- local GridLayout = Instance.new("UIGridLayout", SlotsContainer)
- GridLayout.CellPadding = UDim2.new(0, 8, 0, 8)
- GridLayout.CellSize = UDim2.new(0.5, -4, 0, 50)
- GridLayout.FillDirection = Enum.FillDirection.Vertical
- GridLayout.SortOrder = Enum.SortOrder.LayoutOrder
- GridLayout.StartCorner = Enum.StartCorner.TopLeft
- -- Overlays (mantidos iguais)
- local ConfirmationOverlay = Instance.new("Frame", MainFrame)
- ConfirmationOverlay.Name = "ConfirmationOverlay"
- ConfirmationOverlay.Size = UDim2.new(1, 0, 1, 0)
- ConfirmationOverlay.BackgroundColor3 = Color3.new(0, 0, 0)
- ConfirmationOverlay.BackgroundTransparency = 0.6
- ConfirmationOverlay.Visible = false
- ConfirmationOverlay.ZIndex = 10
- local ConfirmationFrame = Instance.new("Frame", ConfirmationOverlay)
- ConfirmationFrame.Size = UDim2.new(0, 300, 0, 120)
- ConfirmationFrame.Position = UDim2.new(0.5, -150, 0.5, -60)
- ConfirmationFrame.BackgroundColor3 = Color3.fromRGB(35, 32, 50)
- local CF_C = Instance.new("UICorner", ConfirmationFrame)
- CF_C.CornerRadius = UDim.new(0, 8)
- local CF_S = Instance.new("UIStroke", ConfirmationFrame)
- CF_S.Color = Color3.fromRGB(120, 90, 255)
- CF_S.Thickness = 1.5
- local ConfirmLabel = Instance.new("TextLabel", ConfirmationFrame)
- ConfirmLabel.Size = UDim2.new(1, -20, 0, 60)
- ConfirmLabel.Position = UDim2.new(0, 10, 0, 0)
- ConfirmLabel.BackgroundTransparency = 1
- ConfirmLabel.TextColor3 = Color3.new(1, 1, 1)
- ConfirmLabel.Font = Enum.Font.GothamSemibold
- ConfirmLabel.TextSize = 16
- ConfirmLabel.TextWrapped = true
- local ConfirmYes = Instance.new("TextButton", ConfirmationFrame)
- ConfirmYes.Size = UDim2.new(0.5, -15, 0, 40)
- ConfirmYes.Position = UDim2.new(0, 10, 1, -50)
- ConfirmYes.BackgroundColor3 = Color3.fromRGB(220, 80, 80)
- ConfirmYes.Font = Enum.Font.GothamBold
- ConfirmYes.Text = "Sim"
- ConfirmYes.TextColor3 = Color3.new(1, 1, 1)
- ConfirmYes.TextSize = 14
- local CY_C = Instance.new("UICorner", ConfirmYes)
- CY_C.CornerRadius = UDim.new(0, 6)
- AnimateHover(ConfirmYes, Color3.fromRGB(240, 100, 100), Color3.fromRGB(220, 80, 80))
- local ConfirmNo = Instance.new("TextButton", ConfirmationFrame)
- ConfirmNo.Size = UDim2.new(0.5, -15, 0, 40)
- ConfirmNo.Position = UDim2.new(0.5, 5, 1, -50)
- ConfirmNo.BackgroundColor3 = Color3.fromRGB(80, 70, 130)
- ConfirmNo.Font = Enum.Font.GothamBold
- ConfirmNo.Text = "Não"
- ConfirmNo.TextColor3 = Color3.new(1, 1, 1)
- ConfirmNo.TextSize = 14
- local CN_C = Instance.new("UICorner", ConfirmNo)
- CN_C.CornerRadius = UDim.new(0, 6)
- AnimateHover(ConfirmNo, Color3.fromRGB(100, 90, 150), Color3.fromRGB(80, 70, 130))
- local RenameOverlay = Instance.new("Frame", MainFrame)
- RenameOverlay.Name = "RenameOverlay"
- RenameOverlay.Size = UDim2.new(1, 0, 1, 0)
- RenameOverlay.BackgroundColor3 = Color3.new(0, 0, 0)
- RenameOverlay.BackgroundTransparency = 0.6
- RenameOverlay.Visible = false
- RenameOverlay.ZIndex = 11
- local RenameFrame = Instance.new("Frame", RenameOverlay)
- RenameFrame.Size = UDim2.new(0, 350, 0, 160)
- RenameFrame.Position = UDim2.new(0.5, -175, 0.5, -80)
- RenameFrame.BackgroundColor3 = Color3.fromRGB(35, 32, 50)
- local RF_C = Instance.new("UICorner", RenameFrame)
- RF_C.CornerRadius = UDim.new(0, 8)
- local RF_S = Instance.new("UIStroke", RenameFrame)
- RF_S.Color = Color3.fromRGB(120, 90, 255)
- RF_S.Thickness = 1.5
- local RenameTitle = Instance.new("TextLabel", RenameFrame)
- RenameTitle.Size = UDim2.new(1, -20, 0, 40)
- RenameTitle.Position = UDim2.new(0, 10, 0, 0)
- RenameTitle.BackgroundTransparency = 1
- RenameTitle.TextColor3 = Color3.new(1, 1, 1)
- RenameTitle.Font = Enum.Font.GothamSemibold
- RenameTitle.TextSize = 16
- RenameTitle.Text = "Renomear Posição"
- local RenameField = Instance.new("TextBox", RenameFrame)
- RenameField.Size = UDim2.new(1, -20, 0, 40)
- RenameField.Position = UDim2.new(0, 10, 0, 50)
- RenameField.BackgroundColor3 = Color3.fromRGB(30, 28, 42)
- RenameField.TextColor3 = Color3.new(1, 1, 1)
- RenameField.Font = Enum.Font.Gotham
- RenameField.TextSize = 14
- local RFD_C = Instance.new("UICorner", RenameField)
- RFD_C.CornerRadius = UDim.new(0, 6)
- local RFD_S = Instance.new("UIStroke", RenameField)
- RFD_S.Color = Color3.fromRGB(80, 70, 130)
- RFD_S.Thickness = 1
- local RenameConfirm = Instance.new("TextButton", RenameFrame)
- RenameConfirm.Size = UDim2.new(0.5, -15, 0, 40)
- RenameConfirm.Position = UDim2.new(0, 10, 1, -50)
- RenameConfirm.BackgroundColor3 = Color3.fromRGB(80, 160, 220)
- RenameConfirm.Font = Enum.Font.GothamBold
- RenameConfirm.Text = "Confirmar"
- RenameConfirm.TextColor3 = Color3.new(1, 1, 1)
- RenameConfirm.TextSize = 14
- local RC_C = Instance.new("UICorner", RenameConfirm)
- RC_C.CornerRadius = UDim.new(0, 6)
- AnimateHover(RenameConfirm, Color3.fromRGB(100, 180, 240), Color3.fromRGB(80, 160, 220))
- local RenameCancel = Instance.new("TextButton", RenameFrame)
- RenameCancel.Size = UDim2.new(0.5, -15, 0, 40)
- RenameCancel.Position = UDim2.new(0.5, 5, 1, -50)
- RenameCancel.BackgroundColor3 = Color3.fromRGB(80, 70, 130)
- RenameCancel.Font = Enum.Font.GothamBold
- RenameCancel.Text = "Cancelar"
- RenameCancel.TextColor3 = Color3.new(1, 1, 1)
- RenameCancel.TextSize = 14
- local RCN_C = Instance.new("UICorner", RenameCancel)
- RCN_C.CornerRadius = UDim.new(0, 6)
- AnimateHover(RenameCancel, Color3.fromRGB(100, 90, 150), Color3.fromRGB(80, 70, 130))
- local MoveOverlay = Instance.new("Frame", MainFrame)
- MoveOverlay.Name = "MoveOverlay"
- MoveOverlay.Size = UDim2.new(1, 0, 1, 0)
- MoveOverlay.BackgroundColor3 = Color3.new(0, 0, 0)
- MoveOverlay.BackgroundTransparency = 0.6
- MoveOverlay.Visible = false
- MoveOverlay.ZIndex = 12
- local MoveFrame = Instance.new("Frame", MoveOverlay)
- MoveFrame.Size = UDim2.new(0, 300, 0, 180)
- MoveFrame.Position = UDim2.new(0.5, -150, 0.5, -90)
- MoveFrame.BackgroundColor3 = Color3.fromRGB(35, 32, 50)
- local MF_C = Instance.new("UICorner", MoveFrame)
- MF_C.CornerRadius = UDim.new(0, 8)
- local MF_S = Instance.new("UIStroke", MoveFrame)
- MF_S.Color = Color3.fromRGB(120, 90, 255)
- MF_S.Thickness = 1.5
- local MoveTitle = Instance.new("TextLabel", MoveFrame)
- MoveTitle.Size = UDim2.new(1, -20, 0, 40)
- MoveTitle.Position = UDim2.new(0, 10, 0, 10)
- MoveTitle.BackgroundTransparency = 1
- MoveTitle.TextColor3 = Color3.new(1, 1, 1)
- MoveTitle.Font = Enum.Font.GothamSemibold
- MoveTitle.TextSize = 16
- MoveTitle.Text = "Mover Posição"
- local MoveInfo = Instance.new("TextLabel", MoveFrame)
- MoveInfo.Size = UDim2.new(1, -20, 0, 20)
- MoveInfo.Position = UDim2.new(0, 10, 0, 50)
- MoveInfo.BackgroundTransparency = 1
- MoveInfo.TextColor3 = Color3.fromRGB(200, 200, 200)
- MoveInfo.Font = Enum.Font.Gotham
- MoveInfo.TextSize = 13
- MoveInfo.Text = "Digite o número do slot de destino (1-50):"
- local MoveInput = Instance.new("TextBox", MoveFrame)
- MoveInput.Size = UDim2.new(0, 80, 0, 40)
- MoveInput.Position = UDim2.new(0.5, -40, 0, 80)
- MoveInput.BackgroundColor3 = Color3.fromRGB(30, 28, 42)
- MoveInput.TextColor3 = Color3.new(1, 1, 1)
- MoveInput.Font = Enum.Font.GothamBold
- MoveInput.TextSize = 20
- MoveInput.Text = ""
- MoveInput.PlaceholderText = "1-50"
- local MI_C = Instance.new("UICorner", MoveInput)
- MI_C.CornerRadius = UDim.new(0, 6)
- local MI_S = Instance.new("UIStroke", MoveInput)
- MI_S.Color = Color3.fromRGB(80, 70, 130)
- MI_S.Thickness = 1
- local MoveConfirm = Instance.new("TextButton", MoveFrame)
- MoveConfirm.Size = UDim2.new(0.5, -15, 0, 35)
- MoveConfirm.Position = UDim2.new(0, 10, 1, -45)
- MoveConfirm.BackgroundColor3 = Color3.fromRGB(80, 160, 220)
- MoveConfirm.Font = Enum.Font.GothamBold
- MoveConfirm.Text = "Confirmar"
- MoveConfirm.TextColor3 = Color3.new(1, 1, 1)
- MoveConfirm.TextSize = 14
- local MC_C = Instance.new("UICorner", MoveConfirm)
- MC_C.CornerRadius = UDim.new(0, 6)
- AnimateHover(MoveConfirm, Color3.fromRGB(100, 180, 240), Color3.fromRGB(80, 160, 220))
- local MoveCancel = Instance.new("TextButton", MoveFrame)
- MoveCancel.Size = UDim2.new(0.5, -15, 0, 35)
- MoveCancel.Position = UDim2.new(0.5, 5, 1, -45)
- MoveCancel.BackgroundColor3 = Color3.fromRGB(80, 70, 130)
- MoveCancel.Font = Enum.Font.GothamBold
- MoveCancel.Text = "Cancelar"
- MoveCancel.TextColor3 = Color3.new(1, 1, 1)
- MoveCancel.TextSize = 14
- local MCN_C = Instance.new("UICorner", MoveCancel)
- MCN_C.CornerRadius = UDim.new(0, 6)
- AnimateHover(MoveCancel, Color3.fromRGB(100, 90, 150), Color3.fromRGB(80, 70, 130))
- --================================================================================
- -- [LÓGICA DO SISTEMA - ATUALIZADA COM SISTEMA DE PÁGINAS]
- --================================================================================
- local onConfirmCallback = nil
- local slotToRename = nil
- local slotToMove = nil
- local function updateMainPositionUI()
- if mainPosition then
- MainPosContainer.Visible = true
- else
- MainPosContainer.Visible = false
- end
- end
- local function setMainPosition(slot)
- if savedPositions[slot] then
- mainPosition = {
- position = savedPositions[slot].position,
- name = savedPositions[slot].name,
- timestamp = savedPositions[slot].timestamp
- }
- saveMainPosition()
- updateMainPositionUI()
- end
- end
- MP_RemoveBtn.MouseButton1Click:Connect(function()
- ConfirmLabel.Text = "Remover posição principal?"
- ConfirmYes.Text = "Sim"
- onConfirmCallback = function()
- mainPosition = nil
- if hasFS and hasDelFile then pcall(delfile, MAIN_FILE) end
- if hasFS and hasDelFile then pcall(delfile, MAIN_BAK_FILE) end
- updateMainPositionUI()
- end
- ConfirmationOverlay.Visible = true
- end)
- local function swapPositions(fromSlot, toSlot)
- if fromSlot == toSlot then return end
- if savedPositions[toSlot] then
- local temp = savedPositions[fromSlot]
- savedPositions[fromSlot] = savedPositions[toSlot]
- savedPositions[toSlot] = temp
- else
- savedPositions[toSlot] = savedPositions[fromSlot]
- savedPositions[fromSlot] = nil
- end
- saveToDisk()
- end
- local function findNextEmptySlot()
- for i = 1, maxSaves do
- if not savedPositions[i] then return i end
- end
- return (currentSaveSlot % maxSaves) + 1
- end
- local function selectNextSlot()
- currentSaveSlot = findNextEmptySlot()
- SaveSlotLabel.Text = "Slot Atual: " .. currentSaveSlot
- -- NOVO: Atualiza a página automaticamente
- currentPage = math.ceil(currentSaveSlot / slotsPerPage)
- updatePageDisplay()
- end
- local updateSavedList
- local function openRenamePrompt(slot)
- if not savedPositions[slot] then return end
- slotToRename = slot
- RenameTitle.Text = string.format("Renomear Slot %d", slot)
- RenameField.Text = savedPositions[slot].name
- RenameOverlay.Visible = true
- end
- local function openMovePrompt(slot)
- if not savedPositions[slot] then return end
- slotToMove = slot
- MoveTitle.Text = string.format("Mover Slot %d: %s", slot, savedPositions[slot].name)
- MoveInput.Text = ""
- MoveOverlay.Visible = true
- end
- --================================================================================
- -- [NOVO: FUNÇÃO DE ATUALIZAÇÃO DE PÁGINA]
- --================================================================================
- function updatePageDisplay()
- PageLabel.Text = string.format("Página %d/%d", currentPage, maxPages)
- -- Atualiza destaque dos botões rápidos
- for i, btn in ipairs(quickPageButtons) do
- if i == currentPage then
- btn.BackgroundColor3 = Color3.fromRGB(120, 90, 255)
- btn.TextSize = 14
- else
- btn.BackgroundColor3 = Color3.fromRGB(60, 55, 80)
- btn.TextSize = 13
- end
- end
- -- Atualiza a lista de slots
- if updateSavedList then
- updateSavedList()
- end
- end
- -- Navegação de páginas
- PagePrevBtn.MouseButton1Click:Connect(function()
- if currentPage > 1 then
- currentPage = currentPage - 1
- updatePageDisplay()
- end
- end)
- PageNextBtn.MouseButton1Click:Connect(function()
- if currentPage < maxPages then
- currentPage = currentPage + 1
- updatePageDisplay()
- end
- end)
- -- Botões de página rápida
- for i, btn in ipairs(quickPageButtons) do
- btn.MouseButton1Click:Connect(function()
- currentPage = i
- updatePageDisplay()
- end)
- end
- --================================================================================
- -- [ATUALIZAÇÃO DA LISTA DE SLOTS - AGORA COM PAGINAÇÃO]
- --================================================================================
- updateSavedList = function()
- -- Limpa slots anteriores
- for _, child in ipairs(SlotsContainer:GetChildren()) do
- if child:IsA("Frame") then child:Destroy() end
- end
- -- Calcula range de slots para a página atual
- local startSlot = (currentPage - 1) * slotsPerPage + 1
- local endSlot = math.min(currentPage * slotsPerPage, maxSaves)
- local displayIndex = 0
- for slot = startSlot, endSlot do
- displayIndex = displayIndex + 1
- local entryFrame = Instance.new("Frame")
- entryFrame.Name = "Slot_" .. slot
- entryFrame.LayoutOrder = displayIndex
- entryFrame.BackgroundColor3 = Color3.fromRGB(40, 38, 55)
- entryFrame.BackgroundTransparency = 0.5
- entryFrame.Parent = SlotsContainer
- entryFrame.ClipsDescendants = false
- local C7 = Instance.new("UICorner", entryFrame)
- C7.CornerRadius = UDim.new(0, 6)
- local data = savedPositions[slot]
- if data then
- local actionsFrame = Instance.new("Frame", entryFrame)
- actionsFrame.Name = "ActionsFrame"
- actionsFrame.Size = UDim2.new(0, 30, 1, 0)
- actionsFrame.Position = UDim2.new(0, 5, 0, 0)
- actionsFrame.BackgroundTransparency = 1
- local mainBtn = Instance.new("TextButton", actionsFrame)
- mainBtn.Name = "MainBtn"
- mainBtn.Text = mainPosition and mainPosition.position == data.position and "★" or "☆"
- mainBtn.Size = UDim2.new(1, 0, 0, 22)
- mainBtn.Position = UDim2.new(0, 0, 0, 2)
- mainBtn.BackgroundTransparency = 1
- mainBtn.Font = Enum.Font.GothamBold
- mainBtn.TextSize = 14
- mainBtn.TextColor3 = Color3.fromRGB(255, 215, 0)
- mainBtn.MouseEnter:Connect(function()
- mainBtn.TextSize = 16
- end)
- mainBtn.MouseLeave:Connect(function()
- mainBtn.TextSize = 14
- end)
- local menuBtn = Instance.new("TextButton", actionsFrame)
- menuBtn.Name = "MenuBtn"
- menuBtn.Text = "⋮"
- menuBtn.Size = UDim2.new(1, 0, 0, 22)
- menuBtn.Position = UDim2.new(0, 0, 0, 26)
- menuBtn.BackgroundTransparency = 1
- menuBtn.Font = Enum.Font.GothamBold
- menuBtn.TextSize = 18
- menuBtn.TextColor3 = Color3.fromRGB(180, 180, 200)
- menuBtn.MouseEnter:Connect(function()
- menuBtn.TextColor3 = Color3.fromRGB(255, 255, 255)
- menuBtn.TextSize = 20
- end)
- menuBtn.MouseLeave:Connect(function()
- menuBtn.TextColor3 = Color3.fromRGB(180, 180, 200)
- menuBtn.TextSize = 18
- end)
- local optionsFrame = Instance.new("Frame", ScreenGui)
- optionsFrame.Name = "OptionsFrame_" .. slot
- optionsFrame.Size = UDim2.new(0, 120, 0, 110)
- optionsFrame.BackgroundColor3 = Color3.fromRGB(35, 32, 48)
- optionsFrame.BackgroundTransparency = 0.05
- optionsFrame.Visible = false
- optionsFrame.ZIndex = 50
- optionsFrame.BorderSizePixel = 0
- local OptionsCorner = Instance.new("UICorner", optionsFrame)
- OptionsCorner.CornerRadius = UDim.new(0, 8)
- local OptionsStroke = Instance.new("UIStroke", optionsFrame)
- OptionsStroke.Color = Color3.fromRGB(100, 80, 180)
- OptionsStroke.Thickness = 1.5
- local menuTitle = Instance.new("TextLabel", optionsFrame)
- menuTitle.Name = "MenuTitle"
- menuTitle.Size = UDim2.new(1, 0, 0, 20)
- menuTitle.Position = UDim2.new(0, 0, 0, 2)
- menuTitle.BackgroundTransparency = 1
- menuTitle.Text = "Slot " .. slot
- menuTitle.TextColor3 = Color3.fromRGB(200, 200, 220)
- menuTitle.Font = Enum.Font.GothamBold
- menuTitle.TextSize = 11
- menuTitle.ZIndex = 51
- local buttonsContainer = Instance.new("Frame", optionsFrame)
- buttonsContainer.Name = "ButtonsContainer"
- buttonsContainer.Size = UDim2.new(1, -10, 1, -25)
- buttonsContainer.Position = UDim2.new(0, 5, 0, 22)
- buttonsContainer.BackgroundTransparency = 1
- buttonsContainer.ZIndex = 51
- local renameBtn = Instance.new("TextButton", buttonsContainer)
- renameBtn.Name = "RenameBtn"
- renameBtn.Size = UDim2.new(1, 0, 0, 25)
- renameBtn.Position = UDim2.new(0, 0, 0, 0)
- renameBtn.BackgroundColor3 = Color3.fromRGB(45, 42, 58)
- renameBtn.BackgroundTransparency = 0.3
- renameBtn.Text = ""
- renameBtn.Font = Enum.Font.GothamBold
- renameBtn.TextSize = 12
- renameBtn.ZIndex = 52
- local renameBtnCorner = Instance.new("UICorner", renameBtn)
- renameBtnCorner.CornerRadius = UDim.new(0, 4)
- local renameIcon = Instance.new("TextLabel", renameBtn)
- renameIcon.Size = UDim2.new(0, 25, 1, 0)
- renameIcon.Position = UDim2.new(0, 0, 0, 0)
- renameIcon.BackgroundTransparency = 1
- renameIcon.Text = "✏"
- renameIcon.TextColor3 = Color3.fromRGB(150, 180, 255)
- renameIcon.Font = Enum.Font.GothamBold
- renameIcon.TextSize = 14
- renameIcon.ZIndex = 53
- local renameText = Instance.new("TextLabel", renameBtn)
- renameText.Size = UDim2.new(1, -25, 1, 0)
- renameText.Position = UDim2.new(0, 25, 0, 0)
- renameText.BackgroundTransparency = 1
- renameText.Text = "Renomear"
- renameText.TextColor3 = Color3.fromRGB(220, 220, 240)
- renameText.Font = Enum.Font.Gotham
- renameText.TextSize = 11
- renameText.TextXAlignment = Enum.TextXAlignment.Left
- renameText.ZIndex = 53
- local moveBtn = Instance.new("TextButton", buttonsContainer)
- moveBtn.Name = "MoveBtn"
- moveBtn.Size = UDim2.new(1, 0, 0, 25)
- moveBtn.Position = UDim2.new(0, 0, 0, 28)
- moveBtn.BackgroundColor3 = Color3.fromRGB(45, 42, 58)
- moveBtn.BackgroundTransparency = 0.3
- moveBtn.Text = ""
- moveBtn.Font = Enum.Font.GothamBold
- moveBtn.TextSize = 12
- moveBtn.ZIndex = 52
- local moveBtnCorner = Instance.new("UICorner", moveBtn)
- moveBtnCorner.CornerRadius = UDim.new(0, 4)
- local moveIcon = Instance.new("TextLabel", moveBtn)
- moveIcon.Size = UDim2.new(0, 25, 1, 0)
- moveIcon.Position = UDim2.new(0, 0, 0, 0)
- moveIcon.BackgroundTransparency = 1
- moveIcon.Text = "↔"
- moveIcon.TextColor3 = Color3.fromRGB(150, 255, 150)
- moveIcon.Font = Enum.Font.GothamBold
- moveIcon.TextSize = 14
- moveIcon.ZIndex = 53
- local moveText = Instance.new("TextLabel", moveBtn)
- moveText.Size = UDim2.new(1, -25, 1, 0)
- moveText.Position = UDim2.new(0, 25, 0, 0)
- moveText.BackgroundTransparency = 1
- moveText.Text = "Mover"
- moveText.TextColor3 = Color3.fromRGB(220, 220, 240)
- moveText.Font = Enum.Font.Gotham
- moveText.TextSize = 11
- moveText.TextXAlignment = Enum.TextXAlignment.Left
- moveText.ZIndex = 53
- local deleteBtn = Instance.new("TextButton", buttonsContainer)
- deleteBtn.Name = "DeleteBtn"
- deleteBtn.Size = UDim2.new(1, 0, 0, 25)
- deleteBtn.Position = UDim2.new(0, 0, 0, 56)
- deleteBtn.BackgroundColor3 = Color3.fromRGB(45, 42, 58)
- deleteBtn.BackgroundTransparency = 0.3
- deleteBtn.Text = ""
- deleteBtn.Font = Enum.Font.GothamBold
- deleteBtn.TextSize = 12
- deleteBtn.ZIndex = 52
- local deleteBtnCorner = Instance.new("UICorner", deleteBtn)
- deleteBtnCorner.CornerRadius = UDim.new(0, 4)
- local deleteIcon = Instance.new("TextLabel", deleteBtn)
- deleteIcon.Size = UDim2.new(0, 25, 1, 0)
- deleteIcon.Position = UDim2.new(0, 0, 0, 0)
- deleteIcon.BackgroundTransparency = 1
- deleteIcon.Text = "🗑"
- deleteIcon.TextColor3 = Color3.fromRGB(255, 150, 150)
- deleteIcon.Font = Enum.Font.GothamBold
- deleteIcon.TextSize = 14
- deleteIcon.ZIndex = 53
- local deleteText = Instance.new("TextLabel", deleteBtn)
- deleteText.Size = UDim2.new(1, -25, 1, 0)
- deleteText.Position = UDim2.new(0, 25, 0, 0)
- deleteText.BackgroundTransparency = 1
- deleteText.Text = "Excluir"
- deleteText.TextColor3 = Color3.fromRGB(220, 220, 240)
- deleteText.Font = Enum.Font.Gotham
- deleteText.TextSize = 11
- deleteText.TextXAlignment = Enum.TextXAlignment.Left
- deleteText.ZIndex = 53
- renameBtn.MouseEnter:Connect(function()
- TweenService:Create(renameBtn, TweenInfo.new(0.15), {
- BackgroundTransparency = 0,
- BackgroundColor3 = Color3.fromRGB(60, 57, 78)
- }):Play()
- end)
- renameBtn.MouseLeave:Connect(function()
- TweenService:Create(renameBtn, TweenInfo.new(0.15), {
- BackgroundTransparency = 0.3,
- BackgroundColor3 = Color3.fromRGB(45, 42, 58)
- }):Play()
- end)
- moveBtn.MouseEnter:Connect(function()
- TweenService:Create(moveBtn, TweenInfo.new(0.15), {
- BackgroundTransparency = 0,
- BackgroundColor3 = Color3.fromRGB(60, 57, 78)
- }):Play()
- end)
- moveBtn.MouseLeave:Connect(function()
- TweenService:Create(moveBtn, TweenInfo.new(0.15), {
- BackgroundTransparency = 0.3,
- BackgroundColor3 = Color3.fromRGB(45, 42, 58)
- }):Play()
- end)
- deleteBtn.MouseEnter:Connect(function()
- TweenService:Create(deleteBtn, TweenInfo.new(0.15), {
- BackgroundTransparency = 0,
- BackgroundColor3 = Color3.fromRGB(80, 50, 50)
- }):Play()
- end)
- deleteBtn.MouseLeave:Connect(function()
- TweenService:Create(deleteBtn, TweenInfo.new(0.15), {
- BackgroundTransparency = 0.3,
- BackgroundColor3 = Color3.fromRGB(45, 42, 58)
- }):Play()
- end)
- local nameLabel = Instance.new("TextLabel", entryFrame)
- nameLabel.Name = "NameLabel"
- nameLabel.Size = UDim2.new(1, -90, 0, 24)
- nameLabel.Position = UDim2.new(0, 40, 0, 3)
- nameLabel.BackgroundTransparency = 1
- nameLabel.TextColor3 = Color3.fromRGB(220, 220, 255)
- nameLabel.Font = Enum.Font.GothamSemibold
- nameLabel.TextSize = 13
- nameLabel.TextXAlignment = Enum.TextXAlignment.Left
- nameLabel.TextTruncate = Enum.TextTruncate.AtEnd
- nameLabel.Text = data.name
- local timeLabel = Instance.new("TextLabel", entryFrame)
- timeLabel.Name = "TimeLabel"
- timeLabel.Size = UDim2.new(1, -90, 0, 14)
- timeLabel.Position = UDim2.new(0, 40, 0, 28)
- timeLabel.BackgroundTransparency = 1
- timeLabel.TextColor3 = Color3.fromRGB(130, 130, 160)
- timeLabel.Font = Enum.Font.Gotham
- timeLabel.TextSize = 10
- timeLabel.TextXAlignment = Enum.TextXAlignment.Left
- timeLabel.Text = data.timestamp
- if #data.name > 25 then
- local nameTooltip = Instance.new("Frame", ScreenGui)
- nameTooltip.Name = "NameTooltip_" .. slot
- nameTooltip.Size = UDim2.new(0, 280, 0, 60)
- nameTooltip.BackgroundColor3 = Color3.fromRGB(25, 22, 38)
- nameTooltip.BorderSizePixel = 0
- nameTooltip.Visible = false
- nameTooltip.ZIndex = 60
- local TooltipCorner = Instance.new("UICorner", nameTooltip)
- TooltipCorner.CornerRadius = UDim.new(0, 6)
- local TooltipStroke = Instance.new("UIStroke", nameTooltip)
- TooltipStroke.Color = Color3.fromRGB(100, 80, 180)
- TooltipStroke.Thickness = 1
- local TooltipText = Instance.new("TextLabel", nameTooltip)
- TooltipText.Size = UDim2.new(1, -10, 1, 0)
- TooltipText.Position = UDim2.new(0, 5, 0, 0)
- TooltipText.BackgroundTransparency = 1
- TooltipText.Text = data.name
- TooltipText.TextColor3 = Color3.fromRGB(255, 255, 255)
- TooltipText.Font = Enum.Font.Gotham
- TooltipText.TextSize = 12
- TooltipText.TextWrapped = true
- TooltipText.ZIndex = 61
- nameLabel.MouseEnter:Connect(function()
- local pos = nameLabel.AbsolutePosition
- nameTooltip.Position = UDim2.new(0, pos.X, 0, pos.Y - 65)
- nameTooltip.Visible = true
- end)
- nameLabel.MouseLeave:Connect(function()
- nameTooltip.Visible = false
- end)
- end
- local teleportBtn = Instance.new("TextButton", entryFrame)
- teleportBtn.Name = "TeleportBtn"
- teleportBtn.Text = "TP"
- teleportBtn.Size = UDim2.new(0, 35, 0, 35)
- teleportBtn.Position = UDim2.new(1, -40, 0.5, -17.5)
- teleportBtn.BackgroundColor3 = Color3.fromRGB(120, 90, 255)
- teleportBtn.Font = Enum.Font.GothamBold
- teleportBtn.TextSize = 14
- teleportBtn.TextColor3 = Color3.new(1, 1, 1)
- local C9 = Instance.new("UICorner", teleportBtn)
- C9.CornerRadius = UDim.new(0, 6)
- AnimateHover(teleportBtn, Color3.fromRGB(140, 110, 255), Color3.fromRGB(120, 90, 255))
- local menuOpen = false
- local closeConnection = nil
- menuBtn.MouseButton1Click:Connect(function()
- menuOpen = not menuOpen
- if menuOpen then
- local btnPos = menuBtn.AbsolutePosition
- optionsFrame.Position = UDim2.new(0, btnPos.X + 35, 0, btnPos.Y - 10)
- optionsFrame.Visible = true
- for _, child in ipairs(ScreenGui:GetChildren()) do
- if child.Name:match("^OptionsFrame_") and child ~= optionsFrame then
- child.Visible = false
- end
- end
- if closeConnection then
- closeConnection:Disconnect()
- end
- closeConnection = UserInputService.InputBegan:Connect(function(input)
- if input.UserInputType == Enum.UserInputType.MouseButton1 then
- task.wait(0.1)
- local mousePos = UserInputService:GetMouseLocation()
- local framePos = optionsFrame.AbsolutePosition
- local frameSize = optionsFrame.AbsoluteSize
- if mousePos.X < framePos.X or mousePos.X > framePos.X + frameSize.X or
- mousePos.Y < framePos.Y or mousePos.Y > framePos.Y + frameSize.Y then
- optionsFrame.Visible = false
- menuOpen = false
- if closeConnection then
- closeConnection:Disconnect()
- closeConnection = nil
- end
- end
- end
- end)
- else
- optionsFrame.Visible = false
- if closeConnection then
- closeConnection:Disconnect()
- closeConnection = nil
- end
- end
- end)
- mainBtn.MouseButton1Click:Connect(function()
- local isAlreadyMain = (mainPosition and mainPosition.position and mainPosition.position == data.position)
- if isAlreadyMain then
- ConfirmLabel.Text = "Remover posição principal?"
- ConfirmYes.Text = "Remover"
- onConfirmCallback = function()
- mainPosition = nil
- if hasFS and hasDelFile then
- pcall(delfile, MAIN_FILE)
- pcall(delfile, MAIN_BAK_FILE)
- end
- updateMainPositionUI()
- updateSavedList()
- end
- else
- ConfirmLabel.Text = mainPosition and
- "Substituir a posição principal atual?" or
- "Definir como posição principal?"
- ConfirmYes.Text = "Sim"
- onConfirmCallback = function()
- setMainPosition(slot)
- updateSavedList()
- end
- end
- ConfirmationOverlay.Visible = true
- end)
- renameBtn.MouseButton1Click:Connect(function()
- optionsFrame.Visible = false
- menuOpen = false
- if closeConnection then
- closeConnection:Disconnect()
- closeConnection = nil
- end
- openRenamePrompt(slot)
- end)
- moveBtn.MouseButton1Click:Connect(function()
- optionsFrame.Visible = false
- menuOpen = false
- if closeConnection then
- closeConnection:Disconnect()
- closeConnection = nil
- end
- openMovePrompt(slot)
- end)
- deleteBtn.MouseButton1Click:Connect(function()
- optionsFrame.Visible = false
- menuOpen = false
- if closeConnection then
- closeConnection:Disconnect()
- closeConnection = nil
- end
- ConfirmLabel.Text = "Tem certeza que deseja EXCLUIR o Slot " .. slot .. "?"
- ConfirmYes.Text = "Sim, Excluir"
- onConfirmCallback = function()
- savedPositions[slot] = nil
- saveToDisk()
- updateSavedList()
- selectNextSlot()
- end
- ConfirmationOverlay.Visible = true
- end)
- teleportBtn.MouseButton1Click:Connect(function()
- if safeTeleport(data.position) then
- teleportBtn.Text = "✅"
- TweenService:Create(teleportBtn, TweenInfo.new(0.2), {BackgroundColor3 = Color3.fromRGB(80, 200, 120)}):Play()
- task.wait(1)
- if teleportBtn.Parent then
- teleportBtn.Text = "TP"
- TweenService:Create(teleportBtn, TweenInfo.new(0.2), {BackgroundColor3 = Color3.fromRGB(120, 90, 255)}):Play()
- end
- end
- end)
- else
- local nameLabel = Instance.new("TextLabel", entryFrame)
- nameLabel.Size = UDim2.new(1, -20, 1, 0)
- nameLabel.Position = UDim2.new(0, 10, 0, 0)
- nameLabel.BackgroundTransparency = 1
- nameLabel.TextColor3 = Color3.fromRGB(100, 100, 120)
- nameLabel.Font = Enum.Font.Gotham
- nameLabel.TextSize = 15
- nameLabel.TextXAlignment = Enum.TextXAlignment.Left
- nameLabel.Text = string.format("Slot %d: Vazio", slot)
- end
- end
- end
- local function performSave()
- if not humanoidRoot then return false end
- local name = NameField.Text
- savedPositions[currentSaveSlot] = {
- position = humanoidRoot.CFrame,
- name = (#name > 0) and name or ("Slot "..currentSaveSlot),
- timestamp = os.date("%Y-%m-%d %H:%M:%S")
- }
- saveToDisk()
- updateSavedList()
- return true
- end
- local function animateSaveButton(success)
- local button = SaveButton
- local color = success and Color3.fromRGB(80,220,140) or Color3.fromRGB(200,80,80)
- local text = success and "Salvo!" or "Erro!"
- local originalColor, originalText = Color3.fromRGB(60,180,120), "Salvar Posição"
- button.Text = text
- TweenService:Create(button, TweenInfo.new(0.2), {BackgroundColor3 = color}):Play()
- task.wait(1.5)
- button.Text = originalText
- TweenService:Create(button, TweenInfo.new(0.2), {BackgroundColor3 = originalColor}):Play()
- end
- MoveConfirm.MouseButton1Click:Connect(function()
- local targetSlot = tonumber(MoveInput.Text)
- if slotToMove and targetSlot and targetSlot >= 1 and targetSlot <= maxSaves then
- swapPositions(slotToMove, targetSlot)
- updateSavedList()
- MoveOverlay.Visible = false
- slotToMove = nil
- else
- MoveInput.Text = ""
- MoveInput.PlaceholderText = "Inválido!"
- task.wait(1)
- MoveInput.PlaceholderText = "1-50"
- end
- end)
- MoveCancel.MouseButton1Click:Connect(function()
- MoveOverlay.Visible = false
- slotToMove = nil
- end)
- RenameConfirm.MouseButton1Click:Connect(function()
- if slotToRename and #RenameField.Text > 0 then
- local newName = RenameField.Text
- local slotData = savedPositions[slotToRename]
- if slotData then
- slotData.name = newName
- if mainPosition and mainPosition.position and slotData.position and (mainPosition.position == slotData.position) then
- mainPosition.name = newName
- saveMainPosition()
- end
- saveToDisk()
- updateSavedList()
- updateMainPositionUI()
- end
- RenameOverlay.Visible = false
- slotToRename = nil
- end
- end)
- RenameCancel.MouseButton1Click:Connect(function()
- RenameOverlay.Visible = false
- slotToRename = nil
- end)
- SlotPrev.MouseButton1Click:Connect(function()
- currentSaveSlot = ((currentSaveSlot - 2 + maxSaves) % maxSaves) + 1
- SaveSlotLabel.Text = "Slot Atual: " .. currentSaveSlot
- end)
- SlotNext.MouseButton1Click:Connect(function()
- currentSaveSlot = (currentSaveSlot % maxSaves) + 1
- SaveSlotLabel.Text = "Slot Atual: " .. currentSaveSlot
- end)
- ConfirmYes.MouseButton1Click:Connect(function()
- if onConfirmCallback then onConfirmCallback() end
- onConfirmCallback = nil
- ConfirmationOverlay.Visible = false
- end)
- ConfirmNo.MouseButton1Click:Connect(function()
- onConfirmCallback = nil
- ConfirmationOverlay.Visible = false
- end)
- SaveButton.MouseButton1Click:Connect(function()
- if savedPositions[currentSaveSlot] then
- ConfirmLabel.Text = "O Slot "..currentSaveSlot.." já tem uma posição salva. Deseja SUBSTITUIR?"
- ConfirmYes.Text = "Sim, Substituir"
- onConfirmCallback = function()
- local success = performSave()
- if success then selectNextSlot() end
- animateSaveButton(success)
- end
- ConfirmationOverlay.Visible = true
- else
- local success = performSave()
- if success then selectNextSlot() end
- animateSaveButton(success)
- end
- end)
- -- Inicialização
- loadFromDisk()
- selectNextSlot()
- updatePageDisplay()
- updateMainPositionUI()
- Players.LocalPlayer.CharacterAdded:Connect(function(character)
- chr = character
- humanoidRoot = character:WaitForChild("HumanoidRootPart")
- end)
- game:BindToClose(saveToDisk)
- print("✅ Save Locate (NickZ) - v4.0 ULTRA [FIXED & ENHANCED]")
- print("📍 Sistema de persistência corrigido")
- print("💾 Total de slots: 50 (5 páginas × 10 slots)")
- print("📁 Pasta: SaveLocate_NickZ/" .. game.PlaceId)
- print("🚀 Teleport melhorado - Anti-bug de animações")
- print("📄 Sistema de páginas implementado")
- print("✨ Todas as funcionalidades operacionais")
Add Comment
Please, Sign In to add comment