Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local cols = "087f78"
- local length = 9
- local scr_x, scr_y = term.getSize()
- local render = function(col1,col2,prog)
- term.setCursorPos(1,1)
- local screen = (col1:rep(prog)..col2:rep(length-prog)):rep(scr_x*scr_y):sub(1,(scr_x*scr_y))
- local line
- for a = 1, scr_y do
- line = screen:sub((a-1)*scr_x+1,a*scr_x)
- term.setCursorPos(1,a)
- term.blit(("L"):rep(#line),line,line)
- end
- end
- local pos1 = 2
- local pos2 = pos1 - 1
- while true do
- for a = 1, length do
- render(cols:sub(pos1,pos1),cols:sub(pos2,pos2),a)
- sleep(0.05)
- end
- pos1 = (pos1 + 1)
- pos2 = (pos2 + 1)
- if pos1 > #cols then pos1 = 1 end
- if pos2 > #cols then pos2 = 1 end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement