Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local function viewBox(x,y,s,n)
- term.setBackgroundColor(colors.lightGray)
- term.setCursorPos(x,y)
- term.setCursorPos(x,y)
- print(n..(string.rep("-",string.len(s)-string.len(n))))
- print(s)
- print(string.rep("-",string.len(s)))
- end
- startText = "ATerm by aio"
- viewBox(1,1,startText,"TERMINAL")
- sleep(0.2)
- viewBox(1,1," ","TERMINAL")
- function Input()
- term.setCursorPos(1,2)
- return read()
- end
- while true do
- IN = Input()
- if IN == "term" or IN == "" then
- term.setBackgroundColor(colors.black)
- term.clear()
- return "TERM"
- elseif IN == "exit" then
- break
- elseif IN == "FileManager" or IN == "FM" or IN == "fm" then
- shell.run(".FM.lua")
- Out = "OK"
- elseif IN == "?" or IN == "help" or IN == "Help" then
- Out = "exit term fm"
- else
- Out = "Bad command"
- end
- viewBox(1,1,Out,"TERMINAL")
- sleep(2)
- viewBox(1,1," ","TERMINAL")
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement