Advertisement
lafur

Untitled

May 23rd, 2020
396
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.70 KB | None | 0 0
  1. -- Converted using Mokiros's Model to Script plugin
  2. -- Converted string size: 1654
  3. local genv={}
  4. local Scripts = {
  5. function() function kill(hit)
  6. print(hit)
  7. if hit.Parent.ClassName == "Model" then
  8. if hit.Parent:FindFirstChild("HumanoidRootPart") and hit.Parent:FindFirstChild("Head") then
  9. hit.Parent:BreakJoints()
  10. end
  11. end
  12. end
  13.  
  14. script.Parent.Touched:connect(kill) end;
  15. function() function kill(hit)
  16. if hit.Parent and hit.Parent:FindFirstChild("Humanoid") then
  17. if hit.Parent:FindFirstChild("Torso") and hit.Parent:FindFirstChild("Head") then
  18. hit.Parent:BreakJoints()
  19. end
  20. end
  21. end
  22.  
  23. script.Parent.Touched:connect(kill) end;
  24. function() function kill(hit)
  25. if hit.Parent and hit.Parent:FindFirstChild("Humanoid") then
  26. if hit.Parent:FindFirstChild("Torso") and hit.Parent:FindFirstChild("Head") then
  27. hit.Parent:BreakJoints()
  28. end
  29. end
  30. end
  31.  
  32. script.Parent.Touched:connect(kill) end;
  33. function() bin = script.Parent
  34. reapertorso = bin:WaitForChild("Torso")
  35.  
  36. function findNearestTorso(pos)
  37. local list = game.Workspace:GetChildren()
  38. local torso = nil
  39. local dist = 100
  40. local temp = nil
  41. local human = nil
  42. local temp2 = nil
  43. for x = 1, #list do
  44. temp2 = list[x]
  45. if (temp2.className == "Model") and (temp2 ~= script.Parent) and (temp2:FindFirstChild("Humanoid")) then
  46. wait(0.5)
  47. temp = temp2:findFirstChild("Torso")
  48. if temp == nil then
  49. temp = temp2:findFirstChild("UpperTorso")
  50. end
  51. human = temp2:findFirstChild("Humanoid")
  52. if (temp ~= nil) and (human ~= nil) and (human ~= script.Parent.Humanoid) then
  53. if (temp.Position - pos).magnitude < dist then
  54. torso = temp
  55. dist = (temp.Position - pos).magnitude
  56. end
  57. end
  58. end
  59. end
  60. return torso
  61. end
  62.  
  63. function patrol()
  64. local current = reapertorso.Position
  65. local patrolTo = current + Vector3.new(math.random(-100,100), math.random(-100,100), math.random(-100,100))
  66. bin.Humanoid:MoveTo(patrolTo)
  67. wait(5)
  68. end
  69.  
  70. while true do
  71. local torso = findNearestTorso(reapertorso.Position)
  72. if torso~= nil then
  73. bin.Humanoid:MoveTo(torso.Position, torso)
  74. wait(1)
  75. else
  76. patrol()
  77. end
  78. end
  79. end;}local ActualScripts = {}
  80. function s(var)
  81. local func = table.remove(Scripts,1)
  82. setfenv(func,setmetatable({script=var,require=fake_require or require,global=genv},{
  83. __index = getfenv(func),
  84. }))
  85. table.insert(ActualScripts,coroutine.wrap(func))
  86. end
  87. Decode = function(str,t,props,classes,values,ICList,Model,CurPar,LastIns,split,RemoveAndSplit,InstanceList)
  88. local tonum,table_remove,inst,parnt,comma,table_foreach = tonumber,table.remove,Instance.new,"Parent",",",
  89. function(t,f)
  90. for a,b in pairs(t) do
  91. f(a,b)
  92. end
  93. end
  94. local Types = {
  95. Color3 = Color3.new,
  96. Vector3 = Vector3.new,
  97. Vector2 = Vector2.new,
  98. UDim = UDim.new,
  99. UDim2 = UDim2.new,
  100. CFrame = CFrame.new,
  101. Rect = Rect.new,
  102. NumberRange = NumberRange.new,
  103. BrickColor = BrickColor.new,
  104. PhysicalProperties = PhysicalProperties.new,
  105. NumberSequence = function(...)
  106. local a = {...}
  107. local t = {}
  108. repeat
  109. t[#t+1] = NumberSequenceKeypoint.new(table_remove(a,1),table_remove(a,1),table_remove(a,1))
  110. until #a==0
  111. return NumberSequence.new(t)
  112. end,
  113. ColorSequence = function(...)
  114. local a = {...}
  115. local t = {}
  116. repeat
  117. t[#t+1] = ColorSequenceKeypoint.new(table_remove(a,1),Color3.new(table_remove(a,1),table_remove(a,1),table_remove(a,1)))
  118. until #a==0
  119. return ColorSequence.new(t)
  120. end,
  121. number = tonumber,
  122. boolean = function(a)
  123. return a=="1"
  124. end
  125. }
  126. split = function(str,sep)
  127. if not str then return end
  128. local fields = {}
  129. local ConcatNext = false
  130. str:gsub(("([^%s]+)"):format(sep),function(c)
  131. if ConcatNext == true then
  132. fields[#fields] = fields[#fields]..sep..c
  133. ConcatNext = false
  134. else
  135. fields[#fields+1] = c
  136. end
  137. if c:sub(#c)=="\\" then
  138. c = fields[#fields]
  139. fields[#fields] = c:sub(1,#c-1)
  140. ConcatNext = true
  141. end
  142. end)
  143. return fields
  144. end
  145. RemoveAndSplit = function(t)
  146. return split(table_remove(t,1),comma)
  147. end
  148. t = split(str,";")
  149. props = RemoveAndSplit(t)
  150. classes = RemoveAndSplit(t)
  151. values = split(table_remove(t,1),'|')
  152. ICList = RemoveAndSplit(t)
  153. InstanceList = {}
  154. Model = inst"Model"
  155. CurPar = Model
  156. table_foreach(t,function(ct,c)
  157. if c=="n" or c=="p" then
  158. CurPar = c=="n" and LastIns or CurPar[parnt]
  159. else
  160. ct = split(c,"|")
  161. local class = classes[tonum(table_remove(ct,1))]
  162. if class=="UnionOperation" then
  163. LastIns = {UsePartColor="1"}
  164. else
  165. LastIns = inst(class)
  166. if LastIns:IsA"Script" then
  167. s(LastIns)
  168. elseif LastIns:IsA("ModuleScript") then
  169. ms(LastIns)
  170. end
  171. end
  172.  
  173. local function SetProperty(LastIns,p,str,s)
  174. s = Types[typeof(LastIns[p])]
  175. if p=="CustomPhysicalProperties" then
  176. s = PhysicalProperties.new
  177. end
  178. if s then
  179. LastIns[p] = s(unpack(split(str,comma)))
  180. else
  181. LastIns[p] = str
  182. end
  183. end
  184.  
  185. local UnionData
  186. table_foreach(ct,function(s,p,a,str)
  187. a = p:find":"
  188. p,str = props[tonum(p:sub(1,a-1))],values[tonum(p:sub(a+1))]
  189. if p=="UnionData" then
  190. UnionData = split(str," ")
  191. return
  192. end
  193. if class=="UnionOperation" then
  194. LastIns[p] = str
  195. return
  196. end
  197. SetProperty(LastIns,p,str)
  198. end)
  199.  
  200. if UnionData then
  201. local LI_Data = LastIns
  202. LastIns = DecodeUnion(UnionData)
  203. table_foreach(LI_Data,function(p,str)
  204. SetProperty(LastIns,p,str)
  205. end)
  206. end
  207. table.insert(InstanceList,LastIns)
  208. LastIns[parnt] = CurPar
  209. end
  210. end)
  211. table_remove(ICList,1)
  212. table_foreach(ICList,function(a,b)
  213. b = split(b,">")
  214. InstanceList[tonum(b[1])][props[tonum(b[2])]] = InstanceList[tonum(b[3])]
  215. end)
  216.  
  217. return Model:GetChildren()
  218. end
  219.  
  220. local Objects = Decode('Name,PrimaryPart,Transparency,Position,Size,BottomSurface,TopSurface,MaxVelocity,C0,C1,Part0,Part1,CanCollide,Scale,VertexColor,MeshId,TextureId,MeshType,WalkSpeed;Part,Model,Motor6D,Script,SpecialMes'
  221. ..'h,Humanoid;Part|Reaper|HumanoidRootPart|1|0.2815,3.9111,27.8499|2,2,1|0|Root Hip|0.1|0,0,0,-1,0,0,0,0,1,0,1,-0|Torso|0|Left Hip|-1,-1,0,-0.0001,0,-1,0,0.9999,0,1,0,-0.0001|-0.5,1,0,-0.0001,0,-1,0,0.99'
  222. ..'99,0,1,0,-0.0001|Right Hip|1,-1,0,-0.0001,0,1,-0,0.9999,0,-1,0,-0.0001|0.5,1,0,-0.0001,0,1,0,0.9999,0,-1,0,-0.0001|Left Shoulder|-1,0.5,0,-0.0001,0,-1,0,0.9999,0,1,0,-0.0001|0.5,0.5,0,-0.0001,0,-1,0,0'
  223. ..'.9999,0,1,0,-0.0001|Right Shoulder|1,0.5,0,-0.0001,0,1,-0,0.9999,0,-1,0,-0.0001|-0.5,0.5,0,-0.0001,0,1,0,0.9999,0,-1,0,-0.0001|Neck|0,1,0,-1,0,0,0,0,1,0,1,-0|0,-0.5,0,-1,0,0,0,0,1,0,1,-0|Kill Script|9'
  224. ..',9,9|79,79,79|http://www.roblox.com/asset/?id=42579239|http://www.roblox.com/asset/?id=42578558|5|Left Leg|-0.2185,1.9111,27.8499|1,2,1|Right Leg|0.7815,1.9111,27.8499|Left Arm|-1.2185,3.9111,27.8499|'
  225. ..'Right Arm|1.7815,3.9111,27.8499|Head|0.2815,5.4111,27.8499|2,1,1|1.25,1.25,1.25|18|FollowScript;0,1>2>2,3>11>2,3>12>4,5>11>4,5>12>12,6>11>4,6>12>13,7>11>4,7>12>14,8>11>4,8>12>16,9>11>4,9>12>18;2|1:2;n'
  226. ..';1|1:3|3:4|4:5|5:6|6:7|7:7;n;3|1:8|8:9|9:10|10:10;p;1|1:11|4:5|5:6|13:12|6:7|7:7;n;3|1:13|8:9|9:14|10:15;3|1:16|8:9|9:17|10:18;3|1:19|8:9|9:20|10:21;3|1:22|8:9|9:23|10:24;3|1:25|8:9|9:26|10:27;4|1:28;'
  227. ..'5|14:29|15:30|16:31|17:32|18:33;p;1|1:34|3:4|4:35|5:36|13:12|6:7|7:7;1|1:37|3:4|4:38|5:36|13:12|6:7|7:7;1|1:39|3:4|4:40|5:36|13:12|6:7|7:7;n;4|1:28;p;1|1:41|3:4|4:42|5:36|13:12|6:7|7:7;n;4|1:28;p;1|1:'
  228. ..'43|3:4|4:44|5:45|6:7|7:7;n;5|14:46;p;6|19:47;4|1:48;p;')
  229. for _,Object in pairs(Objects) do
  230. Object.Parent = script and script.Parent==workspace and script or workspace
  231. end
  232. for _,f in pairs(ActualScripts) do f() end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement