SHARE
TWEET

Untitled

a guest Jan 20th, 2019 48 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top