Advertisement
Guest User

startup

a guest
May 27th, 2016
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.63 KB | None | 0 0
  1. Side = "back"
  2. local oldPull = os.pullEvent
  3. os.pullEvent = os.pullEventRaw
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18. while true do
  19.  term.clear()
  20.  term.setCursorPos(5, 5)
  21.  term.setTextColor(colors.red)
  22.  print("       Welcome at Your Home System!       ")
  23.  term.setTextColor(colors.orange)
  24.  print("         For Help, enter 'help'           ")
  25.  print("       Please enter the Command....     ")
  26.  input = read()
  27.  if input == "help" then
  28.   term.setCursorPos(1, 1)
  29.   term.clear()
  30.   sleep(0.5)
  31.   term.setTextColor(colors.blue)
  32.   print("ReCoKo's Home System help")
  33.   print("")
  34.   print("- Mainenergy on")
  35.   print("- Mainenergy off")
  36.   print("> Toggles the Main Energy")
  37.   print("")
  38.   print("- ME on")
  39.   print("- ME off")
  40.   print("> Toggles the ME")
  41.   print("")
  42.   print("This Closes after 5 Seconds!")
  43.   sleep(5)
  44.  else if input == "Mainenergy on" then
  45.  term.setCursorPos(1, 1)
  46.  term.clear()
  47.  term.setTextColor(colors.orange)
  48.  print("Turning on the Main Energy")
  49.  sleep(2)
  50.  redstone.setBundledOutput(Side, colors.combine(redstone.getBundledOutput(Side), colors.black))
  51.  term.setTextColor(colors.green)
  52.  print("Successfully turned on the Main Energy!")
  53.  sleep(2)
  54.  else if input == "Mainenergy off" then
  55.  term.setCursorPos(1, 1)
  56.  term.clear()
  57.  term.setTextColor(colors.orange)
  58.  print("Turning off the Main Energy")
  59.  sleep(2)
  60.  redstone.setBundledOutput(Side, colors.subtract(redstone.getBundledOutput(Side), colors.black))
  61.  term.setTextColor(colors.green)
  62.  print("Succesfully turned off the Main Energy!")
  63.  sleep(2)
  64.  else if input == "Exit" then
  65.  term.clear()
  66.  term.setCursorPos(0, 0)
  67.  exit()
  68.  end
  69.   end
  70.   end
  71. end
  72. end
  73. os.pullEvent = ooldPull
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement