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 = {}
- -- Sistema de Paginação
- local slotsPerPage = 10
- local totalPages = 5 -- Total de 50 slots (5 páginas x 10 slots)
- local maxSaves = slotsPerPage * totalPages
- local currentPage = 1
- local currentSaveSlot = 1
- local mainPosition = nil -- Posição principal
- -- 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)
- 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
- 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)
- 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
- 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
- -- Funções de Codificação/Decodificação e Persistência (sem alterações)
- 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
- 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
- local function candidateSavePaths()
- return { SAVE_FILE, SAVE_BAK_FILE, "SkyTP/" .. string.format("Saves_%d_%d.json", game.PlaceId, plr.UserId), "SkyTP/" .. string.format("Saves_%d_%d.bak", game.PlaceId, plr.UserId), string.format("Saves_%d_%d.json", game.PlaceId, plr.UserId), string.format("Saves_%d_%d.bak", game.PlaceId, plr.UserId) }
- end
- local function candidateMainPaths()
- return { MAIN_FILE, MAIN_BAK_FILE, "SkyTP/" .. string.format("MainPos_%d_%d.json", game.PlaceId, plr.UserId), "SkyTP/" .. string.format("MainPos_%d_%d.bak", game.PlaceId, plr.UserId), string.format("MainPos_%d_%d.json", game.PlaceId, plr.UserId), string.format("MainPos_%d_%d.bak", game.PlaceId, plr.UserId) }
- 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
- 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
- local function teleportTo(cframe)
- if humanoidRoot and cframe then
- humanoidRoot.CFrame = cframe
- return true
- end
- return false
- end
- -- Fim das funções de persistência
- --================================================================================
- -- [INTERFACE DO USUÁRIO]
- --================================================================================
- 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, 460) -- Altura aumentada para acomodar a paginação
- MainFrame.Position = UDim2.new(0.5, -300, 0.5, -230) -- Posição ajustada
- 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)"; 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 (sem alterações)
- 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)
- -- 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 = ""; 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))
- -- [INTERFACE DE PAGINAÇÃO APRIMORADA]
- local PaginationFrame = Instance.new("Frame", MainFrame)
- PaginationFrame.Size = UDim2.new(1, -20, 0, 30)
- PaginationFrame.Position = UDim2.new(0, 10, 0, 135)
- PaginationFrame.BackgroundTransparency = 0.9 -- Fundo sutil para criar um painel
- PaginationFrame.BackgroundColor3 = Color3.fromRGB(20, 18, 28)
- local PF_C = Instance.new("UICorner", PaginationFrame); PF_C.CornerRadius = UDim.new(0, 8)
- local PF_S = Instance.new("UIStroke", PaginationFrame); PF_S.Color = Color3.fromRGB(80, 70, 130); PF_S.Thickness = 1
- local PagePrevBtn = Instance.new("TextButton", PaginationFrame)
- PagePrevBtn.Size = UDim2.new(0, 30, 0, 30) -- Tamanho quadrado para se tornar um círculo
- PagePrevBtn.Position = UDim2.new(0, 5, 0, 0) -- Posicionado à esquerda do painel
- PagePrevBtn.BackgroundColor3 = Color3.fromRGB(120, 90, 255) -- Cor principal para destaque
- PagePrevBtn.Font = Enum.Font.GothamBold
- PagePrevBtn.Text = "<"
- PagePrevBtn.TextColor3 = Color3.new(1, 1, 1)
- PagePrevBtn.TextSize = 16
- local PP_C = Instance.new("UICorner", PagePrevBtn); PP_C.CornerRadius = UDim.new(0.5, 0) -- Raio 0.5 para círculo perfeito
- AnimateHover(PagePrevBtn, Color3.fromRGB(140, 110, 255), Color3.fromRGB(120, 90, 255))
- local PageLabel = Instance.new("TextLabel", PaginationFrame)
- PageLabel.Size = UDim2.new(0, 110, 1, 0)
- PageLabel.Position = UDim2.new(0.5, -55, 0, 0) -- Posição central mantida
- PageLabel.BackgroundColor3 = Color3.fromRGB(30, 28, 42)
- PageLabel.Font = Enum.Font.GothamSemibold
- PageLabel.Text = "Página 1 / " .. totalPages
- PageLabel.TextColor3 = Color3.fromRGB(200, 200, 255)
- PageLabel.TextSize = 14
- local PL_C = Instance.new("UICorner", PageLabel); PL_C.CornerRadius = UDim.new(0, 6)
- local PL_S = Instance.new("UIStroke", PageLabel); PL_S.Color = Color3.fromRGB(80, 70, 130); PL_S.Thickness = 1
- local PageNextBtn = Instance.new("TextButton", PaginationFrame)
- PageNextBtn.Size = UDim2.new(0, 30, 0, 30) -- Tamanho quadrado para se tornar um círculo
- PageNextBtn.Position = UDim2.new(1, -35, 0, 0) -- Posicionado à direita do painel
- PageNextBtn.BackgroundColor3 = Color3.fromRGB(120, 90, 255) -- Cor principal para destaque
- PageNextBtn.Font = Enum.Font.GothamBold
- PageNextBtn.Text = ">"
- PageNextBtn.TextColor3 = Color3.new(1, 1, 1)
- PageNextBtn.TextSize = 16
- local PN_C = Instance.new("UICorner", PageNextBtn); PN_C.CornerRadius = UDim.new(0.5, 0) -- Raio 0.5 para círculo perfeito
- AnimateHover(PageNextBtn, Color3.fromRGB(140, 110, 255), Color3.fromRGB(120, 90, 255))
- -- Container de slots
- local SlotsContainer = Instance.new("Frame", MainFrame)
- SlotsContainer.Size = UDim2.new(1, -20, 1, -175) -- Posição Y e tamanho ajustados
- SlotsContainer.Position = UDim2.new(0, 10, 0, 165)
- 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 (sem alterações)
- 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-" .. maxSaves .. "):"
- 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-"..maxSaves; 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))
- -- Fim da UI
- --================================================================================
- -- [LÓGICA DO SISTEMA COM PAGINAÇÃO]
- --================================================================================
- local onConfirmCallback = nil
- local slotToRename = nil
- local slotToMove = nil
- local updateSavedList -- pré-declaração
- -- Funções de Posição Principal
- local function updateMainPositionUI()
- MainPosContainer.Visible = mainPosition ~= nil
- end
- local function setMainPosition(globalSlot)
- if savedPositions[globalSlot] then
- mainPosition = { position = savedPositions[globalSlot].position, name = savedPositions[globalSlot].name, timestamp = savedPositions[globalSlot].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); pcall(delfile, MAIN_BAK_FILE) end
- updateMainPositionUI()
- updateSavedList()
- end
- ConfirmationOverlay.Visible = true
- end)
- MainPosBtn.MouseButton1Click:Connect(function() if mainPosition and teleportTo(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)
- -- Funções de Lógica de Slots
- local function swapPositions(fromSlot, toSlot)
- if fromSlot == toSlot or not savedPositions[fromSlot] 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 nil -- Retorna nil se tudo estiver cheio
- end
- -- Funções para gerenciar UI de paginação e seleção
- local function updatePaginationUI()
- PageLabel.Text = string.format("Página %d / %d", currentPage, totalPages)
- PagePrevBtn.AutoButtonColor = currentPage > 1
- PageNextBtn.AutoButtonColor = currentPage < totalPages
- PagePrevBtn.TextTransparency = currentPage > 1 and 0 or 0.5
- PageNextBtn.TextTransparency = currentPage < totalPages and 0 or 0.5
- end
- local function updateCurrentSlotLabel()
- local localSlot = (currentSaveSlot - 1) % slotsPerPage + 1
- SaveSlotLabel.Text = string.format("Pág %d / Slot %d", currentPage, localSlot)
- end
- local function selectNextSlot()
- local nextEmpty = findNextEmptySlot()
- if not nextEmpty then
- local startSlot = (currentPage - 1) * slotsPerPage + 1
- currentSaveSlot = startSlot
- else
- currentSaveSlot = nextEmpty
- currentPage = math.floor((currentSaveSlot - 1) / slotsPerPage) + 1
- end
- updatePaginationUI()
- updateSavedList()
- updateCurrentSlotLabel()
- end
- local function openRenamePrompt(globalSlot)
- if not savedPositions[globalSlot] then return end
- slotToRename = globalSlot
- local localSlot = (globalSlot - 1) % slotsPerPage + 1
- RenameTitle.Text = string.format("Renomear Slot %d (Pág %d)", localSlot, currentPage)
- RenameField.Text = savedPositions[globalSlot].name
- RenameOverlay.Visible = true
- end
- local function openMovePrompt(globalSlot)
- if not savedPositions[globalSlot] then return end
- slotToMove = globalSlot
- MoveTitle.Text = string.format("Mover Slot %d: %s", globalSlot, savedPositions[globalSlot].name)
- MoveInput.Text = ""
- MoveOverlay.Visible = true
- end
- -- Função principal para renderizar a lista de slots da página atual
- updateSavedList = function()
- for _, child in ipairs(SlotsContainer:GetChildren()) do if child:IsA("Frame") then child:Destroy() end end
- for _, child in ipairs(ScreenGui:GetChildren()) do if child.Name:match("^OptionsFrame_") or child.Name:match("^NameTooltip_") then child:Destroy() end end
- local startSlot = (currentPage - 1) * slotsPerPage + 1
- local endSlot = currentPage * slotsPerPage
- for globalSlot = startSlot, endSlot do
- local localSlot = (globalSlot - 1) % slotsPerPage + 1
- local entryFrame = Instance.new("Frame"); entryFrame.Name = "Slot_" .. globalSlot; entryFrame.LayoutOrder = globalSlot; 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[globalSlot]
- if data then
- -- [CÓDIGO DA INTERFACE DO SLOT INDIVIDUAL - CORRIGIDO]
- 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)
- -- [MENU DE OPÇÕES CORRIGIDO - VISIBILIDADE MELHORADA]
- local optionsFrame = Instance.new("Frame", ScreenGui)
- optionsFrame.Name = "OptionsFrame_" .. globalSlot
- optionsFrame.Size = UDim2.new(0, 120, 0, 110)
- optionsFrame.BackgroundColor3 = Color3.fromRGB(35, 32, 48)
- optionsFrame.BackgroundTransparency = 0 -- Opacidade total para melhor visibilidade
- 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
- -- Adiciona sombra para melhor destaque
- local OptionsShadow = Instance.new("ImageLabel", optionsFrame)
- OptionsShadow.Name = "Shadow"
- OptionsShadow.Size = UDim2.new(1, 20, 1, 20)
- OptionsShadow.Position = UDim2.new(0, -10, 0, -10)
- OptionsShadow.BackgroundTransparency = 1
- OptionsShadow.Image = "rbxasset://textures/ui/GuiImagePlaceholder.png"
- OptionsShadow.ImageColor3 = Color3.new(0, 0, 0)
- OptionsShadow.ImageTransparency = 0.7
- OptionsShadow.ZIndex = 49
- 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 = string.format("Slot %d (Pág %d)", localSlot, currentPage)
- 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
- -- BOTÃO RENOMEAR CORRIGIDO
- 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
- -- BOTÃO MOVER CORRIGIDO
- 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
- -- BOTÃO EXCLUIR CORRIGIDO
- 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
- -- Hover effects melhorados
- 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_" .. globalSlot; 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, closeConnection = false, 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 _, c in ipairs(ScreenGui:GetChildren()) do if c.Name:match("^OptionsFrame_") and c ~= optionsFrame then c.Visible = false end end; if closeConnection then closeConnection:Disconnect() end; closeConnection = UserInputService.InputBegan:Connect(function(i) if i.UserInputType == Enum.UserInputType.MouseButton1 then task.wait(0.1); local m, p, s = UserInputService:GetMouseLocation(), optionsFrame.AbsolutePosition, optionsFrame.AbsoluteSize; if m.X < p.X or m.X > p.X + s.X or m.Y < p.Y or m.Y > p.Y + s.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 isMain = (mainPosition and mainPosition.position == data.position); if isMain 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(globalSlot); 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(globalSlot) end)
- moveBtn.MouseButton1Click:Connect(function() optionsFrame.Visible = false; menuOpen = false; if closeConnection then closeConnection:Disconnect(); closeConnection = nil end; openMovePrompt(globalSlot) 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 " .. globalSlot .. "?"; ConfirmYes.Text = "Sim, Excluir"; onConfirmCallback = function() savedPositions[globalSlot] = nil; saveToDisk(); updateSavedList(); selectNextSlot() end; ConfirmationOverlay.Visible = true end)
- teleportBtn.MouseButton1Click:Connect(function() if teleportTo(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", localSlot)
- end
- end
- end
- -- Lógica dos botões (sem alterações)
- 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, color = SaveButton, 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
- -- Botões de Paginação
- PagePrevBtn.MouseButton1Click:Connect(function() if currentPage > 1 then currentPage = currentPage - 1; updatePaginationUI(); updateSavedList(); updateCurrentSlotLabel() end end)
- PageNextBtn.MouseButton1Click:Connect(function() if currentPage < totalPages then currentPage = currentPage + 1; updatePaginationUI(); updateSavedList(); updateCurrentSlotLabel() end end)
- -- Botões de seleção de slot (ciclam na página atual)
- SlotPrev.MouseButton1Click:Connect(function()
- local startSlot = (currentPage - 1) * slotsPerPage + 1
- local endSlot = currentPage * slotsPerPage
- currentSaveSlot = currentSaveSlot - 1
- if currentSaveSlot < startSlot then currentSaveSlot = endSlot end
- updateCurrentSlotLabel()
- end)
- SlotNext.MouseButton1Click:Connect(function()
- local startSlot = (currentPage - 1) * slotsPerPage + 1
- local endSlot = currentPage * slotsPerPage
- currentSaveSlot = currentSaveSlot + 1
- if currentSaveSlot > endSlot then currentSaveSlot = startSlot end
- updateCurrentSlotLabel()
- end)
- -- Botões de Overlays
- 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-"..maxSaves
- end
- end)
- MoveCancel.MouseButton1Click:Connect(function() MoveOverlay.Visible = false; slotToMove = nil end)
- RenameConfirm.MouseButton1Click:Connect(function()
- if slotToRename and #RenameField.Text > 0 then
- local slotData = savedPositions[slotToRename]; if slotData then slotData.name = RenameField.Text; if mainPosition and mainPosition.position == slotData.position then mainPosition.name = slotData.name; saveMainPosition() end; saveToDisk(); updateSavedList(); updateMainPositionUI() end
- RenameOverlay.Visible = false; slotToRename = nil
- end
- end)
- RenameCancel.MouseButton1Click:Connect(function() RenameOverlay.Visible = false; slotToRename = nil 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
- local localSlot = (currentSaveSlot - 1) % slotsPerPage + 1
- ConfirmLabel.Text = "O Slot "..localSlot.." (Pág "..currentPage..") 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()
- updateMainPositionUI()
- Players.LocalPlayer.CharacterAdded:Connect(function(character) chr = character; humanoidRoot = character:WaitForChild("HumanoidRootPart") end)
- game:BindToClose(saveToDisk)
- print("✅ Save Locate (NickZ) - v5.0 [Menu de Opções Corrigido]")
- print("✨ Interface de menu melhorada com visibilidade otimizada")
- print("📖 Sistema de " .. totalPages .. " páginas e " .. maxSaves .. " slots totais")
- print("💾 Saves por jogo: " .. game.PlaceId)
- print("📁 Pasta: SaveLocate_NickZ/" .. game.PlaceId)
- print("🚀 Todas as funcionalidades operacionais")
Add Comment
Please, Sign In to add comment