Advertisement
Alexr360

Welcome Screen

Mar 26th, 2024 (edited)
535
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.81 KB | None | 0 0
  1. shell.run("background Lockout")
  2.  
  3. -- Print a line of dashes for aesthetics
  4. local function lineBreak()
  5.     local width, height = term.getSize()
  6.     for i = 1, width do
  7.       io.write("-")
  8.     end
  9.     io.write("\n")
  10. end
  11. -- Function to clear the screen
  12. local function clearScreen()
  13.     term.clear()
  14.     term.setCursorPos(1, 1)
  15. end
  16.  
  17. clearScreen()
  18. -- Print the welcome message
  19. print("Welcome to Monopoly OS by Monopoly Co.")
  20. lineBreak()
  21. print("Current Time: " .. textutils.formatTime(os.time(), true))
  22. lineBreak()
  23. print("Select a program to run:")
  24. print("1. Bastion")
  25. print("2. GPS")
  26. print("3. Update")
  27. print("4. Other")
  28. lineBreak()
  29.  
  30. local choice = read()
  31.  
  32. if choice == "1" then
  33.   shell.run("Bastion")
  34. elseif choice == "2" then
  35.   shell.run("GPS")
  36. elseif choice == "3" then
  37.   shell.run("Update")
  38. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement