Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local robot = require("robot")
- local computer = require("computer")
- local variables = require("variables")
- function clean()
- for i = 1, 16 do
- robot.count(16)
- robot.select(i)
- if robot.count(16) > 0 then
- os.sleep(1)
- robot.drop(i, 64)
- end
- end
- robot.select(1)
- end
- while true do
- if robot.detect() then
- robot.swing()
- else
- -- print("Error in code")
- os.sleep(1)
- if count >= 6 then
- clean()
- else --do nothing
- end
- end
- count = count+1
- if count > 6 then
- count = 0
- end
- -- print(count)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement