Advertisement
LazerAio

.ATerm

Mar 1st, 2022
181
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.88 KB | None | 0 0
  1. local function viewBox(x,y,s,n)
  2. term.setBackgroundColor(colors.lightGray)
  3. term.setCursorPos(x,y)
  4. term.setCursorPos(x,y)
  5. print(n..(string.rep("-",string.len(s)-string.len(n))))
  6. print(s)
  7. print(string.rep("-",string.len(s)))
  8. end
  9. startText = "ATerm by aio"
  10. viewBox(1,1,startText,"TERMINAL")
  11. sleep(0.2)
  12. viewBox(1,1," ","TERMINAL")
  13. function Input()
  14. term.setCursorPos(1,2)
  15. return read()
  16. end
  17. while true do
  18. IN = Input()
  19.  
  20. if IN == "term" or IN == "" then
  21. term.setBackgroundColor(colors.black)
  22. term.clear()
  23. return "TERM"
  24. elseif IN == "exit" then
  25. break
  26. elseif IN == "FileManager" or IN == "FM" or IN == "fm" then
  27. shell.run(".FM.lua")
  28. Out = "OK"
  29. elseif IN == "?" or IN == "help" or IN == "Help" then
  30. Out = "exit term fm"
  31. else
  32. Out = "Bad command"
  33. end
  34.  
  35. viewBox(1,1,Out,"TERMINAL")
  36. sleep(2)
  37. viewBox(1,1," ","TERMINAL")
  38. end
  39.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement