Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function center(txt)
- w, h = term.getSize()
- term.setCursorPos(w / 2 - math.floor(string.len(txt) / 2), h / 2)
- print(txt)
- end
- function slowCenter(txt)
- w, h = term.getSize()
- term.setCursorPos(w / 2 - math.floor(string.len(txt) / 2), h / 2)
- textutils.slowPrint(txt)
- end
- function randomPrint(txt, num)
- w, h = term.getSize()
- for i = 1,num do
- term.setCursorPos(math.random(1, w), math.random(1, h))
- print(txt)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement