Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- print("Starting circuit...")
- while true do
- turtle.select(1)
- function compare()
- if turtle.compareDown() == true then
- turtle.forward()
- else
- turtle.select(2)
- if turtle.compareDown() == true then
- turtle.turnLeft()
- turtle.forward()
- else
- turtle.select(3)
- if turtle.compareDown() == true then
- turtle.turnRight()
- turtle.forward()
- else
- turtle.select(4)
- if turtle.compareDown() == true then
- turtle.turnRight()
- turtle.turnRight()
- turtle.forward()
- else
- turtle.select(5)
- if turtle.compare() == true then
- turtle.up()
- turtle.forward()
- else
- if turtle.detect() == true then
- turtle.up()
- else
- if turtle.detect() == false and turtle.detectDown() == false then
- turtle.down()
- else
- if turtle.compareDown() == true then
- turtle.forward()
- else
- turtle.select(6)
- if turtle.compareDown() == true then
- turtle.forward()
- turtle.down()
- else
- os.shutdown()
- end
- end
- end
- end
- end
- end
- end
- end
- end
- end
- compare()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement