Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --parallel.waitForAll(scroll, readIn)
- function scroll()
- u = 0
- boarder = "++++++++++++++++++++++++++"
- filler = "=========================="
- n = "ComputerCraft==========================Lapitos Galacticraft==========================JAC Gaming"
- local w, h = term.getSize()
- while true do
- if u == w + 1 then
- u = 0 - string.len(n)
- end
- sleep(0.10)
- term.clear()
- u = u + 1
- term.setTextColor(colors.red)
- term.setCursorPos(1, 1)
- term.write(boarder)
- term.setCursorPos(1, 3)
- term.write(boarder)
- term.setTextColor(colors.blue)
- term.setCursorPos(u-26, 2)
- term.write(filler)
- term.setCursorPos(u+string.len(n), 2)
- term.write(filler)
- --term.setTextColor(colors.blue)
- term.setCursorPos(u, 2)
- term.write(n)
- end
- end
- function getKey()
- --coroutine.yield()
- local sEvent, param = os.pullEvent("key")
- if sEvent == "key" then
- if param == 205 then
- print("key detected")
- elseif param >= 206 then
- elseif param <= 204 then
- u = u + 1
- end
- else
- term.setCursorPos(u, 2)
- term.write(n)
- end
- end
- --scroll()
- while true do
- parallel.waitForAny(getKey, scroll)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement