Advertisement
SlyHades66

New Copier

Apr 22nd, 2017
297
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.14 KB | None | 0 0
  1. coroutine.resume(coroutine.create(function()
  2.     local Parents
  3.  
  4.     local Storage = Instance.new("Folder")
  5.     Storage.Name = "game"
  6.  
  7.     function New(Obj)
  8.         for _,v in pairs(Obj:GetChildren()) do
  9.             if v:IsA("Player") or v:IsA("PlayerGui") or v:IsA("Terrain") or v:IsA("PlayerScripts") then
  10.                 local Fold = Instance.new("Folder")
  11.                 Fold.Name = v.Name
  12.                 Fold.Parent = Parents
  13.                 Parents = Fold
  14.                 for _,c in pairs(v:GetChildren()) do
  15.                     c:Clone().Parent = Fold
  16.                 end
  17.             else
  18.                 v:Clone().Parent = Parents
  19.             end
  20.         end
  21.     end
  22.  
  23.     function Create(Obj)
  24.         for _,v in pairs(Obj:GetChildren()) do
  25.             if #v:GetChildren() > 0 then
  26.                 local Fold = Instance.new("Folder")
  27.                 Fold.Name = v.Name
  28.                 Parents = Fold
  29.                 Fold.Parent = Storage
  30.                 pcall(New, v)
  31.             end
  32.         end
  33.     end
  34.  
  35.     function Check(Obj)
  36.         for _,v in pairs(Obj:GetChildren()) do
  37.             if v:IsA("LocalScript") or v:IsA("ModuleScript") then
  38.                 v.Source = tostring(decompile(v))
  39.             end
  40.             pcall(Check, v)
  41.         end
  42.     end
  43.  
  44.     pcall(Create, game)
  45.  
  46.     pcall(Check, Storage)
  47.  
  48.     saveinstance(Storage, game:GetService("MarketplaceService"):GetProductInfo(tonumber(game.PlaceId)).Name)
  49. end))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement