Advertisement
Grexxity

GCC1v2

Dec 13th, 2022
21
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.06 KB | None | 0 0
  1. local GithubRepo = "https://github.com/Grexxity/GifProjector/tree/main"
  2.  
  3. local sSavename = "GCC1v2.gif"
  4.  
  5. -----------------------------------------------------------
  6.  
  7. if not fs.exists("bbpack") then
  8. shell.run("pastebin","get","cUYTGbpb","bbpack")
  9. term.clear()
  10. end
  11.  
  12. if not fs.exists("GIF") then
  13. shell.run("pastebin","get","5uk9uRjC","GIF")
  14. term.clear()
  15. end
  16. os.loadAPI("GIF")
  17. os.loadAPI("bbpack")
  18.  
  19. local mon = peripheral.find("monitor")
  20. mon.setTextScale(0.5)
  21. term.redirect(mon)
  22. local x,y = term.getSize()
  23. local Stored = x.."x"..y..sSavename
  24.  
  25. if not fs.exists("GIFs/"..Stored) then
  26. bbpack.fileSys(GithubRepo, "pain/")
  27. local image = GIF.loadGIF("pain/"..sSavename)
  28. local image = GIF.resizeGIF(image, x,y)
  29. GIF.saveGIF(image,"GIFs/"..Stored)
  30. end
  31.  
  32. local image = GIF.loadGIF("GIFs/"..Stored)
  33. while true do
  34. term.setBackgroundColour(image.backgroundCol)
  35. term.clear()
  36. parallel.waitForAny(
  37. function()
  38. GIF.animateGIF(image, math.floor((x - image.width) / 2) + 1, math.floor((y - image.height) / 2) + 1)
  39. end)
  40. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement