Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local n = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}
- function change(num)
- c = colors.black
- if num == 1 then
- c = colors.white
- elseif num == 2 then
- c = colors.orange
- elseif num == 3 then
- c = colors.yellow
- elseif num == 4 then
- c = colors.lime
- elseif num == 5 then
- c = colors.pink
- elseif num == 6 then
- c = colors.cyan
- elseif num == 7 then
- c = colors.purple
- elseif num == 8 then
- c = colors.blue
- elseif num == 9 then
- c = colors.red
- elseif num == 10 then
- c = colors.lightGray
- end
- term.setBackgroundColor(c)
- term.clear()
- end
- while true do
- change(math.random(1, #n))
- sleep(0.5)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement