Advertisement
TIMAS_Bro

Untitled

Oct 15th, 2023
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. os.loadAPI("json")
  2. local args = {...}
  3. str2 = http.get("https://raw.githubusercontent.com/Timasbro/creatopico_os/main/apps.json").readAll()
  4. obj2 = json.decode(str2)
  5. local object = json.decodeFromFile("/apps.json")
  6. local name = args[1]
  7. local ver = "latest"
  8. for key,value in pairs( obj2 ) do
  9. if (key == name) then
  10. ver = value
  11. end
  12. end
  13. object[name] = "update"
  14. prettystring = json.encodePretty(object)
  15. local file = fs.open("apps.json","w")
  16. file.write(prettystring)
  17. file.close()
  18. print("Now, update the app!")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement