Advertisement
Guest User

Untitled

a guest
Feb 7th, 2019
138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.46 KB | None | 0 0
  1. local p = 0
  2. local iteration = 0
  3.  
  4. function apply(object)
  5.     iteration = iteration + 1
  6.     if (iteration%200 == 0) then
  7.         wait()
  8.     end
  9.     p=p+1
  10.     for i,v in pairs(object:GetChildren()) do
  11.         if (i==v) then
  12.             return
  13.         end
  14.     end
  15. end
  16.  
  17. function recurse(parent)
  18.     for k, child in pairs(parent:GetChildren()) do
  19.         recurse(child)
  20.     end
  21.  
  22.     apply(parent)
  23. end
  24.  
  25. wait(3)
  26.  
  27. local t = tick()
  28.  
  29. recurse(game.ReplicatedStorage)
  30.  
  31. print(p)
  32. print(iteration/(tick()-t) .. '/s')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement