Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local computer = require("computer")
- local robot = require("robot")
- local component = require("component")
- local sides = require("sides")
- local redstone = component.redstone
- function scan()
- alm = robot.compareTo(16)
- co = robot.count()
- robot.suck()
- if alm == true and co > 0 then
- robot.dropDown()
- rand = math.random(2)
- print(rand)
- if rand == 1 then
- redstone.setOutput(sides.back,15)
- os.sleep(1)
- redstone.setOutput(sides.back,0)
- elseif rand == 2 then
- computer.beep(2000, 0.7)
- end
- end
- end
- while true do
- red = redstone.getInput(sides.right)
- if red > 0 then
- scan()
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement