- use "- inventory adjust ..." or the "item.with[...]" tag, not adjust+save+inventory set
- You forgot to disable debug on one of the scripts
- Don't use player flags to track data for an inventory script. Just make a generic inventory script (or straight up use "generic
") and apply the dynamic bits later via mechanisms.
- Don't blindly set an item into the player's held item slot. What if they moved an item into that slot while the inventory was open?