Advertisement
jaklsfjlsak

集成尝试420背景

Apr 20th, 2025 (edited)
163
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. -- Set up colors: black text on light gray background
  2. term.setTextColor(colors.black)
  3. term.setBackgroundColor(colors.lightGray)
  4. term.clear()  -- apply background to entire screen
  5.  
  6. print("Press M to Activate Horizontal Mining System")
  7. print("           ")
  8. print("Press J to Activate Laser Guided Warp System")
  9.  
  10. -- Restore default colors for pasted scripts if they rely on them
  11. local function resetColors()
  12.   term.setTextColor(colors.white)
  13.   term.setBackgroundColor(colors.black)
  14. end
  15.  
  16. if not fs.exists("jzc") then
  17.   resetColors()
  18.   shell.run("pastebin get rfXW7SiN jzc")
  19.   term.clear()
  20.   term.setTextColor(colors.black)
  21.   term.setBackgroundColor(colors.lightGray)
  22. end
  23.  
  24. if not fs.exists("ztc") then
  25.   resetColors()
  26.   shell.run("pastebin get S9SW0zHJ ztc")
  27.   term.clear()
  28.   term.setTextColor(colors.black)
  29.   term.setBackgroundColor(colors.lightGray)
  30. end
  31.  
  32. while true do
  33.   local event, key = os.pullEvent("key")
  34.   if key == keys.m then
  35.     print("Booting Horizontal Mining System...")
  36.     resetColors()
  37.     shell.run("jzc")
  38.     -- when it returns, restore our colors
  39.     term.clear()
  40.     term.setTextColor(colors.black)
  41.     term.setBackgroundColor(colors.lightGray)
  42.   elseif key == keys.j then
  43.     print("Booting Laser Guided Warp System...")
  44.     resetColors()
  45.     shell.run("ztc")
  46.     term.clear()
  47.     term.setTextColor(colors.black)
  48.     term.setBackgroundColor(colors.lightGray)
  49.   end
  50. end
  51.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement