scattergun

Goldcube Installer

Jul 31st, 2024 (edited)
670
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.88 KB | None | 0 0
  1. term.clear()
  2. term.setCursorPos(0,2)
  3. term.setTextColor(colors.orange)
  4. write(" Goldcube System Setup (v1.4)")
  5. term.setTextColor(colors.yellow)
  6. write("\n\n Type 'OK' to install console files\n from GitHub.")
  7. term.setCursorPos(5,7)
  8. term.setTextColor(colors.yellow)
  9. write("> ")
  10. term.setTextColor(colors.white)
  11. local input = read()
  12. if input == nil or input == "" then input = " " end
  13. input = input:upper()
  14. if input == "OK" then
  15. local gitDirectory = "https://raw.githubusercontent.com/Missooni/Goldcube-CCTweaked-Console/main/goldcube/"
  16. local Files = {"gcstart","apis/palette", "apis/surface", "apis/cprint", "apis/settingfile", "apis/escalias", "apis/goldcubeapi", "apis/cfg/gcsystem", "apis/cfg/palettecfg", "apis/cfg/gcp1", "apis/cfg/gcp2", "docs/gcinfo.txt", "docs/gcplugins.nft", "template/game.lua", "template/gamefileDefault", "template/menu.nft", "template/stages/1", "template/stages/2", "template/stages/3", "template/images/img1.nft", "template/images/img2.nft", "template/images/img3.nft", "template/images/char.nft"}
  17. for i=1, 6 do
  18. table.insert(Files, "docs/startanim/"..i..".nft")
  19. end
  20. for i=1, 30 do
  21. table.insert(Files, "docs/gcinfo"..i..".nft")
  22. end
  23. term.setTextColor(colors.gray)
  24. for i=1, #Files do
  25. shell.run("wget "..gitDirectory..Files[i].." ".."goldcube/"..Files[i])
  26. sleep(0.25)
  27. end
  28. if not fs.exists("goldcube/plugins") then fs.makeDir("goldcube/plugins") end
  29. term.setTextColor(colors.lime)
  30. write("Done. Press any button to return to shell.")
  31. repeat
  32. event, button, x, y = os.pullEvent()
  33. until event == "key"
  34. term.clear()
  35. term.setCursorPos(1,1)
  36. shell.run("rom/programs/shell.lua")
  37. shell.exit()
  38. else
  39. term.clear()
  40. term.setCursorPos(1,1)
  41. term.setTextColor(colors.red)
  42. write("Console installation cancelled.\n")
  43. term.setTextColor(colors.white)
  44. end
Add Comment
Please, Sign In to add comment