User:Jerricks/scripts

local runService = game:GetService("RunService") local userInputService = game:GetService("UserInputService") local player = game.Players.LocalPlayer local selectButton = require(player:WaitForChild("PlayerGui"):WaitForChild("Scripts"):WaitForChild("SetSelectedButton")) local menu = script.Parent.Parent:WaitForChild("MenuGUI"):WaitForChild("Menu") local openButton = menu:WaitForChild("Main"):WaitForChild("SaveLoad") local slotList = script.Parent:WaitForChild("SlotList") local slotInfo = script.Parent:WaitForChild("SlotInfo") local progress = script.Parent:WaitForChild("Progress") local confirmSave = script.Parent:WaitForChild("OverwriteConfirm") local confirmDelete = script.Parent:WaitForChild("DeleteConfirm") local wipe = slotList:WaitForChild("Main"):WaitForChild("ModeratePlayer"):WaitForChild("WipeSaves") local noticeStateBool = game.ReplicatedStorage.Notices.ClientNoticeIsOpen local buttomBumper = require(script.Parent.Parent:WaitForChild("BumpButton")) local slotItemBackup = slotList:WaitForChild("Main"):WaitForChild("SlotItem") slotItemBackup.Parent = nil local requestSave = game.ReplicatedStorage.LoadSaveRequests.RequestSave local requestLoad = game.ReplicatedStorage.LoadSaveRequests.RequestLoad local clientMayLoad = game.ReplicatedStorage.LoadSaveRequests.ClientMayLoad local getMetaData = game.ReplicatedStorage.LoadSaveRequests.GetMetaData local wipeMetaData = game.ReplicatedStorage.LoadSaveRequests.WipeMetaData local isLocalServer = game.ReplicatedStorage.LoadSaveRequests.IsLocal:InvokeServer local sendNotice = game.ReplicatedStorage.Notices.SendUserNotice local TICKCUT = game.ReplicatedStorage.LoadSaveRequests.GetTickCut:InvokeServer local autosaveFrequency = game.ReplicatedStorage.LoadSaveRequests.GetAutosaveFrequency:InvokeServer local GetDateTable = require(game.ReplicatedStorage:WaitForChild("DateTableModule")) local guiOpen = script.Parent.IsOpen local currentWindow = "Closed" local checker = script:WaitForChild("LocalScript") wait(1.5) local currentSaveSlot = script.CurrentSaveSlot currentSaveSlot.Parent = player math.randomseed(tick) local savePass = math.random pcall(function currentSaveSlot.Set:Invoke(savePass, "zebras") end) local loadPlayer = player local altIdFrame = slotList.Main.LoadOtherId local altVersionFrame = slotList.Main.LoadVersion local passFrame = slotList.Main.Pass local metaDataChange = slotList.Main.SlotHistory.MetaData local adminPanels = {altVersionFrame, altIdFrame, slotList.Main.Logs, slotList.Main.SlotHistory, slotList.Main.SetFunds, slotList.Main.ModeratePlayer} for _,frame in pairs(adminPanels) do frame.Visible = false end local enableTestSave = false local adm = false local isAdmin = function return adm end if game.ReplicatedStorage.Transactions.Level:InvokeServer >= 2 then passFrame.Visible = true passFrame.Field.FocusLost:connect(function(b) local text = passFrame.Field.Text  passFrame:Destroy  if not b then    return   end  if text == "zebraman" then    if game:FindFirstChild("NetworkClient") and game.NetworkClient.Ticket ~= "" then      game.ReplicatedStorage.Transactions.AddLog:InvokeServer("Exploit", player.Name .. " logged in to data admin panel")   end    for _,frame in pairs(adminPanels) do      frame.Visible = true    end    adm = true    currentSaveSlot.Set:Invoke(0, savePass)    currentSaveSlot.Set:Invoke(-1, savePass)  else    for _,frame in pairs(adminPanels) do      frame:Destroy    end    if game:FindFirstChild("NetworkClient") and game.NetworkClient.Ticket ~= "" then      game.ReplicatedStorage.Transactions.AddLog:InvokeServer("Exploit", player.Name .. " failed to login to data admin panel using password: " .. text)   end  end end) else for _,frame in pairs(adminPanels) do   frame:Destroy end end do local loadVersion = nil thereIsASave = function local metaData, error = getMetaData:InvokeServer(loadPlayer) if error then sendNotice:Fire(error) return true end if not metaData then return false end for index,slot in pairs(metaData) do   if slot.NumSaves > 0 then return true end end end local slotItems = {} local slotSelection = nil local lastInstruction = 0 openList = function guiOpen.Value = true currentWindow = "List" local metaData, error = getMetaData:InvokeServer(loadPlayer) if not metaData or error then sendNotice:Fire(error) exitAll return end noticeStateBool.Value = true local yPosition = slotItemBackup.Position.Y.Offset for _,v in pairs(slotItems) do   do      v:Destroy end end slotItems = {} do   local firstItem = nil for index,slot in pairs(metaData) do     local ignore = false local newSlotItem = slotItemBackup:clone newSlotItem.SlotName.Text = "Slot " .. index if currentSaveSlot.Value ~= index or not loadVersion then local NumSaves = slot.NumSaves end if NumSaves <= 0 or not slot.SaveMeta[NumSaves] then newSlotItem.SizeV.Text = "" newSlotItem.Time.Text = "no save" else newSlotItem.SizeV.Text = slot.SaveMeta[NumSaves].NumKeys newSlotItem.Time.Text = getDate(slot.SaveMeta[NumSaves].Timestamp + TICKCUT) end newSlotItem.Position = UDim2.new(0, 0, 0, yPosition) yPosition = yPosition + newSlotItem.Size.Y.Offset + 12 newSlotItem.MouseButton1Click:connect(function   local success, errorMessage = clientMayLoad:InvokeServer(loadPlayer)    if not success then      exitAll      sendNotice:Fire("Error: " .. errorMessage)     return     end    metaDataChange:Fire(slot)    slotSelection = index    slotSelected  end) newSlotItem.Parent = slotList.Main table.insert(slotItems, newSlotItem) if not firstItem then firstItem = newSlotItem end if currentSaveSlot.Value == index then newSlotItem.IsCurrentSlot.Visible = true newSlotItem.BackgroundColor3 = Color3.new(0.31372549019608, 0.82352941176471, 0.3921568627451) if slot.SaveMeta[200] == nil then do           altVersionFrame.VersionsWrap.Text = "Versions wrap: " .. tostring(not altVersionFrame or not altVersionFrame.Parent) altVersionFrame.CurrentVersion.Text = "Current version: " .. tostring(slot.NumSaves) -- DECOMPILER ERROR at PC159: LeaveBlock: unexpected jumping out IF_THEN_STMT

-- DECOMPILER ERROR at PC159: LeaveBlock: unexpected jumping out IF_STMT

-- DECOMPILER ERROR at PC159: LeaveBlock: unexpected jumping out IF_THEN_STMT

-- DECOMPILER ERROR at PC159: LeaveBlock: unexpected jumping out IF_STMT

end end end end slotList.Main.Size = UDim2.new(0, slotList.Main.Size.X.Offset, 0, yPosition + slotList.Main.Info.Size.Y.Offset) slotList.Main.Position = UDim2.new(0.5, slotList.Main.Position.X.Offset, 0.5, -slotList.Main.Size.Y.Offset / 2 - 30) slotList.Quit.Position = UDim2.new(0.5, slotList.Quit.Position.X.Offset, 0.5, slotList.Main.Position.Y.Offset + slotList.Main.Size.Y.Offset + 10) setPlatformControls slotList.Visible = true selectButton(firstItem) -- DECOMPILER ERROR: 3 unprocessed JMP targets end end getDate = function(timeStamp) local clientTimeDifference = os.time - tick timeStamp = timeStamp - clientTimeDifference local timeSinceSave = math.floor(tick - (timeStamp)) if timeSinceSave < 60 then return math.floor(timeSinceSave) .. " seconds ago" else if timeSinceSave < 3600 then local v = math.floor(timeSinceSave / 60) if v == 1 then return "1 minute ago" end return v .. " minutes ago" else do       if timeSinceSave < 86400 then local v = math.floor(timeSinceSave / 60 / 60) if v == 1 then return "1 hour ago" end return v .. " hours ago" else do           if timeSinceSave < 259200 then local v = math.floor(timeSinceSave / 60 / 60 / 24) if v == 1 then return "Yesterday" end return v .. " days ago" else do               local DateTable = GetDateTable(timeStamp) do return DateTable.Month .. " / " .. DateTable.Day .. " / " .. DateTable.Year end end end end end end end end end exitAll = function noticeStateBool.Value = false slotInfo.Visible = false slotList.Visible = false progress.Visible = false currentWindow = "Closed" selectButton(nil) guiOpen.Value = false end back = function if currentWindow == "List" then if not buttomBumper.Bump(slotList.Quit) then return end exitAll else if currentWindow == "SaveSlot" then if not buttomBumper.Bump(slotInfo.Quit) then return end slotInfo.Visible = false openList else if currentWindow == "SaveConfirm" then if not buttomBumper.Bump(confirmSave.Main.Quit) then return end currentWindow = "SaveSlot" if currentSaveSlot.Value == -1 then slotInfo.Main.Load.Visible = true end slotInfo.Visible = true confirmSave.Visible = false selectButton(slotInfo.Main.Load) else if currentWindow == "DeleteConfirm" then if not buttomBumper.Bump(confirmDelete.Main.Quit) then return end currentWindow = "SaveSlot" slotInfo.Visible = true confirmDelete.Visible = false selectButton(slotInfo.Main.Load) end end end end end slotSelected = function if not buttomBumper.Bump(slotItems[slotSelection]) then return end currentWindow = "SaveSlot" slotInfo.Main.SlotName.Text = slotItems[slotSelection].SlotName.Text slotInfo.Main.SizeV.Text = slotItems[slotSelection].SizeV.Text slotInfo.Main.Time.Text = slotItems[slotSelection].Time.Text if currentSaveSlot.Value == -1 then if slotInfo.Main.Time.Text == "no save" then slotInfo.Main.Save.Visible = true slotInfo.Main.Save.TextLabel.Text = "Save to this slot" slotInfo.Main.Save.Size = UDim2.new(1, 0, 0, 50) slotInfo.Main.Save.Position = UDim2.new(0, 0, 1, -50) slotInfo.Main.Load.Visible = false else slotInfo.Main.Save.Visible = true slotInfo.Main.Save.TextLabel.Text = "Overwrite slot" slotInfo.Main.Save.Size = UDim2.new(0.5, 0, 0, 50) slotInfo.Main.Save.Position = UDim2.new(0.5, 0, 1, -50) slotInfo.Main.Load.Visible = true slotInfo.Main.Load.TextLabel.Text = "Load slot" slotInfo.Main.Load.Size = UDim2.new(0.5, 0, 0, 50) end else if currentSaveSlot.Value == slotSelection then slotInfo.Main.Save.Visible = false slotInfo.Main.Load.Visible = true slotInfo.Main.Load.TextLabel.Text = "Reload slot" slotInfo.Main.Load.Size = UDim2.new(1, 0, 0, 50) else slotInfo.Main.Save.Visible = false slotInfo.Main.Load.Visible = true slotInfo.Main.Load.TextLabel.Text = "Load slot" slotInfo.Main.Load.Size = UDim2.new(1, 0, 0, 50) end end slotList.Visible = false slotInfo.Visible = true selectButton(slotInfo.Main.Load) end saveSlot = function if currentWindow ~= "SaveSlot" and currentWindow ~= "SaveConfirm" then return end if not buttomBumper.Bump(slotInfo.Main.Save) then return end if currentWindow == "SaveSlot" then currentWindow = "SaveConfirm" slotInfo.Visible = false confirmSave.Visible = true selectButton(confirmSave.Main.Quit) else if currentWindow == "SaveConfirm" then currentWindow = "Progress" confirmSave.Visible = false progress.Visible = true local success, errorMessage = requestSave:InvokeServer(slotSelection, loadPlayer) exitAll if success then sendNotice:Fire("Save success", 1.5) currentSaveSlot.Set:Invoke(slotSelection, savePass) else sendNotice:Fire("Error: " .. errorMessage) end end end end deleteSlot = function if currentWindow ~= "SaveSlot" and currentWindow ~= "DeleteConfirm" then return end if not buttomBumper.Bump(confirmDelete.Main.Confirm) then return end if currentWindow == "SaveSlot" then currentWindow = "DeleteConfirm" slotInfo.Visible = false confirmDelete.Visible = true selectButton(confirmDelete.Main.Quit) else if currentWindow == "DeleteConfirm" then currentWindow = "Progress" confirmDelete.Visible = false progress.Visible = true local success, errorMessage = false, "Not yet implemented" exitAll if success then sendNotice:Fire("Delete success") else sendNotice:Fire("Error: " .. errorMessage) end end end end loadSlot = function if currentWindow ~= "SaveSlot" then return end currentWindow = "Progress" slotInfo.Visible = false progress.Visible = true local success, errorMessage = clientMayLoad:InvokeServer(loadPlayer) if not success then exitAll sendNotice:Fire("Error: " .. errorMessage) return end do   if currentSaveSlot.Value ~= -1 then local success, errorMessage, itemsDestroyed = requestSave:InvokeServer(currentSaveSlot.Value, loadPlayer, loadVersion, true) progress.Visible = false if success then sendNotice:Fire("Save success", 1.5) currentSaveSlot.Set:Invoke(-1, savePass) else sendNotice:Fire("Error: " .. errorMessage) if isLocalServer then wait(0.5) else exitAll return end end wait(0.2) currentWindow = "Progress" progress.Visible = true end local success, errorMessage, revokeSlot = requestLoad:InvokeServer(slotSelection, loadPlayer, loadVersion) exitAll if success then sendNotice:Fire("Load success", 0.8) currentSaveSlot.Set:Invoke(slotSelection, savePass) else sendNotice:Fire("Error: " .. errorMessage) currentSaveSlot.Set:Invoke(-1, savePass) end end end toggleWindow = function if not buttomBumper.Bump(openButton) then return end menu.Visible = false openList end if altIdFrame.Parent then testPlayerChanged = function if not altIdFrame.Visible or not isAdmin then return end local altId = nil pcall(function   altId = game.Players:GetUserIdFromNameAsync(altIdFrame.IdField.Text)  end) if not altId then altIdFrame.IdField.Text = "Current Player" altIdFrame.PlayerName.Text = "" loadPlayer = player else loadPlayer = {userId = altId, Name = game.Players:GetNameFromUserIdAsync(altId), Parent = enableTestSave} altIdFrame.PlayerName.Text = loadPlayer.Name altIdFrame.EnableSave.Text = enableTestSave and "X" or "" end script.IdChanged:Fire(loadPlayer.userId) currentSaveSlot.Set:Invoke(-1, savePass) openList end altIdFrame.IdField.FocusLost:connect(function(b) if not b then    return   end  enableTestSave = false  loadVersion = nil  altVersionFrame.VersionField.Text = "Current Version"  testPlayerChanged end) script.SetP.Event:connect(function(name, pass) if pass ~= "nohacks" then    return   end  altIdFrame.IdField.Text = name  enableTestSave = false  testPlayerChanged end) altIdFrame.EnableSave.MouseButton1Click:connect(function if not isAdmin then    return   end  enableTestSave = not enableTestSave  testPlayerChanged end) versionChanged = function if not altVersionFrame.Visible or not isAdmin then return end local altVersion = tonumber(altVersionFrame.VersionField.Text) if not altVersion then loadVersion = nil altVersionFrame.VersionField.Text = "Current Version" else loadVersion = altVersion altVersionFrame.VersionField.Text = loadVersion end openList end altVersionFrame.VersionField.FocusLost:connect(function(b) if not b then    return   end  versionChanged end) end script.GetId.OnInvoke = function return loadPlayer.userId end setPlatformControls = function require(player.PlayerGui.Scripts.SetPlatformControls)({slotInfo.Quit, slotList.Quit}) end if thereIsASave then player.PlayerGui:WaitForChild("OnboardingGUI"):WaitForChild("DoOnboarding") player.PlayerGui.OnboardingGUI.DoOnboarding.Value = false else currentSaveSlot.Set:Invoke(1, savePass) end wait(1) input = require(script.Parent.Parent:WaitForChild("Scripts"):WaitForChild("UserInput")) input.InteractAbort(back) slotList.Quit.MouseButton1Click:connect(function back end) slotInfo.Quit.MouseButton1Click:connect(function back end) confirmSave.Main.Quit.MouseButton1Click:connect(function back end) confirmDelete.Main.Quit.MouseButton1Click:connect(function back end) slotInfo.Main.Save.MouseButton1Click:connect(function saveSlot end) slotInfo.Main.Load.MouseButton1Click:connect(function loadSlot end) slotInfo.Main.DeleteSlot.MouseButton1Click:connect(function deleteSlot end) confirmSave.Main.Confirm.MouseButton1Click:connect(function saveSlot end) confirmDelete.Main.Confirm.MouseButton1Click:connect(function deleteSlot end) openButton.MouseButton1Click:connect(function toggleWindow end) script.Parent.Open.Event:connect(function toggleWindow end) pcall(function wipe.MouseButton1Click:connect(function exitAll wipeMetaData:InvokeServer(loadPlayer) openList end) end) checker.Changed:connect(function wait  game.ReplicatedStorage.Transactions.AddLog:InvokeServer("Exploit", player.Name .. " changed currentsaveslot security check") player:Kick end) checker.AncestryChanged:connect(function if player.Parent and not checker.Parent == script then    game.ReplicatedStorage.Transactions.AddLog:InvokeServer("Exploit", player.Name .. " destroyed currentsaveslot security check")   player:Kick  end end) if checker.Parent ~= script then game.ReplicatedStorage.Transactions.AddLog:InvokeServer("Exploit", player.Name .. " quickly destroyed currentsaveslot security check") player:Kick end set = function script.Parent.Set.Text = "Set: " .. game.ReplicatedStorage.DataSet.Value script.Parent.Get.Text = "Get: " .. game.ReplicatedStorage.DataGet.Value end game.ReplicatedStorage.DataSet.Changed:connect(set) game.ReplicatedStorage.DataGet.Changed:connect(set) local savePlease = false script.SavePlease.Event:connect(function savePlease = true end) local CurrentlySavingOrLoading = player:WaitForChild("CurrentlySavingOrLoading") while 1 do   for i = 1, autosaveFrequency do      wait(1) if savePlease then wait(3) break end end do     do        if currentSaveSlot.Value ~= -1 and not CurrentlySavingOrLoading.Value then local success, errorMessage = requestSave:InvokeServer(currentSaveSlot.Value, loadPlayer) if not success then sendNotice:Fire("Autosave failed: " .. errorMessage) end end savePlease = false -- DECOMPILER ERROR at PC581: LeaveBlock: unexpected jumping out DO_STMT

-- DECOMPILER ERROR at PC581: LeaveBlock: unexpected jumping out DO_STMT

end end end end