R6 Animation Script
R6 Animation Script
HumanDied = false
local CountSCIFIMOVIELOL = 1
function SCIFIMOVIELOL(Part0,Part1,Position,Angle)
local AlignPos = Instance.new('AlignPosition', Part1); AlignPos.Name =
"AliP_"..CountSCIFIMOVIELOL
AlignPos.ApplyAtCenterOfMass = true;
AlignPos.MaxForce = 5772000--67752;
AlignPos.MaxVelocity = math.huge/9e110;
AlignPos.ReactionForceEnabled = false;
AlignPos.Responsiveness = 200;
AlignPos.RigidityEnabled = false;
local AlignOri = Instance.new('AlignOrientation', Part1); AlignOri.Name =
"AliO_"..CountSCIFIMOVIELOL
AlignOri.MaxAngularVelocity = math.huge/9e110;
AlignOri.MaxTorque = 5772000
AlignOri.PrimaryAxisOnly = false;
AlignOri.ReactionTorqueEnabled = false;
AlignOri.Responsiveness = 200;
AlignOri.RigidityEnabled = false;
local AttachmentA=Instance.new('Attachment',Part1); AttachmentA.Name =
"Ath_"..CountSCIFIMOVIELOL
local AttachmentB=Instance.new('Attachment',Part0); AttachmentB.Name =
"Ath_"..CountSCIFIMOVIELOL
AttachmentA.Orientation = Angle or Vector3.new(0,0,0)
AttachmentA.Position = Position or Vector3.new(0,0,0)
AlignPos.Attachment1 = AttachmentA;
AlignPos.Attachment0 = AttachmentB;
AlignOri.Attachment1 = AttachmentA;
AlignOri.Attachment0 = AttachmentB;
CountSCIFIMOVIELOL = CountSCIFIMOVIELOL + 1
return {AlignPos,AlignOri,AttachmentA,AttachmentB}
end
game:FindFirstChildOfClass("Players").LocalPlayer["Character"].Archivable = true
local hatnameclone = {}
for _,v in next,
game:FindFirstChildOfClass("Players").LocalPlayer["Character"]:GetChildren() do
if v:IsA("Accessory") then
if hatnameclone[v.Name] then
if hatnameclone[v.Name] == "s" then
hatnameclone[v.Name] = {}
end
table.insert(hatnameclone[v.Name],v)
else
hatnameclone[v.Name] = "s"
end
end
end
for _,v in pairs(hatnameclone) do
if type(v) == "table" then
local num = 1
for _,w in pairs(v) do
w.Name = w.Name..num
num = num + 1
end
end
end
hatnameclone = nil
local fldr =
Instance.new("Folder",game:FindFirstChildOfClass("Players").LocalPlayer["Character"
])
fldr.Name = "DMYF"
local CloneChar = DeadChar:Clone()
local ANIMATIONHERE
if CloneChar:FindFirstChild("Animate") then
ANIMATIONHERE = CloneChar:FindFirstChild("Animate"):Clone()
CloneChar:FindFirstChild("Animate"):Destroy()
end
if CloneChar:FindFirstChildOfClass("Folder") then
CloneChar:FindFirstChildOfClass("Folder"):Destroy() end
if CloneChar.Torso:FindFirstChild("Neck") then
local Clonessss = CloneChar.Torso:FindFirstChild("Neck"):Clone()
Clonessss.Part0 = nil
Clonessss.Part1 = DeadChar.Head
Clonessss.Parent = DeadChar.Torso
end
CloneChar.Parent = fldr
CloneChar.HumanoidRootPart.CFrame = DeadChar.HumanoidRootPart.CFrame
CloneChar.Humanoid.BreakJointsOnDeath = false
CloneChar.Name = "non"
CloneChar.Humanoid.DisplayDistanceType = "None"
local a = DeadChar.Torso
local b = DeadChar.HumanoidRootPart
local c = DeadChar.Humanoid
a.Parent = game:FindFirstChildOfClass("Workspace")
c.Parent = game:FindFirstChildOfClass("Workspace")
local told = a:Clone()
local told1 = c:Clone()
b["RootJoint"].Part0 = told
b["RootJoint"].Part1 = DeadChar.Head
a.Name = "torso"
a.Neck:Destroy()
c.Name = "Cloned Avatar"
told.Parent = DeadChar
told1.Parent = DeadChar
DeadChar.PrimaryPart = told
told1.Health = 0
b:Destroy()
a.Parent = DeadChar
c.Parent = DeadChar
told:Destroy()
told1:Destroy()
a.Name = "Torso"
if CloneChar.Head:FindFirstChildOfClass("Decal") then
CloneChar.Head:FindFirstChildOfClass("Decal").Transparency = 1 end
if DeadChar:FindFirstChild("Animate") then
DeadChar:FindFirstChild("Animate"):Destroy() end
local Collider
function UnCollide()
if HumanDied then Collider:Disconnect(); return end
--[[for _,Parts in next, CloneChar:GetChildren() do
if Parts:IsA("BasePart") then
Parts.CanCollide = false
end
end]]
for _,Parts in next, DeadChar:GetChildren() do
if Parts:IsA("BasePart") then
Parts.CanCollide = false
end
end
end
Collider = game:GetService("RunService").Stepped:Connect(UnCollide)
coroutine.wrap(function()
while true do
game:GetService("RunService").RenderStepped:wait()
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
HumanDied = true
pcall(function()
game:FindFirstChildOfClass("Players").LocalPlayer.Character = DeadChar
DeadChar.Head:Destroy()
DeadChar:FindFirstChildOfClass("Humanoid"):Destroy()
game:FindFirstChildOfClass("Players").LocalPlayer.Character = CloneChar
if DeadChar:FindFirstChildOfClass("Folder") then
DeadChar:FindFirstChildOfClass("Folder"):Destroy() end
end)
if resetBindable then
game:GetService("StarterGui"):SetCore("ResetButtonCallback", true)
resetBindable:Destroy()
end
break
end
end
end)()
SCIFIMOVIELOL(DeadChar["Head"],CloneChar["Head"])
SCIFIMOVIELOL(DeadChar["Torso"],CloneChar["Torso"])
SCIFIMOVIELOL(DeadChar["Left Arm"],CloneChar["Left Arm"])
SCIFIMOVIELOL(DeadChar["Right Arm"],CloneChar["Right Arm"])
SCIFIMOVIELOL(DeadChar["Left Leg"],CloneChar["Left Leg"])
SCIFIMOVIELOL(DeadChar["Right Leg"],CloneChar["Right Leg"])
count = 0
char=game:GetService("Players").LocalPlayer.Character
if _G.permadeath == true then
char = workspace.non
end
if _G.permadeath == false then
hhhh=char.Humanoid.Animator
hhhh.Parent = nil
end
hhhh=char.Humanoid.Animator
hhhh.Parent = nil
for _,v in pairs(char.Humanoid:GetPlayingAnimationTracks()) do
v:Stop()
end
plr.CharacterRemoving:Connect(function()
if playing == true then
playing = false
end
end)
while wait() do
if playanother == true then
break
else
for i,oasjdadlasdkadkldjkl in pairs(anim) do
asdf=getnext(anim,count)
v=anim[asdf]
if v["Lg"] then
lhc0 = v["Lg"]
end
if v["Rg"] then
rhc0 = v["Rg"]
end
if v["Lm"] then
lsc0 = v["Lm"]
end
if v["Rm"] then
rsc0 = v["Rm"]
end
if v["To"] then
rjc0 = v["To"]
end
if v["Hd"] then
nc0 = v["Hd"]
end
count2=0
maxcount2=asdf-count
count=asdf
wait(asdf-count)
count2=maxcount2
if v["Lg"] then
char.Torso["Left Hip"].Transform = v["Lg"]
end
if v["Rg"] then
char.Torso["Right Hip"].Transform = v["Rg"]
end
if v["Lm"] then
char.Torso["Left Shoulder"].Transform = v["Lm"]
end
if v["Rm"] then
char.Torso["Right Shoulder"].Transform = v["Rm"]
end
if v["To"] then
char.HumanoidRootPart["RootJoint"].Transform = v["To"]
end
if v["Hd"] then
char.Torso["Neck"].Transform = v["Hd"]
end
end
end
end
--end)