how do i make a crafting script

How do i make a crafting script that works not with a crafting chest but with Gui. then once you craft it.
the prefab will be placed under you.

like this quick drawing
1523856--87434--$bandicam 2014-02-17 15-30-09-838.jpg

You will have to know about the main algorithms of the crafting which were used by Artisans in the present time. There are different patterns which were used for different apps.First of all get some knowledge from google then try it best of luck.