local currentSlot = 1 function checkSlotInventory() if (turtle.getItemCount(currentSlot) == 0) then currentSlot = currentSlot + 1 turtle.select(currentSlot) end end local index = 0 while (index < 9) do index2 = 0 turtle.up() while (index2 < 4) do index3 = 0 while (index3 < 13) do checkSlotInventory() turtle.placeDown() turtle.forward() index3 = index3 + 1 end index2 = index2 + 1 turtle.turnRight() end index = index + 1 end