Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- shell.run("clear")
- print "Arrows - Turn and move"
- print "Space - Up"
- print "Shift - Down"
- print "W - Dig above"
- print "S - Dig in front"
- print "X - Dig below"
- print "0 - Exit"
- while true do
- event, k = os.pullEvent("key")
- if(k == 203)then
- turtle.turnLeft()
- elseif(k == 200)then
- turtle.forward()
- elseif(k == 208)then
- turtle.back()
- elseif(k == 205)then
- turtle.turnRight()
- elseif(k == 17)then
- turtle.digUp()
- elseif(k == 31)then
- turtle.dig()
- elseif(k == 57)then
- turtle.up()
- elseif(k == 54 or k == 42)then
- turtle.down()
- elseif(k == 11)then
- error()
- elseif(k == 45)then
- turtle.digDown()
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement