Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local component = require("component")
- local sides = require("sides")
- local robot = require("robot")
- local g = component.generator
- g.insert()
- print(g.count())
- robotMovedBlock = 0
- for i = 63,1,-1
- do
- if robot.detect() == true then
- robot.swing(sides.front)
- robot.forward(1)
- robotMovedBlock = robotMovedBlock +1
- print(robotMovedBlock)
- else robot.forward(1) robotMovedBlock = robotMovedBlock + 1 print(robotMovedBlock)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement