Advertisement
ERROR_CODE

Untitled

Nov 30th, 2024 (edited)
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.46 KB | None | 0 0
  1. function createfolders(path)
  2. local pathtbl = string.split(path, "/")
  3. for i, v in pairs(pathtbl) do
  4. if i == 1 then
  5. if not isfolder(v) then
  6. makefolder(v)
  7. end
  8. else
  9. local newpath = pathtbl[1]
  10. for i2=2, i-1 do
  11. newpath = newpath.. "/" ..pathtbl[i2]
  12. end
  13. newpath = newpath.. "/" ..v
  14. if not isfolder(newpath) then
  15. makefolder(newpath)
  16. end
  17. end
  18. end
  19. end
  20. local value = 0
  21. spawn(function()
  22. while wait() do
  23. value = value + 1
  24. createfolders(""..value)
  25. end
  26. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement