Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --pastebin get 32mBeCwc
- --orange is up, magenta is down
- local drive = peripheral.wrap("left")
- local ismovepossible
- function checkmotion(direction)
- ismovepossible=drive.move(direction, true, false)
- end
- function move(direction)
- checkmotion(direction)
- if ismovepossible==true then
- drive.move(direction, false, false)
- else
- os.sleep(1)
- end
- end
- os.sleep(1)
- while true do
- if rs.testBundledInput("right",colours.orange) == true then
- move(1)
- elseif rs.testBundledInput("right",colours.magenta) == true then
- move(0)
- end
- os.sleep(0.1)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement