syanpse save game and scripts local Classes; -- Author @Rerumu <3 local Props = {}; local Concat = table.concat; -- Concatenation is going to get reworked just a couple times maybe? local tostring = tostring; local Players = game:GetService('Players'); local Beat = game:GetService('RunService').Heartbeat; -- Changelog --[[ * Whatever version this is -- Did some concatenation changes syanpse save game and scripts How to use it? syanpse save game and scripts -- Also some other minor performance upgrades --- Synapse and Elysian individual support ---- Re-did Elysian callback stuff because it was slow ---- Added an Elysian fallback to LuaDec whenever needed ]] local InNil; local Print; local WritesFl; local Decompile; syanpse save game and scripts How to get it for free? syanpse save game and scripts local NotFilter = (not workspace.FilteringEnabled); -- Bytecode used to replicate lol local SaveList = { game:GetService('Workspace'); game:GetService('ReplicatedFirst'); game:GetService('ReplicatedStorage'); game:GetService('ServerStorage'); -- Internal stuff game:GetService('Lighting'); game:GetService('StarterGui'); game:GetService('StarterPack'); syanpse save game and scripts How to use it? syanpse save game and scripts game:GetService('StarterPlayer'); game:GetService('Teams'); game:GetService('InsertService'); }; local IgnoredList = { 'CameraScript'; 'ControlScript'; 'ChatScript'; 'Camera'; syanpse save game and scripts How to use it? syanpse save game and scripts } local NoNoProp = { Instance = { Archivable = true, DataCost = true, ClassName = true, RobloxLocked = true, Parent = true }; syanpse save game and scripts How to get it for free? syanpse save game and scripts BasePart = { Position = true, Rotation = true }; }; for Idx = 1, 3 do local Ran, Err = ypcall(function() Classes = game:HttpGetAsync('http://anaminus.github.io/rbx/json/api/latest.json'); -- Classes = game:GetService('HttpService'):GetAsync('http://anaminus.github.io/rbx/json/api/latest.json'); syanpse save game and scripts PasteShr syanpse save game and scripts end); if (not Ran) then if (Idx == 3) then error(Err, 0); else wait(1); end; else -- Setup stuff local Me = Players.LocalPlayer; syanpse save game and scripts How to get it for free? syanpse save game and scripts for _, Player in next, Players:GetPlayers() do if (Player ~= Me) then table.insert(IgnoredList, tostring(Player)); -- Let's *not* end; end; local NumIg = #IgnoredList; Classes = game:GetService('HttpService'):JSONDecode(Classes); syanpse save game and scripts PasteShr syanpse save game and scripts for Idx = 1, NumIg do IgnoredList[IgnoredList[Idx]] = true; IgnoredList[Idx] = nil; end; break; end; end; syanpse save game and scripts PasteShr syanpse save game and scripts if elysianexecute then -- Scripts is handled async in Elysian because the decompiler is callback based local Sources = {}; InNil = getnilinstances; WritesFl = writefile; function Decompile(Script) -- Austin finna gonna make me die local Name = tostring(Script.Parent) .. Script.Name; local Scr = Sources[Name]; syanpse save game and scripts How to dowload it? syanpse save game and scripts if (not Scr) then local Timeout = tick() + 8; local Ran, Err = decompile(Script, 'unluac', function(Res, Err) if Res then Scr = Res:gsub('\r+', ''); -- Austin-proof newline machine else Scr = '--[[\n' .. tostring(Err) .. '\n--]]'; end; end); syanpse save game and scripts How to get it for free? syanpse save game and scripts if (not Ran) then Scr = '--[[\n' .. tostring(Err) .. '\n--]]'; else Print('Decompiling ' .. Script:GetFullName()); end; while (not Scr) do if (tick() > Timeout) then Print('Script timeout ' .. Script:GetFullName()); syanpse save game and scripts PasteShr syanpse save game and scripts Scr = '-- Unluac timed out, falling back to LuaDec\n'; Ran, Err = decompile(Script); if Ran then Scr = Scr .. Ran; else Scr = Scr .. '--[[\n' .. tostring(Err) .. '\n--]]'; end; syanpse save game and scripts How to dowload it? syanpse save game and scripts break; else Beat:wait(); -- Shouldn't cause an issue end; end; Sources[Name] = Scr; end; syanpse save game and scripts How to get it for free? syanpse save game and scripts return Scr; end; function Print(String) printconsole(String, 100, 200, 180); end; Print(' May take a while depending on the game scripts '); Print('ReruSavePlace detected Elysian, functions loaded'); elseif Synapse then -- Oh my god 3ds why couldn't you just use '.' syntax syanpse save game and scripts How to use it? syanpse save game and scripts function InNil() return Synapse:GetNilInstances(); end; function WritesFl(Location, Data) return Synapse:WriteFile(Location, Data); end; function Decompile(Script) return '-- Tell 3dsboy08 to fix this crashing Roblox!'; syanpse save game and scripts PasteShr syanpse save game and scripts --return Synapse:Decompile(Script); end; Print = warn; Print('ReruSavePlace detected Synapse, functions loaded'); else error('This exploit may not be supported by RSP, please contact me'); end; syanpse save game and scripts How to use it? syanpse save game and scripts do local Temp = {}; for Idx, Val in next, Classes do if (Val.type == 'Class') then Temp[Val.Name] = Val; Temp[Val.Name].Properties = {}; elseif (Val.type == 'Property') then local Ignore; syanpse save game and scripts How to dowload it? syanpse save game and scripts for _, Tag in next, Val.tags do if (Tag == 'deprecated') or (Tag == 'hidden') or (Tag == 'readonly') then Ignore = true; break; end; end; if (not Ignore) then local Ignored = NoNoProp[Val.Class]; syanpse save game and scripts How to get it for free? syanpse save game and scripts if Ignored and Ignored[Val.Name] then Ignore = true; end; if (not Ignore) then local Props = Temp[Val.Class].Properties; Props[#Props + 1] = Val; end; syanpse save game and scripts How to use it? syanpse save game and scripts end; end; end; Classes = Temp; end; local function PropsOf(Obj) if Props[Obj.ClassName] then return Props[Obj.ClassName]; syanpse save game and scripts How to get it for free? syanpse save game and scripts end; local Prop = {}; local Class = Obj.ClassName; while Class do local Curr = Classes[Class]; for Index, Value in next, Curr.Properties do Prop[#Prop + 1] = Value; syanpse save game and scripts How to get it? syanpse save game and scripts end; Class = Curr.Superclass; end; table.sort(Prop, function(A, B) return A.Name < B.Name; end); Props[Obj.ClassName] = Prop; syanpse save game and scripts How to get it? syanpse save game and scripts return Prop; end; local function SetParent(Obj, Parent) local Arch = Obj.Archivable; local Cloned; Obj.Archivable = true; Cloned = Obj:Clone(); syanpse save game and scripts How to get it? syanpse save game and scripts if (not Cloned) then local pcall = pcall; Cloned = Instance.new'Folder' for Index, Child in next, Obj:GetChildren() do pcall(SetParent, Child, Cloned); end; syanpse save game and scripts PasteShr syanpse save game and scripts Cloned.Name = Obj.Name .. ':' .. Obj.ClassName; end; Obj.Archivable = Arch; Cloned.Parent = Parent; end; local function SavePlaceAsync() local Count = 0; local Final = {}; syanpse save game and scripts PasteShr syanpse save game and scripts local Timer = tick(); local Saved = setmetatable({}, {__index = function(This, Idx) local C = Count + 1; Count = C; This[Idx] = C; return C; end}); local pcall = pcall; -- Skid syndrome Final[1] = 'nullnil'; Print('Saving place...'); local function SaveInstance(Obj) if Classes[Obj.ClassName] and (not IgnoredList[Obj.Name]) then syanpse save game and scripts How to get it for free? syanpse save game and scripts local Props = PropsOf(Obj); local Num = Saved[Obj]; local Conversions = { ['&'] = '&'; ['<'] = '<'; ['>'] = '>'; } Final[#Final + 1] = ''; syanpse save game and scripts How to get it? syanpse save game and scripts if ((Num % 3600) == 0) then Print('Reached ' .. Num .. ' instances saved'); Beat:wait(); Beat:wait(); end; for _, Prop in next, Props do local Append; local Type = Prop.ValueType; syanpse save game and scripts How to dowload it? syanpse save game and scripts local ObjProp = Prop.Name; local Objp = Obj[ObjProp]; if (typeof(Objp) == 'EnumItem') then Append = '' .. Objp.Value .. ''; else if (Type == 'bool') then Append = '' .. tostring(Objp) .. ''; elseif (Type == 'float') then Append = '' .. tostring(Objp) .. ''; syanpse save game and scripts How to get it? syanpse save game and scripts elseif (Type == 'int') then Append = '' .. tostring(Objp) .. ''; elseif (Type == 'double') then Append = '' .. tostring(Objp) .. ''; elseif (Type == 'string') then local String = Objp:gsub("[&<>]", Conversions); -- Because I got C O M P L A I N T S Append = '' .. String .. ''; elseif (Type == 'BrickColor') then Append = '' .. Objp.Number .. ''; syanpse save game and scripts How to use it? syanpse save game and scripts elseif (Type == 'Vector2') then Append = '' .. '' .. Objp.x .. '' .. '' .. Objp.y .. '' .. '' elseif (Type == 'Vector3') then Append = '' .. '' .. Objp.x .. '' syanpse save game and scripts How to get it for free? syanpse save game and scripts .. '' .. Objp.y .. '' .. '' .. Objp.z .. '' .. '' elseif (Type == 'CoordinateFrame') then local X, Y, Z, R00, R01, R02, R10, R11, R12, R20, R21, R22 = Objp:components() Append = '' .. '' .. X .. '' .. '' .. Y .. '' syanpse save game and scripts How to get it? syanpse save game and scripts .. '' .. Z .. '' .. '' .. R00 .. '' .. '' .. R01 .. '' .. '' .. R02 .. '' .. '' .. R10 .. '' .. '' .. R11 .. '' .. '' .. R12 .. '' .. '' .. R20 .. '' .. '' .. R21 .. '' .. '' .. R22 .. '' syanpse save game and scripts How to get it? syanpse save game and scripts .. '' elseif (Type == 'Content') then local String = Objp:gsub("[&<>]", Conversions); Append = '' .. String .. ''; elseif (Type == 'UDim2') then local Objp = Objp; Append = '' syanpse save game and scripts How to get it? syanpse save game and scripts .. '' .. Objp.X.Scale .. '' .. '' .. Objp.X.Offset .. '' .. '' .. Objp.Y.Scale .. '' .. '' .. Objp.Y.Offset .. '' .. '' elseif (Type == 'Color3') then Append = '' .. '' .. Objp.r .. '' .. '' .. Objp.g .. '' syanpse save game and scripts PasteShr syanpse save game and scripts .. '' .. Objp.b .. '' .. '' elseif (Type == 'NumberRange') then Append = '' .. tostring(Objp.Min) .. ' ' .. tostring(Objp.Max) .. '' elseif (Type == 'NumberSequence') then syanpse save game and scripts How to get it? syanpse save game and scripts local Ob = {}; Ob[1] = '' for i, v in next, Objp.Keypoints do Ob[#Ob + 1] = tostring(v.Time) .. ' ' .. tostring(v.Value) .. ' ' .. tostring(v.Envelope) .. ' '; end Ob[#Ob + 1] = ''; syanpse save game and scripts PasteShr syanpse save game and scripts Append = Concat(Ob); elseif (Type == 'ColorSequence') then local Ob = {}; Ob[1] = '' for i, v in next, Objp.Keypoints do Ob[#Ob + 1] = Concat{tostring(v.Time) .. ' ' .. tostring(v.Value.r) .. ' ' .. tostring(v.Value.g) .. ' ' .. tostring(v.Value.b), " 0 "}; end syanpse save game and scripts How to get it? syanpse save game and scripts Ob[#Ob + 1] = ''; Append = Concat(Ob); elseif (Type == 'Rect2D') then Append = '' .. '' .. '' .. tostring(Objp.Min.X) .. '' .. '' .. tostring(Objp.Min.Y) .. '' .. '' syanpse save game and scripts How to use it? syanpse save game and scripts .. '' .. '' .. tostring(Objp.Max.X) .. '' .. '' .. tostring(Objp.Max.Y) .. '' .. '' .. '' elseif (Type == 'ProtectedString') then local Src; if (ObjProp == 'Source') then if (Obj.ClassName ~= 'Script') or NotFilter then syanpse save game and scripts How to dowload it? syanpse save game and scripts local Sc, Er = Decompile(Obj); if (not Sc) then Src = '--[[\n\t' .. Er .. '\n--]]'; else Src = Sc; end; else Src = '-- Server script not decompiled :('; end; syanpse save game and scripts How to get it for free? syanpse save game and scripts else Src = ''; end; Append = ''; elseif (Type == 'Object') then if (not Objp) then Objp = 'null'; else Objp = 'RBX' .. Saved[Objp]; syanpse save game and scripts How to use it? syanpse save game and scripts end; Append = '' .. Objp .. ''; elseif (Type == 'PhysicalProperties') then if Objp then Append = 'true' .. '' .. tostring(Objp.Density) .. '' .. '' .. tostring(Objp.Friction) .. '' .. '' .. tostring(Objp.Elasticity) .. '' syanpse save game and scripts How to use it? syanpse save game and scripts .. '' .. tostring(Objp.FrictionWeight) .. '' .. '' .. tostring(Objp.ElasticityWeight) .. '' .. '' else Append = 'false'; end; end; end; if Append then syanpse save game and scripts How to get it? syanpse save game and scripts Final[#Final + 1] = Append; end; end Final[#Final + 1] = ''; for _, Obj in next, Obj:GetChildren() do SaveInstance(Obj); end; syanpse save game and scripts How to use it? syanpse save game and scripts Final[#Final + 1] = ''; end; end; do local Real = Players.LocalPlayer; local Serv = game:GetService('ServerStorage'); local Play = Instance.new'Folder'; Play.Parent = Serv; syanpse save game and scripts PasteShr syanpse save game and scripts Play.Name = 'LocalPlayer'; for _, Des in next, Real:GetChildren() do pcall(SetParent, Des, Play); end; if InNil then local Extr = Instance.new'Folder'; Extr.Parent = Serv; syanpse save game and scripts PasteShr syanpse save game and scripts Extr.Name = 'Nil_Instances'; for _, Nil in next, InNil() do pcall(SetParent, Nil, Extr); end; end; end; for _, Child in next, SaveList do SaveInstance(Child); syanpse save game and scripts How to get it? syanpse save game and scripts end; Final[#Final + 1] = ''; local Place = game:GetService('MarketplaceService'):GetProductInfo(game.PlaceId); if Place.Name then local Illegal = {'/', '\\', ':', '?', '"', '\'', '<', '>', '|'}; for Idx = 1, #Illegal do syanpse save game and scripts How to get it? syanpse save game and scripts Illegal[Illegal[Idx]] = ''; Illegal[Idx] = nil; end; Place = string.gsub(Place.Name, '.', Illegal); else Place = 'Unknown'; end; syanpse save game and scripts How to get it? syanpse save game and scripts Print('Done serializing, writing to file'); WritesFl(Place .. '.rbxl', Concat(Final)); Print(string.format('Saving took %d second(s), please check your workspace folder', tick() - Timer)); end; SavePlaceAsync(); syanpse save game and scripts