FoxWorn3365

XTerm

Dec 5th, 2021 (edited)
253
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.69 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. while true do
  19. cmd = getReq()
  20. if string.find(cmd, "exit") ~= nil or string.find(cmd, "quit") ~= nil then
  21. shell.run("desktop")
  22. elseif string.find(cmd, "rm") ~= nil and string.find(cmd, "Hack") ~= nil then
  23. print("ATTENZIONE!\nStai provando ad eliminare la cartella principale di HackOS!")
  24. elseif string.find(cmd, "rm") ~= nil and string.find(cmd, "startup") ~= nil then
  25. print("ATTENZIONE!\nStai provando ad eliminare il launcher di HackOS!")
  26. elseif string.find(cmd, "rm") ~= nil and string.find(cmd, "desktop") ~= nil then
  27. print("ATTENZIONE!\nStai provando ad eliminare l'istanza desktop di HackOS!")
  28. elseif string.find(cmd, "rm") ~= nil and string.find(cmd, ".localConf") ~= nil then
  29. print("HackOS Warning\nERROR: Permission denied!\nOS_important_file_callExp()")
  30. elseif string.find(cmd, "server") ~= nil then
  31. print("Stai giocando su RGBCraft!\nDal 2010 by lego11 <3")
  32. elseif string.find(cmd, "promptManager") ~= nil then
  33. print("Sto avviando il prompt APT!")
  34. shell.run("/Hack/app/prompt_APT.luaDir")
  35. elseif string.find(cmd, "getManager") ~= nil then
  36. print("Installazione del prompt HackOS_APT!")
  37. if fs.isDir("/Hack/app") ~= true then
  38. shell.run("mkdir /Hack/app")
  39. end
  40. shell.run("pastebin get Y8ZAVKJE /Hack/app/prompt_APT.luaDir")
  41. else
  42. shell.run(cmd)
  43. end
  44. end
Advertisement
Add Comment
Please, Sign In to add comment