Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local m = peripheral.wrap("bottom")
- m.setTextScale(2)
- local size = {m.getSize()}
- local text = ""
- if #text > size[1] then
- text = text .. " "
- while true do
- for i=1, #text do
- m.clear()
- m.setCursorPos(1,2)
- local nextText = ""
- if #text -i < size[1] then
- nextText = text:sub(1,i - #text)
- end
- m.write(text:sub(i,#text) .. nextText)
- sleep(0.2)
- end
- m.clear()
- m.write(text)
- sleep(3)
- end
- elseif #text == size[1] then
- m.setCursorPos(1,2)
- m.write(text)
- else
- m.setCursorPos(math.floor(size[1] /2 - #text /2 +0.5),2)
- m.write(text)
- end
Advertisement
Add Comment
Please, Sign In to add comment