How can I make a grabbing and inventory system in blocks?

Does anyone know how to make a grabbing and inventory system in blocks?