FoxWorn3365

Hack APT prompt app manager v1.0

Dec 16th, 2021 (edited)
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.07 KB | None | 0 0
  1. term.setBackgroundColor(colors.black)
  2. term.setTextColor(colors.white)
  3. term.clear()
  4. term.setCursorPos(1, 1)
  5.  
  6. function getReq()
  7. x, y = term.getCursorPos()
  8. if y > 16 then
  9. term.clear()
  10. term.setCursorPos(1, 1)
  11. else
  12. print(">")
  13. term.setCursorPos(x+2, y)
  14. return read()
  15. end
  16. end
  17.  
  18. print("Benvenuto su APT! Qua potrai gestire le varie app non ufficiali, le libreire e molto altro!")
  19. while true do
  20. cmd = getReq()
  21. if string.find(cmd, "exit") ~= nil or string.find(cmd, "quit") ~= nil then
  22. shell.run("desktop")
  23. elseif string.find(cmd, "apt") ~= nil and string.find(cmd, "update") ~= nil then
  24. print("Aggiorno APT!\n")
  25. shell.run("rm /Hack/app/prompt_APT-luaDir")
  26. shell.run("pastebin get Y8ZAVKJE /Hack/app/prompt_APT.luaDir")
  27. elseif string.find(cmd, "help") ~= nil then
  28. print("APT HELP PAGE\napp install <appname>\napp purge <appname>\napp list\napp update <appname>\nlib install <lib>\nlib purge <lib>\nlib list\nlib update <lib>")
  29.  
  30. else
  31. print("Comando non trovato!")
  32. end
  33. end
Add Comment
Please, Sign In to add comment