Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local function restoretext()
- term.setTextColor(colors.black)
- term.setBackgroundColor(colors.white)
- term.clear()
- end
- term.setBackgroundColor(colors.white)
- term.clear()
- term.setCursorPos(1,1)
- term.setTextColor(colors.white)
- term.setBackgroundColor(colors.black)
- write(" Terminal ")
- term.setTextColor(colors.black)
- term.setBackgroundColor(colors.white)
- term.setCursorPos(1,2)
- write("For exit write exit")
- trues = true
- local xter yter = term.getCursorPos()
- term.setCursorPos(1,3)
- while trues == true do
- if xter == 1 and yter == 1 then
- term.setCursorPos(1, 2)
- end
- write(">")
- command = read()
- if command == "exit" then
- print("Exitting...")
- trues = false
- elseif command == "ls" then
- term.setBackgroundColor(colors.black)
- shell.run(command)
- term.setBackgroundColor(colors.white)
- term.setTextColor(colors.black)
- elseif command == "edit" then
- shell.run("pastebin run vyAZc6tJ")
- else
- shell.run(command)
- sleep(1)
- restoretext()
- shell.run("pastebin run AK50tpr8")
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement