Advertisement
An_random_user

computercraft code

Jan 13th, 2024
1,549
1
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function split(inputstr, sep)
  2.         if sep == nil then
  3.                 sep = "%s"
  4.         end
  5.         local t={}
  6.         for str in string.gmatch(inputstr, "([^"..sep.."]+)") do
  7.                 table.insert(t, str)
  8.         end
  9.         return t
  10. end
  11. term.clear()
  12. term.setCursorPos(1,1)
  13. term.write("Requesting video from pastebin...")
  14. local rick = http.get("https://pastebin.com/raw/wZ6UgdLj")
  15. wait = sleep
  16. for i,thing in ipairs(split(rick.readAll(),"\n")) do
  17.     term.clear()
  18.     term.setCursorPos(1,1)
  19.     textutils.slowPrint(thing,20)
  20.     wait(2)
  21. end
  22. rick.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement