There's many a crafting system script out there, but what I've trouble finding is the one that lets you set up leftover material after crafting.
For instance, you have 2x Small Potion.
You can craft them together into 1x Big Potion. But you also receive Empty Flask in the process (because you poured one potion into another).
You could also call it a secondary crafting result, but it has to be hidden - Empty Flask is not the goal you're aiming for when you craft, it's just a bonus item on top of your result. So it mustn't be displayed in the crafting window or anything.
For instance, you have 2x Small Potion.
You can craft them together into 1x Big Potion. But you also receive Empty Flask in the process (because you poured one potion into another).
You could also call it a secondary crafting result, but it has to be hidden - Empty Flask is not the goal you're aiming for when you craft, it's just a bonus item on top of your result. So it mustn't be displayed in the crafting window or anything.