Advertisement
FantasyGamer

XXXXXXXCODEXxxxxxxxxx

Mar 10th, 2017
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.96 KB | None | 0 0
  1. local Return = ""
  2.  
  3. function CreateInstance(Object)
  4. Return = Return.."local "..Object.Name.." = Instance.new('"..tostring(Object.ClassName).."')\n"..Object.Name..".Size = Vector3.new("..tostring(Object.Size.X)..", "..tostring(Object.Size.Y)..", "..tostring(Object.Size.Z)..")\n"..Object.Name..".Position = Vector3.new("..tostring(Object.Position.X)..", "..tostring(Object.Position.Y)..", "..tostring(Object.Position.Z)..")\n"..Object.Name..".BrickColor = BrickColor.new('"..tostring(Object.BrickColor).."')\n"..Object.Name..".TopSurface = "..tostring(Object.TopSurface).."\n"..Object.Name..".BottomSurface = "..tostring(Object.BottomSurface).."\n"..Object.Name..".BackSurface = "..tostring(Object.BackSurface).."\n"..Object.Name..".FrontSurface = "..tostring(Object.FrontSurface).."\n"..Object.Name..".LeftSurface = "..tostring(Object.LeftSurface).."\n"..Object.Name..".RightSurface = "..tostring(Object.RightSurface).."\n"..Object.Name..".CanCollide = "..tostring(Object.CanCollide).."\n"..Object.Name..".Anchored = "..tostring(Object.Anchored).."\n"..Object.Name..".Name = '"..Object.Name.."'\n"..Object.Name..".Parent = game.Workspace\n\n"
  5. end
  6.  
  7. function CreateScript(Object)
  8. Return = Return.."local "..Object.Name.." = Instance.new('"..tostring(Object.ClassName).."')\n"..Object.Name..".Name = '"..Object.Name.."'\n"..Object.Name..".Source = [["..tostring(decompile(Object)).."]]\n"..Object.Name..".Parent = game.Workspace\n\n"
  9. end
  10.  
  11. function Recursive(Object)
  12. wait()
  13. for _,Part in pairs(Object:GetChildren()) do
  14. if Part:IsA("BasePart") and Part.Name ~= "Terrain" then
  15. CreateInstance(Part)
  16. elseif Part:IsA("LocalScript") or Part:IsA("ModuleScript") then
  17. CreateScript(Part)
  18. end
  19. Recursive(Part)
  20. end
  21. end
  22.  
  23. local Cloning = Recursive(game.Workspace)
  24.  
  25. repeat wait() until not Cloning
  26.  
  27. local Cloning2 = Recursive(game.Players.LocalPlayer)
  28.  
  29. repeat wait() until not Cloning2
  30. warn("Done Cloning")
  31. copystr(Return)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement