Advertisement
Guest User

Untitled

a guest
Mar 12th, 2014
47
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.27 KB | None | 0 0
  1. function slowPrint(text, timeBetweenLetters, ignoreSpace)
  2.     for i = 1, #text do
  3.         local c = text:sub(i,i)
  4.         if not ignoreSpace or (ignoreSpace and c ~= " ")  then
  5.             io.write(c)
  6.             os.sleep(timeBetweenLetters)
  7.         end
  8.     end
  9. end
  10.  
  11. --slowPrint("Hello World", 0.3, false)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement