Guest User

Untitled

a guest
Jan 20th, 2019
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. while true do
  2. if os.pullEvent() == "redstone" then -- disregard non redstone events
  3. local b = rs.getBundledInput("left") -- make local copy of bundle input so we dont have to fetch it every time
  4. for k,v in pairs(colors) do -- iterate through colors table
  5. if colors.test(b, colors[v]) then -- test whether input is on for each color
  6. rs.setBundledOutput("back", v) -- if yes then set output to that color
  7. end
  8. end
  9. end
  10. sleep(0.25) -- to prevent spamming signals and forcing program to quit
  11. end
Add Comment
Please, Sign In to add comment