Quick Organization Open Source
Key Required Patched

Quick Organization Open Source

Clean The Library 📖REDzREDz 1.3K views 548 executesUpdated Jun 23, 2026
2.5/ 5(2 votes)
1150% Positive
Lua Script•100 lines (2677 chars)
--[[
	made by real_redz
	opensource, anyone can edit the code
]]

if MAIN_THREAD then --[[task.cancel(MAIN_THREAD)]] return end
if not game.IsLoaded then game.Loaded:Wait() end

local replicatedStorage = game:GetService("ReplicatedStorage")
local players = game:GetService("Players")

local localPlayer = players.LocalPlayer

local libraryGenres = workspace.Library.Genres
local libraryBooks = workspace.Library.Books

local exitDoor = workspace.ExitDoor

local bookController = require(localPlayer.PlayerScripts.Client.Runtime.BookController)
local enum = require(replicatedStorage.Shared.Utility.Enum)

local userLibraryData = bookController.Replica.Data.Players[localPlayer.Name]

local BOOKS_SECTION = {}
local BOOKS_GENRES = {}

local booksGenres = enum.Genres

local function grabBook(book: Instance): (nil)
	bookController.Replica:FireServer("Grab", book)
end

local function placeBook(section: Instance, index: number): (nil)
	bookController.Replica:FireServer("Place", section, index)
end

local function splitTitleIndex(book: Instance): (string, number)
	local title, index = book.Name:match("^(.-)_(.+)$")
	return title, index
end

local function getBookSection(genre: string, bookName: string, volumes: number): Instance?
	if not BOOKS_SECTION[bookName] then
		if not BOOKS_GENRES[genre] then
			BOOKS_GENRES[genre] = libraryGenres[genre]:GetChildren()
		end
		
		for key, section in BOOKS_GENRES[genre] do
			if section:GetAttribute("Width") == volumes then
				BOOKS_SECTION[bookName] = table.remove(BOOKS_GENRES[genre], key)
				break
			end
		end
	end
	
	return BOOKS_SECTION[bookName]
end

local function complete()
	if MAIN_THREAD then
		task.cancel(MAIN_THREAD)
		getgenv().MAIN_THREAD = nil
		task.wait()
	end
	
	localPlayer.Character:PivotTo(exitDoor.Region.Part.CFrame)
end

local function organizeBooks()
	for genre, books in booksGenres do
		for _, data in books do
			local volumes = data.VolumeCount or 1
			local section = getBookSection(genre, data.Title, volumes)
			
			for volume = volumes, 1, -1 do
				local book = libraryBooks:FindFirstChild(`{data.Title}_{volume}`)
				if not book or book:GetAttribute("Locked") then continue end
				
				while not book:FindFirstChild("Attachment") do
					localPlayer.Character:PivotTo(book.CFrame)
					task.wait()
					grabBook(book)
				end
				
				while book:FindFirstChild("Attachment") do
					localPlayer.Character:PivotTo(section:GetPivot())
					task.wait()
					placeBook(section, volume - 1)
				end
			end
		end
	end
end

local function awake()
	exitDoor.DoorPart.DoorHighlight:GetAttributeChangedSignal("Enabled"):Once(complete)
	getgenv().MAIN_THREAD = task.spawn(organizeBooks)
end

awake()

Features & Information

DO NOT PLACE ANY BOOKS, OR THE SCRIPT WILL STOP/BROKE. LET THE SCRIPT DO EVERYTHING. made by real_redz Complete the game automatically (in about 7 to 15 minutes) - The better your ping, the faster it will be How to use it? - Enter a match (solo, professional, duo, trio, squad...) - Run the script
#library#opensource

Community Comments (3)

yasirplays10yasirplays10Jun 23, 2026

can anyone make a script of game pls donate but infinite by /hottopic where ic an get unlimited rob=ux please

didididididididididiJun 23, 2026

Each one is missing one book

didididididididididiJun 23, 2026

Your script will make many books disappear

More Scripts for Clean The Library 📖