I fixed the problem, I was typing 'rs.BundledOutput("bottom", colors.black)' instead of 'rs.setBundledOutput("bottom", colors.black)' for all of the commands. Also I've replaced the 2nd and 20th lines with this format 'if rs.testBundledInput("bottom", colors.black)==false and rs.testBundledInput("bottom", colors.white)==false then'. I haven't tested it but I think it should work properly now.