A backpack and hotbar that never lose an item
A slot backpack with stacks, move, merge, split and sort; a hotbar that follows items when they move; equipment slots with stats; usable items with cooldowns; world drops and pickups; search, tabs and a storage counter; saving. Every number from a client is checked, and a 3,000-step test counts every item.
For: Roblox developers building RPGs, survival, simulator and adventure games that need a real inventory.
See it work: a real play session, recorded from the shipped code
One backpack, 12 steps
Each step is a real call on the kit's Backpack; the grid shows the snapshot the server sends to the client after it.
3,000 random steps, every item counted
931 adds, 463 removes, 867 moves, 538 splits and 201 sorts with a seeded Random. What should be in the backpack against what is:
| Item | Expected | Counted | |
|---|---|---|---|
| Wood | 776 | 776 | match |
| Stone | 1,002 | 1,002 | match |
| Iron Ore | 100 | 100 | match |
| Apple | 20 | 20 | match |
| Iron Sword | 2 | 2 | match |
| Leather Cap | 0 | 0 | match |
Searching the recorded backpack for "iron" returns: Iron Ore ×30. Storage counter: 8 stacks, 197 items.
12 bad requests, each tried for real, each refused
| What the client sent | The server's answer | |
|---|---|---|
| Move from slot 0 | Refused | bad slot |
| Move from slot 1.5 | Refused | bad slot |
| Move from an empty slot | Refused | empty slot |
| Split more than the stack holds | Refused | bad count |
| Split a fraction | Refused | bad count |
| Drop a negative count | Refused | bad count |
| Drop a locked stack | Refused | locked |
| Use Wood | Refused | not usable |
| Equip an Apple | Refused | not equipment |
| Pick up from 500 studs away | Refused | too far |
| Pick up someone's fresh drop | Refused | not yours yet |
| Pick up a drop that is gone | Refused | gone |
What's inside
| Module | Runs on | What it does | Lines |
|---|---|---|---|
| Inventory | Server | A slot-based backpack with stacks. | 459 |
| ItemBook | Shared | Every item in your game: its name, category, rarity, stack size and what it does. | 89 |
| Hotbar | Server | Quick slots that point at items, not at inventory positions, so sorting or moving things in the backpack never breaks the bar. | 153 |
| Equipment | Server | Named equip slots (Weapon, Head, Body…). | 118 |
| Backpack | Server | One player's whole kit in one object and one save: the inventory, the hotbar and the equipment. | 52 |
| Actions | Server | Using and dropping items on the server, with cooldowns and your own effects. | 110 |
| Pickups | Server | Items lying in the world. | 148 |
| TradeBridge | Server | Lets players trade one-of-a-kind backpack items (gear, collectibles) through the CyberMax Pet Trading Kit, or any system that takes the same six functions. | 95 |
| Query (free) | Shared | Search, filter, sort and count what Inventory:Snapshot() returns. | 99 |
| RateLimit (free) | Shared | A token bucket per player per action, so a spammed remote costs you nothing. | 55 |
| Signal (free) | Shared | A tiny event object so your UI and systems can react to inventory changes. | 49 |
| Example script | Type | Put it in |
|---|---|---|
| BackpackConfig | ModuleScript | ReplicatedStorage |
| BackpackServer | Script | ServerScriptService |
| BackpackClient | LocalScript | StarterPlayer > StarterPlayerScripts |
Tested like real software
31 automated tests run in a real Luau VM against a Roblox engine mock, on luau-web 1.4.0 (Luau compiled to WebAssembly). They ship in the zip: cd tests && npm install && node run.mjs.
| Spec | Passing | For example |
|---|---|---|
| bridge | 1/1 | TradeBridge exposes one-of-a-kind items, moves them with their data, and holds them with a lock |
| demo | 1/1 | demo: a recorded play session, the refused requests and the 3,000-step item count |
| example | 6/6 | example server: a new player gets the starter kit, a hotbar and a snapshot … |
| inventory | 13/13 | ItemBook checks the config and fills in defaults … |
| parts | 10/10 | Hotbar points at items, not positions: sorting and moving never break it … |
Install in 5 minutes
- Drag
InventoryHotbarKit.rbxmxonto ReplicatedStorage in Roblox Studio. - Drag
InventoryHotbarKitExamples.rbxmxin and move the three scripts to the services above. - Turn on Studio access to API services and press Play.
INSTALL.mdwalks through an example place step by step.
FAQ
Is this allowed on Roblox?
Yes. It's ordinary Luau using Roblox's own services (DataStoreService, MarketplaceService, Players). Nothing bypasses Roblox rules.
Why not a free model from the Toolbox?
Free models are a fine start. Inventory Hotbar Kit ships its tests (31 of them, run in a real Luau VM), validates every remote argument, and is original code with a clear licence.
Do I need Rojo?
No. Drag the .rbxmx files into Roblox Studio. A Rojo project file is included if you use it.
Can I use it in a game I sell or a client's game?
Yes: unlimited experiences, commercial or not, for you or your clients. You can't resell or share the code itself.
Is CyberMax affiliated with Roblox?
No. Roblox and Roblox Studio are trademarks of Roblox Corporation, named only to describe compatibility.
More tested kits
Free: the Roblox Starter Kit
7 free Luau modules (damage, pets, shop formatting, admin audit log, tycoon guards and more) plus 3 free calculators, then 5 short emails with the scripting fixes we see go wrong most often.