Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- motor = peripheral.wrap("bottom")
- while 1 do
- term.clear()
- term.setCursorPos(1,1)
- print("Welcome to VirtualDXS's Flying Base!")
- print("This is the control computer. Would you like to move:")
- print(" F)orward")
- print(" B)ack")
- print(" L)eft")
- print(" R)ight")
- print(" U)p")
- print(" D)own")
- print(" ")
- while 1 do
- local event, keystroke = os.pullEvent("char")
- if keystroke == "f" then
- motor.move(0,false,false)
- elseif keystroke == "b" then
- motor.move(2,false,false)
- elseif keystroke == "l" then
- motor.move(3,false,false)
- elseif keystroke == "r" then
- motor.move(1,false,false)
- elseif keystroke == "u" then
- motor.move(5,false,false)
- elseif keystroke == "d" then
- motor.move(6,false,false)
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement