Create usable item with Brackeys inventory

Hey guys! I’m trying to make a survival game and i’m with some difficult to set up my inventory. Since i’m new to scripting i’m using Brackeys inventory system (found on the asstes store: Unity Asset Store - The Best Assets for Game Making
and i can’t make a usable item, like a can of food to regenerate my health.

I know i need to put something like

if (healthfod == used) { health += 20; }

Or something like that, but my biggest problem is to setup everything with the system. Because i need to check if it’s a food, drink, antibiotic, etc… and call the specific function for each item to affect my player.

As i said before, i’m new to scripting and also in the community, i’ve been looking for a answer here for a week and couldn’t find it.

If anyone can help me or give me some tutorials on how to do it, that will be awesome =D
Thanks guys

Create a enum of itemtype hpPotion, manaPotion in Item.js then, go to ItemEffect.js, get the item.js component and, in the line of the effect check if (enum from item.js = hpPotion) hp += 20 if (enum from item.js = manaPotion) mana + 20 and so on…