ColorblindRBLX

AnimR6 [No Body Animation]

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