Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- col = {
- [1] = 0, -- Inactive
- [2] = 1, -- White
- [3] = 2, -- Orange
- [4] = 4, -- Magenta
- [5] = 8, -- Light Blue
- [6] = 16, -- Yellow
- [7] = 32, -- Lime
- [8] = 64, -- Pink
- [9] = 128, -- Gray
- [10] = 256, -- Light Gray
- [11] = 512, -- Cyan
- [12] = 1024, -- Purple
- [13] = 2048, -- Blue
- [14] = 4096, -- Brown
- [15] = 8192, -- Green
- [16] = 16384, -- Red
- [17] = 32768, -- Black
- }
- on = {}
- function getOn()
- for i = 1,#col do
- if rs.getBundledOutput("right") == col[i] then
- table.insert(on, col[i])
- end
- end
- end
- getOn()
- for i = 1,#on do
- print(on[i])
- end
- input = read()
- if input then
- if input == "white" then
- if not on == col[1] then
- for i = 1,#on do
- rs.setbundledOutput("right", col[2]+on[i])
- end
- else
- rs.setBundledOutput("right", col[2])
- end
- end
- if input == "green" then
- if not on == col[1] then
- for i = 1,#on do
- rs.setbundledOutput("right", col[2]+on[i])
- end
- else
- rs.setBundledOutput("right", col[15])
- end
- end
- if input == "red" then
- if not on == col[1] then
- for i = 1,#on do
- rs.setbundledOutput("right", col[2]+on[i])
- end
- else
- rs.setBundledOutput("right", col[16])
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement