Advertisement
FoxWorn3365

AppGO!

Dec 5th, 2021 (edited)
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.00 KB | None | 0 0
  1. -- AppMANAGER v1.0 by FoxWorn3365 >>>> Hack Store - AppGO!
  2. -- Funzioni basiche
  3. function giremu(inputstr, sep)
  4. local t={}
  5. for str in string.gmatch(inputstr, "([^"..sep.."]+)") do
  6. table.insert(t, str)
  7. end
  8. return t
  9. end
  10. -- Programma
  11.  
  12. function getInput()
  13. x, y = term.getCursorPos()
  14. print("appgo> ")
  15. term.setCursorPos(x+6, y)
  16. return read()
  17. end
  18.  
  19. term.setBackgroundColor(colors.black)
  20. term.setTextColor(colors.white)
  21. term.clear()
  22. term.setCursorPos(1, 1)
  23. print("user> app start\nBenvenuto, utente su AppGO!\nQui potrai gestire le applicazioni e tutti i programmi!\nPer aiuto scrivi help\nPer uscire scrivi exit o quit")
  24. while true do
  25. cmdInit = getInput()
  26. cmd = giremu(cmdInit, " ")
  27. if cmd[1] == "help" then
  28. print("AppGO! Help\nlist -> Lista delle app\ninstall <appname> -> installa\npurge <appname> -> elimina\nupdate <appname> -> aggiorna\nself -> Aggiorna AppGO!\nexit / quit -> esci\nfrw list -> framework list\nfrw install <appname> -> installa un framework\nfrw remove <appname> -> rimuovi un framework\n")
  29. elseif cmd[1] == "list" then
  30. for i, k in pairs(fs.list("/Hack/programmi/")) do
  31. print(k)
  32. end
  33. elseif cmd[1] == "install" and cmd[2] ~= nil then
  34. print("Nessuna app trovata con quel nome!")
  35. elseif cmd[1] == "purge" and cmd[2] ~= nil then
  36. if fs.isDir("/Hack/programmi/"..cmd[2]) == true then
  37. shell.run("rm /Hack/programmi/"..cmd[2])
  38. print("Programma "..cmd[2].." disinstallato con successo!")
  39. else
  40. print("Non ho trovato nessuna app / programma con quel nome!")
  41. end
  42. elseif cmd[1] == "exit" or cmd[1] == "quit" then
  43. shell.run("desktop")
  44. elseif cmd[1] == "update" and cmd[2] ~= nil then
  45. print("ERRORE DI SISTEMA! Framework Fox.NET/2 non trovato!")
  46. elseif cmd[1] == "self" then
  47. shell.run("rm /Hack/programmi/appGo/exec.luaDir")
  48. shell.run("pastebin get kYbps2Ur /Hack/programmi/appGo/exec.luaDir")
  49. print("AppGO! Aggiornato con successo!")
  50. else
  51. print("Il comando รจ inesistente oppure corrotto")
  52. end
  53. end
  54.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement