Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Robot script(?)
- local comp = require("component")
- local robot = require("robot")
- local keyb = require("keyboard")
- print(robot.level())
- print(robot.name())
- local _isRepeat = true
- print("Controls enabled!")
- while(isRepeat == true) do
- if(keyb.isKeyDown('w')) then
- robot.forward()
- end
- if(keyb.isKeyDown('s')) then
- robot.back()
- end
- if(keyb.isKeyDown('a')) then
- robot.turnLeft()
- end
- if(keyb.isKeyDown('d')) then
- robot.turnRight()
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement