Nevzyn

Untitled

Nov 19th, 2025
341
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 49.75 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. local RunService = game:GetService("RunService") -- Adicionado para o TP
  9.  
  10. local plr = Players.LocalPlayer
  11. local chr = plr.Character or plr.CharacterAdded:Wait()
  12. local humanoidRoot = chr:WaitForChild("HumanoidRootPart")
  13.  
  14. -- Estado
  15. local savedPositions = {}
  16. -- ALTERAÇÃO: Aumentado para 50 para suportar 5 páginas de 10
  17. local maxSaves = 50
  18. local slotsPerPage = 10
  19. local maxPages = 5
  20. local currentPage = 1
  21. local currentSaveSlot = 1
  22. local mainPosition = nil
  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. -- Codificação/decodificação
  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.  
  64. local function decodeCFrame(t)
  65. if type(t)=="table" and t.x and t.R00 then
  66. 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)
  67. end
  68. return nil
  69. end
  70.  
  71. local function tryRead(path)
  72. if not hasFS or type(path) ~= "string" then return nil end
  73. local success, content = pcall(readfile, path)
  74. if success and type(content) == "string" and #content > 0 then return content end
  75. return nil
  76. end
  77.  
  78. local function candidateSavePaths()
  79. local list = {SAVE_FILE, SAVE_BAK_FILE}
  80. if hasFolder then
  81. table.insert(list, "SkyTP/" .. string.format("Saves_%d_%d.json", game.PlaceId, plr.UserId))
  82. table.insert(list, "SkyTP/" .. string.format("Saves_%d_%d.bak", game.PlaceId, plr.UserId))
  83. end
  84. table.insert(list, string.format("Saves_%d_%d.json", game.PlaceId, plr.UserId))
  85. table.insert(list, string.format("Saves_%d_%d.bak", game.PlaceId, plr.UserId))
  86. return list
  87. end
  88.  
  89. local function candidateMainPaths()
  90. local list = {MAIN_FILE, MAIN_BAK_FILE}
  91. if hasFolder then
  92. table.insert(list, "SkyTP/" .. string.format("MainPos_%d_%d.json", game.PlaceId, plr.UserId))
  93. table.insert(list, "SkyTP/" .. string.format("MainPos_%d_%d.bak", game.PlaceId, plr.UserId))
  94. end
  95. table.insert(list, string.format("MainPos_%d_%d.json", game.PlaceId, plr.UserId))
  96. table.insert(list, string.format("MainPos_%d_%d.bak", game.PlaceId, plr.UserId))
  97. return list
  98. end
  99.  
  100. local function firstExistingContent(paths)
  101. for _, p in ipairs(paths) do
  102. if type(p) == "string" then
  103. local content = tryRead(p)
  104. if content then return content, p end
  105. end
  106. end
  107. return nil, nil
  108. end
  109.  
  110. -- Persistência
  111. local function saveMainPosition()
  112. if not hasFS or not mainPosition then return end
  113. local data = {
  114. position = encodeCFrame(mainPosition.position),
  115. name = mainPosition.name,
  116. timestamp = mainPosition.timestamp,
  117. gameId = game.PlaceId,
  118. gameName = game.Name
  119. }
  120. local ok, encoded = pcall(function() return HttpService:JSONEncode(data) end)
  121. if ok and encoded then
  122. pcall(writefile, MAIN_FILE, encoded)
  123. pcall(writefile, MAIN_BAK_FILE, encoded)
  124. end
  125. end
  126.  
  127. local function loadMainPosition()
  128. if not hasFS then return end
  129. local content, usedPath = firstExistingContent(candidateMainPaths())
  130. if not content then return end
  131. local ok, data = pcall(function() return HttpService:JSONDecode(content) end)
  132. if not ok or type(data) ~= "table" then return end
  133. if data.gameId and data.gameId ~= game.PlaceId then return end
  134.  
  135. local cf = decodeCFrame(data.position)
  136. if cf then
  137. mainPosition = {
  138. position = cf,
  139. name = data.name or "Posição Principal",
  140. timestamp = data.timestamp or os.date("%Y-%m-%d %H:%M:%S")
  141. }
  142. if usedPath ~= MAIN_FILE then saveMainPosition() end
  143. end
  144. end
  145.  
  146. local function saveToDisk()
  147. if not hasFS then return end
  148. local out = {
  149. gameId = game.PlaceId,
  150. gameName = game.Name,
  151. userId = plr.UserId,
  152. userName = plr.Name,
  153. saveDate = os.date("%Y-%m-%d %H:%M:%S"),
  154. positions = {}
  155. }
  156. for slot, data in pairs(savedPositions) do
  157. if type(slot)=="number" and slot>=1 and slot<=maxSaves and typeof(data.position)=="CFrame" then
  158. out.positions[tostring(slot)] = {
  159. name = data.name or ("Slot "..slot),
  160. timestamp = data.timestamp or os.date("%Y-%m-%d %H:%M:%S"),
  161. position = encodeCFrame(data.position)
  162. }
  163. end
  164. end
  165. local ok, encoded = pcall(function() return HttpService:JSONEncode(out) end)
  166. if ok and encoded then
  167. pcall(writefile, SAVE_FILE, encoded)
  168. pcall(writefile, SAVE_BAK_FILE, encoded)
  169. end
  170. saveMainPosition()
  171. end
  172.  
  173. local function loadFromDisk()
  174. if not hasFS then return end
  175. local content, usedPath = firstExistingContent(candidateSavePaths())
  176. if not content then loadMainPosition(); return end
  177.  
  178. local ok, data = pcall(function() return HttpService:JSONDecode(content) end)
  179. if not ok or type(data) ~= "table" then loadMainPosition(); return end
  180.  
  181. local positions = data.positions or data
  182. if data.gameId and data.gameId ~= game.PlaceId then loadMainPosition(); return end
  183.  
  184. for k,v in pairs(positions) do
  185. local slot = tonumber(k)
  186. if slot and slot >= 1 and slot <= maxSaves and type(v) == "table" then
  187. local cf = decodeCFrame(v.position)
  188. if cf then
  189. savedPositions[slot] = {
  190. position = cf,
  191. name = v.name or ("Slot "..slot),
  192. timestamp = v.timestamp or os.date("%Y-%m-%d %H:%M:%S")
  193. }
  194. end
  195. end
  196. end
  197. if usedPath ~= SAVE_FILE then saveToDisk() end
  198. loadMainPosition()
  199. end
  200.  
  201. --================================================================================
  202. -- [MELHORIA 1] - Teleport Robusto (Anti-Bug / Anti-Animação)
  203. --================================================================================
  204. local function teleportTo(cframe)
  205. -- Atualiza referência do personagem caso tenha morrido
  206. if not chr or not chr.Parent then
  207. chr = plr.Character
  208. humanoidRoot = chr and chr:FindFirstChild("HumanoidRootPart")
  209. end
  210.  
  211. if humanoidRoot and cframe then
  212. local hum = chr:FindFirstChildWhichIsA("Humanoid")
  213.  
  214. -- 1. Força sair do banco se estiver sentado
  215. if hum and hum.SeatPart then
  216. hum.Sit = false
  217. end
  218.  
  219. -- 2. Método "Hard TP" para ignorar animações
  220. -- Ancoramos a parte para que a física do jogo não lute contra o teleporte
  221. local oldAnchor = humanoidRoot.Anchored
  222. humanoidRoot.Anchored = true
  223.  
  224. -- Resetar velocidade para não ser jogado longe ao desancorar
  225. if humanoidRoot:IsA("BasePart") then
  226. humanoidRoot.Velocity = Vector3.new(0,0,0)
  227. humanoidRoot.RotVelocity = Vector3.new(0,0,0)
  228. end
  229.  
  230. -- Aplica o CFrame
  231. humanoidRoot.CFrame = cframe
  232.  
  233. -- Espera um frame de física para garantir que o servidor/cliente registrou a posição
  234. RunService.Heartbeat:Wait()
  235. humanoidRoot.CFrame = cframe -- Aplica de novo por segurança
  236.  
  237. -- Restaura estado original
  238. humanoidRoot.Anchored = oldAnchor
  239.  
  240. return true
  241. end
  242. return false
  243. end
  244.  
  245. --================================================================================
  246. -- [UI E INTERFACE]
  247. --================================================================================
  248.  
  249. local function AnimateHover(button, a, b)
  250. button.MouseEnter:Connect(function()
  251. TweenService:Create(button, TweenInfo.new(0.2), {BackgroundColor3 = a}):Play()
  252. end)
  253. button.MouseLeave:Connect(function()
  254. TweenService:Create(button, TweenInfo.new(0.2), {BackgroundColor3 = b}):Play()
  255. end)
  256. end
  257.  
  258. local ScreenGui = Instance.new("ScreenGui")
  259. ScreenGui.Name = "Save Locate (NickZ) V4"
  260. ScreenGui.ResetOnSpawn = false
  261. ScreenGui.Parent = game:GetService("CoreGui")
  262.  
  263. local MainFrame = Instance.new("Frame")
  264. -- Aumentei ligeiramente a altura para caber os controles de página
  265. MainFrame.Size = UDim2.new(0, 600, 0, 460)
  266. MainFrame.Position = UDim2.new(0.5, -300, 0.5, -230)
  267. MainFrame.BackgroundColor3 = Color3.fromRGB(20, 18, 28)
  268. MainFrame.BackgroundTransparency = 0.2
  269. MainFrame.BorderSizePixel = 0
  270. MainFrame.AnchorPoint = Vector2.new(0.5, 0.5)
  271. MainFrame.Active = true
  272. MainFrame.Draggable = true
  273. MainFrame.ClipsDescendants = true
  274. MainFrame.Parent = ScreenGui
  275.  
  276. local UICorner = Instance.new("UICorner", MainFrame)
  277. UICorner.CornerRadius = UDim.new(0, 8)
  278. local UIStroke = Instance.new("UIStroke", MainFrame)
  279. UIStroke.Color = Color3.fromRGB(120, 90, 255)
  280. UIStroke.Thickness = 1.5
  281. local UIGradient_BG = Instance.new("UIGradient", MainFrame)
  282. UIGradient_BG.Color = ColorSequence.new({
  283. ColorSequenceKeypoint.new(0, Color3.fromRGB(25, 22, 38)),
  284. ColorSequenceKeypoint.new(1, Color3.fromRGB(45, 40, 65))
  285. })
  286. UIGradient_BG.Rotation = 90
  287.  
  288. local TopBar = Instance.new("Frame", MainFrame)
  289. TopBar.Size = UDim2.new(1, 0, 0, 40)
  290. TopBar.BackgroundTransparency = 1
  291.  
  292. local TitleLabel = Instance.new("TextLabel", TopBar)
  293. TitleLabel.Size = UDim2.new(1, -45, 1, 0)
  294. TitleLabel.Position = UDim2.new(0, 15, 0, 0)
  295. TitleLabel.BackgroundTransparency = 1
  296. TitleLabel.Text = "✧ Save Locate (NickZ)"
  297. TitleLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
  298. TitleLabel.Font = Enum.Font.GothamSemibold
  299. TitleLabel.TextSize = 18
  300. TitleLabel.TextXAlignment = Enum.TextXAlignment.Left
  301.  
  302. local CloseBtn = Instance.new("TextButton", TopBar)
  303. CloseBtn.Size = UDim2.new(0, 30, 0, 30)
  304. CloseBtn.Position = UDim2.new(1, -35, 0.5, -15)
  305. CloseBtn.BackgroundColor3 = Color3.fromRGB(45, 40, 65)
  306. CloseBtn.Text = "✕"
  307. CloseBtn.Font = Enum.Font.GothamBold
  308. CloseBtn.TextSize = 16
  309. CloseBtn.TextColor3 = Color3.fromRGB(255, 120, 120)
  310. local C1 = Instance.new("UICorner", CloseBtn)
  311. C1.CornerRadius = UDim.new(0, 6)
  312. AnimateHover(CloseBtn, Color3.fromRGB(255, 100, 100), Color3.fromRGB(45, 40, 65))
  313. CloseBtn.MouseButton1Click:Connect(function() MainFrame.Visible = false end)
  314.  
  315. local OpenBtn = Instance.new("TextButton", ScreenGui)
  316. OpenBtn.Size = UDim2.new(0, 45, 0, 45)
  317. OpenBtn.Position = UDim2.new(0, 15, 0.5, -22.5)
  318. OpenBtn.BackgroundColor3 = Color3.fromRGB(20, 18, 28)
  319. OpenBtn.Text = "✧"
  320. OpenBtn.Font = Enum.Font.GothamBold
  321. OpenBtn.TextSize = 24
  322. OpenBtn.TextColor3 = Color3.fromRGB(120, 90, 255)
  323. OpenBtn.Visible = false
  324. local C2 = Instance.new("UICorner", OpenBtn)
  325. C2.CornerRadius = UDim.new(0, 8)
  326. local S2 = Instance.new("UIStroke", OpenBtn)
  327. S2.Color = Color3.fromRGB(120, 90, 255)
  328. S2.Thickness = 1.5
  329. OpenBtn.MouseButton1Click:Connect(function() MainFrame.Visible = true end)
  330. MainFrame:GetPropertyChangedSignal("Visible"):Connect(function() OpenBtn.Visible = not MainFrame.Visible end)
  331.  
  332. local MainPosContainer = Instance.new("Frame", ScreenGui)
  333. MainPosContainer.Size = UDim2.new(0, 50, 0, 50)
  334. MainPosContainer.Position = UDim2.new(1, -60, 0, 10)
  335. MainPosContainer.BackgroundTransparency = 1
  336. MainPosContainer.Visible = false
  337. MainPosContainer.Active = true
  338. MainPosContainer.Draggable = true
  339.  
  340. local MainPosBtn = Instance.new("TextButton", MainPosContainer)
  341. MainPosBtn.Size = UDim2.new(1, 0, 1, 0)
  342. MainPosBtn.Position = UDim2.new(0, 0, 0, 0)
  343. MainPosBtn.BackgroundColor3 = Color3.fromRGB(25, 22, 38)
  344. MainPosBtn.BackgroundTransparency = 0.1
  345. MainPosBtn.Text = "🚀"
  346. MainPosBtn.Font = Enum.Font.GothamBold
  347. MainPosBtn.TextSize = 24
  348. MainPosBtn.TextColor3 = Color3.new(1, 1, 1)
  349.  
  350. local MP_Corner = Instance.new("UICorner", MainPosBtn)
  351. MP_Corner.CornerRadius = UDim.new(0.5, 0)
  352. local MP_Stroke = Instance.new("UIStroke", MainPosBtn)
  353. MP_Stroke.Color = Color3.fromRGB(120, 90, 255)
  354. MP_Stroke.Thickness = 2
  355.  
  356. local MP_Tooltip = Instance.new("TextLabel", MainPosBtn)
  357. MP_Tooltip.Size = UDim2.new(0, 150, 0, 30)
  358. MP_Tooltip.Position = UDim2.new(-3.2, 0, 0.5, -15)
  359. MP_Tooltip.BackgroundColor3 = Color3.fromRGB(20, 18, 28)
  360. MP_Tooltip.BackgroundTransparency = 0.1
  361. MP_Tooltip.Text = ""
  362. MP_Tooltip.TextColor3 = Color3.fromRGB(255, 255, 255)
  363. MP_Tooltip.Font = Enum.Font.Gotham
  364. MP_Tooltip.TextSize = 12
  365. MP_Tooltip.Visible = false
  366. MP_Tooltip.ZIndex = 2
  367. local Tooltip_Corner = Instance.new("UICorner", MP_Tooltip)
  368. Tooltip_Corner.CornerRadius = UDim.new(0, 6)
  369. local Tooltip_Stroke = Instance.new("UIStroke", MP_Tooltip)
  370. Tooltip_Stroke.Color = Color3.fromRGB(120, 90, 255)
  371. Tooltip_Stroke.Thickness = 1
  372.  
  373. local MP_RemoveBtn = Instance.new("TextButton", MainPosBtn)
  374. MP_RemoveBtn.Size = UDim2.new(0, 20, 0, 20)
  375. MP_RemoveBtn.Position = UDim2.new(1, -5, 0, -5)
  376. MP_RemoveBtn.BackgroundColor3 = Color3.fromRGB(200, 80, 80)
  377. MP_RemoveBtn.Text = "×"
  378. MP_RemoveBtn.Font = Enum.Font.GothamBold
  379. MP_RemoveBtn.TextSize = 14
  380. MP_RemoveBtn.TextColor3 = Color3.new(1, 1, 1)
  381. MP_RemoveBtn.Visible = false
  382. MP_RemoveBtn.ZIndex = 3
  383. local Remove_Corner = Instance.new("UICorner", MP_RemoveBtn)
  384. Remove_Corner.CornerRadius = UDim.new(0.5, 0)
  385.  
  386. MainPosBtn.MouseButton1Click:Connect(function()
  387. if mainPosition and teleportTo(mainPosition.position) then
  388. MainPosBtn.Text = "✅"
  389. TweenService:Create(MainPosBtn, TweenInfo.new(0.2), {BackgroundColor3 = Color3.fromRGB(80, 200, 120)}):Play()
  390. task.wait(1)
  391. if MainPosBtn.Parent then
  392. MainPosBtn.Text = "🚀"
  393. TweenService:Create(MainPosBtn, TweenInfo.new(0.2), {BackgroundColor3 = Color3.fromRGB(25, 22, 38)}):Play()
  394. end
  395. end
  396. end)
  397.  
  398. MainPosBtn.MouseEnter:Connect(function()
  399. if mainPosition then
  400. MP_Tooltip.Text = mainPosition.name or "Principal"
  401. MP_Tooltip.Visible = true
  402. MP_RemoveBtn.Visible = true
  403. end
  404. TweenService:Create(MainPosBtn, TweenInfo.new(0.2), {Size = UDim2.new(1.1, 0, 1.1, 0)}):Play()
  405. TweenService:Create(MP_Stroke, TweenInfo.new(0.2), {Thickness = 3}):Play()
  406. end)
  407. MainPosBtn.MouseLeave:Connect(function()
  408. MP_Tooltip.Visible = false
  409. MP_RemoveBtn.Visible = false
  410. TweenService:Create(MainPosBtn, TweenInfo.new(0.2), {Size = UDim2.new(1, 0, 1, 0)}):Play()
  411. TweenService:Create(MP_Stroke, TweenInfo.new(0.2), {Thickness = 2}):Play()
  412. end)
  413.  
  414. -- Controles (Salvar/Renomear/Slot)
  415. local ControlsFrame = Instance.new("Frame", MainFrame)
  416. ControlsFrame.Size = UDim2.new(1, -20, 0, 90)
  417. ControlsFrame.Position = UDim2.new(0, 10, 0, 45)
  418. ControlsFrame.BackgroundTransparency = 1
  419.  
  420. local SaveButton = Instance.new("TextButton", ControlsFrame)
  421. SaveButton.Text = "Salvar Posição"
  422. SaveButton.Size = UDim2.new(0.5, -5, 1, -50)
  423. SaveButton.Position = UDim2.new(0, 0, 0, 0)
  424. SaveButton.BackgroundColor3 = Color3.fromRGB(60, 180, 120)
  425. SaveButton.Font = Enum.Font.GothamSemibold
  426. SaveButton.TextSize = 16
  427. SaveButton.TextColor3 = Color3.new(1, 1, 1)
  428. local C3 = Instance.new("UICorner", SaveButton)
  429. C3.CornerRadius = UDim.new(0, 6)
  430. AnimateHover(SaveButton, Color3.fromRGB(80, 220, 140), Color3.fromRGB(60, 180, 120))
  431.  
  432. local NameField = Instance.new("TextBox", ControlsFrame)
  433. NameField.PlaceholderText = "Nome da Posição..."
  434. NameField.Size = UDim2.new(1, 0, 0, 40)
  435. NameField.Position = UDim2.new(0, 0, 0, 50)
  436. NameField.BackgroundColor3 = Color3.fromRGB(30, 28, 42)
  437. NameField.TextColor3 = Color3.new(1, 1, 1)
  438. NameField.Font = Enum.Font.Gotham
  439. NameField.TextSize = 14
  440. NameField.PlaceholderColor3 = Color3.fromRGB(150,150,150)
  441. local C4 = Instance.new("UICorner", NameField)
  442. C4.CornerRadius = UDim.new(0, 6)
  443. local S4 = Instance.new("UIStroke", NameField)
  444. S4.Color = Color3.fromRGB(80, 70, 130)
  445. S4.Thickness = 1
  446.  
  447. -- Seletor de SLOT para salvar
  448. local SaveSlotLabel = Instance.new("TextLabel", ControlsFrame)
  449. SaveSlotLabel.Size = UDim2.new(0.5, -5, 0, 20)
  450. SaveSlotLabel.Position = UDim2.new(0.5, 5, 0, 5)
  451. SaveSlotLabel.BackgroundTransparency = 1
  452. SaveSlotLabel.TextColor3 = Color3.fromRGB(200, 200, 255)
  453. SaveSlotLabel.Font = Enum.Font.Gotham
  454. SaveSlotLabel.TextSize = 14
  455. SaveSlotLabel.Text = "Slot de Destino: " .. currentSaveSlot
  456. SaveSlotLabel.TextXAlignment = Enum.TextXAlignment.Left
  457.  
  458. local SlotPrev = Instance.new("TextButton", ControlsFrame)
  459. SlotPrev.Text = "<"
  460. SlotPrev.Size = UDim2.new(0, 35, 0, 30)
  461. SlotPrev.Position = UDim2.new(0.5, 5, 0, 22)
  462. SlotPrev.BackgroundColor3 = Color3.fromRGB(80, 70, 130)
  463. SlotPrev.Font = Enum.Font.GothamBold
  464. SlotPrev.TextSize = 16
  465. SlotPrev.TextColor3 = Color3.new(1, 1, 1)
  466. local C5 = Instance.new("UICorner", SlotPrev)
  467. C5.CornerRadius = UDim.new(0, 6)
  468. AnimateHover(SlotPrev, Color3.fromRGB(100, 90, 150), Color3.fromRGB(80, 70, 130))
  469.  
  470. local SlotNext = Instance.new("TextButton", ControlsFrame)
  471. SlotNext.Text = ">"
  472. SlotNext.Size = UDim2.new(0, 35, 0, 30)
  473. SlotNext.Position = UDim2.new(0.5, 45, 0, 22)
  474. SlotNext.BackgroundColor3 = Color3.fromRGB(80, 70, 130)
  475. SlotNext.Font = Enum.Font.GothamBold
  476. SlotNext.TextSize = 16
  477. SlotNext.TextColor3 = Color3.new(1, 1, 1)
  478. local C6 = Instance.new("UICorner", SlotNext)
  479. C6.CornerRadius = UDim.new(0, 6)
  480. AnimateHover(SlotNext, Color3.fromRGB(100, 90, 150), Color3.fromRGB(80, 70, 130))
  481.  
  482. --================================================================================
  483. -- [MELHORIA 2] - Interface de Paginação (Abas)
  484. --================================================================================
  485. local PageControlFrame = Instance.new("Frame", MainFrame)
  486. PageControlFrame.Name = "PageControls"
  487. PageControlFrame.Size = UDim2.new(1, -20, 0, 30)
  488. PageControlFrame.Position = UDim2.new(0, 10, 0, 140)
  489. PageControlFrame.BackgroundTransparency = 1
  490.  
  491. local PageLabel = Instance.new("TextLabel", PageControlFrame)
  492. PageLabel.Text = "Página " .. currentPage .. " / " .. maxPages
  493. PageLabel.Size = UDim2.new(0, 120, 1, 0)
  494. PageLabel.Position = UDim2.new(0.5, -60, 0, 0)
  495. PageLabel.BackgroundTransparency = 1
  496. PageLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
  497. PageLabel.Font = Enum.Font.GothamBold
  498. PageLabel.TextSize = 16
  499.  
  500. local PagePrev = Instance.new("TextButton", PageControlFrame)
  501. PagePrev.Text = "◄ Anterior"
  502. PagePrev.Size = UDim2.new(0, 90, 0, 26)
  503. PagePrev.Position = UDim2.new(0, 0, 0, 2)
  504. PagePrev.BackgroundColor3 = Color3.fromRGB(50, 48, 65)
  505. PagePrev.Font = Enum.Font.GothamBold
  506. PagePrev.TextSize = 12
  507. PagePrev.TextColor3 = Color3.new(1, 1, 1)
  508. local PPrev_C = Instance.new("UICorner", PagePrev)
  509. PPrev_C.CornerRadius = UDim.new(0, 6)
  510. AnimateHover(PagePrev, Color3.fromRGB(70, 65, 90), Color3.fromRGB(50, 48, 65))
  511.  
  512. local PageNext = Instance.new("TextButton", PageControlFrame)
  513. PageNext.Text = "Próxima ►"
  514. PageNext.Size = UDim2.new(0, 90, 0, 26)
  515. PageNext.Position = UDim2.new(1, -90, 0, 2)
  516. PageNext.BackgroundColor3 = Color3.fromRGB(50, 48, 65)
  517. PageNext.Font = Enum.Font.GothamBold
  518. PageNext.TextSize = 12
  519. PageNext.TextColor3 = Color3.new(1, 1, 1)
  520. local PNext_C = Instance.new("UICorner", PageNext)
  521. PNext_C.CornerRadius = UDim.new(0, 6)
  522. AnimateHover(PageNext, Color3.fromRGB(70, 65, 90), Color3.fromRGB(50, 48, 65))
  523.  
  524. -- Container dos Slots
  525. local SlotsContainer = Instance.new("Frame", MainFrame)
  526. -- Ajustei a posição Y e tamanho por causa da barra de páginas
  527. SlotsContainer.Size = UDim2.new(1, -20, 1, -185)
  528. SlotsContainer.Position = UDim2.new(0, 10, 0, 175)
  529. SlotsContainer.BackgroundTransparency = 1
  530.  
  531. local GridLayout = Instance.new("UIGridLayout", SlotsContainer)
  532. GridLayout.CellPadding = UDim2.new(0, 8, 0, 8)
  533. GridLayout.CellSize = UDim2.new(0.5, -4, 0, 46)
  534. GridLayout.FillDirection = Enum.FillDirection.Vertical
  535. GridLayout.SortOrder = Enum.SortOrder.LayoutOrder
  536. GridLayout.StartCorner = Enum.StartCorner.TopLeft
  537.  
  538. -- Overlays (Confirmação, Renomear, Mover) - Mantidos iguais
  539. local ConfirmationOverlay = Instance.new("Frame", MainFrame)
  540. ConfirmationOverlay.Name = "ConfirmationOverlay"
  541. ConfirmationOverlay.Size = UDim2.new(1, 0, 1, 0)
  542. ConfirmationOverlay.BackgroundColor3 = Color3.new(0, 0, 0)
  543. ConfirmationOverlay.BackgroundTransparency = 0.6
  544. ConfirmationOverlay.Visible = false
  545. ConfirmationOverlay.ZIndex = 10
  546.  
  547. local ConfirmationFrame = Instance.new("Frame", ConfirmationOverlay)
  548. ConfirmationFrame.Size = UDim2.new(0, 300, 0, 120)
  549. ConfirmationFrame.Position = UDim2.new(0.5, -150, 0.5, -60)
  550. ConfirmationFrame.BackgroundColor3 = Color3.fromRGB(35, 32, 50)
  551. local CF_C = Instance.new("UICorner", ConfirmationFrame)
  552. CF_C.CornerRadius = UDim.new(0, 8)
  553. local CF_S = Instance.new("UIStroke", ConfirmationFrame)
  554. CF_S.Color = Color3.fromRGB(120, 90, 255)
  555. CF_S.Thickness = 1.5
  556.  
  557. local ConfirmLabel = Instance.new("TextLabel", ConfirmationFrame)
  558. ConfirmLabel.Size = UDim2.new(1, -20, 0, 60)
  559. ConfirmLabel.Position = UDim2.new(0, 10, 0, 0)
  560. ConfirmLabel.BackgroundTransparency = 1
  561. ConfirmLabel.TextColor3 = Color3.new(1, 1, 1)
  562. ConfirmLabel.Font = Enum.Font.GothamSemibold
  563. ConfirmLabel.TextSize = 16
  564. ConfirmLabel.TextWrapped = true
  565.  
  566. local ConfirmYes = Instance.new("TextButton", ConfirmationFrame)
  567. ConfirmYes.Size = UDim2.new(0.5, -15, 0, 40)
  568. ConfirmYes.Position = UDim2.new(0, 10, 1, -50)
  569. ConfirmYes.BackgroundColor3 = Color3.fromRGB(220, 80, 80)
  570. ConfirmYes.Font = Enum.Font.GothamBold
  571. ConfirmYes.Text = "Sim"
  572. ConfirmYes.TextColor3 = Color3.new(1, 1, 1)
  573. ConfirmYes.TextSize = 14
  574. local CY_C = Instance.new("UICorner", ConfirmYes)
  575. CY_C.CornerRadius = UDim.new(0, 6)
  576. AnimateHover(ConfirmYes, Color3.fromRGB(240, 100, 100), Color3.fromRGB(220, 80, 80))
  577.  
  578. local ConfirmNo = Instance.new("TextButton", ConfirmationFrame)
  579. ConfirmNo.Size = UDim2.new(0.5, -15, 0, 40)
  580. ConfirmNo.Position = UDim2.new(0.5, 5, 1, -50)
  581. ConfirmNo.BackgroundColor3 = Color3.fromRGB(80, 70, 130)
  582. ConfirmNo.Font = Enum.Font.GothamBold
  583. ConfirmNo.Text = "Não"
  584. ConfirmNo.TextColor3 = Color3.new(1, 1, 1)
  585. ConfirmNo.TextSize = 14
  586. local CN_C = Instance.new("UICorner", ConfirmNo)
  587. CN_C.CornerRadius = UDim.new(0, 6)
  588. AnimateHover(ConfirmNo, Color3.fromRGB(100, 90, 150), Color3.fromRGB(80, 70, 130))
  589.  
  590. local RenameOverlay = Instance.new("Frame", MainFrame)
  591. RenameOverlay.Name = "RenameOverlay"
  592. RenameOverlay.Size = UDim2.new(1, 0, 1, 0)
  593. RenameOverlay.BackgroundColor3 = Color3.new(0, 0, 0)
  594. RenameOverlay.BackgroundTransparency = 0.6
  595. RenameOverlay.Visible = false
  596. RenameOverlay.ZIndex = 11
  597.  
  598. local RenameFrame = Instance.new("Frame", RenameOverlay)
  599. RenameFrame.Size = UDim2.new(0, 350, 0, 160)
  600. RenameFrame.Position = UDim2.new(0.5, -175, 0.5, -80)
  601. RenameFrame.BackgroundColor3 = Color3.fromRGB(35, 32, 50)
  602. local RF_C = Instance.new("UICorner", RenameFrame)
  603. RF_C.CornerRadius = UDim.new(0, 8)
  604. local RF_S = Instance.new("UIStroke", RenameFrame)
  605. RF_S.Color = Color3.fromRGB(120, 90, 255)
  606. RF_S.Thickness = 1.5
  607.  
  608. local RenameTitle = Instance.new("TextLabel", RenameFrame)
  609. RenameTitle.Size = UDim2.new(1, -20, 0, 40)
  610. RenameTitle.Position = UDim2.new(0, 10, 0, 0)
  611. RenameTitle.BackgroundTransparency = 1
  612. RenameTitle.TextColor3 = Color3.new(1, 1, 1)
  613. RenameTitle.Font = Enum.Font.GothamSemibold
  614. RenameTitle.TextSize = 16
  615. RenameTitle.Text = "Renomear Posição"
  616.  
  617. local RenameField = Instance.new("TextBox", RenameFrame)
  618. RenameField.Size = UDim2.new(1, -20, 0, 40)
  619. RenameField.Position = UDim2.new(0, 10, 0, 50)
  620. RenameField.BackgroundColor3 = Color3.fromRGB(30, 28, 42)
  621. RenameField.TextColor3 = Color3.new(1, 1, 1)
  622. RenameField.Font = Enum.Font.Gotham
  623. RenameField.TextSize = 14
  624. local RFD_C = Instance.new("UICorner", RenameField)
  625. RFD_C.CornerRadius = UDim.new(0, 6)
  626. local RFD_S = Instance.new("UIStroke", RenameField)
  627. RFD_S.Color = Color3.fromRGB(80, 70, 130)
  628. RFD_S.Thickness = 1
  629.  
  630. local RenameConfirm = Instance.new("TextButton", RenameFrame)
  631. RenameConfirm.Size = UDim2.new(0.5, -15, 0, 40)
  632. RenameConfirm.Position = UDim2.new(0, 10, 1, -50)
  633. RenameConfirm.BackgroundColor3 = Color3.fromRGB(80, 160, 220)
  634. RenameConfirm.Font = Enum.Font.GothamBold
  635. RenameConfirm.Text = "Confirmar"
  636. RenameConfirm.TextColor3 = Color3.new(1, 1, 1)
  637. RenameConfirm.TextSize = 14
  638. local RC_C = Instance.new("UICorner", RenameConfirm)
  639. RC_C.CornerRadius = UDim.new(0, 6)
  640. AnimateHover(RenameConfirm, Color3.fromRGB(100, 180, 240), Color3.fromRGB(80, 160, 220))
  641.  
  642. local RenameCancel = Instance.new("TextButton", RenameFrame)
  643. RenameCancel.Size = UDim2.new(0.5, -15, 0, 40)
  644. RenameCancel.Position = UDim2.new(0.5, 5, 1, -50)
  645. RenameCancel.BackgroundColor3 = Color3.fromRGB(80, 70, 130)
  646. RenameCancel.Font = Enum.Font.GothamBold
  647. RenameCancel.Text = "Cancelar"
  648. RenameCancel.TextColor3 = Color3.new(1, 1, 1)
  649. RenameCancel.TextSize = 14
  650. local RCN_C = Instance.new("UICorner", RenameCancel)
  651. RCN_C.CornerRadius = UDim.new(0, 6)
  652. AnimateHover(RenameCancel, Color3.fromRGB(100, 90, 150), Color3.fromRGB(80, 70, 130))
  653.  
  654. local MoveOverlay = Instance.new("Frame", MainFrame)
  655. MoveOverlay.Name = "MoveOverlay"
  656. MoveOverlay.Size = UDim2.new(1, 0, 1, 0)
  657. MoveOverlay.BackgroundColor3 = Color3.new(0, 0, 0)
  658. MoveOverlay.BackgroundTransparency = 0.6
  659. MoveOverlay.Visible = false
  660. MoveOverlay.ZIndex = 12
  661.  
  662. local MoveFrame = Instance.new("Frame", MoveOverlay)
  663. MoveFrame.Size = UDim2.new(0, 300, 0, 180)
  664. MoveFrame.Position = UDim2.new(0.5, -150, 0.5, -90)
  665. MoveFrame.BackgroundColor3 = Color3.fromRGB(35, 32, 50)
  666. local MF_C = Instance.new("UICorner", MoveFrame)
  667. MF_C.CornerRadius = UDim.new(0, 8)
  668. local MF_S = Instance.new("UIStroke", MoveFrame)
  669. MF_S.Color = Color3.fromRGB(120, 90, 255)
  670. MF_S.Thickness = 1.5
  671.  
  672. local MoveTitle = Instance.new("TextLabel", MoveFrame)
  673. MoveTitle.Size = UDim2.new(1, -20, 0, 40)
  674. MoveTitle.Position = UDim2.new(0, 10, 0, 10)
  675. MoveTitle.BackgroundTransparency = 1
  676. MoveTitle.TextColor3 = Color3.new(1, 1, 1)
  677. MoveTitle.Font = Enum.Font.GothamSemibold
  678. MoveTitle.TextSize = 16
  679. MoveTitle.Text = "Mover Posição"
  680.  
  681. local MoveInfo = Instance.new("TextLabel", MoveFrame)
  682. MoveInfo.Size = UDim2.new(1, -20, 0, 20)
  683. MoveInfo.Position = UDim2.new(0, 10, 0, 50)
  684. MoveInfo.BackgroundTransparency = 1
  685. MoveInfo.TextColor3 = Color3.fromRGB(200, 200, 200)
  686. MoveInfo.Font = Enum.Font.Gotham
  687. MoveInfo.TextSize = 13
  688. MoveInfo.Text = "Digite o número do slot de destino (1-50):"
  689.  
  690. local MoveInput = Instance.new("TextBox", MoveFrame)
  691. MoveInput.Size = UDim2.new(0, 80, 0, 40)
  692. MoveInput.Position = UDim2.new(0.5, -40, 0, 80)
  693. MoveInput.BackgroundColor3 = Color3.fromRGB(30, 28, 42)
  694. MoveInput.TextColor3 = Color3.new(1, 1, 1)
  695. MoveInput.Font = Enum.Font.GothamBold
  696. MoveInput.TextSize = 20
  697. MoveInput.Text = ""
  698. MoveInput.PlaceholderText = "1-50"
  699. local MI_C = Instance.new("UICorner", MoveInput)
  700. MI_C.CornerRadius = UDim.new(0, 6)
  701. local MI_S = Instance.new("UIStroke", MoveInput)
  702. MI_S.Color = Color3.fromRGB(80, 70, 130)
  703. MI_S.Thickness = 1
  704.  
  705. local MoveConfirm = Instance.new("TextButton", MoveFrame)
  706. MoveConfirm.Size = UDim2.new(0.5, -15, 0, 35)
  707. MoveConfirm.Position = UDim2.new(0, 10, 1, -45)
  708. MoveConfirm.BackgroundColor3 = Color3.fromRGB(80, 160, 220)
  709. MoveConfirm.Font = Enum.Font.GothamBold
  710. MoveConfirm.Text = "Confirmar"
  711. MoveConfirm.TextColor3 = Color3.new(1, 1, 1)
  712. MoveConfirm.TextSize = 14
  713. local MC_C = Instance.new("UICorner", MoveConfirm)
  714. MC_C.CornerRadius = UDim.new(0, 6)
  715. AnimateHover(MoveConfirm, Color3.fromRGB(100, 180, 240), Color3.fromRGB(80, 160, 220))
  716.  
  717. local MoveCancel = Instance.new("TextButton", MoveFrame)
  718. MoveCancel.Size = UDim2.new(0.5, -15, 0, 35)
  719. MoveCancel.Position = UDim2.new(0.5, 5, 1, -45)
  720. MoveCancel.BackgroundColor3 = Color3.fromRGB(80, 70, 130)
  721. MoveCancel.Font = Enum.Font.GothamBold
  722. MoveCancel.Text = "Cancelar"
  723. MoveCancel.TextColor3 = Color3.new(1, 1, 1)
  724. MoveCancel.TextSize = 14
  725. local MCN_C = Instance.new("UICorner", MoveCancel)
  726. MCN_C.CornerRadius = UDim.new(0, 6)
  727. AnimateHover(MoveCancel, Color3.fromRGB(100, 90, 150), Color3.fromRGB(80, 70, 130))
  728.  
  729. --================================================================================
  730. -- [LÓGICA E CONTROLES]
  731. --================================================================================
  732.  
  733. local onConfirmCallback = nil
  734. local slotToRename = nil
  735. local slotToMove = nil
  736. local updateSavedList -- declaração antecipada
  737.  
  738. local function updateMainPositionUI()
  739. if mainPosition then
  740. MainPosContainer.Visible = true
  741. else
  742. MainPosContainer.Visible = false
  743. end
  744. end
  745.  
  746. local function setMainPosition(slot)
  747. if savedPositions[slot] then
  748. mainPosition = {
  749. position = savedPositions[slot].position,
  750. name = savedPositions[slot].name,
  751. timestamp = savedPositions[slot].timestamp
  752. }
  753. saveMainPosition()
  754. updateMainPositionUI()
  755. end
  756. end
  757.  
  758. MP_RemoveBtn.MouseButton1Click:Connect(function()
  759. ConfirmLabel.Text = "Remover posição principal?"
  760. ConfirmYes.Text = "Sim"
  761. onConfirmCallback = function()
  762. mainPosition = nil
  763. if hasFS and hasDelFile then pcall(delfile, MAIN_FILE) end
  764. if hasFS and hasDelFile then pcall(delfile, MAIN_BAK_FILE) end
  765. updateMainPositionUI()
  766. end
  767. ConfirmationOverlay.Visible = true
  768. end)
  769.  
  770. local function swapPositions(fromSlot, toSlot)
  771. if fromSlot == toSlot then return end
  772. if savedPositions[toSlot] then
  773. local temp = savedPositions[fromSlot]
  774. savedPositions[fromSlot] = savedPositions[toSlot]
  775. savedPositions[toSlot] = temp
  776. else
  777. savedPositions[toSlot] = savedPositions[fromSlot]
  778. savedPositions[fromSlot] = nil
  779. end
  780. saveToDisk()
  781. end
  782.  
  783. local function findNextEmptySlot()
  784. for i = 1, maxSaves do
  785. if not savedPositions[i] then return i end
  786. end
  787. return (currentSaveSlot % maxSaves) + 1
  788. end
  789.  
  790. local function selectNextSlot()
  791. currentSaveSlot = findNextEmptySlot()
  792. SaveSlotLabel.Text = "Slot de Destino: " .. currentSaveSlot
  793. end
  794.  
  795. local function openRenamePrompt(slot)
  796. if not savedPositions[slot] then return end
  797. slotToRename = slot
  798. RenameTitle.Text = string.format("Renomear Slot %d", slot)
  799. RenameField.Text = savedPositions[slot].name
  800. RenameOverlay.Visible = true
  801. end
  802.  
  803. local function openMovePrompt(slot)
  804. if not savedPositions[slot] then return end
  805. slotToMove = slot
  806. MoveTitle.Text = string.format("Mover Slot %d: %s", slot, savedPositions[slot].name)
  807. MoveInput.Text = ""
  808. MoveOverlay.Visible = true
  809. end
  810.  
  811. -- Lógica de Paginação
  812. local function changePage(dir)
  813. local newPage = currentPage + dir
  814. if newPage < 1 then newPage = maxPages end
  815. if newPage > maxPages then newPage = 1 end
  816. currentPage = newPage
  817. PageLabel.Text = "Página " .. currentPage .. " / " .. maxPages
  818. updateSavedList()
  819. end
  820.  
  821. PagePrev.MouseButton1Click:Connect(function() changePage(-1) end)
  822. PageNext.MouseButton1Click:Connect(function() changePage(1) end)
  823.  
  824. -- ATUALIZAR LISTA (Modificado para Paginação)
  825. updateSavedList = function()
  826. -- Limpa apenas slots visuais
  827. for _, child in ipairs(SlotsContainer:GetChildren()) do
  828. if child:IsA("Frame") then child:Destroy() end
  829. end
  830.  
  831. -- Calcula índice inicial e final baseado na página
  832. local startSlot = (currentPage - 1) * slotsPerPage + 1
  833. local endSlot = currentPage * slotsPerPage
  834.  
  835. for slot = startSlot, endSlot do
  836. local entryFrame = Instance.new("Frame")
  837. entryFrame.Name = "Slot_" .. slot
  838. entryFrame.LayoutOrder = slot
  839. entryFrame.BackgroundColor3 = Color3.fromRGB(40, 38, 55)
  840. entryFrame.BackgroundTransparency = 0.5
  841. entryFrame.Parent = SlotsContainer
  842. entryFrame.ClipsDescendants = false
  843.  
  844. local C7 = Instance.new("UICorner", entryFrame)
  845. C7.CornerRadius = UDim.new(0, 6)
  846.  
  847. local data = savedPositions[slot]
  848. if data then
  849. local actionsFrame = Instance.new("Frame", entryFrame)
  850. actionsFrame.Name = "ActionsFrame"
  851. actionsFrame.Size = UDim2.new(0, 30, 1, 0)
  852. actionsFrame.Position = UDim2.new(0, 5, 0, 0)
  853. actionsFrame.BackgroundTransparency = 1
  854.  
  855. local mainBtn = Instance.new("TextButton", actionsFrame)
  856. mainBtn.Name = "MainBtn"
  857. mainBtn.Text = mainPosition and mainPosition.position == data.position and "★" or "☆"
  858. mainBtn.Size = UDim2.new(1, 0, 0, 22)
  859. mainBtn.Position = UDim2.new(0, 0, 0, 2)
  860. mainBtn.BackgroundTransparency = 1
  861. mainBtn.Font = Enum.Font.GothamBold
  862. mainBtn.TextSize = 14
  863. mainBtn.TextColor3 = Color3.fromRGB(255, 215, 0)
  864.  
  865. mainBtn.MouseEnter:Connect(function() mainBtn.TextSize = 16 end)
  866. mainBtn.MouseLeave:Connect(function() mainBtn.TextSize = 14 end)
  867.  
  868. local menuBtn = Instance.new("TextButton", actionsFrame)
  869. menuBtn.Name = "MenuBtn"
  870. menuBtn.Text = "⋮"
  871. menuBtn.Size = UDim2.new(1, 0, 0, 22)
  872. menuBtn.Position = UDim2.new(0, 0, 0, 26)
  873. menuBtn.BackgroundTransparency = 1
  874. menuBtn.Font = Enum.Font.GothamBold
  875. menuBtn.TextSize = 18
  876. menuBtn.TextColor3 = Color3.fromRGB(180, 180, 200)
  877.  
  878. menuBtn.MouseEnter:Connect(function()
  879. menuBtn.TextColor3 = Color3.fromRGB(255, 255, 255)
  880. menuBtn.TextSize = 20
  881. end)
  882. menuBtn.MouseLeave:Connect(function()
  883. menuBtn.TextColor3 = Color3.fromRGB(180, 180, 200)
  884. menuBtn.TextSize = 18
  885. end)
  886.  
  887. local optionsFrame = Instance.new("Frame", ScreenGui)
  888. optionsFrame.Name = "OptionsFrame_" .. slot
  889. optionsFrame.Size = UDim2.new(0, 120, 0, 110)
  890. optionsFrame.BackgroundColor3 = Color3.fromRGB(35, 32, 48)
  891. optionsFrame.BackgroundTransparency = 0.05
  892. optionsFrame.Visible = false
  893. optionsFrame.ZIndex = 50
  894. optionsFrame.BorderSizePixel = 0
  895.  
  896. local OptionsCorner = Instance.new("UICorner", optionsFrame)
  897. OptionsCorner.CornerRadius = UDim.new(0, 8)
  898. local OptionsStroke = Instance.new("UIStroke", optionsFrame)
  899. OptionsStroke.Color = Color3.fromRGB(100, 80, 180)
  900. OptionsStroke.Thickness = 1.5
  901.  
  902. local buttonsContainer = Instance.new("Frame", optionsFrame)
  903. buttonsContainer.Name = "ButtonsContainer"
  904. buttonsContainer.Size = UDim2.new(1, -10, 1, -25)
  905. buttonsContainer.Position = UDim2.new(0, 5, 0, 22)
  906. buttonsContainer.BackgroundTransparency = 1
  907. buttonsContainer.ZIndex = 51
  908.  
  909. local renameBtn = Instance.new("TextButton", buttonsContainer)
  910. renameBtn.Size = UDim2.new(1, 0, 0, 25)
  911. renameBtn.Position = UDim2.new(0, 0, 0, 0)
  912. renameBtn.BackgroundColor3 = Color3.fromRGB(45, 42, 58)
  913. renameBtn.BackgroundTransparency = 0.3
  914. renameBtn.Text = "✏ Renomear"
  915. renameBtn.TextColor3 = Color3.fromRGB(220, 220, 240)
  916. renameBtn.Font = Enum.Font.Gotham
  917. renameBtn.TextSize = 12
  918. renameBtn.ZIndex = 52
  919. local renameBtnCorner = Instance.new("UICorner", renameBtn)
  920. renameBtnCorner.CornerRadius = UDim.new(0, 4)
  921.  
  922. local moveBtn = Instance.new("TextButton", buttonsContainer)
  923. moveBtn.Size = UDim2.new(1, 0, 0, 25)
  924. moveBtn.Position = UDim2.new(0, 0, 0, 28)
  925. moveBtn.BackgroundColor3 = Color3.fromRGB(45, 42, 58)
  926. moveBtn.BackgroundTransparency = 0.3
  927. moveBtn.Text = "↔ Mover"
  928. moveBtn.TextColor3 = Color3.fromRGB(220, 220, 240)
  929. moveBtn.Font = Enum.Font.Gotham
  930. moveBtn.TextSize = 12
  931. moveBtn.ZIndex = 52
  932. local moveBtnCorner = Instance.new("UICorner", moveBtn)
  933. moveBtnCorner.CornerRadius = UDim.new(0, 4)
  934.  
  935. local deleteBtn = Instance.new("TextButton", buttonsContainer)
  936. deleteBtn.Size = UDim2.new(1, 0, 0, 25)
  937. deleteBtn.Position = UDim2.new(0, 0, 0, 56)
  938. deleteBtn.BackgroundColor3 = Color3.fromRGB(45, 42, 58)
  939. deleteBtn.BackgroundTransparency = 0.3
  940. deleteBtn.Text = "🗑 Excluir"
  941. deleteBtn.TextColor3 = Color3.fromRGB(255, 150, 150)
  942. deleteBtn.Font = Enum.Font.Gotham
  943. deleteBtn.TextSize = 12
  944. deleteBtn.ZIndex = 52
  945. local deleteBtnCorner = Instance.new("UICorner", deleteBtn)
  946. deleteBtnCorner.CornerRadius = UDim.new(0, 4)
  947.  
  948. -- Helper de hover para menu
  949. local function menuHover(b, col)
  950. b.MouseEnter:Connect(function()
  951. TweenService:Create(b, TweenInfo.new(0.15), {BackgroundTransparency=0, BackgroundColor3=col}):Play()
  952. end)
  953. b.MouseLeave:Connect(function()
  954. TweenService:Create(b, TweenInfo.new(0.15), {BackgroundTransparency=0.3, BackgroundColor3=Color3.fromRGB(45, 42, 58)}):Play()
  955. end)
  956. end
  957. menuHover(renameBtn, Color3.fromRGB(60, 57, 78))
  958. menuHover(moveBtn, Color3.fromRGB(60, 57, 78))
  959. menuHover(deleteBtn, Color3.fromRGB(80, 50, 50))
  960.  
  961. local nameLabel = Instance.new("TextLabel", entryFrame)
  962. nameLabel.Name = "NameLabel"
  963. nameLabel.Size = UDim2.new(1, -90, 0, 24)
  964. nameLabel.Position = UDim2.new(0, 40, 0, 3)
  965. nameLabel.BackgroundTransparency = 1
  966. nameLabel.TextColor3 = Color3.fromRGB(220, 220, 255)
  967. nameLabel.Font = Enum.Font.GothamSemibold
  968. nameLabel.TextSize = 13
  969. nameLabel.TextXAlignment = Enum.TextXAlignment.Left
  970. nameLabel.TextTruncate = Enum.TextTruncate.AtEnd
  971. nameLabel.Text = data.name
  972.  
  973. local timeLabel = Instance.new("TextLabel", entryFrame)
  974. timeLabel.Name = "TimeLabel"
  975. timeLabel.Size = UDim2.new(1, -90, 0, 14)
  976. timeLabel.Position = UDim2.new(0, 40, 0, 28)
  977. timeLabel.BackgroundTransparency = 1
  978. timeLabel.TextColor3 = Color3.fromRGB(130, 130, 160)
  979. timeLabel.Font = Enum.Font.Gotham
  980. timeLabel.TextSize = 10
  981. timeLabel.TextXAlignment = Enum.TextXAlignment.Left
  982. timeLabel.Text = data.timestamp
  983.  
  984. local teleportBtn = Instance.new("TextButton", entryFrame)
  985. teleportBtn.Name = "TeleportBtn"
  986. teleportBtn.Text = "TP"
  987. teleportBtn.Size = UDim2.new(0, 35, 0, 35)
  988. teleportBtn.Position = UDim2.new(1, -40, 0.5, -17.5)
  989. teleportBtn.BackgroundColor3 = Color3.fromRGB(120, 90, 255)
  990. teleportBtn.Font = Enum.Font.GothamBold
  991. teleportBtn.TextSize = 14
  992. teleportBtn.TextColor3 = Color3.new(1, 1, 1)
  993. local C9 = Instance.new("UICorner", teleportBtn)
  994. C9.CornerRadius = UDim.new(0, 6)
  995. AnimateHover(teleportBtn, Color3.fromRGB(140, 110, 255), Color3.fromRGB(120, 90, 255))
  996.  
  997. local menuOpen = false
  998. local closeConnection = nil
  999.  
  1000. menuBtn.MouseButton1Click:Connect(function()
  1001. menuOpen = not menuOpen
  1002. if menuOpen then
  1003. local btnPos = menuBtn.AbsolutePosition
  1004. optionsFrame.Position = UDim2.new(0, btnPos.X + 35, 0, btnPos.Y - 10)
  1005. optionsFrame.Visible = true
  1006. for _, child in ipairs(ScreenGui:GetChildren()) do
  1007. if child.Name:match("^OptionsFrame_") and child ~= optionsFrame then
  1008. child.Visible = false
  1009. end
  1010. end
  1011. if closeConnection then closeConnection:Disconnect() end
  1012. closeConnection = UserInputService.InputBegan:Connect(function(input)
  1013. if input.UserInputType == Enum.UserInputType.MouseButton1 then
  1014. task.wait(0.1)
  1015. local mousePos = UserInputService:GetMouseLocation()
  1016. local framePos = optionsFrame.AbsolutePosition
  1017. local frameSize = optionsFrame.AbsoluteSize
  1018. if mousePos.X < framePos.X or mousePos.X > framePos.X + frameSize.X or
  1019. mousePos.Y < framePos.Y or mousePos.Y > framePos.Y + frameSize.Y then
  1020. optionsFrame.Visible = false
  1021. menuOpen = false
  1022. if closeConnection then
  1023. closeConnection:Disconnect()
  1024. closeConnection = nil
  1025. end
  1026. end
  1027. end
  1028. end)
  1029. else
  1030. optionsFrame.Visible = false
  1031. if closeConnection then
  1032. closeConnection:Disconnect()
  1033. closeConnection = nil
  1034. end
  1035. end
  1036. end)
  1037.  
  1038. mainBtn.MouseButton1Click:Connect(function()
  1039. local isAlreadyMain = (mainPosition and mainPosition.position and mainPosition.position == data.position)
  1040. if isAlreadyMain then
  1041. ConfirmLabel.Text = "Remover posição principal?"
  1042. ConfirmYes.Text = "Remover"
  1043. onConfirmCallback = function()
  1044. mainPosition = nil
  1045. if hasFS and hasDelFile then
  1046. pcall(delfile, MAIN_FILE)
  1047. pcall(delfile, MAIN_BAK_FILE)
  1048. end
  1049. updateMainPositionUI()
  1050. updateSavedList()
  1051. end
  1052. else
  1053. ConfirmLabel.Text = mainPosition and
  1054. "Substituir a posição principal atual?" or
  1055. "Definir como posição principal?"
  1056. ConfirmYes.Text = "Sim"
  1057. onConfirmCallback = function()
  1058. setMainPosition(slot)
  1059. updateSavedList()
  1060. end
  1061. end
  1062. ConfirmationOverlay.Visible = true
  1063. end)
  1064.  
  1065. renameBtn.MouseButton1Click:Connect(function()
  1066. optionsFrame.Visible = false; menuOpen = false
  1067. openRenamePrompt(slot)
  1068. end)
  1069. moveBtn.MouseButton1Click:Connect(function()
  1070. optionsFrame.Visible = false; menuOpen = false
  1071. openMovePrompt(slot)
  1072. end)
  1073. deleteBtn.MouseButton1Click:Connect(function()
  1074. optionsFrame.Visible = false; menuOpen = false
  1075. ConfirmLabel.Text = "Tem certeza que deseja EXCLUIR o Slot " .. slot .. "?"
  1076. ConfirmYes.Text = "Sim, Excluir"
  1077. onConfirmCallback = function()
  1078. savedPositions[slot] = nil
  1079. saveToDisk()
  1080. updateSavedList()
  1081. selectNextSlot()
  1082. end
  1083. ConfirmationOverlay.Visible = true
  1084. end)
  1085.  
  1086. teleportBtn.MouseButton1Click:Connect(function()
  1087. if teleportTo(data.position) then
  1088. teleportBtn.Text = "✅"
  1089. TweenService:Create(teleportBtn, TweenInfo.new(0.2), {BackgroundColor3 = Color3.fromRGB(80, 200, 120)}):Play()
  1090. task.wait(1)
  1091. if teleportBtn.Parent then
  1092. teleportBtn.Text = "TP"
  1093. TweenService:Create(teleportBtn, TweenInfo.new(0.2), {BackgroundColor3 = Color3.fromRGB(120, 90, 255)}):Play()
  1094. end
  1095. end
  1096. end)
  1097.  
  1098. else
  1099. local nameLabel = Instance.new("TextLabel", entryFrame)
  1100. nameLabel.Size = UDim2.new(1, -20, 1, 0)
  1101. nameLabel.Position = UDim2.new(0, 10, 0, 0)
  1102. nameLabel.BackgroundTransparency = 1
  1103. nameLabel.TextColor3 = Color3.fromRGB(100, 100, 120)
  1104. nameLabel.Font = Enum.Font.Gotham
  1105. nameLabel.TextSize = 15
  1106. nameLabel.TextXAlignment = Enum.TextXAlignment.Left
  1107. nameLabel.Text = string.format("Slot %d: Vazio", slot)
  1108. end
  1109. end
  1110. end
  1111.  
  1112. local function performSave()
  1113. if not humanoidRoot then return false end
  1114. local name = NameField.Text
  1115. savedPositions[currentSaveSlot] = {
  1116. position = humanoidRoot.CFrame,
  1117. name = (#name > 0) and name or ("Slot "..currentSaveSlot),
  1118. timestamp = os.date("%Y-%m-%d %H:%M:%S")
  1119. }
  1120. saveToDisk()
  1121.  
  1122. -- Se o slot salvo não está na página atual, move para a página do slot
  1123. local pageOfSlot = math.ceil(currentSaveSlot / slotsPerPage)
  1124. if pageOfSlot ~= currentPage then
  1125. currentPage = pageOfSlot
  1126. PageLabel.Text = "Página " .. currentPage .. " / " .. maxPages
  1127. end
  1128.  
  1129. updateSavedList()
  1130. return true
  1131. end
  1132.  
  1133. local function animateSaveButton(success)
  1134. local button = SaveButton
  1135. local color = success and Color3.fromRGB(80,220,140) or Color3.fromRGB(200,80,80)
  1136. local text = success and "Salvo!" or "Erro!"
  1137. local originalColor, originalText = Color3.fromRGB(60,180,120), "Salvar Posição"
  1138. button.Text = text
  1139. TweenService:Create(button, TweenInfo.new(0.2), {BackgroundColor3 = color}):Play()
  1140. task.wait(1.5)
  1141. button.Text = originalText
  1142. TweenService:Create(button, TweenInfo.new(0.2), {BackgroundColor3 = originalColor}):Play()
  1143. end
  1144.  
  1145. MoveConfirm.MouseButton1Click:Connect(function()
  1146. local targetSlot = tonumber(MoveInput.Text)
  1147. if slotToMove and targetSlot and targetSlot >= 1 and targetSlot <= maxSaves then
  1148. swapPositions(slotToMove, targetSlot)
  1149. updateSavedList()
  1150. MoveOverlay.Visible = false
  1151. slotToMove = nil
  1152. else
  1153. MoveInput.Text = ""
  1154. MoveInput.PlaceholderText = "Inválido (1-50)!"
  1155. task.wait(1)
  1156. MoveInput.PlaceholderText = "1-50"
  1157. end
  1158. end)
  1159.  
  1160. MoveCancel.MouseButton1Click:Connect(function()
  1161. MoveOverlay.Visible = false
  1162. slotToMove = nil
  1163. end)
  1164.  
  1165. RenameConfirm.MouseButton1Click:Connect(function()
  1166. if slotToRename and #RenameField.Text > 0 then
  1167. local newName = RenameField.Text
  1168. local slotData = savedPositions[slotToRename]
  1169. if slotData then
  1170. slotData.name = newName
  1171. if mainPosition and mainPosition.position and slotData.position and (mainPosition.position == slotData.position) then
  1172. mainPosition.name = newName
  1173. saveMainPosition()
  1174. end
  1175. saveToDisk()
  1176. updateSavedList()
  1177. updateMainPositionUI()
  1178. end
  1179. RenameOverlay.Visible = false
  1180. slotToRename = nil
  1181. end
  1182. end)
  1183. RenameCancel.MouseButton1Click:Connect(function()
  1184. RenameOverlay.Visible = false
  1185. slotToRename = nil
  1186. end)
  1187.  
  1188. SlotPrev.MouseButton1Click:Connect(function()
  1189. currentSaveSlot = ((currentSaveSlot - 2 + maxSaves) % maxSaves) + 1
  1190. SaveSlotLabel.Text = "Slot de Destino: " .. currentSaveSlot
  1191. end)
  1192. SlotNext.MouseButton1Click:Connect(function()
  1193. currentSaveSlot = (currentSaveSlot % maxSaves) + 1
  1194. SaveSlotLabel.Text = "Slot de Destino: " .. currentSaveSlot
  1195. end)
  1196.  
  1197. ConfirmYes.MouseButton1Click:Connect(function()
  1198. if onConfirmCallback then onConfirmCallback() end
  1199. onConfirmCallback = nil
  1200. ConfirmationOverlay.Visible = false
  1201. end)
  1202. ConfirmNo.MouseButton1Click:Connect(function()
  1203. onConfirmCallback = nil
  1204. ConfirmationOverlay.Visible = false
  1205. end)
  1206.  
  1207. SaveButton.MouseButton1Click:Connect(function()
  1208. if savedPositions[currentSaveSlot] then
  1209. ConfirmLabel.Text = "O Slot "..currentSaveSlot.." já tem uma posição salva. Deseja SUBSTITUIR?"
  1210. ConfirmYes.Text = "Sim, Substituir"
  1211. onConfirmCallback = function()
  1212. local success = performSave()
  1213. if success then selectNextSlot() end
  1214. animateSaveButton(success)
  1215. end
  1216. ConfirmationOverlay.Visible = true
  1217. else
  1218. local success = performSave()
  1219. if success then selectNextSlot() end
  1220. animateSaveButton(success)
  1221. end
  1222. end)
  1223.  
  1224. -- Inicialização
  1225. loadFromDisk()
  1226. selectNextSlot()
  1227. updateSavedList()
  1228. updateMainPositionUI()
  1229.  
  1230. Players.LocalPlayer.CharacterAdded:Connect(function(character)
  1231. chr = character
  1232. humanoidRoot = character:WaitForChild("HumanoidRootPart")
  1233. end)
  1234.  
  1235. game:BindToClose(saveToDisk)
  1236.  
  1237. print("✅ Save Locate (NickZ) - v4.0 [PAGINADO + ANTI-BUG]")
  1238. print("📍 Total Slots: 50 (5 Páginas)")
  1239. print("🦕 Teleporte Hard (Anti-Animação) Ativo")
Add Comment
Please, Sign In to add comment