Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- os.loadAPI("apis/cosUtils.lua")
- local monitor = cosUtils.isMonitorHere()
- if monitor then
- monitor.setTextColor(colors.white)
- monitor.clear()
- monitor.setCursorPos(1, 1)
- monitor.setTextScale(0.5)
- monitor.write("Welcome to COS CMD Prompt!")
- monitor.setCursorPos(1, 2)
- monitor.write("To return to the main menu, type `back`")
- monitor.setCursorPos(1, 3)
- monitor.write("===================================================")
- monitor.setCursorPos(1, 4)
- while true do
- monitor.write("\n> ")
- local input = read()
- if input == "back" then
- shell.run("/2/.menu")
- break
- else
- shell.run(input)
- end
- end
- cosUtils.onScreenKeyboard()
- else
- term.setTextColor(colors.white)
- term.clear()
- term.setCursorPos(1, 1)
- term.write("Welcome to COS CMD Prompt!")
- term.setCursorPos(1, 2)
- term.write("To return to the main menu, type `back`")
- term.setCursorPos(1, 3)
- term.write("===================================================")
- term.setCursorPos(1, 4)
- while true do
- term.write("\n> ")
- local input = read()
- if input == "back" then
- shell.run("/2/.menu")
- break
- else
- shell.run(input)
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement