protosmasher script decompiler -- Revelation216's SaveInstance Protosmasher Script -- Big black clock#3068 local SETTINGS = { SAVE_AS = "FILENAME"; -- File Name to Save As (Find in your Protosmasher Folder [workspace>saved]) DECOMPILE_SCRIPTS = true; -- Use if you want to Decompile Scripts (TAKES A LONG TIME FOR A LOT OF SCRIPTS!!!!, Will Decompile ALL SCRIPTS for Enabled WHERE_TO_SAVE) OUTPUT_MODE = "OUT"; -- "LOGS" Logs for Dev Console (F9) or "OUT" Output in Protosmasher (Out is more secure) SAFE_MODE = false; -- Use if an Anti-Exploit detects this SaveInstance Script (Doesn't Toggle Bool for Archivable Instances from false to true) TERRAIN_SAVE = false; -- Uses Protosmasher's saveinstance to Save Terrain to a seperate File named "Terrain_FILENAME" WHERE_TO_SAVE = { protosmasher script decompiler How to get it? protosmasher script decompiler Workspace = true; Lighting = true; ReplicatedFirst = true; ReplicatedStorage = true; JointsService = true; Players = true; StarterGui = true; Nil = false; -- Only Saves LocalScripts, ModuleScripts, and Folders (with Children) in Nil }; protosmasher script decompiler How to use it? protosmasher script decompiler Version = "1.7.5"; Change_Log = "1.5.0\n- Public release\n1.7.5\n- Fixed bugs with Nil\n- Fixed Saving process"; } local SaveModel = Instance.new("Model") SaveModel.Name = "DataModel" local Output = function(String) if SETTINGS.OUTPUT_MODE == "OUT" then printoutput("\n[RSI]: \n"..tostring(String)) protosmasher script decompiler How to get it? protosmasher script decompiler elseif SETTINGS.OUTPUT_MODE == "LOGS" then print("\n[RSI]: \n"..String) end end local DecompileScript = function(Script) local DisabledState local SV = Instance.new("StringValue") SV.Name = Script.Name.."_"..Script.ClassName protosmasher script decompiler How to get it for free? protosmasher script decompiler if Script.ClassName == "LocalScript" then DisabledState = Script.Disabled Script.Disabled = true end if SETTINGS.DECOMPILE_SCRIPTS == true then if decompile then local Source if Script.ClassName == "LocalScript" or Script.ClassName == "ModuleScript" then protosmasher script decompiler How to get it for free? protosmasher script decompiler local Run, Err = pcall(function() Source = decompile(Script) end) if Err then Output("Decompiler Ran into Error (skipped source) :\n"..tostring(Err)) Source = "DECOMPILER ERROR" end end if tostring(Source) == "false" then SV.Value = "DECOMPILER IS PATCHED OR HAS ERRORED" else SV.Value = Source end elseif not decompile then protosmasher script decompiler How to get it? protosmasher script decompiler SV.Value = "DECOMPILER NOT FOUND" end else SV.Value = "DECOMPILER DISABLED FROM SCRIPT" end if Script.ClassName == "LocalScript" then Script.Disabled = DisabledState end protosmasher script decompiler How to dowload it? protosmasher script decompiler return SV end local CreateBool = function(instance) if SETTINGS.SAFE_MODE == true then local Bool = Instance.new("BoolValue") Bool.Name = tostring(instance).."_ANTIEXPLOIT_SETTING_ENABLED_ARCHIVABLE_FALSE" protosmasher script decompiler How to get it for free? protosmasher script decompiler return Bool else local Bool = Instance.new("BoolValue") Bool.Name = tostring(instance) return Bool end end local Clone = function(Tree) protosmasher script decompiler How to get it for free? protosmasher script decompiler local CTree if Tree.ClassName == "Player" then local Replace = Instance.new("Folder") Replace.Name = Tree.Name CTree = Replace for Index, Child in pairs(Tree:GetChildren()) do local NewFolder = Instance.new("Folder") NewFolder.Name = Child.Name protosmasher script decompiler How to get it? protosmasher script decompiler for Ind, Chil in pairs(Child:GetChildren()) do Chil = Chil:Clone() Chil.Parent = NewFolder end NewFolder.Parent = CTree end elseif Tree.ClassName == "Folder" then local Replace = Instance.new("Folder") protosmasher script decompiler How to get it for free? protosmasher script decompiler Replace.Name = Tree.Name CTree = Replace for Ind, Child in pairs(Tree:GetChildren()) do Child = Child:Clone() Child.Parent = Replace end else CTree = Tree:Clone() end protosmasher script decompiler How to get it? protosmasher script decompiler if CTree ~= nil then for Index, Des in pairs(CTree:GetDescendants()) do if Des.ClassName == "LocalScript" or Des.ClassName == "ModuleScript" then local Dec = DecompileScript(Des) local ParentofDes = Des.Parent for I, Child in pairs(Des:GetChildren()) do Child.Parent = Dec end protosmasher script decompiler How to get it? protosmasher script decompiler Des.Parent = game.RobloxReplicatedStorage --// Yes I know, but it would show in nil when destroyed sooo eh Dec.Parent = ParentofDes end end if CTree.ClassName == "LocalScript" or CTree.ClassName == "ModuleScript" then local DecompiledScript = DecompileScript(CTree) for I, Child in pairs(CTree:GetChildren()) do protosmasher script decompiler How to get it? protosmasher script decompiler Child.Parent = DecompiledScript end CTree.Parent = game.RobloxReplicatedStorage CTree = DecompiledScript end else return CreateBool("Nil") end protosmasher script decompiler How to dowload it? protosmasher script decompiler return CTree end local SaveInstance = function(instance, DoSave) local IndexFolder if DoSave == true then IndexFolder = Instance.new("Folder") IndexFolder.Name = instance.Name IndexFolder.Parent = SaveModel protosmasher script decompiler How to use it? protosmasher script decompiler else IndexFolder = Instance.new("Folder") IndexFolder.Name = instance.Name.."_NOT_ENABLED" IndexFolder.Parent = SaveModel end local Save = function(InsToSave) if InsToSave ~= game.Workspace.Terrain and InsToSave ~= game.Workspace.Camera and InsToSave ~= nil then if InsToSave.ClassName == "LocalScript" or InsToSave.ClassName == "ModuleScript" then local Dec = DecompileScript(InsToSave) protosmasher script decompiler PasteShr protosmasher script decompiler Dec.Parent = IndexFolder else local ToParent if InsToSave.Archivable == false and SETTINGS.SAFE_MODE == false then InsToSave.Archivable = true for i, Desn in pairs(InsToSave:GetDescendants()) do if Desn.Archivable == false then Desn.Archivable = true protosmasher script decompiler PasteShr protosmasher script decompiler end end ToParent = Clone(InsToSave) elseif InsToSave.Archivable == true and SETTINGS.SAFE_MODE == false then ToParent = Clone(InsToSave) elseif SETTINGS.SAFE_MODE == true and InsToSave.Archivable == true then ToParent = Clone(InsToSave) elseif SETTINGS.SAFE_MODE == true and InsToSave.Archivable == false then local Ins = CreateBool(InsToSave) protosmasher script decompiler How to use it? protosmasher script decompiler ToParent = IndexFolder end ToParent.Parent = IndexFolder end else if InsToSave == game.Workspace.Terrain and SETTINGS.TERRAIN_SAVE == true then Output("Saving Terrain as: Terrain_"..SETTINGS.SAVE_AS) if saveinstance then protosmasher script decompiler PasteShr protosmasher script decompiler saveinstance(InsToSave, "Terrain_"..SETTINGS.SAVE_AS, false) else error("saveinstance NOT FOUND!") end else local Ins = CreateBool(InsToSave) Ins.Parent = IndexFolder end end end protosmasher script decompiler How to get it? protosmasher script decompiler local Children = instance:GetChildren() if #Children >= 1 and DoSave == true then for Index, Child in pairs(Children) do Save(Child) end elseif #Children == 0 and DoSave == true then instance = instance.Name.."_NO_CHILDREN" IndexFolder = CreateBool(instance) protosmasher script decompiler How to get it for free? protosmasher script decompiler end Output("Instance: "..tostring(instance.Name).."\nSaved: "..tostring(DoSave).."\nChildren: "..tostring(#Children)) end local Start = function() Output("Begining Compilation of DataModel...") SaveInstance(game:GetService("Workspace"), SETTINGS.WHERE_TO_SAVE.Workspace) protosmasher script decompiler PasteShr protosmasher script decompiler SaveInstance(game:GetService("Lighting"), SETTINGS.WHERE_TO_SAVE.Lighting) SaveInstance(game:GetService("ReplicatedFirst"), SETTINGS.WHERE_TO_SAVE.ReplicatedFirst) SaveInstance(game:GetService("ReplicatedStorage"), SETTINGS.WHERE_TO_SAVE.ReplicatedStorage) SaveInstance(game:GetService("JointsService"), SETTINGS.WHERE_TO_SAVE.JointsService) SaveInstance(game:GetService("Players"), SETTINGS.WHERE_TO_SAVE.Players) protosmasher script decompiler PasteShr protosmasher script decompiler SaveInstance(game:GetService("StarterGui"), SETTINGS.WHERE_TO_SAVE.StarterGui) if SETTINGS.WHERE_TO_SAVE.Nil == true then if get_nil_instances then local Nil = Instance.new("Folder") Nil.Name = "Nil" Nil.Parent = SaveModel for Index, Nilled in pairs(get_nil_instances()) do if Nilled.ClassName == "LocalScript" or Nilled.ClassName == "ModuleScript" then protosmasher script decompiler How to use it? protosmasher script decompiler local Script = DecompileScript(Nilled) Script.Parent = Nil elseif Nilled.ClassName == "Folder" then print("Fold: "..tostring(Nilled)) local Cl = Clone(Nilled) Cl.Parent = Nil end end else Output("get_nil_instances NOT FOUND") protosmasher script decompiler How to dowload it? protosmasher script decompiler local Nil = Instance.new("Folder") Nil.Name = "Nil_NOT_FOUND" Nil.Parent = SaveModel end else local Nil = Instance.new("Folder") Nil.Name = "Nil_NOT_ENABLED" Nil.Parent = SaveModel end protosmasher script decompiler PasteShr protosmasher script decompiler Output("Instance: Nil\nSaved: "..tostring(SETTINGS.WHERE_TO_SAVE.Nil)) Output("Compiled DataModel!\nSaving DataModel as: "..SETTINGS.SAVE_AS) if saveinstance then saveinstance(SaveModel, SETTINGS.SAVE_AS, false) else Output("saveinstance NOT FOUND!") end protosmasher script decompiler How to dowload it? protosmasher script decompiler end Output("Big Black Clocks Protosmasher SaveInstance Script\nVersion: "..SETTINGS.Version.."\n"..SETTINGS.Change_Log) local run, err = pcall(Start) if err then Output("An Error occured!\nRevelation216#6140 for bugs\n"..err) else Output("Successfully Saved DataModel") protosmasher script decompiler How to get it? protosmasher script decompiler end protosmasher script decompiler