Advertisement
Synpase_X

Roblox's scifimovie reanim

Oct 26th, 2022
877
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 9.86 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.  
  30. if _G.netted ~= true then
  31.     _G.netted = true
  32.     coroutine.wrap(function()
  33.         local set = setsimulationradius or set_simulation_radius
  34. game.RunService.Stepped:Connect(function()
  35. settings().Physics.AllowSleep = false
  36. game:GetService("Players").LocalPlayer.ReplicationFocus = workspace
  37. game:GetService("RunService").Heartbeat:wait()
  38. game:GetService("Players").LocalPlayer.MaximumSimulationRadius = math.huge
  39. set(math.huge, math.huge)
  40. end)
  41.     end)()
  42. end
  43.  
  44. game:FindFirstChildOfClass("Players").LocalPlayer["Character"].Archivable = true
  45. local hatnameclone = {}
  46. for _,v in next, game:FindFirstChildOfClass("Players").LocalPlayer["Character"]:GetChildren() do
  47.     if v:IsA("Accessory") then
  48.         if hatnameclone[v.Name] then
  49.             if hatnameclone[v.Name] == "s" then
  50.                 hatnameclone[v.Name] = {}
  51.             end
  52.             table.insert(hatnameclone[v.Name],v)
  53.         else
  54.             hatnameclone[v.Name] = "s"
  55.         end
  56.     end
  57. end
  58. for _,v in pairs(hatnameclone) do
  59.     if type(v) == "table" then
  60.         local num = 1
  61.         for _,w in pairs(v) do
  62.             w.Name = w.Name..num
  63.             num = num + 1
  64.         end
  65.     end
  66. end
  67. hatnameclone = nil
  68.  
  69. local DeadChar = game:FindFirstChildOfClass("Players").LocalPlayer.Character
  70.  
  71. local fldr = Instance.new("Folder",game:FindFirstChildOfClass("Players").LocalPlayer["Character"])
  72. fldr.Name = "DMYF"
  73. local CloneChar = DeadChar:Clone()
  74. local ANIMATIONHERE
  75. if CloneChar:FindFirstChild("Animate") then
  76.     ANIMATIONHERE = CloneChar:FindFirstChild("Animate"):Clone()
  77.     CloneChar:FindFirstChild("Animate"):Destroy()
  78. end
  79. if CloneChar:FindFirstChildOfClass("Folder") then CloneChar:FindFirstChildOfClass("Folder"):Destroy() end
  80. if CloneChar.Torso:FindFirstChild("Neck") then
  81.     local Clonessss = CloneChar.Torso:FindFirstChild("Neck"):Clone()
  82.     Clonessss.Part0 = nil
  83.     Clonessss.Part1 = DeadChar.Head
  84.     Clonessss.Parent = DeadChar.Torso
  85. end
  86. CloneChar.Parent = fldr
  87. CloneChar.HumanoidRootPart.CFrame = DeadChar.HumanoidRootPart.CFrame
  88. CloneChar.Humanoid.BreakJointsOnDeath = false
  89. CloneChar.Name = "non"
  90. CloneChar.Humanoid.DisplayDistanceType = "None"
  91.  
  92. for _,v in next, DeadChar:GetChildren() do
  93.     if v:IsA("Accessory") then
  94.         local topacc = false
  95.         if v.Handle:FindFirstChildOfClass("Weld") then v.Handle:FindFirstChildOfClass("Weld"):Destroy() end
  96.         v.Handle.Massless = true
  97.         v.Handle.CanCollide = false
  98.         if v.Handle:FindFirstChildOfClass("Attachment") then
  99.             local ath__ = v.Handle:FindFirstChildOfClass("Attachment")
  100.             if ath__.Name == "HatAttachment" or ath__.Name == "HairAttachment" or ath__.Name == "FaceFrontAttachment" or ath__.Name == "FaceCenterAttachment" then
  101.                 topacc = ath__.Name
  102.             end
  103.         end
  104.         local bv = Instance.new("BodyVelocity",v.Handle)
  105.         bv.Velocity = Vector3.new(0,0,0)
  106.         coroutine.wrap(function()
  107.             if topacc then
  108.                 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))
  109.                 local normaltop = allthings[1].Attachment1
  110.                 local alipos = allthings[1]
  111.                 local alirot = allthings[2]
  112.                 local p0 = v.Handle
  113.                 local p1 = DeadChar.Head
  114.                 alipos.Parent = CloneChar:FindFirstChild(v.Name).Handle
  115.                 alirot.Parent = CloneChar:FindFirstChild(v.Name).Handle
  116.                 while true do
  117.                     game:GetService("RunService").RenderStepped:wait()
  118.                     if HumanDied then break end
  119.                     coroutine.wrap(function()
  120.                         if alipos.Attachment1 == normaltop then
  121.                             p0.CFrame = p0.CFrame:lerp((((DeadChar.Torso.CFrame * CFrame.new(0,1.5,0)) * p1[topacc].CFrame) * p0[topacc].CFrame:inverse()),1)
  122.                         else
  123.                             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)
  124.                         end
  125.                     end)()
  126.                 end
  127.             else
  128.                 SCIFIMOVIELOL(v.Handle,CloneChar[v.Name].Handle,Vector3.new(0,0,0),Vector3.new(0,0,0))
  129.             end
  130.         end)()
  131.     end
  132. end
  133.  
  134. local a = DeadChar.Torso
  135. local b = DeadChar.HumanoidRootPart
  136. local c = DeadChar.Humanoid
  137. a.Parent = game:FindFirstChildOfClass("Workspace")
  138. c.Parent = game:FindFirstChildOfClass("Workspace")
  139. local told = a:Clone()
  140. local told1 = c:Clone()
  141. b["RootJoint"].Part0 = told
  142. b["RootJoint"].Part1 = DeadChar.Head
  143. a.Name = "torso"
  144. a.Neck:Destroy()
  145. c.Name = "Humanoid"
  146. told.Parent = DeadChar
  147. told1.Parent = DeadChar
  148. DeadChar.PrimaryPart = told
  149. told1.Health = 0
  150. b:Destroy()
  151. a.Parent = DeadChar
  152. c.Parent = DeadChar
  153. told:Destroy()
  154. told1:Destroy()
  155. a.Name = "Torso"
  156.  
  157. if CloneChar.Head:FindFirstChildOfClass("Decal") then CloneChar.Head:FindFirstChildOfClass("Decal").Transparency = 1 end
  158. if DeadChar:FindFirstChild("Animate") then DeadChar:FindFirstChild("Animate"):Destroy() end
  159.  
  160. local Collider
  161. function UnCollide()
  162.     if HumanDied then Collider:Disconnect(); return end
  163.     --[[for _,Parts in next, CloneChar:GetChildren() do
  164.         if Parts:IsA("BasePart") then
  165.             Parts.CanCollide = false
  166.         end
  167.     end]]
  168.     for _,Parts in next, DeadChar:GetChildren() do
  169.         if Parts:IsA("BasePart") then
  170.         Parts.CanCollide = false
  171.         end
  172.     end
  173. end
  174. Collider = game:GetService("RunService").Stepped:Connect(UnCollide)
  175.  
  176. local resetBindable = Instance.new("BindableEvent")
  177. resetBindable.Event:connect(function()
  178.     game:GetService("StarterGui"):SetCore("ResetButtonCallback", true)
  179.     resetBindable:Destroy()
  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. end)
  189. game:GetService("StarterGui"):SetCore("ResetButtonCallback", resetBindable)
  190.  
  191. coroutine.wrap(function()
  192.     while true do
  193.         game:GetService("RunService").RenderStepped:wait()
  194.         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
  195.             HumanDied = true
  196.             pcall(function()
  197.                 game:FindFirstChildOfClass("Players").LocalPlayer.Character = DeadChar
  198.                 DeadChar.Head:Destroy()
  199.                 DeadChar:FindFirstChildOfClass("Humanoid"):Destroy()
  200.                 game:FindFirstChildOfClass("Players").LocalPlayer.Character = CloneChar
  201.                 if DeadChar:FindFirstChildOfClass("Folder") then DeadChar:FindFirstChildOfClass("Folder"):Destroy() end
  202.             end)
  203.             if resetBindable then
  204.                 game:GetService("StarterGui"):SetCore("ResetButtonCallback", true)
  205.                 resetBindable:Destroy()
  206.             end
  207.             break
  208.         end    
  209.     end
  210. end)()
  211.  
  212.  
  213. SCIFIMOVIELOL(DeadChar["Head"],CloneChar["Head"])
  214. SCIFIMOVIELOL(DeadChar["Torso"],CloneChar["Torso"])
  215. SCIFIMOVIELOL(DeadChar["Left Arm"],CloneChar["Left Arm"])
  216. SCIFIMOVIELOL(DeadChar["Right Arm"],CloneChar["Right Arm"])
  217. SCIFIMOVIELOL(DeadChar["Left Leg"],CloneChar["Left Leg"])
  218. SCIFIMOVIELOL(DeadChar["Right Leg"],CloneChar["Right Leg"])
  219.  
  220. for _,v in pairs(DeadChar:GetChildren()) do
  221.     if v:IsA("BasePart") and v.Name ~= "Head" then
  222.         --[[local bv = Instance.new("BodyVelocity",v)
  223.         bv.Velocity = Vector3.new(0,0,0)
  224.         coroutine.wrap(function()
  225.             while true do
  226.                 game:GetService("RunService").RenderStepped:wait()
  227.                 if HumanDied then break end
  228.                 v.CFrame = CloneChar[v.Name].CFrame
  229.             end
  230.         end)()]]
  231.     elseif v:IsA("BasePart") and v.Name == "Head" then
  232.         local bv = Instance.new("BodyVelocity",v)
  233.         bv.Velocity = Vector3.new(0,0,0)
  234.         coroutine.wrap(function()
  235.             while true do
  236.                 game:GetService("RunService").RenderStepped:wait()
  237.                 if HumanDied then break end
  238.                 v.CFrame = DeadChar.Torso.CFrame * CFrame.new(0,1.5,0)
  239.             end
  240.         end)()
  241.     end
  242. end
  243.  
  244. for _,BodyParts in next, CloneChar:GetDescendants() do
  245. if BodyParts:IsA("BasePart") or BodyParts:IsA("Part") then
  246. BodyParts.Transparency = 1 end end
  247. game:GetService("RunService").RenderStepped:wait()
  248. game:FindFirstChildOfClass("Players").LocalPlayer.Character = CloneChar
  249. game:FindFirstChildOfClass("Workspace"):FindFirstChildOfClass("Camera").CameraSubject = CloneChar.Humanoid
  250.  
  251. for _,v in next, DeadChar:GetChildren() do
  252.     if v:IsA("Accessory") then
  253.         if v.Handle:FindFirstChildOfClass("Weld") then v.Handle:FindFirstChildOfClass("Weld"):Destroy() end
  254.     end
  255. end
  256.  
  257. if ANIMATIONHERE then ANIMATIONHERE.Parent = CloneChar end
  258.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement