Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Compiler by Dan1999
- --[[Property:
- ObjectClass={"Prop"}
- ]]
- de=Instance.new("StringValue")
- de.Value="--No Compiled Model"
- de.Name="Kokuto's Zanpaktou"
- e="mod=Instance.new(\"Model\") mod.Name=\"DanCompile\" mod.Parent=workspace "
- NewClass=function(class)
- return("o=Instance.new(\""..class.."\") ")
- end
- function explode(div,str)
- if (div=='') then return false end
- local pos,arr = 0,{}
- for st,sp in function() return string.find(str,div,pos,true) end do
- table.insert(arr,string.sub(str,pos,st-1))
- pos = sp + 1
- end
- table.insert(arr,string.sub(str,pos))
- return arr
- end
- SetProp=function(prop,val)
- if(type(val)=="string")then
- e=e.."o[\""..prop.."\"]=\""..val.."\" "
- elseif(type(val)=="boolean")then
- e=e.."o[\""..prop.."\"]="..tostring(val).." "
- elseif(#(explode(",",tostring(val)))==3)then
- e=e.."o[\""..prop.."\"]=Vector3.new("..tostring(val)..") "
- elseif(#(explode(",",tostring(val)))==12)then
- e=e.."o[\""..prop.."\"]=CFrame.new("..tostring(val)..") "
- elseif(type(val)=="number")then
- e=e.."o[\""..prop.."\"]="..val.." "
- elseif(#(explode(".",tostring(val)))==3)then
- e=e.."o[\""..prop.."\"]="..tostring(val).." "
- else
- e=e.."o[\""..prop.."\"]=BrickColor.new(\""..tostring(val).."\") "
- end
- return(e)
- end
- Scan=function(o)
- for _,v in ipairs(o:children()) do
- if(v.Name~="Safe")then
- e=e..NewClass(v.className)
- e=SetProp("Name",v.Name)
- if(v.className=="Part")or(v.className=="Seat")or(v.className=="SpawnLocation")then
- e=SetProp("Reflectance",v.Reflectance)
- e=SetProp("Transparency",v.Transparency)
- e=SetProp("CFrame",v.CFrame)
- e=SetProp("BrickColor",v.BrickColor)
- e=SetProp("TopSurface",v.TopSurface)
- e=SetProp("BottomSurface",v.BottomSurface)
- e=SetProp("LeftSurface",v.LeftSurface)
- e=SetProp("RightSurface",v.RightSurface)
- e=SetProp("FrontSurface",v.FrontSurface)
- e=SetProp("BackSurface",v.BackSurface)
- e=SetProp("Material",v.Material)
- e=SetProp("Size",v.Size)
- e=SetProp("Shape",v.Shape)
- e=SetProp("Anchored",v.Anchored)
- e=SetProp("Locked",v.Locked)
- e=e.."o.Parent=mod "
- e=e.."o:makeJoints() "
- end
- if(v.className=="VehicleSeat")then
- e=SetProp("Reflectance",v.Reflectance)
- e=SetProp("Transparency",v.Transparency)
- e=SetProp("CFrame",v.CFrame)
- e=SetProp("BrickColor",v.BrickColor)
- e=SetProp("TopSurface",v.TopSurface)
- e=SetProp("BottomSurface",v.BottomSurface)
- e=SetProp("LeftSurface",v.LeftSurface)
- e=SetProp("RightSurface",v.RightSurface)
- e=SetProp("FrontSurface",v.FrontSurface)
- e=SetProp("BackSurface",v.BackSurface)
- e=SetProp("Material",v.Material)
- e=SetProp("Size",v.Size)
- e=SetProp("Anchored",v.Anchored)
- e=SetProp("Locked",v.Locked)
- e=SetProp("MaxSpeed",v.MaxSpeed)
- e=SetProp("Torque",v.Torque)
- e=SetProp("TurnSpeed",v.TurnSpeed)
- e=e.."o.Parent=mod "
- e=e.."o:makeJoints() "
- end
- Scan(v)
- end
- end
- --e=e.."mod:makeJoints()"
- return(e)
- end
- e=Scan(workspace)
- de.Value=e
- de.Parent=workspace
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement