VTC - Value To Code
This module contains one simple function where you can turn whatever you want into code,
Say you wanted to get the code to generate a model, you would simply do
local vtc = require(game.ServerScriptService.VTC)
print(vtc(workspace.Model))
And you will get an output of this:
local model = (function()
local Model = Instance.new('Model')
local Part = Instance.new('Part')
local Part2 = Instance.new('Part')
local Part3 = Instance.new('Part')
local Part4 = Instance.new('Part')
local Part5 = Instance.new('Part')
local Part6 = Instance.new('Part')
Part4.FormFactor = Enum.FormFactor.Custom
Part4.BottomSurface = Enum.SurfaceType.Smooth
Part4.Orientation = Vector3.new(0, 90, 0)
Part4.Color = Color3.fromRGB(0, 255, 0)
Part4.Parent = Model
Part4.CFrame = CFrame.new(220.361328, 61.89666, 171.585815, 0, 0, 1, 0, 1, -0, -1, 0, 0)
Part4.Locked = true
Part4.Material = Enum.Material.SmoothPlastic
Part4.Size = Vector3.new(144.09996, 44.200008, 0.2)
Part4.Friction = 0.3
Part4.Rotation = Vector3.new(0, 90, 0)
Part4.Position = Vector3.new(220.361328, 61.89666, 171.585815)
Part4.TopSurface = Enum.SurfaceType.Smooth
Part5.FormFactor = Enum.FormFactor.Custom
Part5.BottomSurface = Enum.SurfaceType.Smooth
Part5.Color = Color3.fromRGB(0, 255, 0)
Part5.Parent = Model
Part5.CFrame = CFrame.new(148.304321, 40.296654, 171.762817, 1, 0, 0, 0, 1, 0, 0, 0, 1)
Part5.Locked = true
Part5.Material = Enum.Material.SmoothPlastic
Part5.Size = Vector3.new(144.199966, 0.35, 144.360001)
Part5.Friction = 0.3
Part5.Position = Vector3.new(148.304321, 40.296654, 171.762817)
Part5.TopSurface = Enum.SurfaceType.Smooth
Model.Parent = nil
Part6.FormFactor = Enum.FormFactor.Custom
Part6.BottomSurface = Enum.SurfaceType.Smooth
Part6.Color = Color3.fromRGB(0, 255, 0)
Part6.Parent = Model
Part6.CFrame = CFrame.new(148.304321, 84.196655, 172.082825, 1, 0, 0, 0, 1, 0, 0, 0, 1)
Part6.Locked = true
Part6.Material = Enum.Material.SmoothPlastic
Part6.Size = Vector3.new(144.199966, 0.35, 144.360001)
Part6.Friction = 0.3
Part6.Position = Vector3.new(148.304321, 84.196655, 172.082825)
Part6.TopSurface = Enum.SurfaceType.Smooth
Part2.FormFactor = Enum.FormFactor.Custom
Part2.BottomSurface = Enum.SurfaceType.Smooth
Part2.Color = Color3.fromRGB(0, 255, 0)
Part2.Parent = Model
Part2.CFrame = CFrame.new(148.304321, 61.929474, 243.392822, 1, 0, 0, 0, 1, 0, 0, 0, 1)
Part2.Locked = true
Part2.Material = Enum.Material.SmoothPlastic
Part2.Size = Vector3.new(144.199966, 44.200008, 0.2)
Part2.Friction = 0.3
Part2.Position = Vector3.new(148.304321, 61.929474, 243.392822)
Part2.TopSurface = Enum.SurfaceType.Smooth
Part.FormFactor = Enum.FormFactor.Custom
Part.BottomSurface = Enum.SurfaceType.Smooth
Part.Orientation = Vector3.new(0, 90, 0)
Part.Color = Color3.fromRGB(0, 255, 0)
Part.Parent = Model
Part.CFrame = CFrame.new(76.121529, 61.916656, 171.436111, 0, 0, 1, 0, 1, -0, -1, 0, 0)
Part.Material = Enum.Material.SmoothPlastic
Part.Size = Vector3.new(144.09996, 44.200008, 0.2)
Part.Friction = 0.3
Part.Rotation = Vector3.new(0, 90, 0)
Part.Position = Vector3.new(76.121529, 61.916656, 171.436111)
Part.TopSurface = Enum.SurfaceType.Smooth
Part3.FormFactor = Enum.FormFactor.Custom
Part3.BottomSurface = Enum.SurfaceType.Smooth
Part3.Color = Color3.fromRGB(0, 255, 0)
Part3.Parent = Model
Part3.CFrame = CFrame.new(148.304321, 61.921661, 99.482811, 1, 0, 0, 0, 1, 0, 0, 0, 1)
Part3.Locked = true
Part3.Material = Enum.Material.SmoothPlastic
Part3.Size = Vector3.new(144.199966, 44.200008, 0.2)
Part3.Friction = 0.3
Part3.Position = Vector3.new(148.304321, 61.921661, 99.482811)
Part3.TopSurface = Enum.SurfaceType.Smooth
return Model
end)()
Which you can then assign to a variable.
Note: It can handle most roblox data types, not just Instances.