Connect a Switch block from the Utilities library to the "Q" (Item Quantity) input connector on the Create block (Item library). If the Switch is On, a quantity of 1 is sent to the Create block and an item is created. When the Switch is Off, a quantity of 0 is sent to the Create block and no item is created.