Nevzyn

NickzTP

Sep 18th, 2025
22
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 52.87 KB | None | 0 0
  1. if not game or not game:IsLoaded() then game.Loaded:Wait() end
  2.  
  3. -- Serviços
  4. local Players = game:GetService("Players")
  5. local HttpService = game:GetService("HttpService")
  6. local TweenService = game:GetService("TweenService")
  7. local UserInputService = game:GetService("UserInputService")
  8.  
  9. local plr = Players.LocalPlayer
  10. local chr = plr.Character or plr.CharacterAdded:Wait()
  11. local humanoidRoot = chr:WaitForChild("HumanoidRootPart")
  12.  
  13. -- Estado
  14. local savedPositions = {}
  15. -- Sistema de Paginação
  16. local slotsPerPage = 10
  17. local totalPages = 5 -- Total de 50 slots (5 páginas x 10 slots)
  18. local maxSaves = slotsPerPage * totalPages
  19. local currentPage = 1
  20.  
  21. local currentSaveSlot = 1
  22. local mainPosition = nil -- Posição principal
  23.  
  24. -- Helpers de FS
  25. local hasWrite = (type(writefile) == "function")
  26. local hasRead = (type(readfile) == "function")
  27. local hasFS = (hasWrite and hasRead)
  28. local hasFolder = (type(isfolder) == "function" and type(makefolder) == "function")
  29. local hasIsFile = (type(isfile) == "function")
  30. local hasDelFile = (type(delfile) == "function")
  31.  
  32. -- Sistema de diretórios
  33. local SAVE_DIR = "SaveLocate_NickZ"
  34. local GAME_DIR = tostring(game.PlaceId)
  35.  
  36. if hasFolder then
  37. if not isfolder(SAVE_DIR) then pcall(makefolder, SAVE_DIR) end
  38. if not isfolder(SAVE_DIR .. "/" .. GAME_DIR) then pcall(makefolder, SAVE_DIR .. "/" .. GAME_DIR) end
  39. end
  40.  
  41. local BASE_NAME = string.format("Saves_%s.json", plr.UserId)
  42. local MAIN_NAME = string.format("MainPos_%s.json", plr.UserId)
  43. local BASE_BAK = string.format("Saves_%s.bak", plr.UserId)
  44. local MAIN_BAK = string.format("MainPos_%s.bak", plr.UserId)
  45.  
  46. local SAVE_FILE = SAVE_DIR .. "/" .. GAME_DIR .. "/" .. BASE_NAME
  47. local MAIN_FILE = SAVE_DIR .. "/" .. GAME_DIR .. "/" .. MAIN_NAME
  48. local SAVE_BAK_FILE = SAVE_DIR .. "/" .. GAME_DIR .. "/" .. BASE_BAK
  49. local MAIN_BAK_FILE = SAVE_DIR .. "/" .. GAME_DIR .. "/" .. MAIN_BAK
  50.  
  51. if not hasFolder then
  52. SAVE_FILE = string.format("SaveLocate_%d_%s.json", game.PlaceId, plr.UserId)
  53. MAIN_FILE = string.format("MainPos_%d_%s.json", game.PlaceId, plr.UserId)
  54. SAVE_BAK_FILE = string.format("SaveLocate_%d_%s.bak", game.PlaceId, plr.UserId)
  55. MAIN_BAK_FILE = string.format("MainPos_%d_%s.bak", game.PlaceId, plr.UserId)
  56. end
  57.  
  58. -- Funções de Codificação/Decodificação e Persistência (sem alterações)
  59. local function encodeCFrame(cf)
  60. local x,y,z,R00,R01,R02,R10,R11,R12,R20,R21,R22 = cf:GetComponents()
  61. 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}
  62. end
  63. local function decodeCFrame(t)
  64. if type(t)=="table" and t.x and t.R00 then
  65. 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)
  66. end
  67. return nil
  68. end
  69. local function tryRead(path)
  70. if not hasFS or type(path) ~= "string" then return nil end
  71. local success, content = pcall(readfile, path)
  72. if success and type(content) == "string" and #content > 0 then return content end
  73. return nil
  74. end
  75. local function candidateSavePaths()
  76. 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) }
  77. end
  78. local function candidateMainPaths()
  79. 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) }
  80. end
  81. local function firstExistingContent(paths)
  82. for _, p in ipairs(paths) do
  83. if type(p) == "string" then
  84. local content = tryRead(p)
  85. if content then return content, p end
  86. end
  87. end
  88. return nil, nil
  89. end
  90. local function saveMainPosition()
  91. if not hasFS or not mainPosition then return end
  92. local data = { position = encodeCFrame(mainPosition.position), name = mainPosition.name, timestamp = mainPosition.timestamp, gameId = game.PlaceId, gameName = game.Name }
  93. local ok, encoded = pcall(function() return HttpService:JSONEncode(data) end)
  94. if ok and encoded then
  95. pcall(writefile, MAIN_FILE, encoded)
  96. pcall(writefile, MAIN_BAK_FILE, encoded)
  97. end
  98. end
  99. local function loadMainPosition()
  100. if not hasFS then return end
  101. local content, usedPath = firstExistingContent(candidateMainPaths())
  102. if not content then return end
  103. local ok, data = pcall(function() return HttpService:JSONDecode(content) end)
  104. if not ok or type(data) ~= "table" then return end
  105. if data.gameId and data.gameId ~= game.PlaceId then return end
  106. local cf = decodeCFrame(data.position)
  107. if cf then
  108. mainPosition = { position = cf, name = data.name or "Posição Principal", timestamp = data.timestamp or os.date("%Y-%m-%d %H:%M:%S") }
  109. if usedPath ~= MAIN_FILE then saveMainPosition() end
  110. end
  111. end
  112. local function saveToDisk()
  113. if not hasFS then return end
  114. local out = { gameId = game.PlaceId, gameName = game.Name, userId = plr.UserId, userName = plr.Name, saveDate = os.date("%Y-%m-%d %H:%M:%S"), positions = {} }
  115. for slot, data in pairs(savedPositions) do
  116. if type(slot)=="number" and slot>=1 and slot<=maxSaves and typeof(data.position)=="CFrame" then
  117. 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) }
  118. end
  119. end
  120. local ok, encoded = pcall(function() return HttpService:JSONEncode(out) end)
  121. if ok and encoded then
  122. pcall(writefile, SAVE_FILE, encoded)
  123. pcall(writefile, SAVE_BAK_FILE, encoded)
  124. end
  125. saveMainPosition()
  126. end
  127. local function loadFromDisk()
  128. if not hasFS then return end
  129. local content, usedPath = firstExistingContent(candidateSavePaths())
  130. if not content then loadMainPosition(); return end
  131. local ok, data = pcall(function() return HttpService:JSONDecode(content) end)
  132. if not ok or type(data) ~= "table" then loadMainPosition(); return end
  133. local positions = data.positions or data
  134. if data.gameId and data.gameId ~= game.PlaceId then loadMainPosition(); return end
  135. for k,v in pairs(positions) do
  136. local slot = tonumber(k)
  137. if slot and slot >= 1 and slot <= maxSaves and type(v) == "table" then
  138. local cf = decodeCFrame(v.position)
  139. 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
  140. end
  141. end
  142. if usedPath ~= SAVE_FILE then saveToDisk() end
  143. loadMainPosition()
  144. end
  145. local function teleportTo(cframe)
  146. if humanoidRoot and cframe then
  147. humanoidRoot.CFrame = cframe
  148. return true
  149. end
  150. return false
  151. end
  152. -- Fim das funções de persistência
  153.  
  154. --================================================================================
  155. -- [INTERFACE DO USUÁRIO]
  156. --================================================================================
  157.  
  158. local function AnimateHover(button, a, b)
  159. button.MouseEnter:Connect(function() TweenService:Create(button, TweenInfo.new(0.2), {BackgroundColor3 = a}):Play() end)
  160. button.MouseLeave:Connect(function() TweenService:Create(button, TweenInfo.new(0.2), {BackgroundColor3 = b}):Play() end)
  161. end
  162.  
  163. local ScreenGui = Instance.new("ScreenGui")
  164. ScreenGui.Name = "Save Locate (NickZ)"
  165. ScreenGui.ResetOnSpawn = false
  166. ScreenGui.Parent = game:GetService("CoreGui")
  167.  
  168. local MainFrame = Instance.new("Frame")
  169. MainFrame.Size = UDim2.new(0, 600, 0, 460) -- Altura aumentada para acomodar a paginação
  170. MainFrame.Position = UDim2.new(0.5, -300, 0.5, -230) -- Posição ajustada
  171. MainFrame.BackgroundColor3 = Color3.fromRGB(20, 18, 28)
  172. MainFrame.BackgroundTransparency = 0.2
  173. MainFrame.BorderSizePixel = 0
  174. MainFrame.AnchorPoint = Vector2.new(0.5, 0.5)
  175. MainFrame.Active = true
  176. MainFrame.Draggable = true
  177. MainFrame.ClipsDescendants = true
  178. MainFrame.Parent = ScreenGui
  179.  
  180. local UICorner = Instance.new("UICorner", MainFrame); UICorner.CornerRadius = UDim.new(0, 8)
  181. local UIStroke = Instance.new("UIStroke", MainFrame); UIStroke.Color = Color3.fromRGB(120, 90, 255); UIStroke.Thickness = 1.5
  182. 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
  183.  
  184. local TopBar = Instance.new("Frame", MainFrame); TopBar.Size = UDim2.new(1, 0, 0, 40); TopBar.BackgroundTransparency = 1
  185. 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
  186. 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)
  187. 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)
  188.  
  189. -- Botão principal (sem alterações)
  190. 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
  191. 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
  192. 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
  193. 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)
  194.  
  195. -- Controles superiores
  196. 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
  197. 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))
  198. 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
  199. 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
  200. 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))
  201. 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))
  202.  
  203. -- [INTERFACE DE PAGINAÇÃO APRIMORADA]
  204. local PaginationFrame = Instance.new("Frame", MainFrame)
  205. PaginationFrame.Size = UDim2.new(1, -20, 0, 30)
  206. PaginationFrame.Position = UDim2.new(0, 10, 0, 135)
  207. PaginationFrame.BackgroundTransparency = 0.9 -- Fundo sutil para criar um painel
  208. PaginationFrame.BackgroundColor3 = Color3.fromRGB(20, 18, 28)
  209. local PF_C = Instance.new("UICorner", PaginationFrame); PF_C.CornerRadius = UDim.new(0, 8)
  210. local PF_S = Instance.new("UIStroke", PaginationFrame); PF_S.Color = Color3.fromRGB(80, 70, 130); PF_S.Thickness = 1
  211.  
  212. local PagePrevBtn = Instance.new("TextButton", PaginationFrame)
  213. PagePrevBtn.Size = UDim2.new(0, 30, 0, 30) -- Tamanho quadrado para se tornar um círculo
  214. PagePrevBtn.Position = UDim2.new(0, 5, 0, 0) -- Posicionado à esquerda do painel
  215. PagePrevBtn.BackgroundColor3 = Color3.fromRGB(120, 90, 255) -- Cor principal para destaque
  216. PagePrevBtn.Font = Enum.Font.GothamBold
  217. PagePrevBtn.Text = "<"
  218. PagePrevBtn.TextColor3 = Color3.new(1, 1, 1)
  219. PagePrevBtn.TextSize = 16
  220. local PP_C = Instance.new("UICorner", PagePrevBtn); PP_C.CornerRadius = UDim.new(0.5, 0) -- Raio 0.5 para círculo perfeito
  221. AnimateHover(PagePrevBtn, Color3.fromRGB(140, 110, 255), Color3.fromRGB(120, 90, 255))
  222.  
  223. local PageLabel = Instance.new("TextLabel", PaginationFrame)
  224. PageLabel.Size = UDim2.new(0, 110, 1, 0)
  225. PageLabel.Position = UDim2.new(0.5, -55, 0, 0) -- Posição central mantida
  226. PageLabel.BackgroundColor3 = Color3.fromRGB(30, 28, 42)
  227. PageLabel.Font = Enum.Font.GothamSemibold
  228. PageLabel.Text = "Página 1 / " .. totalPages
  229. PageLabel.TextColor3 = Color3.fromRGB(200, 200, 255)
  230. PageLabel.TextSize = 14
  231. local PL_C = Instance.new("UICorner", PageLabel); PL_C.CornerRadius = UDim.new(0, 6)
  232. local PL_S = Instance.new("UIStroke", PageLabel); PL_S.Color = Color3.fromRGB(80, 70, 130); PL_S.Thickness = 1
  233.  
  234. local PageNextBtn = Instance.new("TextButton", PaginationFrame)
  235. PageNextBtn.Size = UDim2.new(0, 30, 0, 30) -- Tamanho quadrado para se tornar um círculo
  236. PageNextBtn.Position = UDim2.new(1, -35, 0, 0) -- Posicionado à direita do painel
  237. PageNextBtn.BackgroundColor3 = Color3.fromRGB(120, 90, 255) -- Cor principal para destaque
  238. PageNextBtn.Font = Enum.Font.GothamBold
  239. PageNextBtn.Text = ">"
  240. PageNextBtn.TextColor3 = Color3.new(1, 1, 1)
  241. PageNextBtn.TextSize = 16
  242. local PN_C = Instance.new("UICorner", PageNextBtn); PN_C.CornerRadius = UDim.new(0.5, 0) -- Raio 0.5 para círculo perfeito
  243. AnimateHover(PageNextBtn, Color3.fromRGB(140, 110, 255), Color3.fromRGB(120, 90, 255))
  244.  
  245. -- Container de slots
  246. local SlotsContainer = Instance.new("Frame", MainFrame)
  247. SlotsContainer.Size = UDim2.new(1, -20, 1, -175) -- Posição Y e tamanho ajustados
  248. SlotsContainer.Position = UDim2.new(0, 10, 0, 165)
  249. SlotsContainer.BackgroundTransparency = 1
  250.  
  251. 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
  252.  
  253. -- Overlays (sem alterações)
  254. 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
  255. 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
  256. 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
  257. 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))
  258. 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))
  259. 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
  260. 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
  261. 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"
  262. 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
  263. 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))
  264. 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))
  265. 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
  266. 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
  267. 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"
  268. 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 .. "):"
  269. 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
  270. 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))
  271. 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))
  272. -- Fim da UI
  273.  
  274. --================================================================================
  275. -- [LÓGICA DO SISTEMA COM PAGINAÇÃO]
  276. --================================================================================
  277.  
  278. local onConfirmCallback = nil
  279. local slotToRename = nil
  280. local slotToMove = nil
  281. local updateSavedList -- pré-declaração
  282.  
  283. -- Funções de Posição Principal
  284. local function updateMainPositionUI()
  285. MainPosContainer.Visible = mainPosition ~= nil
  286. end
  287. local function setMainPosition(globalSlot)
  288. if savedPositions[globalSlot] then
  289. mainPosition = { position = savedPositions[globalSlot].position, name = savedPositions[globalSlot].name, timestamp = savedPositions[globalSlot].timestamp }
  290. saveMainPosition()
  291. updateMainPositionUI()
  292. end
  293. end
  294. MP_RemoveBtn.MouseButton1Click:Connect(function()
  295. ConfirmLabel.Text = "Remover posição principal?"; ConfirmYes.Text = "Sim"
  296. onConfirmCallback = function()
  297. mainPosition = nil
  298. if hasFS and hasDelFile then pcall(delfile, MAIN_FILE); pcall(delfile, MAIN_BAK_FILE) end
  299. updateMainPositionUI()
  300. updateSavedList()
  301. end
  302. ConfirmationOverlay.Visible = true
  303. end)
  304. 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)
  305. 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)
  306. 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)
  307.  
  308. -- Funções de Lógica de Slots
  309. local function swapPositions(fromSlot, toSlot)
  310. if fromSlot == toSlot or not savedPositions[fromSlot] then return end
  311. if savedPositions[toSlot] then
  312. local temp = savedPositions[fromSlot]
  313. savedPositions[fromSlot] = savedPositions[toSlot]
  314. savedPositions[toSlot] = temp
  315. else
  316. savedPositions[toSlot] = savedPositions[fromSlot]
  317. savedPositions[fromSlot] = nil
  318. end
  319. saveToDisk()
  320. end
  321.  
  322. local function findNextEmptySlot()
  323. for i = 1, maxSaves do
  324. if not savedPositions[i] then return i end
  325. end
  326. return nil -- Retorna nil se tudo estiver cheio
  327. end
  328.  
  329. -- Funções para gerenciar UI de paginação e seleção
  330. local function updatePaginationUI()
  331. PageLabel.Text = string.format("Página %d / %d", currentPage, totalPages)
  332. PagePrevBtn.AutoButtonColor = currentPage > 1
  333. PageNextBtn.AutoButtonColor = currentPage < totalPages
  334. PagePrevBtn.TextTransparency = currentPage > 1 and 0 or 0.5
  335. PageNextBtn.TextTransparency = currentPage < totalPages and 0 or 0.5
  336. end
  337.  
  338. local function updateCurrentSlotLabel()
  339. local localSlot = (currentSaveSlot - 1) % slotsPerPage + 1
  340. SaveSlotLabel.Text = string.format("Pág %d / Slot %d", currentPage, localSlot)
  341. end
  342.  
  343. local function selectNextSlot()
  344. local nextEmpty = findNextEmptySlot()
  345. if not nextEmpty then
  346. local startSlot = (currentPage - 1) * slotsPerPage + 1
  347. currentSaveSlot = startSlot
  348. else
  349. currentSaveSlot = nextEmpty
  350. currentPage = math.floor((currentSaveSlot - 1) / slotsPerPage) + 1
  351. end
  352. updatePaginationUI()
  353. updateSavedList()
  354. updateCurrentSlotLabel()
  355. end
  356.  
  357. local function openRenamePrompt(globalSlot)
  358. if not savedPositions[globalSlot] then return end
  359. slotToRename = globalSlot
  360. local localSlot = (globalSlot - 1) % slotsPerPage + 1
  361. RenameTitle.Text = string.format("Renomear Slot %d (Pág %d)", localSlot, currentPage)
  362. RenameField.Text = savedPositions[globalSlot].name
  363. RenameOverlay.Visible = true
  364. end
  365.  
  366. local function openMovePrompt(globalSlot)
  367. if not savedPositions[globalSlot] then return end
  368. slotToMove = globalSlot
  369. MoveTitle.Text = string.format("Mover Slot %d: %s", globalSlot, savedPositions[globalSlot].name)
  370. MoveInput.Text = ""
  371. MoveOverlay.Visible = true
  372. end
  373.  
  374. -- Função principal para renderizar a lista de slots da página atual
  375. updateSavedList = function()
  376. for _, child in ipairs(SlotsContainer:GetChildren()) do if child:IsA("Frame") then child:Destroy() end end
  377. for _, child in ipairs(ScreenGui:GetChildren()) do if child.Name:match("^OptionsFrame_") or child.Name:match("^NameTooltip_") then child:Destroy() end end
  378.  
  379. local startSlot = (currentPage - 1) * slotsPerPage + 1
  380. local endSlot = currentPage * slotsPerPage
  381.  
  382. for globalSlot = startSlot, endSlot do
  383. local localSlot = (globalSlot - 1) % slotsPerPage + 1
  384.  
  385. 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
  386. local C7 = Instance.new("UICorner", entryFrame); C7.CornerRadius = UDim.new(0, 6)
  387.  
  388. local data = savedPositions[globalSlot]
  389. if data then
  390. -- [CÓDIGO DA INTERFACE DO SLOT INDIVIDUAL - CORRIGIDO]
  391. 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
  392. 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)
  393. 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)
  394.  
  395. -- [MENU DE OPÇÕES CORRIGIDO - VISIBILIDADE MELHORADA]
  396. local optionsFrame = Instance.new("Frame", ScreenGui)
  397. optionsFrame.Name = "OptionsFrame_" .. globalSlot
  398. optionsFrame.Size = UDim2.new(0, 120, 0, 110)
  399. optionsFrame.BackgroundColor3 = Color3.fromRGB(35, 32, 48)
  400. optionsFrame.BackgroundTransparency = 0 -- Opacidade total para melhor visibilidade
  401. optionsFrame.Visible = false
  402. optionsFrame.ZIndex = 50
  403. optionsFrame.BorderSizePixel = 0
  404.  
  405. local OptionsCorner = Instance.new("UICorner", optionsFrame)
  406. OptionsCorner.CornerRadius = UDim.new(0, 8)
  407.  
  408. local OptionsStroke = Instance.new("UIStroke", optionsFrame)
  409. OptionsStroke.Color = Color3.fromRGB(100, 80, 180)
  410. OptionsStroke.Thickness = 1.5
  411.  
  412. -- Adiciona sombra para melhor destaque
  413. local OptionsShadow = Instance.new("ImageLabel", optionsFrame)
  414. OptionsShadow.Name = "Shadow"
  415. OptionsShadow.Size = UDim2.new(1, 20, 1, 20)
  416. OptionsShadow.Position = UDim2.new(0, -10, 0, -10)
  417. OptionsShadow.BackgroundTransparency = 1
  418. OptionsShadow.Image = "rbxasset://textures/ui/GuiImagePlaceholder.png"
  419. OptionsShadow.ImageColor3 = Color3.new(0, 0, 0)
  420. OptionsShadow.ImageTransparency = 0.7
  421. OptionsShadow.ZIndex = 49
  422.  
  423. local menuTitle = Instance.new("TextLabel", optionsFrame)
  424. menuTitle.Name = "MenuTitle"
  425. menuTitle.Size = UDim2.new(1, 0, 0, 20)
  426. menuTitle.Position = UDim2.new(0, 0, 0, 2)
  427. menuTitle.BackgroundTransparency = 1
  428. menuTitle.Text = string.format("Slot %d (Pág %d)", localSlot, currentPage)
  429. menuTitle.TextColor3 = Color3.fromRGB(200, 200, 220)
  430. menuTitle.Font = Enum.Font.GothamBold
  431. menuTitle.TextSize = 11
  432. menuTitle.ZIndex = 51
  433.  
  434. local buttonsContainer = Instance.new("Frame", optionsFrame)
  435. buttonsContainer.Name = "ButtonsContainer"
  436. buttonsContainer.Size = UDim2.new(1, -10, 1, -25)
  437. buttonsContainer.Position = UDim2.new(0, 5, 0, 22)
  438. buttonsContainer.BackgroundTransparency = 1
  439. buttonsContainer.ZIndex = 51
  440.  
  441. -- BOTÃO RENOMEAR CORRIGIDO
  442. local renameBtn = Instance.new("TextButton", buttonsContainer)
  443. renameBtn.Name = "RenameBtn"
  444. renameBtn.Size = UDim2.new(1, 0, 0, 25)
  445. renameBtn.Position = UDim2.new(0, 0, 0, 0)
  446. renameBtn.BackgroundColor3 = Color3.fromRGB(45, 42, 58)
  447. renameBtn.BackgroundTransparency = 0.3
  448. renameBtn.Text = ""
  449. renameBtn.Font = Enum.Font.GothamBold
  450. renameBtn.TextSize = 12
  451. renameBtn.ZIndex = 52
  452.  
  453. local renameBtnCorner = Instance.new("UICorner", renameBtn)
  454. renameBtnCorner.CornerRadius = UDim.new(0, 4)
  455.  
  456. local renameIcon = Instance.new("TextLabel", renameBtn)
  457. renameIcon.Size = UDim2.new(0, 25, 1, 0)
  458. renameIcon.Position = UDim2.new(0, 0, 0, 0)
  459. renameIcon.BackgroundTransparency = 1
  460. renameIcon.Text = "✏"
  461. renameIcon.TextColor3 = Color3.fromRGB(150, 180, 255)
  462. renameIcon.Font = Enum.Font.GothamBold
  463. renameIcon.TextSize = 14
  464. renameIcon.ZIndex = 53
  465.  
  466. local renameText = Instance.new("TextLabel", renameBtn)
  467. renameText.Size = UDim2.new(1, -25, 1, 0)
  468. renameText.Position = UDim2.new(0, 25, 0, 0)
  469. renameText.BackgroundTransparency = 1
  470. renameText.Text = "Renomear"
  471. renameText.TextColor3 = Color3.fromRGB(220, 220, 240)
  472. renameText.Font = Enum.Font.Gotham
  473. renameText.TextSize = 11
  474. renameText.TextXAlignment = Enum.TextXAlignment.Left
  475. renameText.ZIndex = 53
  476.  
  477. -- BOTÃO MOVER CORRIGIDO
  478. local moveBtn = Instance.new("TextButton", buttonsContainer)
  479. moveBtn.Name = "MoveBtn"
  480. moveBtn.Size = UDim2.new(1, 0, 0, 25)
  481. moveBtn.Position = UDim2.new(0, 0, 0, 28)
  482. moveBtn.BackgroundColor3 = Color3.fromRGB(45, 42, 58)
  483. moveBtn.BackgroundTransparency = 0.3
  484. moveBtn.Text = ""
  485. moveBtn.Font = Enum.Font.GothamBold
  486. moveBtn.TextSize = 12
  487. moveBtn.ZIndex = 52
  488.  
  489. local moveBtnCorner = Instance.new("UICorner", moveBtn)
  490. moveBtnCorner.CornerRadius = UDim.new(0, 4)
  491.  
  492. local moveIcon = Instance.new("TextLabel", moveBtn)
  493. moveIcon.Size = UDim2.new(0, 25, 1, 0)
  494. moveIcon.Position = UDim2.new(0, 0, 0, 0)
  495. moveIcon.BackgroundTransparency = 1
  496. moveIcon.Text = "↔"
  497. moveIcon.TextColor3 = Color3.fromRGB(150, 255, 150)
  498. moveIcon.Font = Enum.Font.GothamBold
  499. moveIcon.TextSize = 14
  500. moveIcon.ZIndex = 53
  501.  
  502. local moveText = Instance.new("TextLabel", moveBtn)
  503. moveText.Size = UDim2.new(1, -25, 1, 0)
  504. moveText.Position = UDim2.new(0, 25, 0, 0)
  505. moveText.BackgroundTransparency = 1
  506. moveText.Text = "Mover"
  507. moveText.TextColor3 = Color3.fromRGB(220, 220, 240)
  508. moveText.Font = Enum.Font.Gotham
  509. moveText.TextSize = 11
  510. moveText.TextXAlignment = Enum.TextXAlignment.Left
  511. moveText.ZIndex = 53
  512.  
  513. -- BOTÃO EXCLUIR CORRIGIDO
  514. local deleteBtn = Instance.new("TextButton", buttonsContainer)
  515. deleteBtn.Name = "DeleteBtn"
  516. deleteBtn.Size = UDim2.new(1, 0, 0, 25)
  517. deleteBtn.Position = UDim2.new(0, 0, 0, 56)
  518. deleteBtn.BackgroundColor3 = Color3.fromRGB(45, 42, 58)
  519. deleteBtn.BackgroundTransparency = 0.3
  520. deleteBtn.Text = ""
  521. deleteBtn.Font = Enum.Font.GothamBold
  522. deleteBtn.TextSize = 12
  523. deleteBtn.ZIndex = 52
  524.  
  525. local deleteBtnCorner = Instance.new("UICorner", deleteBtn)
  526. deleteBtnCorner.CornerRadius = UDim.new(0, 4)
  527.  
  528. local deleteIcon = Instance.new("TextLabel", deleteBtn)
  529. deleteIcon.Size = UDim2.new(0, 25, 1, 0)
  530. deleteIcon.Position = UDim2.new(0, 0, 0, 0)
  531. deleteIcon.BackgroundTransparency = 1
  532. deleteIcon.Text = "🗑"
  533. deleteIcon.TextColor3 = Color3.fromRGB(255, 150, 150)
  534. deleteIcon.Font = Enum.Font.GothamBold
  535. deleteIcon.TextSize = 14
  536. deleteIcon.ZIndex = 53
  537.  
  538. local deleteText = Instance.new("TextLabel", deleteBtn)
  539. deleteText.Size = UDim2.new(1, -25, 1, 0)
  540. deleteText.Position = UDim2.new(0, 25, 0, 0)
  541. deleteText.BackgroundTransparency = 1
  542. deleteText.Text = "Excluir"
  543. deleteText.TextColor3 = Color3.fromRGB(220, 220, 240)
  544. deleteText.Font = Enum.Font.Gotham
  545. deleteText.TextSize = 11
  546. deleteText.TextXAlignment = Enum.TextXAlignment.Left
  547. deleteText.ZIndex = 53
  548.  
  549. -- Hover effects melhorados
  550. renameBtn.MouseEnter:Connect(function()
  551. TweenService:Create(renameBtn, TweenInfo.new(0.15), {
  552. BackgroundTransparency = 0,
  553. BackgroundColor3 = Color3.fromRGB(60, 57, 78)
  554. }):Play()
  555. end)
  556. renameBtn.MouseLeave:Connect(function()
  557. TweenService:Create(renameBtn, TweenInfo.new(0.15), {
  558. BackgroundTransparency = 0.3,
  559. BackgroundColor3 = Color3.fromRGB(45, 42, 58)
  560. }):Play()
  561. end)
  562.  
  563. moveBtn.MouseEnter:Connect(function()
  564. TweenService:Create(moveBtn, TweenInfo.new(0.15), {
  565. BackgroundTransparency = 0,
  566. BackgroundColor3 = Color3.fromRGB(60, 57, 78)
  567. }):Play()
  568. end)
  569. moveBtn.MouseLeave:Connect(function()
  570. TweenService:Create(moveBtn, TweenInfo.new(0.15), {
  571. BackgroundTransparency = 0.3,
  572. BackgroundColor3 = Color3.fromRGB(45, 42, 58)
  573. }):Play()
  574. end)
  575.  
  576. deleteBtn.MouseEnter:Connect(function()
  577. TweenService:Create(deleteBtn, TweenInfo.new(0.15), {
  578. BackgroundTransparency = 0,
  579. BackgroundColor3 = Color3.fromRGB(80, 50, 50)
  580. }):Play()
  581. end)
  582. deleteBtn.MouseLeave:Connect(function()
  583. TweenService:Create(deleteBtn, TweenInfo.new(0.15), {
  584. BackgroundTransparency = 0.3,
  585. BackgroundColor3 = Color3.fromRGB(45, 42, 58)
  586. }):Play()
  587. end)
  588.  
  589. 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
  590. 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
  591. 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
  592. 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))
  593. local menuOpen, closeConnection = false, nil
  594. 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)
  595. 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)
  596. renameBtn.MouseButton1Click:Connect(function() optionsFrame.Visible = false; menuOpen = false; if closeConnection then closeConnection:Disconnect(); closeConnection = nil end; openRenamePrompt(globalSlot) end)
  597. moveBtn.MouseButton1Click:Connect(function() optionsFrame.Visible = false; menuOpen = false; if closeConnection then closeConnection:Disconnect(); closeConnection = nil end; openMovePrompt(globalSlot) end)
  598. 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)
  599. 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)
  600. else
  601. 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)
  602. end
  603. end
  604. end
  605.  
  606. -- Lógica dos botões (sem alterações)
  607. local function performSave()
  608. if not humanoidRoot then return false end
  609. local name = NameField.Text
  610. savedPositions[currentSaveSlot] = { position = humanoidRoot.CFrame, name = (#name > 0) and name or ("Slot "..currentSaveSlot), timestamp = os.date("%Y-%m-%d %H:%M:%S") }
  611. saveToDisk()
  612. updateSavedList()
  613. return true
  614. end
  615.  
  616. local function animateSaveButton(success)
  617. local button, color = SaveButton, success and Color3.fromRGB(80,220,140) or Color3.fromRGB(200,80,80)
  618. local text = success and "Salvo!" or "Erro!"; local originalColor, originalText = Color3.fromRGB(60,180,120), "Salvar Posição"
  619. 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()
  620. end
  621.  
  622. -- Botões de Paginação
  623. PagePrevBtn.MouseButton1Click:Connect(function() if currentPage > 1 then currentPage = currentPage - 1; updatePaginationUI(); updateSavedList(); updateCurrentSlotLabel() end end)
  624. PageNextBtn.MouseButton1Click:Connect(function() if currentPage < totalPages then currentPage = currentPage + 1; updatePaginationUI(); updateSavedList(); updateCurrentSlotLabel() end end)
  625.  
  626. -- Botões de seleção de slot (ciclam na página atual)
  627. SlotPrev.MouseButton1Click:Connect(function()
  628. local startSlot = (currentPage - 1) * slotsPerPage + 1
  629. local endSlot = currentPage * slotsPerPage
  630. currentSaveSlot = currentSaveSlot - 1
  631. if currentSaveSlot < startSlot then currentSaveSlot = endSlot end
  632. updateCurrentSlotLabel()
  633. end)
  634. SlotNext.MouseButton1Click:Connect(function()
  635. local startSlot = (currentPage - 1) * slotsPerPage + 1
  636. local endSlot = currentPage * slotsPerPage
  637. currentSaveSlot = currentSaveSlot + 1
  638. if currentSaveSlot > endSlot then currentSaveSlot = startSlot end
  639. updateCurrentSlotLabel()
  640. end)
  641.  
  642. -- Botões de Overlays
  643. MoveConfirm.MouseButton1Click:Connect(function()
  644. local targetSlot = tonumber(MoveInput.Text)
  645. if slotToMove and targetSlot and targetSlot >= 1 and targetSlot <= maxSaves then
  646. swapPositions(slotToMove, targetSlot); updateSavedList(); MoveOverlay.Visible = false; slotToMove = nil
  647. else
  648. MoveInput.Text = ""; MoveInput.PlaceholderText = "Inválido!"; task.wait(1); MoveInput.PlaceholderText = "1-"..maxSaves
  649. end
  650. end)
  651. MoveCancel.MouseButton1Click:Connect(function() MoveOverlay.Visible = false; slotToMove = nil end)
  652. RenameConfirm.MouseButton1Click:Connect(function()
  653. if slotToRename and #RenameField.Text > 0 then
  654. 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
  655. RenameOverlay.Visible = false; slotToRename = nil
  656. end
  657. end)
  658. RenameCancel.MouseButton1Click:Connect(function() RenameOverlay.Visible = false; slotToRename = nil end)
  659. ConfirmYes.MouseButton1Click:Connect(function() if onConfirmCallback then onConfirmCallback() end; onConfirmCallback = nil; ConfirmationOverlay.Visible = false end)
  660. ConfirmNo.MouseButton1Click:Connect(function() onConfirmCallback = nil; ConfirmationOverlay.Visible = false end)
  661.  
  662. SaveButton.MouseButton1Click:Connect(function()
  663. if savedPositions[currentSaveSlot] then
  664. local localSlot = (currentSaveSlot - 1) % slotsPerPage + 1
  665. ConfirmLabel.Text = "O Slot "..localSlot.." (Pág "..currentPage..") já tem uma posição salva. Deseja SUBSTITUIR?"
  666. ConfirmYes.Text = "Sim, Substituir"; onConfirmCallback = function() local success = performSave(); if success then selectNextSlot() end; animateSaveButton(success) end; ConfirmationOverlay.Visible = true
  667. else
  668. local success = performSave(); if success then selectNextSlot() end; animateSaveButton(success)
  669. end
  670. end)
  671.  
  672. -- Inicialização
  673. loadFromDisk()
  674. selectNextSlot()
  675. updateMainPositionUI()
  676.  
  677. Players.LocalPlayer.CharacterAdded:Connect(function(character) chr = character; humanoidRoot = character:WaitForChild("HumanoidRootPart") end)
  678. game:BindToClose(saveToDisk)
  679.  
  680. print("✅ Save Locate (NickZ) - v5.0 [Menu de Opções Corrigido]")
  681. print("✨ Interface de menu melhorada com visibilidade otimizada")
  682. print("📖 Sistema de " .. totalPages .. " páginas e " .. maxSaves .. " slots totais")
  683. print("💾 Saves por jogo: " .. game.PlaceId)
  684. print("📁 Pasta: SaveLocate_NickZ/" .. game.PlaceId)
  685. print("🚀 Todas as funcionalidades operacionais")
Add Comment
Please, Sign In to add comment