So basically it's a mapped key (say th E key) that onced pressed fires a raycast where the cursor is pointing.
Now, there would be an event where when the action raycast hits it, it activates the event. Say something like
onActionButton>Player>addItem>Gun