Advertisement
Guest User

Untitled

a guest
Aug 3rd, 2015
184
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.81 KB | None | 0 0
  1. --Compiler by Dan1999
  2. --[[Property:
  3. ObjectClass={"Prop"}
  4. ]]
  5. de=Instance.new("StringValue")
  6. de.Value="--No Compiled Model"
  7. de.Name="Kokuto's Zanpaktou"
  8. e="mod=Instance.new(\"Model\") mod.Name=\"DanCompile\" mod.Parent=workspace "
  9. NewClass=function(class)
  10. return("o=Instance.new(\""..class.."\") ")
  11. end
  12. function explode(div,str)
  13. if (div=='') then return false end
  14. local pos,arr = 0,{}
  15. for st,sp in function() return string.find(str,div,pos,true) end do
  16. table.insert(arr,string.sub(str,pos,st-1))
  17. pos = sp + 1
  18. end
  19. table.insert(arr,string.sub(str,pos))
  20. return arr
  21. end
  22. SetProp=function(prop,val)
  23. if(type(val)=="string")then
  24. e=e.."o[\""..prop.."\"]=\""..val.."\" "
  25. elseif(type(val)=="boolean")then
  26. e=e.."o[\""..prop.."\"]="..tostring(val).." "
  27. elseif(#(explode(",",tostring(val)))==3)then
  28. e=e.."o[\""..prop.."\"]=Vector3.new("..tostring(val)..") "
  29. elseif(#(explode(",",tostring(val)))==12)then
  30. e=e.."o[\""..prop.."\"]=CFrame.new("..tostring(val)..") "
  31. elseif(type(val)=="number")then
  32. e=e.."o[\""..prop.."\"]="..val.." "
  33. elseif(#(explode(".",tostring(val)))==3)then
  34. e=e.."o[\""..prop.."\"]="..tostring(val).." "
  35. else
  36. e=e.."o[\""..prop.."\"]=BrickColor.new(\""..tostring(val).."\") "
  37. end
  38. return(e)
  39. end
  40. Scan=function(o)
  41. for _,v in ipairs(o:children()) do
  42. if(v.Name~="Safe")then
  43. e=e..NewClass(v.className)
  44. e=SetProp("Name",v.Name)
  45. if(v.className=="Part")or(v.className=="Seat")or(v.className=="SpawnLocation")then
  46. e=SetProp("Reflectance",v.Reflectance)
  47. e=SetProp("Transparency",v.Transparency)
  48. e=SetProp("CFrame",v.CFrame)
  49. e=SetProp("BrickColor",v.BrickColor)
  50. e=SetProp("TopSurface",v.TopSurface)
  51. e=SetProp("BottomSurface",v.BottomSurface)
  52. e=SetProp("LeftSurface",v.LeftSurface)
  53. e=SetProp("RightSurface",v.RightSurface)
  54. e=SetProp("FrontSurface",v.FrontSurface)
  55. e=SetProp("BackSurface",v.BackSurface)
  56. e=SetProp("Material",v.Material)
  57. e=SetProp("Size",v.Size)
  58. e=SetProp("Shape",v.Shape)
  59. e=SetProp("Anchored",v.Anchored)
  60. e=SetProp("Locked",v.Locked)
  61. e=e.."o.Parent=mod "
  62. e=e.."o:makeJoints() "
  63. end
  64. if(v.className=="VehicleSeat")then
  65. e=SetProp("Reflectance",v.Reflectance)
  66. e=SetProp("Transparency",v.Transparency)
  67. e=SetProp("CFrame",v.CFrame)
  68. e=SetProp("BrickColor",v.BrickColor)
  69. e=SetProp("TopSurface",v.TopSurface)
  70. e=SetProp("BottomSurface",v.BottomSurface)
  71. e=SetProp("LeftSurface",v.LeftSurface)
  72. e=SetProp("RightSurface",v.RightSurface)
  73. e=SetProp("FrontSurface",v.FrontSurface)
  74. e=SetProp("BackSurface",v.BackSurface)
  75. e=SetProp("Material",v.Material)
  76. e=SetProp("Size",v.Size)
  77. e=SetProp("Anchored",v.Anchored)
  78. e=SetProp("Locked",v.Locked)
  79. e=SetProp("MaxSpeed",v.MaxSpeed)
  80. e=SetProp("Torque",v.Torque)
  81. e=SetProp("TurnSpeed",v.TurnSpeed)
  82. e=e.."o.Parent=mod "
  83. e=e.."o:makeJoints() "
  84. end
  85. Scan(v)
  86. end
  87. end
  88. --e=e.."mod:makeJoints()"
  89. return(e)
  90. end
  91. e=Scan(workspace)
  92. de.Value=e
  93. de.Parent=workspace
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement