Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if game.PlaceId == 843468296 or game.PlaceId == 843495510 or game.PlaceId == 897312463 then
- function DE_Ragdoll(player)
- wait(1/math.huge)
- local pc = player.Character
- if pc~=nil then
- local hum = pc:FindFirstChild'Humanoid'
- local LArm = pc:FindFirstChild'Left Arm'
- local RArm = pc:FindFirstChild'Right Arm'
- local LLeg = pc:FindFirstChild'Left Leg'
- local RLeg = pc:FindFirstChild'Right Leg'
- local torso = pc:FindFirstChild'Torso'
- local head = pc:FindFirstChild'Head'
- local LUA = pc:FindFirstChild'LeftUpperArm'
- local LLA = pc:FindFirstChild'LeftLowerArm'
- local LH = pc:FindFirstChild'LeftHand'
- local RUA = pc:FindFirstChild'RightUpperArm'
- local RLA = pc:FindFirstChild'RightLowerArm'
- local RH = pc:FindFirstChild'RightHand'
- local LUL = pc:FindFirstChild'LeftUpperLeg'
- local LLL = pc:FindFirstChild'LeftLowerLeg'
- local LF = pc:FindFirstChild'LeftFoot'
- local RUL = pc:FindFirstChild'RightUpperLeg'
- local RLL = pc:FindFirstChild'RightLowerLeg'
- local RF = pc:FindFirstChild'RightFoot'
- local UT = pc:FindFirstChild'UpperTorso'
- local LT = pc:FindFirstChild'LowerTorso'
- if hum and LArm and RArm and LLeg and RLeg and head then
- hum.BreakJointsOnDeath = false
- hum.Died:Connect(function()
- if hum.RigType==Enum.HumanoidRigType.R6 then
- for _,v in pairs(torso:GetChildren())do
- if v:IsA'Motor6D'then
- v:Destroy()
- end
- end
- local vis = false
- local vis2 = false
- local at1 = Instance.new("Attachment",torso)
- at1.Visible = vis
- at1.Orientation = torso.Orientation + Vector3.new(0,180,0)
- at1.Position = Vector3.new(-1,1,0)
- local at1p2 = Instance.new("Attachment",LArm)
- at1p2.Visible = vis
- at1p2.Orientation = LArm.Orientation + Vector3.new(0,180,0)
- at1p2.Position = Vector3.new(.5,1,0)
- local bis = Instance.new("BallSocketConstraint",torso)
- bis.Attachment0 = at1
- bis.Attachment1 = at1p2
- bis.LimitsEnabled = true
- bis.UpperAngle = 15
- bis.Visible = vis2
- bis.TwistLimitsEnabled = true
- bis.UpperAngle = -45
- bis.TwistLowerAngle = -45
- local at2 = Instance.new("Attachment",torso)
- at2.Visible = vis
- at2.Orientation = torso.Orientation + Vector3.new(0,0,0)
- at2.Position = Vector3.new(1,1,0)
- local at2p2 = Instance.new("Attachment",RArm)
- at2p2.Visible = vis
- at2p2.Orientation = RArm.Orientation + Vector3.new(0,0,0)
- at2p2.Position = Vector3.new(-.5,1,0)
- local bis2 = Instance.new("BallSocketConstraint",torso)
- bis2.Attachment0 = at2
- bis2.Attachment1 = at2p2
- bis2.LimitsEnabled = true
- bis2.UpperAngle = 15
- bis2.Visible = vis2
- bis2.TwistLimitsEnabled = true
- bis2.UpperAngle = -45
- bis2.TwistLowerAngle = -45
- local at3 = Instance.new("Attachment",torso)
- at3.Visible = vis
- at3.Orientation = torso.Orientation + Vector3.new(90,0,-90)
- at3.Position = Vector3.new(.5,-1,0)
- local at3p2 = Instance.new("Attachment",RLeg)
- at3p2.Visible = vis
- at3p2.Orientation = RLeg.Orientation + Vector3.new(90,0,-90)
- at3p2.Position = Vector3.new(0,1,0)
- local bis3 = Instance.new("BallSocketConstraint",torso)
- bis3.Attachment0 = at3
- bis3.Attachment1 = at3p2
- bis3.LimitsEnabled = true
- bis3.UpperAngle = 180-15
- bis3.Visible = vis2
- local at4 = Instance.new("Attachment",torso)
- at4.Visible = vis
- at4.Orientation = torso.Orientation + Vector3.new(90,0,-90)
- at4.Position = Vector3.new(-.5,-1,0)
- local at4p2 = Instance.new("Attachment",LLeg)
- at4p2.Visible = vis
- at4p2.Orientation = LLeg.Orientation + Vector3.new(90,0,-90)
- at4p2.Position = Vector3.new(0,1,0)
- local bis4 = Instance.new("BallSocketConstraint",torso)
- bis4.Attachment0 = at4
- bis4.Attachment1 = at4p2
- bis4.LimitsEnabled = true
- bis4.UpperAngle = 180-15
- bis4.Visible = vis2
- local at5 = Instance.new("Attachment",torso)
- at5.Visible = vis
- at5.Orientation = torso.Orientation + Vector3.new(180,90,0)
- at5.Position = Vector3.new(0,1,0)
- local at5p2 = Instance.new("Attachment",head)
- at5p2.Visible = vis
- at5p2.Orientation = head.Orientation + Vector3.new(180,90,0)
- at5p2.Position = Vector3.new(0,-.5,0)
- local bis5 = Instance.new("BallSocketConstraint",torso)
- bis5.Attachment0 = at5p2
- bis5.Attachment1 = at5
- bis5.LimitsEnabled = true
- bis5.UpperAngle = 75
- bis5.Visible = vis2
- bis5.TwistLimitsEnabled = true
- bis5.UpperAngle = -45
- bis5.TwistLowerAngle = -45
- end
- end)
- elseif head and hum then
- hum.BreakJointsOnDeath = false
- hum.Died:Connect(function()
- if hum.RigType==Enum.HumanoidRigType.R15 then
- for _,v in pairs(pc:GetDescendants())do
- if v:IsA'Motor6D'then
- v:Destroy()
- end
- end
- local vis = false
- local vis2 = false
- local bsc1 = Instance.new("BallSocketConstraint",UT)
- bsc1.Attachment0 = LF.LeftAnkleRigAttachment
- bsc1.Attachment1 = LLL.LeftAnkleRigAttachment
- local bsc2 = Instance.new("BallSocketConstraint",UT)
- bsc2.Attachment0 = LLL.LeftKneeRigAttachment
- bsc2.Attachment1 = LUL.LeftKneeRigAttachment
- local bsc3 = Instance.new("BallSocketConstraint",UT)
- bsc3.Attachment0 = LUL.LeftHipRigAttachment
- bsc3.Attachment1 = LT.LeftHipRigAttachment
- local bsc4 = Instance.new("BallSocketConstraint",UT)
- bsc4.Attachment0 = RF.RightAnkleRigAttachment
- bsc4.Attachment1 = RLL.RightAnkleRigAttachment
- local bsc5 = Instance.new("BallSocketConstraint",UT)
- bsc5.Attachment0 = RLL.RightKneeRigAttachment
- bsc5.Attachment1 = RUL.RightKneeRigAttachment
- local bsc6 = Instance.new("BallSocketConstraint",UT)
- bsc6.Attachment0 = RUL.RightHipRigAttachment
- bsc6.Attachment1 = LT.RightHipRigAttachment
- local bsc7 = Instance.new("BallSocketConstraint",UT)
- bsc7.Attachment0 = LH.LeftWristRigAttachment
- bsc7.Attachment1 = LLA.LeftWristRigAttachment
- local bsc8 = Instance.new("BallSocketConstraint",UT)
- bsc8.Attachment0 = LLA.LeftElbowRigAttachment
- bsc8.Attachment1 = LUA.LeftElbowRigAttachment
- local bsc9 = Instance.new("BallSocketConstraint",UT)
- bsc9.Attachment0 = LUA.LeftShoulderAttachment
- bsc9.Attachment1 = UT.LeftCollarAttachment
- local bsc10 = Instance.new("BallSocketConstraint",UT)
- bsc10.Attachment0 = RH.RightWristRigAttachment
- bsc10.Attachment1 = RLA.RightWristRigAttachment
- local bsc11 = Instance.new("BallSocketConstraint",UT)
- bsc11.Attachment0 = RLA.RightElbowRigAttachment
- bsc11.Attachment1 = RUA.RightElbowRigAttachment
- local bsc12 = Instance.new("BallSocketConstraint",UT)
- bsc12.Attachment0 = RUA.RightShoulderAttachment
- bsc12.Attachment1 = UT.RightCollarAttachment
- local bsc13 = Instance.new("BallSocketConstraint",UT)
- bsc13.Attachment0 = LT.WaistRigAttachment
- bsc13.Attachment1 = UT.WaistRigAttachment
- local bsc14 = Instance.new("BallSocketConstraint",UT)
- bsc14.Attachment0 = UT.NeckRigAttachment
- bsc14.Attachment1 = head.NeckRigAttachment
- bsc14.LimitsEnabled = true
- bsc14.UpperAngle = -75
- bsc14.TwistLimitsEnabled = true
- bsc14.UpperAngle = -45
- bsc14.TwistLowerAngle = -45
- end
- end)
- end
- end
- end
- for _,v in pairs(workspace:GetChildren())do
- if game:GetService'Players':FindFirstChild(v.Name) then
- DE_Ragdoll(game:GetService'Players':FindFirstChild(v.Name))
- end
- end
- workspace.ChildAdded:Connect(function(ch)
- if game:GetService'Players':FindFirstChild(ch.Name) then
- DE_Ragdoll(game:GetService'Players':FindFirstChild(ch.Name))
- end
- end)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement