Parellel_X

Reanimation by mizt

Sep 13th, 2020 (edited)
9,280
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.39 KB | None | 0 0
  1. HumanDied = false
  2. local CountSCIFIMOVIELOL = 1
  3. function SCIFIMOVIELOL(Part0,Part1,Position,Angle)
  4. local AlignPos = Instance.new('AlignPosition', Part1); AlignPos.Name = "AliP_"..CountSCIFIMOVIELOL
  5. AlignPos.ApplyAtCenterOfMass = true;
  6. AlignPos.MaxForce = 5772000--67752;
  7. AlignPos.MaxVelocity = math.huge/9e110;
  8. AlignPos.ReactionForceEnabled = false;
  9. AlignPos.Responsiveness = 200;
  10. AlignPos.RigidityEnabled = false;
  11. local AlignOri = Instance.new('AlignOrientation', Part1); AlignOri.Name = "AliO_"..CountSCIFIMOVIELOL
  12. AlignOri.MaxAngularVelocity = math.huge/9e110;
  13. AlignOri.MaxTorque = 5772000
  14. AlignOri.PrimaryAxisOnly = false;
  15. AlignOri.ReactionTorqueEnabled = false;
  16. AlignOri.Responsiveness = 200;
  17. AlignOri.RigidityEnabled = false;
  18. local AttachmentA=Instance.new('Attachment',Part1); AttachmentA.Name = "Ath_"..CountSCIFIMOVIELOL
  19. local AttachmentB=Instance.new('Attachment',Part0); AttachmentB.Name = "Ath_"..CountSCIFIMOVIELOL
  20. AttachmentA.Orientation = Angle or Vector3.new(0,0,0)
  21. AttachmentA.Position = Position or Vector3.new(0,0,0)
  22. AlignPos.Attachment1 = AttachmentA;
  23. AlignPos.Attachment0 = AttachmentB;
  24. AlignOri.Attachment1 = AttachmentA;
  25. AlignOri.Attachment0 = AttachmentB;
  26. CountSCIFIMOVIELOL = CountSCIFIMOVIELOL + 1
  27. return {AlignPos,AlignOri,AttachmentA,AttachmentB}
  28. end
  29. game:FindFirstChildOfClass("Players").LocalPlayer["Character"].Archivable = true
  30. local hatnameclone = {}
  31. for _,v in next, game:FindFirstChildOfClass("Players").LocalPlayer["Character"]:GetChildren() do
  32. if v:IsA("Accessory") then
  33. if hatnameclone[v.Name] then
  34. if hatnameclone[v.Name] == "s" then
  35. hatnameclone[v.Name] = {}
  36. end
  37. table.insert(hatnameclone[v.Name],v)
  38. else
  39. hatnameclone[v.Name] = "s"
  40. end
  41. end
  42. end
  43. for _,v in pairs(hatnameclone) do
  44. if type(v) == "table" then
  45. local num = 1
  46. for _,w in pairs(v) do
  47. w.Name = w.Name..num
  48. num = num + 1
  49. end
  50. end
  51. end
  52. hatnameclone = nil
  53.  
  54. local DeadChar = game:FindFirstChildOfClass("Players").LocalPlayer.Character
  55.  
  56. local fldr = Instance.new("Folder",game:FindFirstChildOfClass("Players").LocalPlayer["Character"])
  57. fldr.Name = "DMYF"
  58. local CloneChar = DeadChar:Clone()
  59. local ANIMATIONHERE
  60. if CloneChar:FindFirstChild("Animate") then
  61. ANIMATIONHERE = CloneChar:FindFirstChild("Animate"):Clone()
  62. CloneChar:FindFirstChild("Animate"):Destroy()
  63. end
  64. if CloneChar:FindFirstChildOfClass("Folder") then CloneChar:FindFirstChildOfClass("Folder"):Destroy() end
  65. if CloneChar.Torso:FindFirstChild("Neck") then
  66. local Clonessss = CloneChar.Torso:FindFirstChild("Neck"):Clone()
  67. Clonessss.Part0 = nil
  68. Clonessss.Part1 = DeadChar.Head
  69. Clonessss.Parent = DeadChar.Torso
  70. end
  71. CloneChar.Parent = fldr
  72. CloneChar.HumanoidRootPart.CFrame = DeadChar.HumanoidRootPart.CFrame
  73. CloneChar.Humanoid.BreakJointsOnDeath = false
  74. CloneChar.Name = "non"
  75. CloneChar.Humanoid.DisplayDistanceType = "None"
  76.  
  77. for _,v in next, DeadChar:GetChildren() do
  78. if v:IsA("Accessory") then
  79. local topacc = false
  80. if v.Handle:FindFirstChildOfClass("Weld") then v.Handle:FindFirstChildOfClass("Weld"):Destroy() end
  81. v.Handle.Massless = true
  82. v.Handle.CanCollide = false
  83. if v.Handle:FindFirstChildOfClass("Attachment") then
  84. local ath__ = v.Handle:FindFirstChildOfClass("Attachment")
  85. if ath__.Name == "HatAttachment" or ath__.Name == "HairAttachment" or ath__.Name == "FaceFrontAttachment" or ath__.Name == "FaceCenterAttachment" then
  86. topacc = ath__.Name
  87. end
  88. end
  89. local bv = Instance.new("BodyVelocity",v.Handle)
  90. bv.Velocity = Vector3.new(0,0,0)
  91. coroutine.wrap(function()
  92. if topacc then
  93. local allthings = SCIFIMOVIELOL(v.Handle,DeadChar.Torso,Vector3.new(0,1.5,0)+ (DeadChar.Head[topacc].Position + (v.Handle[topacc].Position*-1)),Vector3.new(0,0,0))
  94. local normaltop = allthings[1].Attachment1
  95. local alipos = allthings[1]
  96. local alirot = allthings[2]
  97. local p0 = v.Handle
  98. local p1 = DeadChar.Head
  99. alipos.Parent = CloneChar:FindFirstChild(v.Name).Handle
  100. alirot.Parent = CloneChar:FindFirstChild(v.Name).Handle
  101. while true do
  102. game:GetService("RunService").RenderStepped:wait()
  103. if HumanDied then break end
  104. coroutine.wrap(function()
  105. if alipos.Attachment1 == normaltop then
  106. p0.CFrame = p0.CFrame:lerp((((DeadChar.Torso.CFrame * CFrame.new(0,1.5,0)) * p1[topacc].CFrame) * p0[topacc].CFrame:inverse()),1)
  107. else
  108. v.Handle.CFrame = v.Handle.CFrame:lerp(alipos.Attachment1.Parent.CFrame * CFrame.new(alipos.Attachment1.Position) * CFrame.Angles(math.rad(alipos.Attachment1.Rotation.X),math.rad(alipos.Attachment1.Rotation.Y),math.rad(alipos.Attachment1.Rotation.Z)),1)
  109. end
  110. end)()
  111. end
  112. else
  113. SCIFIMOVIELOL(v.Handle,CloneChar[v.Name].Handle,Vector3.new(0,0,0),Vector3.new(0,0,0))
  114. end
  115. end)()
  116. end
  117. end
  118.  
  119. local a = DeadChar.Torso
  120. local b = DeadChar.HumanoidRootPart
  121. local c = DeadChar.Humanoid
  122. a.Parent = game:FindFirstChildOfClass("Workspace")
  123. c.Parent = game:FindFirstChildOfClass("Workspace")
  124. local told = a:Clone()
  125. local told1 = c:Clone()
  126. b["RootJoint"].Part0 = told
  127. b["RootJoint"].Part1 = DeadChar.Head
  128. a.Name = "torso"
  129. a.Neck:Destroy()
  130. c.Name = "Mizt Hub Best"
  131. told.Parent = DeadChar
  132. told1.Parent = DeadChar
  133. DeadChar.PrimaryPart = told
  134. told1.Health = 0
  135. b:Destroy()
  136. a.Parent = DeadChar
  137. c.Parent = DeadChar
  138. told:Destroy()
  139. told1:Destroy()
  140. a.Name = "Torso"
  141.  
  142. if CloneChar.Head:FindFirstChildOfClass("Decal") then CloneChar.Head:FindFirstChildOfClass("Decal").Transparency = 1 end
  143. if DeadChar:FindFirstChild("Animate") then DeadChar:FindFirstChild("Animate"):Destroy() end
  144.  
  145. local Collider
  146. function UnCollide()
  147. if HumanDied then Collider:Disconnect(); return end
  148. --[[for _,Parts in next, CloneChar:GetChildren() do
  149. if Parts:IsA("BasePart") then
  150. Parts.CanCollide = false
  151. end
  152. end]]
  153. for _,Parts in next, DeadChar:GetChildren() do
  154. if Parts:IsA("BasePart") then
  155. Parts.CanCollide = false
  156. end
  157. end
  158. end
  159. Collider = game:GetService("RunService").Stepped:Connect(UnCollide)
  160.  
  161. local resetBindable = Instance.new("BindableEvent")
  162. resetBindable.Event:connect(function()
  163. game:GetService("StarterGui"):SetCore("ResetButtonCallback", true)
  164. resetBindable:Destroy()
  165. HumanDied = true
  166. pcall(function()
  167. game:FindFirstChildOfClass("Players").LocalPlayer.Character = DeadChar
  168. DeadChar.Head:Destroy()
  169. DeadChar:FindFirstChildOfClass("Humanoid"):Destroy()
  170. game:FindFirstChildOfClass("Players").LocalPlayer.Character = CloneChar
  171. if DeadChar:FindFirstChildOfClass("Folder") then DeadChar:FindFirstChildOfClass("Folder"):Destroy() end
  172. end)
  173. end)
  174. game:GetService("StarterGui"):SetCore("ResetButtonCallback", resetBindable)
  175.  
  176. coroutine.wrap(function()
  177. while true do
  178. game:GetService("RunService").RenderStepped:wait()
  179. if not CloneChar or not CloneChar:FindFirstChild("Head") or not CloneChar:FindFirstChildOfClass("Humanoid") or CloneChar:FindFirstChildOfClass("Humanoid").Health <= 0 and not DeadChar or not DeadChar:FindFirstChild("Head") or not DeadChar:FindFirstChildOfClass("Humanoid") or DeadChar:FindFirstChildOfClass("Humanoid").Health <= 0 then
  180. HumanDied = true
  181. pcall(function()
  182. game:FindFirstChildOfClass("Players").LocalPlayer.Character = DeadChar
  183. DeadChar.Head:Destroy()
  184. DeadChar:FindFirstChildOfClass("Humanoid"):Destroy()
  185. game:FindFirstChildOfClass("Players").LocalPlayer.Character = CloneChar
  186. if DeadChar:FindFirstChildOfClass("Folder") then DeadChar:FindFirstChildOfClass("Folder"):Destroy() end
  187. end)
  188. if resetBindable then
  189. game:GetService("StarterGui"):SetCore("ResetButtonCallback", true)
  190. resetBindable:Destroy()
  191. end
  192. break
  193. end
  194. end
  195. end)()
  196.  
  197.  
  198. SCIFIMOVIELOL(DeadChar["Head"],CloneChar["Head"])
  199. SCIFIMOVIELOL(DeadChar["Torso"],CloneChar["Torso"])
  200. SCIFIMOVIELOL(DeadChar["Left Arm"],CloneChar["Left Arm"])
  201. SCIFIMOVIELOL(DeadChar["Right Arm"],CloneChar["Right Arm"])
  202. SCIFIMOVIELOL(DeadChar["Left Leg"],CloneChar["Left Leg"])
  203. SCIFIMOVIELOL(DeadChar["Right Leg"],CloneChar["Right Leg"])
  204.  
  205. for _,v in pairs(DeadChar:GetChildren()) do
  206. if v:IsA("BasePart") and v.Name ~= "Head" then
  207. --[[local bv = Instance.new("BodyVelocity",v)
  208. bv.Velocity = Vector3.new(0,0,0)
  209. coroutine.wrap(function()
  210. while true do
  211. game:GetService("RunService").RenderStepped:wait()
  212. if HumanDied then break end
  213. v.CFrame = CloneChar[v.Name].CFrame
  214. end
  215. end)()]]
  216. elseif v:IsA("BasePart") and v.Name == "Head" then
  217. local bv = Instance.new("BodyVelocity",v)
  218. bv.Velocity = Vector3.new(0,0,0)
  219. coroutine.wrap(function()
  220. while true do
  221. game:GetService("RunService").RenderStepped:wait()
  222. if HumanDied then break end
  223. v.CFrame = DeadChar.Torso.CFrame * CFrame.new(0,1.5,0)
  224. end
  225. end)()
  226. end
  227. end
  228.  
  229. for _,BodyParts in next, CloneChar:GetDescendants() do
  230. if BodyParts:IsA("BasePart") or BodyParts:IsA("Part") then
  231. BodyParts.Transparency = 1 end end
  232. game:GetService("RunService").RenderStepped:wait()
  233. game:FindFirstChildOfClass("Players").LocalPlayer.Character = CloneChar
  234. game:FindFirstChildOfClass("Workspace"):FindFirstChildOfClass("Camera").CameraSubject = CloneChar.Humanoid
  235.  
  236. for _,v in next, DeadChar:GetChildren() do
  237. if v:IsA("Accessory") then
  238. if v.Handle:FindFirstChildOfClass("Weld") then v.Handle:FindFirstChildOfClass("Weld"):Destroy() end
  239. end
  240. end
  241.  
  242. if ANIMATIONHERE then ANIMATIONHERE.Parent = CloneChar end
Add Comment
Please, Sign In to add comment