How do I make an inventory simular to the one in Baldi's Basics

Hello, I have been trying to make an inventory for my game inspired by Baldi’s Basics for a few weeks now, I have yet to find anything helpful. So I have resorted to asking on here.

If you don’t know how the inventory works I copied some text from the wiki.

[The inventory can hold 5 items at a time. The player can pick up items with the “Interact” action (Left-click or E by default) and use them with the “Use Item” action (Right-click or Q by default).
The player can scroll the mouse wheel or press the number keys (1, 2, 3, 4, and 5 by default) to select different items.
To swap an item, the player has to left click an item with another item selected with a full inventory. The player will pick up the new item and the old one will be left in its place. If the player approaches It’s a Bully while having items, he will take a random item from their inventory.
The item the player has selected will have a red background in its square. If the player has an inventory slot selected with nothing in it, then the item slot will just say “Nothing”.]