Yobeast99

test

Mar 12th, 2024 (edited)
37
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1.  
  2. -- Made by Xella#8655
  3.  
  4. local objLoader = require("objLoader")
  5.  
  6. term.write("> filename: ")
  7. local filename = read()
  8.  
  9. local model = objLoader.load(filename)
  10.  
  11. print("Serializing model...")
  12. if #model > 5000 then
  13. term.setTextColor(colors.orange)
  14. print("Model has " .. (#model) .. " polygons. This can take a while...")
  15. term.setTextColor(colors.white)
  16. end
  17. model = textutils.serialise(model)
  18.  
  19. print("Saving model...")
  20. local file = fs.open("models/" .. filename, "w") -- Make sure you save the model in the models folder with a new name
  21. file.write(model)
  22. file.close()
  23.  
  24. term.setTextColor(colors.lime)
  25. print("Done!")
  26. term.setTextColor(colors.white)
Add Comment
Please, Sign In to add comment