How do I make an inventory where players can get materials and items?

I'm not good at the Script Editor, and I can't figure out how to make a system where the player can pick up items by pressing the action button when standing next to/facing the item on the ground. Can anyone help me?

Thanks
that should not be done in the script editor at all, that should be done with events.

and then it is a simple change item command on action button depending on what exactly you want to do.
Super new here, I dont think it should be a problem linking something but I found this insanely helpful ;3 Now I just gotta figure out an inventory

Original thread: https://forums.rpgmakerweb.com/threads/how-do-i-make-an-inventory-where-players-can-get-materials-and-items.120445/