20 lines
401 B
Lua
20 lines
401 B
Lua
local robot = require("robot")
|
|
local component = require("component")
|
|
local sides = require("sides")
|
|
local rs = component.redstone
|
|
local flag = true;
|
|
while true do
|
|
if rs.getInput(sides.top) > 0 then
|
|
flag = true
|
|
robot.suck()
|
|
robot.dropDown()
|
|
else
|
|
if flag then
|
|
os.sleep(5)
|
|
else
|
|
flag = false
|
|
end
|
|
robot.suckDown()
|
|
robot.drop()
|
|
end
|
|
end
|