Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- term.setTextColor(colors.lime)
- rainbow = {
- colors.white,
- colors.lightGray,
- colors.gray,
- -- colors.black,
- colors.brown,
- colors.red,
- colors.orange,
- colors.yellow,
- colors.lime,
- colors.green,
- colors.cyan,
- colors.lightBlue,
- colors.blue,
- colors.purple,
- colors.magenta,
- colors.pink
- }
- --for i=1,16 do
- -- rainbow[i] = 2^(i-1)
- --end
- function spaces(c)
- for i=0,c,1 do
- write(" ")
- end
- end
- function offset(step,max)
- return (math.sin(step/10 * math.pi)+1)/2 * max
- end
- x,y = term.getSize()
- function writetext(n,step)
- step = math.floor(step)
- max = x-string.len(n)-1
- xs,ys = term.getCursorPos()
- term.setCursorPos(offset(step,max), ys)
- --color = rainbow[1 + step % table.getn(rainbow)]
- --term.setTextColor(color)
- write(n)
- end
- step = 0
- while true do
- --local n = "I still think dawt is cheating" -- :thinking:" --math.random(0, 9)
- local n = "dawt"
- --write("hi")
- color = rainbow[1 + math.floor(step/4) % table.getn(rainbow)]
- term.setTextColor(color)
- writetext("dawt", step+7)
- writetext("cheating", step/3)
- write("\n")
- os.queueEvent("someFakeEventName")
- os.pullEvent("someFakeEventName")
- step = step+1
- --write(string.len(n))
- sleep(1/30)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement