JustDoesGames

Updat

Jul 31st, 2018 (edited)
182
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.02 KB | None | 0 0
  1. -- Updat System v1.0 --
  2. -- Created by JDG --
  3. -- 7 / 31 / 2018 --
  4. -- 8:00 PM CT --
  5.  
  6. function cls()
  7. shell.run("clear")
  8. end
  9.  
  10. if fs.exists("Updat") == false or fs.exists("Launcher.exe") == false then
  11. error("Crashed: Failed to Verify File Name(s). Please Reinstall.")
  12. end
  13.  
  14. sel = 1
  15.  
  16. function MainMenu()
  17. Options()
  18. cls()
  19. if sel == 1 then
  20. print(" >", op1)
  21. print(op2)
  22. print(op3)
  23. elseif sel == 2 then
  24. print(op1)
  25. print(" >", op2)
  26. print(op3)
  27. elseif sel == 3 then
  28. print(op1)
  29. print(op2)
  30. print(" >", op3)
  31. end
  32.  
  33. end
  34.  
  35. function Options()
  36.  
  37. op1 = "Option 1"
  38. op2 = "Option 2"
  39. op3 = "Exit"
  40.  
  41. end
  42.  
  43. while true do
  44.  
  45. MainMenu()
  46.  
  47. a, i = os.pullEvent("key")
  48.  
  49. sleep(.01)
  50.  
  51. if i == 17 or i == 200 and sel ~= 1 then
  52. sel = sel - 1
  53. elseif i == 31 or i == 208 and sel ~= 3 then
  54. sel = sel + 1
  55. elseif i == 28 or i == 57 then
  56. if sel == 1 then
  57. -- selection 1
  58. elseif sel == 2 then
  59. -- selection 2
  60. elseif sel == 3 then
  61. cls()
  62. break
  63. end
  64. end
  65.  
  66. end
Add Comment
Please, Sign In to add comment