Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local robot = require("robot")
- local computer = require("computer")
- local price =3
- local Boolean,n =false
- local a
- local Boolean,b
- while true do
- print (n)
- robot.suck (2)
- a =robot.count(1)
- if a >= price then
- computer.beep(400)
- computer.beep(500)
- robot.turnAround()
- robot.drop(price-1)
- robot.turnRight()
- robot.suck (1)
- robot.turnRight()
- robot.select(2)
- robot.drop(1)
- robot.select(1)
- a =robot.count(1)
- computer.beep(500)
- computer.beep(400)
- os.sleep(3)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement