Nevzyn

Untitled

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