Marlingaming

Aperture Science OS System - Appstore_Menu

Sep 16th, 2021 (edited)
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.29 KB | None | 0 0
  1. --App Store V1
  2. --this program is a app store, it gets apps from a pastebin download list on a google doc
  3. --this program is for Minecraft 1.16.5, CC Tweaked
  4.  
  5.  
  6. local AllowedFeatures = {false,false,false,true}
  7.  
  8. local w, h = term.getSize()
  9.  
  10. local nOption = 0
  11.  
  12. function Clear()
  13. term.clear()
  14. term.setCursorPos(1,1)
  15. end
  16.  
  17. function CenterText(y,text)
  18. local x = math.floor((w - string.len(text)) /2)
  19. term.setCursorPos(x,y)
  20. term.clearLine()
  21. term.write(text)
  22. end
  23.  
  24.  
  25.  
  26. function StoreMenu()
  27. Clear()
  28. print("StoreMenu")
  29. CenterText(3,"1 - Browse")
  30. CenterText(4,"2 - Profile")
  31. CenterText(5,"3 - <Empty>")
  32. CenterText(6,"4 - Exit")
  33. nOption = 1
  34. while true do
  35. local event, key = os.pullEvent("key")
  36. if key == keys.one and AllowedFeatures[1] == true then
  37. nOption = 1
  38. break
  39. elseif key == keys.two AllowedFeatures[2] == true then
  40. nOption = 2
  41. break
  42. elseif key == keys.three AllowedFeatures[3] == true then
  43. nOption = 3
  44. elseif key == keys.four AllowedFeatures[4] == true then
  45. nOption = 4
  46. break
  47. end
  48. end
  49. if nOption == 1 then
  50. shell.run("ApertureDL_AppStore_Browser")
  51. elseif nOption == 2 then
  52. shell.run("ApertureDL_AppStore_StoreProfile")
  53. elseif nOption == 3 then
  54.  
  55. elseif nOption == 4 then
  56. shell.run("ApertureOS_Base")
  57. end
  58. end
  59.  
  60. StoreMenu()
Add Comment
Please, Sign In to add comment