Advertisement
Jahn_M_L

startup

Feb 14th, 2021 (edited)
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.84 KB | None | 0 0
  1. SIDE = "left"
  2. local i = true
  3. while i == true do
  4.     term.clear() -- Clears the screen
  5.     term.setCursorPos(1, 1)
  6.     write("Password: ")
  7.     pw = read()
  8.  
  9.     if pw == "1" then
  10.         if redstone.testBundledInput(SIDE, colors.red) then
  11.             redstone.setBundledOutput(SIDE, colors.subtract(redstone.getBundledOutput(SIDE), colors.red))
  12.         else
  13.             redstone.setBundledOutput(SIDE, colors.combine(redstone.getBundledOutput(SIDE),colors.red))
  14.         end
  15.  
  16.     elseif pw == "2" then
  17.         if redstone.testBundledInput(SIDE, colors.blue) then
  18.             redstone.setBundledOutput(SIDE, colors.subtract(redstone.getBundledOutput(SIDE), colors.blue))
  19.         else
  20.             redstone.setBundledOutput(SIDE, colors.combine(redstone.getBundledOutput(SIDE), colors.blue))
  21.         end
  22.  
  23.     elseif pw == "stop" then
  24.         i = false
  25.     end
  26.  
  27. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement