Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local copyWhat = "Workspace"
- local skipObjVals = true -- Skip "Object" properties, speeds up a lot. Set false if you want to copy things like welds.
- local copyGroup = Instance.new("Model",game.ReplicatedStorage)
- function archivable(root)
- for i,v in pairs(root:GetChildren()) do
- if not game.Players:GetPlayerFromCharacter(v) then
- v.Archivable = true
- archivable(v)
- end
- end
- end
- function decompileS(root)
- for i,v in pairs(root:GetChildren()) do
- if v:IsA("LocalScript") then
- local isDisabled = v.Disabled
- v.Disabled = true
- v.Source = decompile(v)
- v.Disabled = isDisabled
- elseif v:IsA("ModuleScript") then
- v.Source = decompile(v)
- end
- decompileS(v)
- end
- end
- archivable(game[copyWhat])
- for i,v in pairs(game[copyWhat]:GetChildren()) do
- pcall(function()
- v:Clone().Parent = copyGroup
- end)
- end
- --decompileS(copyGroup)
- _G.SaveInstance(copyGroup,tostring(game.PlaceId)..copyWhat,skipObjVals)
- print("Saved!")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement