-- _PROGRAM 2.2 local robot = require("robot") local component = require("component") function checkSwitch() do component.inventory_controller.equip() robot.setLightColor(0xF4FF0D) if robot.count(1) > 50 function expUse() robot.setLightColor(0x00FF00) --green print("Extracting...") robot.use() while true do checkSwitch() end while true do expUse() end