Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- while true do
- if os.pullEvent() == "redstone" then -- disregard non redstone events
- local b = rs.getBundledInput("left") -- make local copy of bundle input so we dont have to fetch it every time
- for k,v in pairs(colors) do -- iterate through colors table
- if colors.test(b, colors[v]) then -- test whether input is on for each color
- rs.setBundledOutput("back", v) -- if yes then set output to that color
- end
- end
- end
- sleep(0.25) -- to prevent spamming signals and forcing program to quit
- end
Add Comment
Please, Sign In to add comment