Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- rednet.open("right");
- function move(key)
- if key == "w" then
- turtle.forward();
- end
- if key == "a" then
- turtle.turnLeft();
- end
- if key == "s" then
- turtle.back();
- end
- if key == "d" then
- turtle.turnRight();
- end
- if key == "z" then
- turtle.down();
- end
- if key == "x" then
- turtle.up();
- end
- if key == "c" then
- turtle.dig();
- end
- if key == "v" then
- turtle.place();
- end
- end
- while true do
- local sender, msg, protocol = rednet.receive("theft");
- print(msg);
- move(msg);
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement