Open Sourced Inventory System

One of the most common systems that a lot of beginner scripters struggle with is an inventory system, so today I am going to open source an inventory system I made recently.

Contents:

  • Savable
  • Drop/Pick up system
  • Stack system (items are able to be in the same slot for X amount if stackable)
  • Weight system
  • Slot system
  • Equip system
  • Easy way to add/customize items:

[itemName] = {
    Name
    Type --set to "Tool" if you wish for an item to be equippable
    Weight --item weight
    Model --model path
    Stackable --if item can stack
    StackCap --how many items can stack per slot
    Droppable --if item can be dropped
    Desc --item description, will be shown when you hover over an item in inventory
}

This is my first open sourced project and I still want to know how I can improve this system so please leave some tips or tell me what I’m doing wrong or what things you don’t like about this system such as: the structure, my methods, bad practices etc…

I got an inspiration from this post Open Source Advanced Inventory System and decided to make my own and added some things such as slot and stack system etc… but I’ve made mine from scratch.

Also I used ProfileService to save items because of how easy it is to use so if you wanna learn about it check it out here Save your player data with ProfileService! (DataStore Module)

I may be able to update this in the future so reply down below what you want to see added.
InventorySystem_OpenSourced.rbxl (74.4 KB)

Hopefully I would be able to help some of you!

76 Likes

Really nice script i like it was gona be really helpful 2 weeks ago but i made my own with this fethures
and backpack system too

Anyway really good work

3 Likes

This is really nice, you could make another one that is keycoded, like G or E to open etc. Instead of a button. But good work! This will really help out starter developers.

1 Like

I am going to try and use this for my game, great work!

Also, just don’t mind that guy.

1 Like

The system looks nice, I’ll definitely try it out!

1 Like

There we go, much better. I love the item stacking you added. There are thousands of desperate developers looking for a good inventory system and supplied just that. :+1:

1 Like

I do have a question tho, any way to add pictures / viewport frames rather that plain text?

I also can’t seem to find the script where you add items, do I have to manually add it?

yes, I recommend making a new value of the item in ItemsInfo such as Image = "Image" then just customize the slot by editing NewItemSlot a bit

1 Like

Cool and nice system, I won’t use it, but it’s cool!

1 Like

You can add items by picking up items on the ground, for default items look in DataSetter script and there should be an instruction on how to add starting items there

Thanks! I’ll try to look look for it right now!

My only feedback for your script, remove this:
image

haha I knew someone would point that out, a lot of people get annoyed by it. :stuck_out_tongue:

bro amazing Inventory System but the question is, will you keep updating it? and yeah that’s pretty much it

I might, so tell me what you want to be added

I want inventory slots and the item button frames to be draggable if you can do it here is an example: long click the button frame then drag it to the inventory slot and it will be automatically added into that inventory slot, Ik if it sounds hard but if you can’t do it then that’s fine :slight_smile:

1 Like

After seeing the last time you open-sourced this (wich… I really don‘t need to explain what happens, I think you understand what I mean (It was today)), you credited the inspiration source, wich, is always good to do. Then, I already saw the profileservice, but still don‘t understand why you used it instead of the regular datastore service

1 Like

ProfileService uses the “regular” DataStore Service.

Yeah but, the question is, why not just set your own DataStores up? They aren’t that difficult to use.