Advertisement
Guest User

Untitled

a guest
Mar 20th, 2020
178
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.17 KB | None | 0 0
  1. local redstone = component.proxy(component.list("redstone")())
  2.  
  3. local white = 0
  4. local orange = 1
  5. local magenta = 2
  6. local lightBlue = 3
  7. local yellow = 4
  8. local lime = 5
  9. local pink = 6
  10. local gray = 7
  11. local silver = 8
  12. local cyan = 9
  13. local purple = 10
  14. local blue = 11
  15. local brown = 12
  16. local green = 13
  17. local red = 14
  18. local black = 15
  19.  
  20. local function sides(direction)
  21.     if direction == "bottom" then return 0
  22.     elseif direction == "top" then return 1
  23.     elseif direction == "back" then return 2
  24.     elseif direction == "front" then return 3
  25.     elseif direction == "right" then return 4
  26.     elseif direction == "left" then return 5
  27.     else return false
  28.     end
  29. end
  30.  
  31. while true do
  32.     computer.pullSignal(1)
  33.     if redstone.getInput(sides("front")) > 0 then
  34.         redstone.setOutput(sides("back"), 15)
  35.         redstone.setBundledOutput(sides("right"), white, 255)
  36.         redstone.setBundledOutput(sides("right"), orange, 255)
  37.         redstone.setBundledOutput(sides("right"), blue, 255)
  38.     else
  39.         redstone.setOutput(sides("back"), 0)
  40.         redstone.setBundledOutput(sides("right"), white, 0)
  41.         redstone.setBundledOutput(sides("right"), orange, 0)
  42.         redstone.setBundledOutput(sides("right"), blue, 0)
  43.     end
  44. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement