Advertisement
lafur

Untitled

May 23rd, 2020
571
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.22 KB | None | 0 0
  1. -- Converted using Mokiros's Model to Script plugin
  2. -- Converted string size: 1486
  3. local genv={}
  4. 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. BrickColor = BrickColor.new,
  21. PhysicalProperties = PhysicalProperties.new,
  22. NumberSequence = function(...)
  23. local a = {...}
  24. local t = {}
  25. repeat
  26. t[#t+1] = NumberSequenceKeypoint.new(table_remove(a,1),table_remove(a,1),table_remove(a,1))
  27. until #a==0
  28. return NumberSequence.new(t)
  29. end,
  30. ColorSequence = function(...)
  31. local a = {...}
  32. local t = {}
  33. repeat
  34. t[#t+1] = ColorSequenceKeypoint.new(table_remove(a,1),Color3.new(table_remove(a,1),table_remove(a,1),table_remove(a,1)))
  35. until #a==0
  36. return ColorSequence.new(t)
  37. end,
  38. number = tonumber,
  39. boolean = function(a)
  40. return a=="1"
  41. end
  42. }
  43. split = function(str,sep)
  44. if not str then return end
  45. local fields = {}
  46. local ConcatNext = false
  47. str:gsub(("([^%s]+)"):format(sep),function(c)
  48. if ConcatNext == true then
  49. fields[#fields] = fields[#fields]..sep..c
  50. ConcatNext = false
  51. else
  52. fields[#fields+1] = c
  53. end
  54. if c:sub(#c)=="\\" then
  55. c = fields[#fields]
  56. fields[#fields] = c:sub(1,#c-1)
  57. ConcatNext = true
  58. end
  59. end)
  60. return fields
  61. end
  62. RemoveAndSplit = function(t)
  63. return split(table_remove(t,1),comma)
  64. end
  65. t = split(str,";")
  66. props = RemoveAndSplit(t)
  67. classes = RemoveAndSplit(t)
  68. values = split(table_remove(t,1),'|')
  69. ICList = RemoveAndSplit(t)
  70. InstanceList = {}
  71. Model = inst"Model"
  72. CurPar = Model
  73. table_foreach(t,function(ct,c)
  74. if c=="n" or c=="p" then
  75. CurPar = c=="n" and LastIns or CurPar[parnt]
  76. else
  77. ct = split(c,"|")
  78. local class = classes[tonum(table_remove(ct,1))]
  79. if class=="UnionOperation" then
  80. LastIns = {UsePartColor="1"}
  81. else
  82. LastIns = inst(class)
  83. if LastIns:IsA"Script" then
  84. s(LastIns)
  85. elseif LastIns:IsA("ModuleScript") then
  86. ms(LastIns)
  87. end
  88. end
  89.  
  90. local function SetProperty(LastIns,p,str,s)
  91. s = Types[typeof(LastIns[p])]
  92. if p=="CustomPhysicalProperties" then
  93. s = PhysicalProperties.new
  94. end
  95. if s then
  96. LastIns[p] = s(unpack(split(str,comma)))
  97. else
  98. LastIns[p] = str
  99. end
  100. end
  101.  
  102. local UnionData
  103. table_foreach(ct,function(s,p,a,str)
  104. a = p:find":"
  105. p,str = props[tonum(p:sub(1,a-1))],values[tonum(p:sub(a+1))]
  106. if p=="UnionData" then
  107. UnionData = split(str," ")
  108. return
  109. end
  110. if class=="UnionOperation" then
  111. LastIns[p] = str
  112. return
  113. end
  114. SetProperty(LastIns,p,str)
  115. end)
  116.  
  117. if UnionData then
  118. local LI_Data = LastIns
  119. LastIns = DecodeUnion(UnionData)
  120. table_foreach(LI_Data,function(p,str)
  121. SetProperty(LastIns,p,str)
  122. end)
  123. end
  124. table.insert(InstanceList,LastIns)
  125. LastIns[parnt] = CurPar
  126. end
  127. end)
  128. table_remove(ICList,1)
  129. table_foreach(ICList,function(a,b)
  130. b = split(b,">")
  131. InstanceList[tonum(b[1])][props[tonum(b[2])]] = InstanceList[tonum(b[3])]
  132. end)
  133.  
  134. return Model:GetChildren()
  135. end
  136.  
  137. local Objects = Decode('Name,PrimaryPart,Position,Size,C0,C1,Part1,Part0,Transparency,CanCollide;Part,Model,MeshPart,Weld,Motor6D,Humanoid;Part|Siren Head_Head|-25.2013,49.3607,191.8819|7.184,10.5947,7.1423|Siren Head_Left A'
  138. ..'rm|-22.0006,43.1199,210.7315|1.8849,2.39,27.2099|Siren Head_Left Leg|-21.7706,16.3849,195.2315|3.815,32.75,2.443|-16.4001,0.6,32,-1,0,0,0,0,1,0,1,-0|62.9309,-16.359,12.348,-0.0001,1,0,0,0,1,1,0,0|-16.'
  139. ..'0001,0.5,4,-1,0,0,0,0,1,0,1,-0|-1.0691,-16.359,11.948,0,1,0,0,0,1,1,0,0|Siren Head_Right Arm|-22.0007,42.7349,177.1915|1.8847,3.8,27.2099|Siren Head_Right Leg|-21.7706,16.3849,192.1215|3.8153,32.7499,'
  140. ..'2.2432|-1.0691,-16.359,15.058,0,1,0,0,0,1,1,0,0|Siren Head_Torso|-22.1209,37.8096,193.9967|4.7387,13.6547,7.2275|0.3502,-5.9386,1.2347,1,0,0,0,1,0,0,0,1|0,15.4861,0,1,0,0,0,1,0,0,0,1|-0.9289,6.5405,-1'
  141. ..'.0787,1,0,0,0,1,0,0,0,1|2.1515,-5.0106,1.0361,1,0,0,0,1,0,0,0,1|0.1202,4.9252,-3.4071,1,0,0,0,1,0,0,0,1|0,0,13.3982,1,0,0,0,1,0,0,0,1|0.3502,-5.9386,-1.8753,1,0,0,0,1,0,0,0,1|0.1202,5.3102,3.3717,1,0,'
  142. ..'0,0,1,0,0,0,1|0,0,-13.363,1,0,0,0,1,0,0,0,1|HumanoidRootPart|1|0|AnimSaves;0,2>2>17,6>7>5,7>7>5,10>7>9,12>8>11,12>7>5,13>8>11,13>7>3,14>8>11,14>7>8,15>8>11,15>7>9,16>8>11,16>7>4,18>8>17,18>7>11;2;n;2;'
  143. ..'n;3|1:2|3:3|4:4;3|1:5|3:6|4:7;3|1:8|3:9|4:10;n;4|5:11|6:12;4|5:13|6:14;p;3|1:15|3:16|4:17;3|1:18|3:19|4:20;n;4|5:13|6:21;p;3|1:22|3:23|4:24;n;5|1:8|5:25|6:26;5|1:2|5:27|6:28;5|1:15|5:29|6:30;5|1:18|5:'
  144. ..'31|6:26;5|1:5|5:32|6:33;p;3|1:34|9:35|3:23|4:24|10:36;n;5|1:22;p;6;n;p;2|1:37;n;p;p;p;')
  145. for _,Object in pairs(Objects) do
  146. Object.Parent = script and script.Parent==workspace and script or workspace
  147. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement