i made my own but its terrible
it only spports a few parts, it skips parts, and other stuff
Heres mine:
Encoder:
local function EncodePart(Part)
local Table = {}
if Part:IsA("BasePart") then
local Table = ReturnTableBasePart
Table.CastShadow = Part.CastShadow
Table.Color = Part.Color
Table.Material = Part.Material
Table.Reflectance = Part.Reflectance
Table.Transparency = Part.Transparency
Table.Size = Part.Size
Table.CFrame = Part.CFrame
if Part:IsA("Part") then
Table.Shape = Part.Shape
else
Table.Shape = "None"
end
Table.Type = "BasePart"
Table.Name = Part.Name
--table.insert(Table, typeof(Part))
return Table
elseif Part:IsA("UnionOperation") then
local Table = ReturnTableUnion
Table.CastShadow = Part.CastShadow
Table.Color = Part.Color
Table.Material = Part.Material
Table.Reflectance = Part.Reflectance
Table.Transparency = Part.Transparency
Table.SmoothingAngle = Part.SmoothingAngle
Table.UsePartColor = Part.UsePartColor
Table.Size = Part.Size
Table.CFrame = Part.CFrame
Table.Type = "UnionOperation"
Table.Name = Part.Name
--table.insert(Table, typeof(Part))
return Table
elseif Part:IsA("MeshPart") then
local Table = ReturnTableMesh
Table.CastShadow = Part.CastShadow
Table.Color = Part.Color
Table.DoubleSided = Part.DoubleSided
Table.Material = Part.Material
Table.MeshId = Part.MeshId
Table.Reflectance = Part.Reflectance
Table.TextureID = Part.TextureID
Table.Transparency = Part.Transparency
Table.Size = Part.Size
Table.CFrame = Part.CFrame
Table.Type = "MeshPart"
Table.Name = Part.Name
--table.insert(Table, typeof(Part))
return Table
elseif Part:IsA("Decal") then
local Table = RetunTableDecal
Table.Color3 = Part.Color3
Table.Texture = Part.Texture
Table.Transparency = Part.Transparency
Table.ZIndex = Part.ZIndex
Table.Face = Part.Face
Table.Type = "Decal"
Table.Name = Part.Name
--table.insert(Table, typeof(Part))
return Table
elseif Part:IsA("Texture") then
local Table = ReturnTableTexture
Table.Color3 = Part.Color3
Table.OffsetStudsU = Part.OffsetStudsU
Table.OffsetStudsV = Part.OffsetStudsV
Table.StudsPerTileU = Part.StudsPerTileU
Table.StudsPerTileV = Part.StudsPerTileV
Table.Texture = Part.Texture
Table.Transparency = Part.Transparency
Table.ZIndex = Part.ZIndex
Table.Face = Part.Face
Table.Type = "Texture"
Table.Name = Part.Name
--table.insert(Table, typeof(Part))
return Table
end
end
Decoder:
local function DecodePart(PartTable, Type)
--print(Type)
Type = PartTable["Type"]
--print(PartTable[4])
if Type == "BasePart" then
local iInstance = Instance.new("Part")
iInstance.CastShadow = PartTable["CastShadow"]
iInstance.Color = PartTable["Color"]
iInstance.Material = PartTable["Material"]
iInstance.Reflectance = PartTable["Reflectance"]
iInstance.Transparency = PartTable["Transparency"]
iInstance.Size = PartTable["Size"]
iInstance.CFrame = PartTable["CFrame"]
if PartTable["Shape"] ~= "None" then
iInstance.Shape = PartTable["Shape"]
end
iInstance.Name = PartTable["Name"]
iInstance.Anchored = true
return iInstance
elseif Type == "UnionOperation" then
local iInstance = Instance.new("UnionOperation")
iInstance.CastShadow = PartTable["CastShadow"]
iInstance.Color = PartTable["Color"]
iInstance.Material = PartTable["Material"]
iInstance.Reflectance = PartTable["Reflectance"]
iInstance.Transparency = PartTable["Transparency"]
iInstance.SmoothingAngle = PartTable["SmoothingAngle"]
iInstance.UsePartColor = PartTable["UsePartColor"]
iInstance.Size = PartTable["Size"]
iInstance.CFrame = PartTable["CFrame"]
iInstance.Name = PartTable["Name"]
iInstance.Anchored = true
return iInstance
elseif Type == "MeshPart" then
local iInstance = Instance.new("MeshPart")
iInstance.CastShadow = PartTable["CastShadow"]
iInstance.Color = PartTable["Color"]
--iInstance.DoubleSided = PartTable["DoubleSided"]
iInstance.Material = PartTable["Material"]
--iInstance.MeshId = PartTable["MeshId"]
iInstance.Reflectance = PartTable["Reflectance"]
iInstance.TextureID = PartTable["TextureID"]
iInstance.Transparency = PartTable["Transparency"]
iInstance.Size = PartTable["Size"]
iInstance.CFrame = PartTable["CFrame"]
iInstance.Name = PartTable["Name"]
iInstance.Anchored = true
return iInstance
elseif Type == "Decal" then
local iInstance = Instance.new("Decal")
iInstance.Color3 = PartTable["Color3"]
iInstance.Texture = PartTable["Texture"]
iInstance.Transparency = PartTable["Transparency"]
iInstance.ZIndex = PartTable["ZIndex"]
iInstance.Face = PartTable["Face"]
iInstance.Name = PartTable["Name"]
return iInstance
elseif Type == "Texture" then
local iInstance = Instance.new("Texture")
iInstance.Color3 = PartTable["Color3"]
iInstance.OffsetStudsU = PartTable["OffsetStudsU"]
iInstance.OffsetStudsV = PartTable["OffsetStudsV"]
iInstance.StudsPerTileU = PartTable["StudsPerTileU"]
iInstance.StudsPerTileV = PartTable["StudsPerTileV"]
iInstance.Texture = PartTable["Texture"]
iInstance.Transparency = PartTable["Transparency"]
iInstance.ZIndex = PartTable["ZIndex"]
iInstance.Face = PartTable["Face"]
iInstance.Name = PartTable["Name"]
return iInstance
else
return "What ?"
end
end
Im not asking for anyone to make me code, im asking if anyone has/knows about a part encoder/decoder
Thank you