Advertisement
LazerAio

.CMD

Mar 1st, 2022
179
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.97 KB | None | 0 0
  1. local function viewBox(x,y,s,n)
  2. term.setCursorPos(x,y)
  3. term.setCursorPos(x,y)
  4. term.setBackgroundColor(colors.lightGray)
  5. print(n..(string.rep("-",string.len(s)-string.len(n))))
  6. term.setBackgroundColor(colors.black)
  7. print(s)
  8. print(s)
  9. print(s)
  10. term.setBackgroundColor(colors.lightGray)
  11. print(string.rep("-",string.len(s)))
  12. end
  13. viewBox(1,1," ","CMD")
  14. term.setCursorPos(1,2)
  15. print("[A]Term [S]hell")
  16. term.setCursorPos(1,3)
  17. IN = read()
  18. w = true
  19. while w do
  20. if IN == "A" or IN == "a" then
  21. w = false
  22. shell.run(".ATerm")
  23. else
  24. w = false
  25. while true do
  26. term.setBackgroundColor(colors.black)
  27. term.setCursorPos(1,2)
  28. print(" ")
  29. print(" ")
  30. term.setCursorPos(1,2)
  31. I = read()
  32. if I == "EXIT" then
  33. break
  34. else
  35. term.setCursorPos(1,3)
  36. shell.run(I)
  37. end
  38. end
  39. end
  40. end
  41.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement