Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local component = require("component")
- local sides = require("sides")
- local rs = component.redstone
- local event = require("event")
- local goodColors = {[0]=1,2,3,4,5,6,9,10,11,13,14}
- local c = 0
- local running = true
- local colorSet = {[0]=2, 14, 1, 4, 13, 5, 3, 9, 11, 10}
- local nextColor = 0
- while running do
- local eventID = event.pull(.1, "key_down")
- if (eventID) then
- running = false;
- break
- end
- if (c > #colorSet) then
- c = 0
- end
- nextColor = colorSet[c]
- rs.setOutput(sides.left, nextColor)
- rs.setOutput(sides.right, nextColor)
- rs.setOutput(sides.front, nextColor)
- rs.setOutput(sides.back, nextColor)
- c = c + 1
- os.sleep(1)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement