User:Bocajls

Currently working om some lua.

Lastest prjoect:

Wire colors need to be in line.

1 = white / just write "white"

2 = orange / Just write "orange"

And so on.

Here's the code:

print (" ")w

rite (" Choose Color: ")p

rint (" ")

print (" ")

write (" white. ")

write (" orange. ")

print (" ")

write (" magenta. ")

write (" light blue. ")

print (" ")

write (" yellow. ")

write (" lime. ")p

rint (" ")w

rite (" pink. ")

write (" gray. ")

print (" ")

write (" light gray. ")w

rite (" cyan. ")

print (" ")

write (" purple. ")

write (" blue. ")

print (" ")

write (" brown. ")

write (" green. ")p

rint (" ")

write (" red. ")

write (" black. ")

term.setCursorPos(16,2)

v = read

if v == "white" then

rs.setBundledOutput("back", 1, true)

elseif v == "orange" then

rs.setBundledOutput("back", 2, true)e

lseif v == "magenta" then

rs.setBundledOutput("back", 4, true)

elseif v == "light blue" then

rs.setBundledOutput("back", 8, true)

elseif v == "yellow" then

rs.setBundledOutput("back", 16, true)

elseif v == "lime" then

rs.setBundledOutput("back", 32, true)

elseif v == "pink" then

rs.setBundledOutput("back", 64, true)e

lseif v == "gray" then

rs.setBundledOutput("back", 128, true)

elseif v == "light gray" then

rs.setBundledOutput("back", 256, true)e

lseif v == "cyan" then

rs.setBundledOutput("back", 512, true)

elseif v == "purple" then

rs.setBundledOutput("back", 1024, true)

elseif v == "blue" then

rs.setBundledOutput("back", 2048, true)

elseif v == "brown" then

rs.setBundledOutput("back", 4096, true)e

lseif v == "green" then

rs.setBundledOutput("back", 8192, true)

elseif v == "red" then

rs.setBundledOutput("back", 16384, true)

elseif v == "black" then

rs.setBundledOutput("back", 32768, true)

endsl

eep(2)

os.reboot