Advertisement
Guest User

Untitled

a guest
Mar 19th, 2020
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.10 KB | None | 0 0
  1. local redstone = componentproxy(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. 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.     if redstone.getInput(sides.back) > 0 then
  33.         redstone.setOutput(sides.front, 15)
  34.         redstone.setBundledOutput(sides(right), white, 255)
  35.         redstone.setBundledOutput(sides(right), orange, 255)
  36.         redstone.setBundledOutput(sides(right), blue, 255)
  37.     else
  38.         redstone.setOutput(sides.front, 0)
  39.         redstone.setBundledOutput(sides(right), white, 0)
  40.         redstone.setBundledOutput(sides(right), orange, 0)
  41.         redstone.setBundledOutput(sides(right), blue, 0)
  42.     end
  43. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement