Guest User

Untitled

a guest
Jul 22nd, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.42 KB | None | 0 0
  1. function draw(endStr, middleChar, amount, mode, programname)
  2.  scrX, scrY = term.getCursorPos()
  3.  local str = ""
  4.  str = endStr..string.rep(" ", amount)..endStr
  5.  write(str)
  6.  term.setCursorPos(scrX + 1, scrY)
  7.  str = ""
  8.  for i=1,amount do
  9.   write(middleChar)
  10.   sleep(1)
  11.  end
  12.  if mode == "print" then print() end
  13.  if programname then
  14.   shell.run(programname)
  15.  end
  16. end
  17. print("Loading...")
  18. draw("|", ".", 4, "write", "done")
Add Comment
Please, Sign In to add comment