Advertisement
AxeuerAlt

Untitled

Aug 25th, 2019
288
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.88 KB | None | 0 0
  1. -- Converted using Mokiros's Model to Script plugin
  2. -- Converted string size: 398
  3.  
  4. local Decode = function(str,t,props,classes,values,ICList,Model,CurPar,LastIns,split,RemoveAndSplit,InstanceList)
  5. local tonum,table_remove,inst,parnt,comma,table_foreach = tonumber,table.remove,Instance.new,"Parent",",",
  6. function(t,f)
  7. for a,b in pairs(t) do
  8. f(a,b)
  9. end
  10. end
  11. local Types = {
  12. Color3 = Color3.new,
  13. Vector3 = Vector3.new,
  14. Vector2 = Vector2.new,
  15. UDim = UDim.new,
  16. UDim2 = UDim2.new,
  17. CFrame = CFrame.new,
  18. Rect = Rect.new,
  19. NumberRange = NumberRange.new,
  20. NumberSequence = function(...)
  21. local a = {...}
  22. local t = {}
  23. repeat
  24. t[#t+1] = NumberSequenceKeypoint.new(table_remove(a,1),table_remove(a,1),table_remove(a,1))
  25. until #a==0
  26. return NumberSequence.new(t)
  27. end,
  28. ColorSequence = function(...)
  29. local a = {...}
  30. local t = {}
  31. repeat
  32. t[#t+1] = ColorSequenceKeypoint.new(table_remove(a,1),Color3.new(table_remove(a,1),table_remove(a,1),table_remove(a,1)))
  33. until #a==0
  34. return ColorSequence.new(t)
  35. end,
  36. number = tonumber,
  37. boolean = function(a)
  38. return a=="1"
  39. end
  40. }
  41. split = function(str,sep)
  42. if not str then return end
  43. local fields = {}
  44. local ConcatNext = false
  45. str:gsub(("([^%s]+)"):format(sep),function(c)
  46. if ConcatNext == true then
  47. fields[#fields] = fields[#fields]..sep..c
  48. ConcatNext = false
  49. else
  50. fields[#fields+1] = c
  51. end
  52. if c:sub(#c)=="\\" then
  53. c = fields[#fields]
  54. fields[#fields] = c:sub(1,#c-1)
  55. ConcatNext = true
  56. end
  57. end)
  58. return fields
  59. end
  60. RemoveAndSplit = function(t)
  61. return split(table_remove(t,1),comma)
  62. end
  63. t = split(str,";")
  64. props = RemoveAndSplit(t)
  65. classes = RemoveAndSplit(t)
  66. values = split(table_remove(t,1),'|')
  67. ICList = RemoveAndSplit(t)
  68. InstanceList = {}
  69. Model = inst"Model"
  70. CurPar = Model
  71. table_foreach(t,function(ct,c)
  72. if c=="n" or c=="p" then
  73. CurPar = c=="n" and LastIns or CurPar[parnt]
  74. else
  75. ct = split(c,"|")
  76. local class = classes[tonum(table_remove(ct,1))]
  77. if class=="UnionOperation" then
  78. LastIns = {Locked="true",Anchored="true",UsePartColor="true"}
  79. else
  80. LastIns = inst(class)
  81. if LastIns:IsA"Script" then
  82. s(LastIns)
  83. end
  84. end
  85.  
  86. local function SetProperty(LastIns,p,str,s)
  87. s = Types[typeof(LastIns[p])]
  88. LastIns[p] = s and s(unpack(split(str,comma))) or str
  89. end
  90.  
  91. local UnionData
  92. table_foreach(ct,function(s,p,a,str)
  93. a = p:find":"
  94. p,str = props[tonum(p:sub(1,a-1))],values[tonum(p:sub(a+1))]
  95. if p=="UnionData" then
  96. UnionData = split(str," ")
  97. return
  98. end
  99. if class=="UnionOperation" then
  100. LastIns[p] = str
  101. return
  102. end
  103. SetProperty(LastIns,p,str)
  104. end)
  105.  
  106. if UnionData then
  107. local LI_Data = LastIns
  108. LastIns = DecodeUnion(UnionData)
  109. table_foreach(LI_Data,function(p,str)
  110. SetProperty(LastIns,p,str)
  111. end)
  112. end
  113. table.insert(InstanceList,LastIns)
  114. LastIns[parnt] = CurPar
  115. end
  116. end)
  117. table_remove(ICList,1)
  118. table_foreach(ICList,function(a,b)
  119. b = split(b,">")
  120. InstanceList[tonum(b[1])][props[tonum(b[2])]] = InstanceList[tonum(b[3])]
  121. end)
  122.  
  123. return Model:GetChildren()
  124. end
  125.  
  126. local Objects = Decode('Name,Anchored,Transparency,Position,Size,BottomSurface,TopSurface,Texture,Speed,Acceleration,Lifetime,LockedToPart,RotSpeed,Rotation;Part,ParticleEmitter;Part|TORANDO OF DEATH|1|-45,0.5,52|4,1,2|0|MOP'
  127. ..'articles|0,2.0000000545128e+16,0,1,2.0000000545128e+16,0|rbxassetid://242201991|10,30|0,100,0|inf,inf|100,100|1,1;0;1|1:2|2:3|3:3|4:4|5:5|6:6|7:6;n;2|1:7|5:8|8:9|9:10|10:11|11:12|12:3|13:13|14:14;p;')
  128. for _,Object in pairs(Objects) do
  129. Object.Parent = script and script.Parent==workspace and script or workspace
  130. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement