LuaScripts/craftCrystal.lua
2021-01-05 17:00:10 +03:00

23 lines
477 B
Lua

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