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!

148 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

4 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.

2 Likes

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:

3 Likes

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

3 Likes

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.