Nevzyn

Untitled

Nov 19th, 2025
32
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 60.25 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. local maxSaves = 50 -- ALTERADO: 5 páginas × 10 slots
  16. local slotsPerPage = 10 -- NOVO: Slots por página
  17. local maxPages = 5 -- NOVO: Máximo de páginas
  18. local currentPage = 1 -- NOVO: Página atual
  19. local currentSaveSlot = 1
  20. local mainPosition = nil
  21.  
  22. -- Helpers de FS
  23. local hasWrite = (type(writefile) == "function")
  24. local hasRead = (type(readfile) == "function")
  25. local hasFS = (hasWrite and hasRead)
  26. local hasFolder = (type(isfolder) == "function" and type(makefolder) == "function")
  27. local hasIsFile = (type(isfile) == "function")
  28. local hasDelFile = (type(delfile) == "function")
  29.  
  30. -- Sistema de diretórios
  31. local SAVE_DIR = "SaveLocate_NickZ"
  32. local GAME_DIR = tostring(game.PlaceId)
  33.  
  34. -- Criar estrutura de pastas
  35. if hasFolder then
  36. if not isfolder(SAVE_DIR) then
  37. pcall(makefolder, SAVE_DIR)
  38. end
  39. if not isfolder(SAVE_DIR .. "/" .. GAME_DIR) then
  40. pcall(makefolder, SAVE_DIR .. "/" .. GAME_DIR)
  41. end
  42. end
  43.  
  44. -- Nomes de arquivo
  45. local BASE_NAME = string.format("Saves_%s.json", plr.UserId)
  46. local MAIN_NAME = string.format("MainPos_%s.json", plr.UserId)
  47. local BASE_BAK = string.format("Saves_%s.bak", plr.UserId)
  48. local MAIN_BAK = string.format("MainPos_%s.bak", plr.UserId)
  49.  
  50. -- Caminhos completos
  51. local SAVE_FILE = SAVE_DIR .. "/" .. GAME_DIR .. "/" .. BASE_NAME
  52. local MAIN_FILE = SAVE_DIR .. "/" .. GAME_DIR .. "/" .. MAIN_NAME
  53. local SAVE_BAK_FILE = SAVE_DIR .. "/" .. GAME_DIR .. "/" .. BASE_BAK
  54. local MAIN_BAK_FILE = SAVE_DIR .. "/" .. GAME_DIR .. "/" .. MAIN_BAK
  55.  
  56. -- Fallback para executors sem suporte a pastas
  57. if not hasFolder then
  58. SAVE_FILE = string.format("SaveLocate_%d_%s.json", game.PlaceId, plr.UserId)
  59. MAIN_FILE = string.format("MainPos_%d_%s.json", game.PlaceId, plr.UserId)
  60. SAVE_BAK_FILE = string.format("SaveLocate_%d_%s.bak", game.PlaceId, plr.UserId)
  61. MAIN_BAK_FILE = string.format("MainPos_%d_%s.bak", game.PlaceId, plr.UserId)
  62. end
  63.  
  64. -- Codificação/decodificação de CFrame
  65. local function encodeCFrame(cf)
  66. local x,y,z,R00,R01,R02,R10,R11,R12,R20,R21,R22 = cf:GetComponents()
  67. 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}
  68. end
  69.  
  70. local function decodeCFrame(t)
  71. if type(t)=="table" and t.x and t.R00 then
  72. 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)
  73. end
  74. return nil
  75. end
  76.  
  77. -- Função de leitura
  78. local function tryRead(path)
  79. if not hasFS or type(path) ~= "string" then return nil end
  80. local success, content = pcall(readfile, path)
  81. if success and type(content) == "string" and #content > 0 then
  82. return content
  83. end
  84. return nil
  85. end
  86.  
  87. -- Caminhos para compatibilidade
  88. local function candidateSavePaths()
  89. local list = {}
  90. table.insert(list, SAVE_FILE)
  91. table.insert(list, SAVE_BAK_FILE)
  92. if hasFolder then
  93. table.insert(list, "SkyTP/" .. string.format("Saves_%d_%d.json", game.PlaceId, plr.UserId))
  94. table.insert(list, "SkyTP/" .. string.format("Saves_%d_%d.bak", game.PlaceId, plr.UserId))
  95. end
  96. table.insert(list, string.format("Saves_%d_%d.json", game.PlaceId, plr.UserId))
  97. table.insert(list, string.format("Saves_%d_%d.bak", game.PlaceId, plr.UserId))
  98. return list
  99. end
  100.  
  101. local function candidateMainPaths()
  102. local list = {}
  103. table.insert(list, MAIN_FILE)
  104. table.insert(list, MAIN_BAK_FILE)
  105. if hasFolder then
  106. table.insert(list, "SkyTP/" .. string.format("MainPos_%d_%d.json", game.PlaceId, plr.UserId))
  107. table.insert(list, "SkyTP/" .. string.format("MainPos_%d_%d.bak", game.PlaceId, plr.UserId))
  108. end
  109. table.insert(list, string.format("MainPos_%d_%d.json", game.PlaceId, plr.UserId))
  110. table.insert(list, string.format("MainPos_%d_%d.bak", game.PlaceId, plr.UserId))
  111. return list
  112. end
  113.  
  114. local function firstExistingContent(paths)
  115. for _, p in ipairs(paths) do
  116. if type(p) == "string" then
  117. local content = tryRead(p)
  118. if content then
  119. return content, p
  120. end
  121. end
  122. end
  123. return nil, nil
  124. end
  125.  
  126. -- Persistência
  127. local function saveMainPosition()
  128. if not hasFS or not mainPosition then return end
  129.  
  130. local data = {
  131. position = encodeCFrame(mainPosition.position),
  132. name = mainPosition.name,
  133. timestamp = mainPosition.timestamp,
  134. gameId = game.PlaceId,
  135. gameName = game.Name
  136. }
  137.  
  138. local ok, encoded = pcall(function() return HttpService:JSONEncode(data) end)
  139. if ok and encoded then
  140. pcall(writefile, MAIN_FILE, encoded)
  141. pcall(writefile, MAIN_BAK_FILE, encoded)
  142. end
  143. end
  144.  
  145. local function loadMainPosition()
  146. if not hasFS then return end
  147.  
  148. local content, usedPath = firstExistingContent(candidateMainPaths())
  149. if not content then return end
  150.  
  151. local ok, data = pcall(function() return HttpService:JSONDecode(content) end)
  152. if not ok or type(data) ~= "table" then return end
  153.  
  154. if data.gameId and data.gameId ~= game.PlaceId then return end
  155.  
  156. local cf = decodeCFrame(data.position)
  157. if cf then
  158. mainPosition = {
  159. position = cf,
  160. name = data.name or "Posição Principal",
  161. timestamp = data.timestamp or os.date("%Y-%m-%d %H:%M:%S")
  162. }
  163.  
  164. if usedPath ~= MAIN_FILE then
  165. saveMainPosition()
  166. end
  167. end
  168. end
  169.  
  170. local function saveToDisk()
  171. if not hasFS then return end
  172.  
  173. local out = {
  174. gameId = game.PlaceId,
  175. gameName = game.Name,
  176. userId = plr.UserId,
  177. userName = plr.Name,
  178. saveDate = os.date("%Y-%m-%d %H:%M:%S"),
  179. positions = {}
  180. }
  181.  
  182. for slot, data in pairs(savedPositions) do
  183. if type(slot)=="number" and slot>=1 and slot<=maxSaves and typeof(data.position)=="CFrame" then
  184. out.positions[tostring(slot)] = {
  185. name = data.name or ("Slot "..slot),
  186. timestamp = data.timestamp or os.date("%Y-%m-%d %H:%M:%S"),
  187. position = encodeCFrame(data.position)
  188. }
  189. end
  190. end
  191.  
  192. local ok, encoded = pcall(function() return HttpService:JSONEncode(out) end)
  193. if ok and encoded then
  194. pcall(writefile, SAVE_FILE, encoded)
  195. pcall(writefile, SAVE_BAK_FILE, encoded)
  196. end
  197.  
  198. saveMainPosition()
  199. end
  200.  
  201. local function loadFromDisk()
  202. if not hasFS then return end
  203.  
  204. local content, usedPath = firstExistingContent(candidateSavePaths())
  205. if not content then
  206. loadMainPosition()
  207. return
  208. end
  209.  
  210. local ok, data = pcall(function() return HttpService:JSONDecode(content) end)
  211. if not ok or type(data) ~= "table" then
  212. loadMainPosition()
  213. return
  214. end
  215.  
  216. local positions = data.positions or data
  217.  
  218. if data.gameId and data.gameId ~= game.PlaceId then
  219. loadMainPosition()
  220. return
  221. end
  222.  
  223. for k,v in pairs(positions) do
  224. local slot = tonumber(k)
  225. if slot and slot >= 1 and slot <= maxSaves and type(v) == "table" then
  226. local cf = decodeCFrame(v.position)
  227. if cf then
  228. savedPositions[slot] = {
  229. position = cf,
  230. name = v.name or ("Slot "..slot),
  231. timestamp = v.timestamp or os.date("%Y-%m-%d %H:%M:%S")
  232. }
  233. end
  234. end
  235. end
  236.  
  237. if usedPath ~= SAVE_FILE then
  238. saveToDisk()
  239. end
  240.  
  241. loadMainPosition()
  242. end
  243.  
  244. --================================================================================
  245. -- [SISTEMA DE TELEPORT MELHORADO - ANTI-BUG DE ANIMAÇÕES]
  246. --================================================================================
  247.  
  248. local function safeTeleport(cframe)
  249. if not humanoidRoot or not cframe then return false end
  250.  
  251. local humanoid = chr:FindFirstChildOfClass("Humanoid")
  252.  
  253. -- Para TODAS as animações em execução
  254. if humanoid then
  255. pcall(function()
  256. for _, track in pairs(humanoid:GetPlayingAnimationTracks()) do
  257. track:Stop(0)
  258. end
  259. end)
  260.  
  261. -- Reseta estados que podem interferir
  262. pcall(function() humanoid.PlatformStand = false end)
  263. pcall(function() humanoid.Sit = false end)
  264. pcall(function() humanoid.AutoRotate = true end)
  265. end
  266.  
  267. -- Limpa todas as velocidades do HumanoidRootPart
  268. if humanoidRoot:IsA("BasePart") then
  269. pcall(function()
  270. humanoidRoot.Velocity = Vector3.new(0, 0, 0)
  271. humanoidRoot.RotVelocity = Vector3.new(0, 0, 0)
  272. humanoidRoot.AssemblyLinearVelocity = Vector3.new(0, 0, 0)
  273. humanoidRoot.AssemblyAngularVelocity = Vector3.new(0, 0, 0)
  274. end)
  275. end
  276.  
  277. -- Limpa velocidades de todas as partes do personagem (para dinossauros e modelos complexos)
  278. pcall(function()
  279. for _, part in pairs(chr:GetDescendants()) do
  280. if part:IsA("BasePart") then
  281. part.Velocity = Vector3.new(0, 0, 0)
  282. part.RotVelocity = Vector3.new(0, 0, 0)
  283. if part:IsA("MeshPart") or part:IsA("Part") then
  284. part.AssemblyLinearVelocity = Vector3.new(0, 0, 0)
  285. part.AssemblyAngularVelocity = Vector3.new(0, 0, 0)
  286. end
  287. end
  288. end
  289. end)
  290.  
  291. -- Ancora temporariamente para garantir teleport instantâneo
  292. local wasAnchored = humanoidRoot.Anchored
  293. humanoidRoot.Anchored = true
  294.  
  295. -- Executa o teleport
  296. humanoidRoot.CFrame = cframe
  297.  
  298. -- Aguarda 2 frames para garantir que o CFrame foi aplicado
  299. task.wait()
  300. task.wait()
  301.  
  302. -- Desancora
  303. humanoidRoot.Anchored = wasAnchored
  304.  
  305. -- Força atualização de física
  306. if humanoid then
  307. pcall(function()
  308. humanoid:ChangeState(Enum.HumanoidStateType.Landed)
  309. end)
  310. end
  311.  
  312. return true
  313. end
  314.  
  315. -- Função de teleport original (mantida para compatibilidade)
  316. local function teleportTo(cframe)
  317. return safeTeleport(cframe)
  318. end
  319.  
  320. --================================================================================
  321. -- [UI OTIMIZADA COM SISTEMA DE PÁGINAS]
  322. --================================================================================
  323.  
  324. local function AnimateHover(button, a, b)
  325. button.MouseEnter:Connect(function()
  326. TweenService:Create(button, TweenInfo.new(0.2), {BackgroundColor3 = a}):Play()
  327. end)
  328. button.MouseLeave:Connect(function()
  329. TweenService:Create(button, TweenInfo.new(0.2), {BackgroundColor3 = b}):Play()
  330. end)
  331. end
  332.  
  333. local ScreenGui = Instance.new("ScreenGui")
  334. ScreenGui.Name = "Save Locate (NickZ)"
  335. ScreenGui.ResetOnSpawn = false
  336. ScreenGui.Parent = game:GetService("CoreGui")
  337.  
  338. local MainFrame = Instance.new("Frame")
  339. MainFrame.Size = UDim2.new(0, 600, 0, 470) -- AUMENTADO para acomodar navegação de páginas
  340. MainFrame.Position = UDim2.new(0.5, -300, 0.5, -235)
  341. MainFrame.BackgroundColor3 = Color3.fromRGB(20, 18, 28)
  342. MainFrame.BackgroundTransparency = 0.2
  343. MainFrame.BorderSizePixel = 0
  344. MainFrame.AnchorPoint = Vector2.new(0.5, 0.5)
  345. MainFrame.Active = true
  346. MainFrame.Draggable = true
  347. MainFrame.ClipsDescendants = true
  348. MainFrame.Parent = ScreenGui
  349.  
  350. local UICorner = Instance.new("UICorner", MainFrame)
  351. UICorner.CornerRadius = UDim.new(0, 8)
  352. local UIStroke = Instance.new("UIStroke", MainFrame)
  353. UIStroke.Color = Color3.fromRGB(120, 90, 255)
  354. UIStroke.Thickness = 1.5
  355. local UIGradient_BG = Instance.new("UIGradient", MainFrame)
  356. UIGradient_BG.Color = ColorSequence.new({
  357. ColorSequenceKeypoint.new(0, Color3.fromRGB(25, 22, 38)),
  358. ColorSequenceKeypoint.new(1, Color3.fromRGB(45, 40, 65))
  359. })
  360. UIGradient_BG.Rotation = 90
  361.  
  362. local TopBar = Instance.new("Frame", MainFrame)
  363. TopBar.Size = UDim2.new(1, 0, 0, 40)
  364. TopBar.BackgroundTransparency = 1
  365.  
  366. local TitleLabel = Instance.new("TextLabel", TopBar)
  367. TitleLabel.Size = UDim2.new(1, -45, 1, 0)
  368. TitleLabel.Position = UDim2.new(0, 15, 0, 0)
  369. TitleLabel.BackgroundTransparency = 1
  370. TitleLabel.Text = "✧ Save Locate (NickZ) - 50 Slots"
  371. TitleLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
  372. TitleLabel.Font = Enum.Font.GothamSemibold
  373. TitleLabel.TextSize = 18
  374. TitleLabel.TextXAlignment = Enum.TextXAlignment.Left
  375.  
  376. local CloseBtn = Instance.new("TextButton", TopBar)
  377. CloseBtn.Size = UDim2.new(0, 30, 0, 30)
  378. CloseBtn.Position = UDim2.new(1, -35, 0.5, -15)
  379. CloseBtn.BackgroundColor3 = Color3.fromRGB(45, 40, 65)
  380. CloseBtn.Text = "✕"
  381. CloseBtn.Font = Enum.Font.GothamBold
  382. CloseBtn.TextSize = 16
  383. CloseBtn.TextColor3 = Color3.fromRGB(255, 120, 120)
  384. local C1 = Instance.new("UICorner", CloseBtn)
  385. C1.CornerRadius = UDim.new(0, 6)
  386. AnimateHover(CloseBtn, Color3.fromRGB(255, 100, 100), Color3.fromRGB(45, 40, 65))
  387. CloseBtn.MouseButton1Click:Connect(function() MainFrame.Visible = false end)
  388.  
  389. local OpenBtn = Instance.new("TextButton", ScreenGui)
  390. OpenBtn.Size = UDim2.new(0, 45, 0, 45)
  391. OpenBtn.Position = UDim2.new(0, 15, 0.5, -22.5)
  392. OpenBtn.BackgroundColor3 = Color3.fromRGB(20, 18, 28)
  393. OpenBtn.Text = "✧"
  394. OpenBtn.Font = Enum.Font.GothamBold
  395. OpenBtn.TextSize = 24
  396. OpenBtn.TextColor3 = Color3.fromRGB(120, 90, 255)
  397. OpenBtn.Visible = false
  398. local C2 = Instance.new("UICorner", OpenBtn)
  399. C2.CornerRadius = UDim.new(0, 8)
  400. local S2 = Instance.new("UIStroke", OpenBtn)
  401. S2.Color = Color3.fromRGB(120, 90, 255)
  402. S2.Thickness = 1.5
  403. OpenBtn.MouseButton1Click:Connect(function() MainFrame.Visible = true end)
  404. MainFrame:GetPropertyChangedSignal("Visible"):Connect(function() OpenBtn.Visible = not MainFrame.Visible end)
  405.  
  406. -- Botão principal (mantido igual)
  407. local MainPosContainer = Instance.new("Frame", ScreenGui)
  408. MainPosContainer.Size = UDim2.new(0, 50, 0, 50)
  409. MainPosContainer.Position = UDim2.new(1, -60, 0, 10)
  410. MainPosContainer.BackgroundTransparency = 1
  411. MainPosContainer.Visible = false
  412. MainPosContainer.Active = true
  413. MainPosContainer.Draggable = true
  414.  
  415. local MainPosBtn = Instance.new("TextButton", MainPosContainer)
  416. MainPosBtn.Size = UDim2.new(1, 0, 1, 0)
  417. MainPosBtn.Position = UDim2.new(0, 0, 0, 0)
  418. MainPosBtn.BackgroundColor3 = Color3.fromRGB(25, 22, 38)
  419. MainPosBtn.BackgroundTransparency = 0.1
  420. MainPosBtn.Text = "🚀"
  421. MainPosBtn.Font = Enum.Font.GothamBold
  422. MainPosBtn.TextSize = 24
  423. MainPosBtn.TextColor3 = Color3.new(1, 1, 1)
  424.  
  425. local MP_Corner = Instance.new("UICorner", MainPosBtn)
  426. MP_Corner.CornerRadius = UDim.new(0.5, 0)
  427.  
  428. local MP_Stroke = Instance.new("UIStroke", MainPosBtn)
  429. MP_Stroke.Color = Color3.fromRGB(120, 90, 255)
  430. MP_Stroke.Thickness = 2
  431.  
  432. local MP_Tooltip = Instance.new("TextLabel", MainPosBtn)
  433. MP_Tooltip.Size = UDim2.new(0, 150, 0, 30)
  434. MP_Tooltip.Position = UDim2.new(-3.2, 0, 0.5, -15)
  435. MP_Tooltip.BackgroundColor3 = Color3.fromRGB(20, 18, 28)
  436. MP_Tooltip.BackgroundTransparency = 0.1
  437. MP_Tooltip.Text = ""
  438. MP_Tooltip.TextColor3 = Color3.fromRGB(255, 255, 255)
  439. MP_Tooltip.Font = Enum.Font.Gotham
  440. MP_Tooltip.TextSize = 12
  441. MP_Tooltip.Visible = false
  442. MP_Tooltip.ZIndex = 2
  443. local Tooltip_Corner = Instance.new("UICorner", MP_Tooltip)
  444. Tooltip_Corner.CornerRadius = UDim.new(0, 6)
  445. local Tooltip_Stroke = Instance.new("UIStroke", MP_Tooltip)
  446. Tooltip_Stroke.Color = Color3.fromRGB(120, 90, 255)
  447. Tooltip_Stroke.Thickness = 1
  448.  
  449. local MP_RemoveBtn = Instance.new("TextButton", MainPosBtn)
  450. MP_RemoveBtn.Size = UDim2.new(0, 20, 0, 20)
  451. MP_RemoveBtn.Position = UDim2.new(1, -5, 0, -5)
  452. MP_RemoveBtn.BackgroundColor3 = Color3.fromRGB(200, 80, 80)
  453. MP_RemoveBtn.Text = "×"
  454. MP_RemoveBtn.Font = Enum.Font.GothamBold
  455. MP_RemoveBtn.TextSize = 14
  456. MP_RemoveBtn.TextColor3 = Color3.new(1, 1, 1)
  457. MP_RemoveBtn.Visible = false
  458. MP_RemoveBtn.ZIndex = 3
  459. local Remove_Corner = Instance.new("UICorner", MP_RemoveBtn)
  460. Remove_Corner.CornerRadius = UDim.new(0.5, 0)
  461.  
  462. MainPosBtn.MouseButton1Click:Connect(function()
  463. if mainPosition and safeTeleport(mainPosition.position) then
  464. MainPosBtn.Text = "✅"
  465. TweenService:Create(MainPosBtn, TweenInfo.new(0.2), {BackgroundColor3 = Color3.fromRGB(80, 200, 120)}):Play()
  466. task.wait(1)
  467. if MainPosBtn.Parent then
  468. MainPosBtn.Text = "🚀"
  469. TweenService:Create(MainPosBtn, TweenInfo.new(0.2), {BackgroundColor3 = Color3.fromRGB(25, 22, 38)}):Play()
  470. end
  471. end
  472. end)
  473.  
  474. MainPosBtn.MouseEnter:Connect(function()
  475. if mainPosition then
  476. MP_Tooltip.Text = mainPosition.name or "Principal"
  477. MP_Tooltip.Visible = true
  478. MP_RemoveBtn.Visible = true
  479. end
  480. TweenService:Create(MainPosBtn, TweenInfo.new(0.2), {Size = UDim2.new(1.1, 0, 1.1, 0)}):Play()
  481. TweenService:Create(MP_Stroke, TweenInfo.new(0.2), {Thickness = 3}):Play()
  482. end)
  483. MainPosBtn.MouseLeave:Connect(function()
  484. MP_Tooltip.Visible = false
  485. MP_RemoveBtn.Visible = false
  486. TweenService:Create(MainPosBtn, TweenInfo.new(0.2), {Size = UDim2.new(1, 0, 1, 0)}):Play()
  487. TweenService:Create(MP_Stroke, TweenInfo.new(0.2), {Thickness = 2}):Play()
  488. end)
  489.  
  490. -- Controles superiores
  491. local ControlsFrame = Instance.new("Frame", MainFrame)
  492. ControlsFrame.Size = UDim2.new(1, -20, 0, 90)
  493. ControlsFrame.Position = UDim2.new(0, 10, 0, 45)
  494. ControlsFrame.BackgroundTransparency = 1
  495.  
  496. local SaveButton = Instance.new("TextButton", ControlsFrame)
  497. SaveButton.Text = "Salvar Posição"
  498. SaveButton.Size = UDim2.new(0.5, -5, 1, -50)
  499. SaveButton.Position = UDim2.new(0, 0, 0, 0)
  500. SaveButton.BackgroundColor3 = Color3.fromRGB(60, 180, 120)
  501. SaveButton.Font = Enum.Font.GothamSemibold
  502. SaveButton.TextSize = 16
  503. SaveButton.TextColor3 = Color3.new(1, 1, 1)
  504. local C3 = Instance.new("UICorner", SaveButton)
  505. C3.CornerRadius = UDim.new(0, 6)
  506. AnimateHover(SaveButton, Color3.fromRGB(80, 220, 140), Color3.fromRGB(60, 180, 120))
  507.  
  508. local NameField = Instance.new("TextBox", ControlsFrame)
  509. NameField.PlaceholderText = "Nome da Posição..."
  510. NameField.Size = UDim2.new(1, 0, 0, 40)
  511. NameField.Position = UDim2.new(0, 0, 0, 50)
  512. NameField.BackgroundColor3 = Color3.fromRGB(30, 28, 42)
  513. NameField.TextColor3 = Color3.new(1, 1, 1)
  514. NameField.Font = Enum.Font.Gotham
  515. NameField.TextSize = 14
  516. NameField.PlaceholderColor3 = Color3.fromRGB(150,150,150)
  517. local C4 = Instance.new("UICorner", NameField)
  518. C4.CornerRadius = UDim.new(0, 6)
  519. local S4 = Instance.new("UIStroke", NameField)
  520. S4.Color = Color3.fromRGB(80, 70, 130)
  521. S4.Thickness = 1
  522.  
  523. local SaveSlotLabel = Instance.new("TextLabel", ControlsFrame)
  524. SaveSlotLabel.Size = UDim2.new(0.5, -5, 0, 20)
  525. SaveSlotLabel.Position = UDim2.new(0.5, 5, 0, 5)
  526. SaveSlotLabel.BackgroundTransparency = 1
  527. SaveSlotLabel.TextColor3 = Color3.fromRGB(200, 200, 255)
  528. SaveSlotLabel.Font = Enum.Font.Gotham
  529. SaveSlotLabel.TextSize = 14
  530. SaveSlotLabel.Text = "Slot Atual: " .. currentSaveSlot
  531. SaveSlotLabel.TextXAlignment = Enum.TextXAlignment.Left
  532.  
  533. local SlotPrev = Instance.new("TextButton", ControlsFrame)
  534. SlotPrev.Text = "<"
  535. SlotPrev.Size = UDim2.new(0, 35, 0, 30)
  536. SlotPrev.Position = UDim2.new(0.5, 5, 0, 22)
  537. SlotPrev.BackgroundColor3 = Color3.fromRGB(80, 70, 130)
  538. SlotPrev.Font = Enum.Font.GothamBold
  539. SlotPrev.TextSize = 16
  540. SlotPrev.TextColor3 = Color3.new(1, 1, 1)
  541. local C5 = Instance.new("UICorner", SlotPrev)
  542. C5.CornerRadius = UDim.new(0, 6)
  543. AnimateHover(SlotPrev, Color3.fromRGB(100, 90, 150), Color3.fromRGB(80, 70, 130))
  544.  
  545. local SlotNext = Instance.new("TextButton", ControlsFrame)
  546. SlotNext.Text = ">"
  547. SlotNext.Size = UDim2.new(0, 35, 0, 30)
  548. SlotNext.Position = UDim2.new(0.5, 45, 0, 22)
  549. SlotNext.BackgroundColor3 = Color3.fromRGB(80, 70, 130)
  550. SlotNext.Font = Enum.Font.GothamBold
  551. SlotNext.TextSize = 16
  552. SlotNext.TextColor3 = Color3.new(1, 1, 1)
  553. local C6 = Instance.new("UICorner", SlotNext)
  554. C6.CornerRadius = UDim.new(0, 6)
  555. AnimateHover(SlotNext, Color3.fromRGB(100, 90, 150), Color3.fromRGB(80, 70, 130))
  556.  
  557. --================================================================================
  558. -- [NOVO: SISTEMA DE NAVEGAÇÃO DE PÁGINAS]
  559. --================================================================================
  560.  
  561. local PageNavigationFrame = Instance.new("Frame", MainFrame)
  562. PageNavigationFrame.Size = UDim2.new(1, -20, 0, 35)
  563. PageNavigationFrame.Position = UDim2.new(0, 10, 0, 135)
  564. PageNavigationFrame.BackgroundTransparency = 1
  565.  
  566. local PageLabel = Instance.new("TextLabel", PageNavigationFrame)
  567. PageLabel.Size = UDim2.new(0, 150, 1, 0)
  568. PageLabel.Position = UDim2.new(0.5, -75, 0, 0)
  569. PageLabel.BackgroundTransparency = 1
  570. PageLabel.TextColor3 = Color3.fromRGB(200, 200, 255)
  571. PageLabel.Font = Enum.Font.GothamBold
  572. PageLabel.TextSize = 16
  573. PageLabel.Text = string.format("Página %d/%d", currentPage, maxPages)
  574.  
  575. local PagePrevBtn = Instance.new("TextButton", PageNavigationFrame)
  576. PagePrevBtn.Text = "◀"
  577. PagePrevBtn.Size = UDim2.new(0, 40, 0, 30)
  578. PagePrevBtn.Position = UDim2.new(0, 0, 0, 2.5)
  579. PagePrevBtn.BackgroundColor3 = Color3.fromRGB(80, 70, 130)
  580. PagePrevBtn.Font = Enum.Font.GothamBold
  581. PagePrevBtn.TextSize = 14
  582. PagePrevBtn.TextColor3 = Color3.new(1, 1, 1)
  583. local PPB_Corner = Instance.new("UICorner", PagePrevBtn)
  584. PPB_Corner.CornerRadius = UDim.new(0, 6)
  585. AnimateHover(PagePrevBtn, Color3.fromRGB(100, 90, 150), Color3.fromRGB(80, 70, 130))
  586.  
  587. local PageNextBtn = Instance.new("TextButton", PageNavigationFrame)
  588. PageNextBtn.Text = "▶"
  589. PageNextBtn.Size = UDim2.new(0, 40, 0, 30)
  590. PageNextBtn.Position = UDim2.new(1, -40, 0, 2.5)
  591. PageNextBtn.BackgroundColor3 = Color3.fromRGB(80, 70, 130)
  592. PageNextBtn.Font = Enum.Font.GothamBold
  593. PageNextBtn.TextSize = 14
  594. PageNextBtn.TextColor3 = Color3.new(1, 1, 1)
  595. local PNB_Corner = Instance.new("UICorner", PageNextBtn)
  596. PNB_Corner.CornerRadius = UDim.new(0, 6)
  597. AnimateHover(PageNextBtn, Color3.fromRGB(100, 90, 150), Color3.fromRGB(80, 70, 130))
  598.  
  599. -- Botões de página rápida (1-5)
  600. local QuickPageFrame = Instance.new("Frame", PageNavigationFrame)
  601. QuickPageFrame.Size = UDim2.new(0, 200, 0, 25)
  602. QuickPageFrame.Position = UDim2.new(0.5, -100, 0, 35)
  603. QuickPageFrame.BackgroundTransparency = 1
  604.  
  605. local quickPageButtons = {}
  606. for i = 1, maxPages do
  607. local btn = Instance.new("TextButton", QuickPageFrame)
  608. btn.Text = tostring(i)
  609. btn.Size = UDim2.new(0, 35, 0, 25)
  610. btn.Position = UDim2.new(0, (i-1) * 40, 0, 0)
  611. btn.BackgroundColor3 = Color3.fromRGB(60, 55, 80)
  612. btn.Font = Enum.Font.GothamBold
  613. btn.TextSize = 13
  614. btn.TextColor3 = Color3.new(1, 1, 1)
  615. local qp_corner = Instance.new("UICorner", btn)
  616. qp_corner.CornerRadius = UDim.new(0, 5)
  617. AnimateHover(btn, Color3.fromRGB(90, 80, 120), Color3.fromRGB(60, 55, 80))
  618. quickPageButtons[i] = btn
  619. end
  620.  
  621. -- Container de slots (agora mostra apenas a página atual)
  622. local SlotsContainer = Instance.new("Frame", MainFrame)
  623. SlotsContainer.Size = UDim2.new(1, -20, 1, -220) -- AJUSTADO para acomodar navegação
  624. SlotsContainer.Position = UDim2.new(0, 10, 0, 210) -- AJUSTADO
  625. SlotsContainer.BackgroundTransparency = 1
  626.  
  627. local GridLayout = Instance.new("UIGridLayout", SlotsContainer)
  628. GridLayout.CellPadding = UDim2.new(0, 8, 0, 8)
  629. GridLayout.CellSize = UDim2.new(0.5, -4, 0, 50)
  630. GridLayout.FillDirection = Enum.FillDirection.Vertical
  631. GridLayout.SortOrder = Enum.SortOrder.LayoutOrder
  632. GridLayout.StartCorner = Enum.StartCorner.TopLeft
  633.  
  634. -- Overlays (mantidos iguais)
  635. local ConfirmationOverlay = Instance.new("Frame", MainFrame)
  636. ConfirmationOverlay.Name = "ConfirmationOverlay"
  637. ConfirmationOverlay.Size = UDim2.new(1, 0, 1, 0)
  638. ConfirmationOverlay.BackgroundColor3 = Color3.new(0, 0, 0)
  639. ConfirmationOverlay.BackgroundTransparency = 0.6
  640. ConfirmationOverlay.Visible = false
  641. ConfirmationOverlay.ZIndex = 10
  642.  
  643. local ConfirmationFrame = Instance.new("Frame", ConfirmationOverlay)
  644. ConfirmationFrame.Size = UDim2.new(0, 300, 0, 120)
  645. ConfirmationFrame.Position = UDim2.new(0.5, -150, 0.5, -60)
  646. ConfirmationFrame.BackgroundColor3 = Color3.fromRGB(35, 32, 50)
  647. local CF_C = Instance.new("UICorner", ConfirmationFrame)
  648. CF_C.CornerRadius = UDim.new(0, 8)
  649. local CF_S = Instance.new("UIStroke", ConfirmationFrame)
  650. CF_S.Color = Color3.fromRGB(120, 90, 255)
  651. CF_S.Thickness = 1.5
  652.  
  653. local ConfirmLabel = Instance.new("TextLabel", ConfirmationFrame)
  654. ConfirmLabel.Size = UDim2.new(1, -20, 0, 60)
  655. ConfirmLabel.Position = UDim2.new(0, 10, 0, 0)
  656. ConfirmLabel.BackgroundTransparency = 1
  657. ConfirmLabel.TextColor3 = Color3.new(1, 1, 1)
  658. ConfirmLabel.Font = Enum.Font.GothamSemibold
  659. ConfirmLabel.TextSize = 16
  660. ConfirmLabel.TextWrapped = true
  661.  
  662. local ConfirmYes = Instance.new("TextButton", ConfirmationFrame)
  663. ConfirmYes.Size = UDim2.new(0.5, -15, 0, 40)
  664. ConfirmYes.Position = UDim2.new(0, 10, 1, -50)
  665. ConfirmYes.BackgroundColor3 = Color3.fromRGB(220, 80, 80)
  666. ConfirmYes.Font = Enum.Font.GothamBold
  667. ConfirmYes.Text = "Sim"
  668. ConfirmYes.TextColor3 = Color3.new(1, 1, 1)
  669. ConfirmYes.TextSize = 14
  670. local CY_C = Instance.new("UICorner", ConfirmYes)
  671. CY_C.CornerRadius = UDim.new(0, 6)
  672. AnimateHover(ConfirmYes, Color3.fromRGB(240, 100, 100), Color3.fromRGB(220, 80, 80))
  673.  
  674. local ConfirmNo = Instance.new("TextButton", ConfirmationFrame)
  675. ConfirmNo.Size = UDim2.new(0.5, -15, 0, 40)
  676. ConfirmNo.Position = UDim2.new(0.5, 5, 1, -50)
  677. ConfirmNo.BackgroundColor3 = Color3.fromRGB(80, 70, 130)
  678. ConfirmNo.Font = Enum.Font.GothamBold
  679. ConfirmNo.Text = "Não"
  680. ConfirmNo.TextColor3 = Color3.new(1, 1, 1)
  681. ConfirmNo.TextSize = 14
  682. local CN_C = Instance.new("UICorner", ConfirmNo)
  683. CN_C.CornerRadius = UDim.new(0, 6)
  684. AnimateHover(ConfirmNo, Color3.fromRGB(100, 90, 150), Color3.fromRGB(80, 70, 130))
  685.  
  686. local RenameOverlay = Instance.new("Frame", MainFrame)
  687. RenameOverlay.Name = "RenameOverlay"
  688. RenameOverlay.Size = UDim2.new(1, 0, 1, 0)
  689. RenameOverlay.BackgroundColor3 = Color3.new(0, 0, 0)
  690. RenameOverlay.BackgroundTransparency = 0.6
  691. RenameOverlay.Visible = false
  692. RenameOverlay.ZIndex = 11
  693.  
  694. local RenameFrame = Instance.new("Frame", RenameOverlay)
  695. RenameFrame.Size = UDim2.new(0, 350, 0, 160)
  696. RenameFrame.Position = UDim2.new(0.5, -175, 0.5, -80)
  697. RenameFrame.BackgroundColor3 = Color3.fromRGB(35, 32, 50)
  698. local RF_C = Instance.new("UICorner", RenameFrame)
  699. RF_C.CornerRadius = UDim.new(0, 8)
  700. local RF_S = Instance.new("UIStroke", RenameFrame)
  701. RF_S.Color = Color3.fromRGB(120, 90, 255)
  702. RF_S.Thickness = 1.5
  703.  
  704. local RenameTitle = Instance.new("TextLabel", RenameFrame)
  705. RenameTitle.Size = UDim2.new(1, -20, 0, 40)
  706. RenameTitle.Position = UDim2.new(0, 10, 0, 0)
  707. RenameTitle.BackgroundTransparency = 1
  708. RenameTitle.TextColor3 = Color3.new(1, 1, 1)
  709. RenameTitle.Font = Enum.Font.GothamSemibold
  710. RenameTitle.TextSize = 16
  711. RenameTitle.Text = "Renomear Posição"
  712.  
  713. local RenameField = Instance.new("TextBox", RenameFrame)
  714. RenameField.Size = UDim2.new(1, -20, 0, 40)
  715. RenameField.Position = UDim2.new(0, 10, 0, 50)
  716. RenameField.BackgroundColor3 = Color3.fromRGB(30, 28, 42)
  717. RenameField.TextColor3 = Color3.new(1, 1, 1)
  718. RenameField.Font = Enum.Font.Gotham
  719. RenameField.TextSize = 14
  720. local RFD_C = Instance.new("UICorner", RenameField)
  721. RFD_C.CornerRadius = UDim.new(0, 6)
  722. local RFD_S = Instance.new("UIStroke", RenameField)
  723. RFD_S.Color = Color3.fromRGB(80, 70, 130)
  724. RFD_S.Thickness = 1
  725.  
  726. local RenameConfirm = Instance.new("TextButton", RenameFrame)
  727. RenameConfirm.Size = UDim2.new(0.5, -15, 0, 40)
  728. RenameConfirm.Position = UDim2.new(0, 10, 1, -50)
  729. RenameConfirm.BackgroundColor3 = Color3.fromRGB(80, 160, 220)
  730. RenameConfirm.Font = Enum.Font.GothamBold
  731. RenameConfirm.Text = "Confirmar"
  732. RenameConfirm.TextColor3 = Color3.new(1, 1, 1)
  733. RenameConfirm.TextSize = 14
  734. local RC_C = Instance.new("UICorner", RenameConfirm)
  735. RC_C.CornerRadius = UDim.new(0, 6)
  736. AnimateHover(RenameConfirm, Color3.fromRGB(100, 180, 240), Color3.fromRGB(80, 160, 220))
  737.  
  738. local RenameCancel = Instance.new("TextButton", RenameFrame)
  739. RenameCancel.Size = UDim2.new(0.5, -15, 0, 40)
  740. RenameCancel.Position = UDim2.new(0.5, 5, 1, -50)
  741. RenameCancel.BackgroundColor3 = Color3.fromRGB(80, 70, 130)
  742. RenameCancel.Font = Enum.Font.GothamBold
  743. RenameCancel.Text = "Cancelar"
  744. RenameCancel.TextColor3 = Color3.new(1, 1, 1)
  745. RenameCancel.TextSize = 14
  746. local RCN_C = Instance.new("UICorner", RenameCancel)
  747. RCN_C.CornerRadius = UDim.new(0, 6)
  748. AnimateHover(RenameCancel, Color3.fromRGB(100, 90, 150), Color3.fromRGB(80, 70, 130))
  749.  
  750. local MoveOverlay = Instance.new("Frame", MainFrame)
  751. MoveOverlay.Name = "MoveOverlay"
  752. MoveOverlay.Size = UDim2.new(1, 0, 1, 0)
  753. MoveOverlay.BackgroundColor3 = Color3.new(0, 0, 0)
  754. MoveOverlay.BackgroundTransparency = 0.6
  755. MoveOverlay.Visible = false
  756. MoveOverlay.ZIndex = 12
  757.  
  758. local MoveFrame = Instance.new("Frame", MoveOverlay)
  759. MoveFrame.Size = UDim2.new(0, 300, 0, 180)
  760. MoveFrame.Position = UDim2.new(0.5, -150, 0.5, -90)
  761. MoveFrame.BackgroundColor3 = Color3.fromRGB(35, 32, 50)
  762. local MF_C = Instance.new("UICorner", MoveFrame)
  763. MF_C.CornerRadius = UDim.new(0, 8)
  764. local MF_S = Instance.new("UIStroke", MoveFrame)
  765. MF_S.Color = Color3.fromRGB(120, 90, 255)
  766. MF_S.Thickness = 1.5
  767.  
  768. local MoveTitle = Instance.new("TextLabel", MoveFrame)
  769. MoveTitle.Size = UDim2.new(1, -20, 0, 40)
  770. MoveTitle.Position = UDim2.new(0, 10, 0, 10)
  771. MoveTitle.BackgroundTransparency = 1
  772. MoveTitle.TextColor3 = Color3.new(1, 1, 1)
  773. MoveTitle.Font = Enum.Font.GothamSemibold
  774. MoveTitle.TextSize = 16
  775. MoveTitle.Text = "Mover Posição"
  776.  
  777. local MoveInfo = Instance.new("TextLabel", MoveFrame)
  778. MoveInfo.Size = UDim2.new(1, -20, 0, 20)
  779. MoveInfo.Position = UDim2.new(0, 10, 0, 50)
  780. MoveInfo.BackgroundTransparency = 1
  781. MoveInfo.TextColor3 = Color3.fromRGB(200, 200, 200)
  782. MoveInfo.Font = Enum.Font.Gotham
  783. MoveInfo.TextSize = 13
  784. MoveInfo.Text = "Digite o número do slot de destino (1-50):"
  785.  
  786. local MoveInput = Instance.new("TextBox", MoveFrame)
  787. MoveInput.Size = UDim2.new(0, 80, 0, 40)
  788. MoveInput.Position = UDim2.new(0.5, -40, 0, 80)
  789. MoveInput.BackgroundColor3 = Color3.fromRGB(30, 28, 42)
  790. MoveInput.TextColor3 = Color3.new(1, 1, 1)
  791. MoveInput.Font = Enum.Font.GothamBold
  792. MoveInput.TextSize = 20
  793. MoveInput.Text = ""
  794. MoveInput.PlaceholderText = "1-50"
  795. local MI_C = Instance.new("UICorner", MoveInput)
  796. MI_C.CornerRadius = UDim.new(0, 6)
  797. local MI_S = Instance.new("UIStroke", MoveInput)
  798. MI_S.Color = Color3.fromRGB(80, 70, 130)
  799. MI_S.Thickness = 1
  800.  
  801. local MoveConfirm = Instance.new("TextButton", MoveFrame)
  802. MoveConfirm.Size = UDim2.new(0.5, -15, 0, 35)
  803. MoveConfirm.Position = UDim2.new(0, 10, 1, -45)
  804. MoveConfirm.BackgroundColor3 = Color3.fromRGB(80, 160, 220)
  805. MoveConfirm.Font = Enum.Font.GothamBold
  806. MoveConfirm.Text = "Confirmar"
  807. MoveConfirm.TextColor3 = Color3.new(1, 1, 1)
  808. MoveConfirm.TextSize = 14
  809. local MC_C = Instance.new("UICorner", MoveConfirm)
  810. MC_C.CornerRadius = UDim.new(0, 6)
  811. AnimateHover(MoveConfirm, Color3.fromRGB(100, 180, 240), Color3.fromRGB(80, 160, 220))
  812.  
  813. local MoveCancel = Instance.new("TextButton", MoveFrame)
  814. MoveCancel.Size = UDim2.new(0.5, -15, 0, 35)
  815. MoveCancel.Position = UDim2.new(0.5, 5, 1, -45)
  816. MoveCancel.BackgroundColor3 = Color3.fromRGB(80, 70, 130)
  817. MoveCancel.Font = Enum.Font.GothamBold
  818. MoveCancel.Text = "Cancelar"
  819. MoveCancel.TextColor3 = Color3.new(1, 1, 1)
  820. MoveCancel.TextSize = 14
  821. local MCN_C = Instance.new("UICorner", MoveCancel)
  822. MCN_C.CornerRadius = UDim.new(0, 6)
  823. AnimateHover(MoveCancel, Color3.fromRGB(100, 90, 150), Color3.fromRGB(80, 70, 130))
  824.  
  825. --================================================================================
  826. -- [LÓGICA DO SISTEMA - ATUALIZADA COM SISTEMA DE PÁGINAS]
  827. --================================================================================
  828.  
  829. local onConfirmCallback = nil
  830. local slotToRename = nil
  831. local slotToMove = nil
  832.  
  833. local function updateMainPositionUI()
  834. if mainPosition then
  835. MainPosContainer.Visible = true
  836. else
  837. MainPosContainer.Visible = false
  838. end
  839. end
  840.  
  841. local function setMainPosition(slot)
  842. if savedPositions[slot] then
  843. mainPosition = {
  844. position = savedPositions[slot].position,
  845. name = savedPositions[slot].name,
  846. timestamp = savedPositions[slot].timestamp
  847. }
  848. saveMainPosition()
  849. updateMainPositionUI()
  850. end
  851. end
  852.  
  853. MP_RemoveBtn.MouseButton1Click:Connect(function()
  854. ConfirmLabel.Text = "Remover posição principal?"
  855. ConfirmYes.Text = "Sim"
  856. onConfirmCallback = function()
  857. mainPosition = nil
  858. if hasFS and hasDelFile then pcall(delfile, MAIN_FILE) end
  859. if hasFS and hasDelFile then pcall(delfile, MAIN_BAK_FILE) end
  860. updateMainPositionUI()
  861. end
  862. ConfirmationOverlay.Visible = true
  863. end)
  864.  
  865. local function swapPositions(fromSlot, toSlot)
  866. if fromSlot == toSlot then return end
  867. if savedPositions[toSlot] then
  868. local temp = savedPositions[fromSlot]
  869. savedPositions[fromSlot] = savedPositions[toSlot]
  870. savedPositions[toSlot] = temp
  871. else
  872. savedPositions[toSlot] = savedPositions[fromSlot]
  873. savedPositions[fromSlot] = nil
  874. end
  875. saveToDisk()
  876. end
  877.  
  878. local function findNextEmptySlot()
  879. for i = 1, maxSaves do
  880. if not savedPositions[i] then return i end
  881. end
  882. return (currentSaveSlot % maxSaves) + 1
  883. end
  884.  
  885. local function selectNextSlot()
  886. currentSaveSlot = findNextEmptySlot()
  887. SaveSlotLabel.Text = "Slot Atual: " .. currentSaveSlot
  888.  
  889. -- NOVO: Atualiza a página automaticamente
  890. currentPage = math.ceil(currentSaveSlot / slotsPerPage)
  891. updatePageDisplay()
  892. end
  893.  
  894. local updateSavedList
  895.  
  896. local function openRenamePrompt(slot)
  897. if not savedPositions[slot] then return end
  898. slotToRename = slot
  899. RenameTitle.Text = string.format("Renomear Slot %d", slot)
  900. RenameField.Text = savedPositions[slot].name
  901. RenameOverlay.Visible = true
  902. end
  903.  
  904. local function openMovePrompt(slot)
  905. if not savedPositions[slot] then return end
  906. slotToMove = slot
  907. MoveTitle.Text = string.format("Mover Slot %d: %s", slot, savedPositions[slot].name)
  908. MoveInput.Text = ""
  909. MoveOverlay.Visible = true
  910. end
  911.  
  912. --================================================================================
  913. -- [NOVO: FUNÇÃO DE ATUALIZAÇÃO DE PÁGINA]
  914. --================================================================================
  915.  
  916. function updatePageDisplay()
  917. PageLabel.Text = string.format("Página %d/%d", currentPage, maxPages)
  918.  
  919. -- Atualiza destaque dos botões rápidos
  920. for i, btn in ipairs(quickPageButtons) do
  921. if i == currentPage then
  922. btn.BackgroundColor3 = Color3.fromRGB(120, 90, 255)
  923. btn.TextSize = 14
  924. else
  925. btn.BackgroundColor3 = Color3.fromRGB(60, 55, 80)
  926. btn.TextSize = 13
  927. end
  928. end
  929.  
  930. -- Atualiza a lista de slots
  931. if updateSavedList then
  932. updateSavedList()
  933. end
  934. end
  935.  
  936. -- Navegação de páginas
  937. PagePrevBtn.MouseButton1Click:Connect(function()
  938. if currentPage > 1 then
  939. currentPage = currentPage - 1
  940. updatePageDisplay()
  941. end
  942. end)
  943.  
  944. PageNextBtn.MouseButton1Click:Connect(function()
  945. if currentPage < maxPages then
  946. currentPage = currentPage + 1
  947. updatePageDisplay()
  948. end
  949. end)
  950.  
  951. -- Botões de página rápida
  952. for i, btn in ipairs(quickPageButtons) do
  953. btn.MouseButton1Click:Connect(function()
  954. currentPage = i
  955. updatePageDisplay()
  956. end)
  957. end
  958.  
  959. --================================================================================
  960. -- [ATUALIZAÇÃO DA LISTA DE SLOTS - AGORA COM PAGINAÇÃO]
  961. --================================================================================
  962.  
  963. updateSavedList = function()
  964. -- Limpa slots anteriores
  965. for _, child in ipairs(SlotsContainer:GetChildren()) do
  966. if child:IsA("Frame") then child:Destroy() end
  967. end
  968.  
  969. -- Calcula range de slots para a página atual
  970. local startSlot = (currentPage - 1) * slotsPerPage + 1
  971. local endSlot = math.min(currentPage * slotsPerPage, maxSaves)
  972.  
  973. local displayIndex = 0
  974.  
  975. for slot = startSlot, endSlot do
  976. displayIndex = displayIndex + 1
  977.  
  978. local entryFrame = Instance.new("Frame")
  979. entryFrame.Name = "Slot_" .. slot
  980. entryFrame.LayoutOrder = displayIndex
  981. entryFrame.BackgroundColor3 = Color3.fromRGB(40, 38, 55)
  982. entryFrame.BackgroundTransparency = 0.5
  983. entryFrame.Parent = SlotsContainer
  984. entryFrame.ClipsDescendants = false
  985.  
  986. local C7 = Instance.new("UICorner", entryFrame)
  987. C7.CornerRadius = UDim.new(0, 6)
  988.  
  989. local data = savedPositions[slot]
  990. if data then
  991. local actionsFrame = Instance.new("Frame", entryFrame)
  992. actionsFrame.Name = "ActionsFrame"
  993. actionsFrame.Size = UDim2.new(0, 30, 1, 0)
  994. actionsFrame.Position = UDim2.new(0, 5, 0, 0)
  995. actionsFrame.BackgroundTransparency = 1
  996.  
  997. local mainBtn = Instance.new("TextButton", actionsFrame)
  998. mainBtn.Name = "MainBtn"
  999. mainBtn.Text = mainPosition and mainPosition.position == data.position and "★" or "☆"
  1000. mainBtn.Size = UDim2.new(1, 0, 0, 22)
  1001. mainBtn.Position = UDim2.new(0, 0, 0, 2)
  1002. mainBtn.BackgroundTransparency = 1
  1003. mainBtn.Font = Enum.Font.GothamBold
  1004. mainBtn.TextSize = 14
  1005. mainBtn.TextColor3 = Color3.fromRGB(255, 215, 0)
  1006.  
  1007. mainBtn.MouseEnter:Connect(function()
  1008. mainBtn.TextSize = 16
  1009. end)
  1010. mainBtn.MouseLeave:Connect(function()
  1011. mainBtn.TextSize = 14
  1012. end)
  1013.  
  1014. local menuBtn = Instance.new("TextButton", actionsFrame)
  1015. menuBtn.Name = "MenuBtn"
  1016. menuBtn.Text = "⋮"
  1017. menuBtn.Size = UDim2.new(1, 0, 0, 22)
  1018. menuBtn.Position = UDim2.new(0, 0, 0, 26)
  1019. menuBtn.BackgroundTransparency = 1
  1020. menuBtn.Font = Enum.Font.GothamBold
  1021. menuBtn.TextSize = 18
  1022. menuBtn.TextColor3 = Color3.fromRGB(180, 180, 200)
  1023.  
  1024. menuBtn.MouseEnter:Connect(function()
  1025. menuBtn.TextColor3 = Color3.fromRGB(255, 255, 255)
  1026. menuBtn.TextSize = 20
  1027. end)
  1028. menuBtn.MouseLeave:Connect(function()
  1029. menuBtn.TextColor3 = Color3.fromRGB(180, 180, 200)
  1030. menuBtn.TextSize = 18
  1031. end)
  1032.  
  1033. local optionsFrame = Instance.new("Frame", ScreenGui)
  1034. optionsFrame.Name = "OptionsFrame_" .. slot
  1035. optionsFrame.Size = UDim2.new(0, 120, 0, 110)
  1036. optionsFrame.BackgroundColor3 = Color3.fromRGB(35, 32, 48)
  1037. optionsFrame.BackgroundTransparency = 0.05
  1038. optionsFrame.Visible = false
  1039. optionsFrame.ZIndex = 50
  1040. optionsFrame.BorderSizePixel = 0
  1041.  
  1042. local OptionsCorner = Instance.new("UICorner", optionsFrame)
  1043. OptionsCorner.CornerRadius = UDim.new(0, 8)
  1044.  
  1045. local OptionsStroke = Instance.new("UIStroke", optionsFrame)
  1046. OptionsStroke.Color = Color3.fromRGB(100, 80, 180)
  1047. OptionsStroke.Thickness = 1.5
  1048.  
  1049. local menuTitle = Instance.new("TextLabel", optionsFrame)
  1050. menuTitle.Name = "MenuTitle"
  1051. menuTitle.Size = UDim2.new(1, 0, 0, 20)
  1052. menuTitle.Position = UDim2.new(0, 0, 0, 2)
  1053. menuTitle.BackgroundTransparency = 1
  1054. menuTitle.Text = "Slot " .. slot
  1055. menuTitle.TextColor3 = Color3.fromRGB(200, 200, 220)
  1056. menuTitle.Font = Enum.Font.GothamBold
  1057. menuTitle.TextSize = 11
  1058. menuTitle.ZIndex = 51
  1059.  
  1060. local buttonsContainer = Instance.new("Frame", optionsFrame)
  1061. buttonsContainer.Name = "ButtonsContainer"
  1062. buttonsContainer.Size = UDim2.new(1, -10, 1, -25)
  1063. buttonsContainer.Position = UDim2.new(0, 5, 0, 22)
  1064. buttonsContainer.BackgroundTransparency = 1
  1065. buttonsContainer.ZIndex = 51
  1066.  
  1067. local renameBtn = Instance.new("TextButton", buttonsContainer)
  1068. renameBtn.Name = "RenameBtn"
  1069. renameBtn.Size = UDim2.new(1, 0, 0, 25)
  1070. renameBtn.Position = UDim2.new(0, 0, 0, 0)
  1071. renameBtn.BackgroundColor3 = Color3.fromRGB(45, 42, 58)
  1072. renameBtn.BackgroundTransparency = 0.3
  1073. renameBtn.Text = ""
  1074. renameBtn.Font = Enum.Font.GothamBold
  1075. renameBtn.TextSize = 12
  1076. renameBtn.ZIndex = 52
  1077.  
  1078. local renameBtnCorner = Instance.new("UICorner", renameBtn)
  1079. renameBtnCorner.CornerRadius = UDim.new(0, 4)
  1080.  
  1081. local renameIcon = Instance.new("TextLabel", renameBtn)
  1082. renameIcon.Size = UDim2.new(0, 25, 1, 0)
  1083. renameIcon.Position = UDim2.new(0, 0, 0, 0)
  1084. renameIcon.BackgroundTransparency = 1
  1085. renameIcon.Text = "✏"
  1086. renameIcon.TextColor3 = Color3.fromRGB(150, 180, 255)
  1087. renameIcon.Font = Enum.Font.GothamBold
  1088. renameIcon.TextSize = 14
  1089. renameIcon.ZIndex = 53
  1090.  
  1091. local renameText = Instance.new("TextLabel", renameBtn)
  1092. renameText.Size = UDim2.new(1, -25, 1, 0)
  1093. renameText.Position = UDim2.new(0, 25, 0, 0)
  1094. renameText.BackgroundTransparency = 1
  1095. renameText.Text = "Renomear"
  1096. renameText.TextColor3 = Color3.fromRGB(220, 220, 240)
  1097. renameText.Font = Enum.Font.Gotham
  1098. renameText.TextSize = 11
  1099. renameText.TextXAlignment = Enum.TextXAlignment.Left
  1100. renameText.ZIndex = 53
  1101.  
  1102. local moveBtn = Instance.new("TextButton", buttonsContainer)
  1103. moveBtn.Name = "MoveBtn"
  1104. moveBtn.Size = UDim2.new(1, 0, 0, 25)
  1105. moveBtn.Position = UDim2.new(0, 0, 0, 28)
  1106. moveBtn.BackgroundColor3 = Color3.fromRGB(45, 42, 58)
  1107. moveBtn.BackgroundTransparency = 0.3
  1108. moveBtn.Text = ""
  1109. moveBtn.Font = Enum.Font.GothamBold
  1110. moveBtn.TextSize = 12
  1111. moveBtn.ZIndex = 52
  1112.  
  1113. local moveBtnCorner = Instance.new("UICorner", moveBtn)
  1114. moveBtnCorner.CornerRadius = UDim.new(0, 4)
  1115.  
  1116. local moveIcon = Instance.new("TextLabel", moveBtn)
  1117. moveIcon.Size = UDim2.new(0, 25, 1, 0)
  1118. moveIcon.Position = UDim2.new(0, 0, 0, 0)
  1119. moveIcon.BackgroundTransparency = 1
  1120. moveIcon.Text = "↔"
  1121. moveIcon.TextColor3 = Color3.fromRGB(150, 255, 150)
  1122. moveIcon.Font = Enum.Font.GothamBold
  1123. moveIcon.TextSize = 14
  1124. moveIcon.ZIndex = 53
  1125.  
  1126. local moveText = Instance.new("TextLabel", moveBtn)
  1127. moveText.Size = UDim2.new(1, -25, 1, 0)
  1128. moveText.Position = UDim2.new(0, 25, 0, 0)
  1129. moveText.BackgroundTransparency = 1
  1130. moveText.Text = "Mover"
  1131. moveText.TextColor3 = Color3.fromRGB(220, 220, 240)
  1132. moveText.Font = Enum.Font.Gotham
  1133. moveText.TextSize = 11
  1134. moveText.TextXAlignment = Enum.TextXAlignment.Left
  1135. moveText.ZIndex = 53
  1136.  
  1137. local deleteBtn = Instance.new("TextButton", buttonsContainer)
  1138. deleteBtn.Name = "DeleteBtn"
  1139. deleteBtn.Size = UDim2.new(1, 0, 0, 25)
  1140. deleteBtn.Position = UDim2.new(0, 0, 0, 56)
  1141. deleteBtn.BackgroundColor3 = Color3.fromRGB(45, 42, 58)
  1142. deleteBtn.BackgroundTransparency = 0.3
  1143. deleteBtn.Text = ""
  1144. deleteBtn.Font = Enum.Font.GothamBold
  1145. deleteBtn.TextSize = 12
  1146. deleteBtn.ZIndex = 52
  1147.  
  1148. local deleteBtnCorner = Instance.new("UICorner", deleteBtn)
  1149. deleteBtnCorner.CornerRadius = UDim.new(0, 4)
  1150.  
  1151. local deleteIcon = Instance.new("TextLabel", deleteBtn)
  1152. deleteIcon.Size = UDim2.new(0, 25, 1, 0)
  1153. deleteIcon.Position = UDim2.new(0, 0, 0, 0)
  1154. deleteIcon.BackgroundTransparency = 1
  1155. deleteIcon.Text = "🗑"
  1156. deleteIcon.TextColor3 = Color3.fromRGB(255, 150, 150)
  1157. deleteIcon.Font = Enum.Font.GothamBold
  1158. deleteIcon.TextSize = 14
  1159. deleteIcon.ZIndex = 53
  1160.  
  1161. local deleteText = Instance.new("TextLabel", deleteBtn)
  1162. deleteText.Size = UDim2.new(1, -25, 1, 0)
  1163. deleteText.Position = UDim2.new(0, 25, 0, 0)
  1164. deleteText.BackgroundTransparency = 1
  1165. deleteText.Text = "Excluir"
  1166. deleteText.TextColor3 = Color3.fromRGB(220, 220, 240)
  1167. deleteText.Font = Enum.Font.Gotham
  1168. deleteText.TextSize = 11
  1169. deleteText.TextXAlignment = Enum.TextXAlignment.Left
  1170. deleteText.ZIndex = 53
  1171.  
  1172. renameBtn.MouseEnter:Connect(function()
  1173. TweenService:Create(renameBtn, TweenInfo.new(0.15), {
  1174. BackgroundTransparency = 0,
  1175. BackgroundColor3 = Color3.fromRGB(60, 57, 78)
  1176. }):Play()
  1177. end)
  1178. renameBtn.MouseLeave:Connect(function()
  1179. TweenService:Create(renameBtn, TweenInfo.new(0.15), {
  1180. BackgroundTransparency = 0.3,
  1181. BackgroundColor3 = Color3.fromRGB(45, 42, 58)
  1182. }):Play()
  1183. end)
  1184.  
  1185. moveBtn.MouseEnter:Connect(function()
  1186. TweenService:Create(moveBtn, TweenInfo.new(0.15), {
  1187. BackgroundTransparency = 0,
  1188. BackgroundColor3 = Color3.fromRGB(60, 57, 78)
  1189. }):Play()
  1190. end)
  1191. moveBtn.MouseLeave:Connect(function()
  1192. TweenService:Create(moveBtn, TweenInfo.new(0.15), {
  1193. BackgroundTransparency = 0.3,
  1194. BackgroundColor3 = Color3.fromRGB(45, 42, 58)
  1195. }):Play()
  1196. end)
  1197.  
  1198. deleteBtn.MouseEnter:Connect(function()
  1199. TweenService:Create(deleteBtn, TweenInfo.new(0.15), {
  1200. BackgroundTransparency = 0,
  1201. BackgroundColor3 = Color3.fromRGB(80, 50, 50)
  1202. }):Play()
  1203. end)
  1204. deleteBtn.MouseLeave:Connect(function()
  1205. TweenService:Create(deleteBtn, TweenInfo.new(0.15), {
  1206. BackgroundTransparency = 0.3,
  1207. BackgroundColor3 = Color3.fromRGB(45, 42, 58)
  1208. }):Play()
  1209. end)
  1210.  
  1211. local nameLabel = Instance.new("TextLabel", entryFrame)
  1212. nameLabel.Name = "NameLabel"
  1213. nameLabel.Size = UDim2.new(1, -90, 0, 24)
  1214. nameLabel.Position = UDim2.new(0, 40, 0, 3)
  1215. nameLabel.BackgroundTransparency = 1
  1216. nameLabel.TextColor3 = Color3.fromRGB(220, 220, 255)
  1217. nameLabel.Font = Enum.Font.GothamSemibold
  1218. nameLabel.TextSize = 13
  1219. nameLabel.TextXAlignment = Enum.TextXAlignment.Left
  1220. nameLabel.TextTruncate = Enum.TextTruncate.AtEnd
  1221. nameLabel.Text = data.name
  1222.  
  1223. local timeLabel = Instance.new("TextLabel", entryFrame)
  1224. timeLabel.Name = "TimeLabel"
  1225. timeLabel.Size = UDim2.new(1, -90, 0, 14)
  1226. timeLabel.Position = UDim2.new(0, 40, 0, 28)
  1227. timeLabel.BackgroundTransparency = 1
  1228. timeLabel.TextColor3 = Color3.fromRGB(130, 130, 160)
  1229. timeLabel.Font = Enum.Font.Gotham
  1230. timeLabel.TextSize = 10
  1231. timeLabel.TextXAlignment = Enum.TextXAlignment.Left
  1232. timeLabel.Text = data.timestamp
  1233.  
  1234. if #data.name > 25 then
  1235. local nameTooltip = Instance.new("Frame", ScreenGui)
  1236. nameTooltip.Name = "NameTooltip_" .. slot
  1237. nameTooltip.Size = UDim2.new(0, 280, 0, 60)
  1238. nameTooltip.BackgroundColor3 = Color3.fromRGB(25, 22, 38)
  1239. nameTooltip.BorderSizePixel = 0
  1240. nameTooltip.Visible = false
  1241. nameTooltip.ZIndex = 60
  1242.  
  1243. local TooltipCorner = Instance.new("UICorner", nameTooltip)
  1244. TooltipCorner.CornerRadius = UDim.new(0, 6)
  1245.  
  1246. local TooltipStroke = Instance.new("UIStroke", nameTooltip)
  1247. TooltipStroke.Color = Color3.fromRGB(100, 80, 180)
  1248. TooltipStroke.Thickness = 1
  1249.  
  1250. local TooltipText = Instance.new("TextLabel", nameTooltip)
  1251. TooltipText.Size = UDim2.new(1, -10, 1, 0)
  1252. TooltipText.Position = UDim2.new(0, 5, 0, 0)
  1253. TooltipText.BackgroundTransparency = 1
  1254. TooltipText.Text = data.name
  1255. TooltipText.TextColor3 = Color3.fromRGB(255, 255, 255)
  1256. TooltipText.Font = Enum.Font.Gotham
  1257. TooltipText.TextSize = 12
  1258. TooltipText.TextWrapped = true
  1259. TooltipText.ZIndex = 61
  1260.  
  1261. nameLabel.MouseEnter:Connect(function()
  1262. local pos = nameLabel.AbsolutePosition
  1263. nameTooltip.Position = UDim2.new(0, pos.X, 0, pos.Y - 65)
  1264. nameTooltip.Visible = true
  1265. end)
  1266.  
  1267. nameLabel.MouseLeave:Connect(function()
  1268. nameTooltip.Visible = false
  1269. end)
  1270. end
  1271.  
  1272. local teleportBtn = Instance.new("TextButton", entryFrame)
  1273. teleportBtn.Name = "TeleportBtn"
  1274. teleportBtn.Text = "TP"
  1275. teleportBtn.Size = UDim2.new(0, 35, 0, 35)
  1276. teleportBtn.Position = UDim2.new(1, -40, 0.5, -17.5)
  1277. teleportBtn.BackgroundColor3 = Color3.fromRGB(120, 90, 255)
  1278. teleportBtn.Font = Enum.Font.GothamBold
  1279. teleportBtn.TextSize = 14
  1280. teleportBtn.TextColor3 = Color3.new(1, 1, 1)
  1281. local C9 = Instance.new("UICorner", teleportBtn)
  1282. C9.CornerRadius = UDim.new(0, 6)
  1283. AnimateHover(teleportBtn, Color3.fromRGB(140, 110, 255), Color3.fromRGB(120, 90, 255))
  1284.  
  1285. local menuOpen = false
  1286. local closeConnection = nil
  1287.  
  1288. menuBtn.MouseButton1Click:Connect(function()
  1289. menuOpen = not menuOpen
  1290.  
  1291. if menuOpen then
  1292. local btnPos = menuBtn.AbsolutePosition
  1293. optionsFrame.Position = UDim2.new(0, btnPos.X + 35, 0, btnPos.Y - 10)
  1294. optionsFrame.Visible = true
  1295.  
  1296. for _, child in ipairs(ScreenGui:GetChildren()) do
  1297. if child.Name:match("^OptionsFrame_") and child ~= optionsFrame then
  1298. child.Visible = false
  1299. end
  1300. end
  1301.  
  1302. if closeConnection then
  1303. closeConnection:Disconnect()
  1304. end
  1305.  
  1306. closeConnection = UserInputService.InputBegan:Connect(function(input)
  1307. if input.UserInputType == Enum.UserInputType.MouseButton1 then
  1308. task.wait(0.1)
  1309. local mousePos = UserInputService:GetMouseLocation()
  1310. local framePos = optionsFrame.AbsolutePosition
  1311. local frameSize = optionsFrame.AbsoluteSize
  1312.  
  1313. if mousePos.X < framePos.X or mousePos.X > framePos.X + frameSize.X or
  1314. mousePos.Y < framePos.Y or mousePos.Y > framePos.Y + frameSize.Y then
  1315. optionsFrame.Visible = false
  1316. menuOpen = false
  1317. if closeConnection then
  1318. closeConnection:Disconnect()
  1319. closeConnection = nil
  1320. end
  1321. end
  1322. end
  1323. end)
  1324. else
  1325. optionsFrame.Visible = false
  1326. if closeConnection then
  1327. closeConnection:Disconnect()
  1328. closeConnection = nil
  1329. end
  1330. end
  1331. end)
  1332.  
  1333. mainBtn.MouseButton1Click:Connect(function()
  1334. local isAlreadyMain = (mainPosition and mainPosition.position and mainPosition.position == data.position)
  1335. if isAlreadyMain then
  1336. ConfirmLabel.Text = "Remover posição principal?"
  1337. ConfirmYes.Text = "Remover"
  1338. onConfirmCallback = function()
  1339. mainPosition = nil
  1340. if hasFS and hasDelFile then
  1341. pcall(delfile, MAIN_FILE)
  1342. pcall(delfile, MAIN_BAK_FILE)
  1343. end
  1344. updateMainPositionUI()
  1345. updateSavedList()
  1346. end
  1347. else
  1348. ConfirmLabel.Text = mainPosition and
  1349. "Substituir a posição principal atual?" or
  1350. "Definir como posição principal?"
  1351. ConfirmYes.Text = "Sim"
  1352. onConfirmCallback = function()
  1353. setMainPosition(slot)
  1354. updateSavedList()
  1355. end
  1356. end
  1357. ConfirmationOverlay.Visible = true
  1358. end)
  1359.  
  1360. renameBtn.MouseButton1Click:Connect(function()
  1361. optionsFrame.Visible = false
  1362. menuOpen = false
  1363. if closeConnection then
  1364. closeConnection:Disconnect()
  1365. closeConnection = nil
  1366. end
  1367. openRenamePrompt(slot)
  1368. end)
  1369.  
  1370. moveBtn.MouseButton1Click:Connect(function()
  1371. optionsFrame.Visible = false
  1372. menuOpen = false
  1373. if closeConnection then
  1374. closeConnection:Disconnect()
  1375. closeConnection = nil
  1376. end
  1377. openMovePrompt(slot)
  1378. end)
  1379.  
  1380. deleteBtn.MouseButton1Click:Connect(function()
  1381. optionsFrame.Visible = false
  1382. menuOpen = false
  1383. if closeConnection then
  1384. closeConnection:Disconnect()
  1385. closeConnection = nil
  1386. end
  1387. ConfirmLabel.Text = "Tem certeza que deseja EXCLUIR o Slot " .. slot .. "?"
  1388. ConfirmYes.Text = "Sim, Excluir"
  1389. onConfirmCallback = function()
  1390. savedPositions[slot] = nil
  1391. saveToDisk()
  1392. updateSavedList()
  1393. selectNextSlot()
  1394. end
  1395. ConfirmationOverlay.Visible = true
  1396. end)
  1397.  
  1398. teleportBtn.MouseButton1Click:Connect(function()
  1399. if safeTeleport(data.position) then
  1400. teleportBtn.Text = "✅"
  1401. TweenService:Create(teleportBtn, TweenInfo.new(0.2), {BackgroundColor3 = Color3.fromRGB(80, 200, 120)}):Play()
  1402. task.wait(1)
  1403. if teleportBtn.Parent then
  1404. teleportBtn.Text = "TP"
  1405. TweenService:Create(teleportBtn, TweenInfo.new(0.2), {BackgroundColor3 = Color3.fromRGB(120, 90, 255)}):Play()
  1406. end
  1407. end
  1408. end)
  1409.  
  1410. else
  1411. local nameLabel = Instance.new("TextLabel", entryFrame)
  1412. nameLabel.Size = UDim2.new(1, -20, 1, 0)
  1413. nameLabel.Position = UDim2.new(0, 10, 0, 0)
  1414. nameLabel.BackgroundTransparency = 1
  1415. nameLabel.TextColor3 = Color3.fromRGB(100, 100, 120)
  1416. nameLabel.Font = Enum.Font.Gotham
  1417. nameLabel.TextSize = 15
  1418. nameLabel.TextXAlignment = Enum.TextXAlignment.Left
  1419. nameLabel.Text = string.format("Slot %d: Vazio", slot)
  1420. end
  1421. end
  1422. end
  1423.  
  1424. local function performSave()
  1425. if not humanoidRoot then return false end
  1426. local name = NameField.Text
  1427. savedPositions[currentSaveSlot] = {
  1428. position = humanoidRoot.CFrame,
  1429. name = (#name > 0) and name or ("Slot "..currentSaveSlot),
  1430. timestamp = os.date("%Y-%m-%d %H:%M:%S")
  1431. }
  1432. saveToDisk()
  1433. updateSavedList()
  1434. return true
  1435. end
  1436.  
  1437. local function animateSaveButton(success)
  1438. local button = SaveButton
  1439. local color = success and Color3.fromRGB(80,220,140) or Color3.fromRGB(200,80,80)
  1440. local text = success and "Salvo!" or "Erro!"
  1441. local originalColor, originalText = Color3.fromRGB(60,180,120), "Salvar Posição"
  1442. button.Text = text
  1443. TweenService:Create(button, TweenInfo.new(0.2), {BackgroundColor3 = color}):Play()
  1444. task.wait(1.5)
  1445. button.Text = originalText
  1446. TweenService:Create(button, TweenInfo.new(0.2), {BackgroundColor3 = originalColor}):Play()
  1447. end
  1448.  
  1449. MoveConfirm.MouseButton1Click:Connect(function()
  1450. local targetSlot = tonumber(MoveInput.Text)
  1451. if slotToMove and targetSlot and targetSlot >= 1 and targetSlot <= maxSaves then
  1452. swapPositions(slotToMove, targetSlot)
  1453. updateSavedList()
  1454. MoveOverlay.Visible = false
  1455. slotToMove = nil
  1456. else
  1457. MoveInput.Text = ""
  1458. MoveInput.PlaceholderText = "Inválido!"
  1459. task.wait(1)
  1460. MoveInput.PlaceholderText = "1-50"
  1461. end
  1462. end)
  1463.  
  1464. MoveCancel.MouseButton1Click:Connect(function()
  1465. MoveOverlay.Visible = false
  1466. slotToMove = nil
  1467. end)
  1468.  
  1469. RenameConfirm.MouseButton1Click:Connect(function()
  1470. if slotToRename and #RenameField.Text > 0 then
  1471. local newName = RenameField.Text
  1472. local slotData = savedPositions[slotToRename]
  1473. if slotData then
  1474. slotData.name = newName
  1475. if mainPosition and mainPosition.position and slotData.position and (mainPosition.position == slotData.position) then
  1476. mainPosition.name = newName
  1477. saveMainPosition()
  1478. end
  1479. saveToDisk()
  1480. updateSavedList()
  1481. updateMainPositionUI()
  1482. end
  1483. RenameOverlay.Visible = false
  1484. slotToRename = nil
  1485. end
  1486. end)
  1487. RenameCancel.MouseButton1Click:Connect(function()
  1488. RenameOverlay.Visible = false
  1489. slotToRename = nil
  1490. end)
  1491.  
  1492. SlotPrev.MouseButton1Click:Connect(function()
  1493. currentSaveSlot = ((currentSaveSlot - 2 + maxSaves) % maxSaves) + 1
  1494. SaveSlotLabel.Text = "Slot Atual: " .. currentSaveSlot
  1495. end)
  1496. SlotNext.MouseButton1Click:Connect(function()
  1497. currentSaveSlot = (currentSaveSlot % maxSaves) + 1
  1498. SaveSlotLabel.Text = "Slot Atual: " .. currentSaveSlot
  1499. end)
  1500.  
  1501. ConfirmYes.MouseButton1Click:Connect(function()
  1502. if onConfirmCallback then onConfirmCallback() end
  1503. onConfirmCallback = nil
  1504. ConfirmationOverlay.Visible = false
  1505. end)
  1506. ConfirmNo.MouseButton1Click:Connect(function()
  1507. onConfirmCallback = nil
  1508. ConfirmationOverlay.Visible = false
  1509. end)
  1510.  
  1511. SaveButton.MouseButton1Click:Connect(function()
  1512. if savedPositions[currentSaveSlot] then
  1513. ConfirmLabel.Text = "O Slot "..currentSaveSlot.." já tem uma posição salva. Deseja SUBSTITUIR?"
  1514. ConfirmYes.Text = "Sim, Substituir"
  1515. onConfirmCallback = function()
  1516. local success = performSave()
  1517. if success then selectNextSlot() end
  1518. animateSaveButton(success)
  1519. end
  1520. ConfirmationOverlay.Visible = true
  1521. else
  1522. local success = performSave()
  1523. if success then selectNextSlot() end
  1524. animateSaveButton(success)
  1525. end
  1526. end)
  1527.  
  1528. -- Inicialização
  1529. loadFromDisk()
  1530. selectNextSlot()
  1531. updatePageDisplay()
  1532. updateMainPositionUI()
  1533.  
  1534. Players.LocalPlayer.CharacterAdded:Connect(function(character)
  1535. chr = character
  1536. humanoidRoot = character:WaitForChild("HumanoidRootPart")
  1537. end)
  1538.  
  1539. game:BindToClose(saveToDisk)
  1540.  
  1541. print("✅ Save Locate (NickZ) - v4.0 ULTRA [FIXED & ENHANCED]")
  1542. print("📍 Sistema de persistência corrigido")
  1543. print("💾 Total de slots: 50 (5 páginas × 10 slots)")
  1544. print("📁 Pasta: SaveLocate_NickZ/" .. game.PlaceId)
  1545. print("🚀 Teleport melhorado - Anti-bug de animações")
  1546. print("📄 Sistema de páginas implementado")
  1547. print("✨ Todas as funcionalidades operacionais")
Add Comment
Please, Sign In to add comment