Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local bodyhit = Instance.new("Sound", owner.Character.Torso)
- bodyhit.SoundId = "rbxassetid://220025741"
- bodyhit.Volume = 2
- local isragdoll = false
- local limbcollider = Instance.new("Part", owner.Character:findFirstChild("Right Arm"))
- limbcollider.Size = Vector3.new(1.4,1,1)
- limbcollider.Shape = "Cylinder"
- limbcollider.Transparency = 1
- limbcollider.Name = "LimbCollider"
- local limbcolliderweld = Instance.new("Weld", limbcollider)
- limbcolliderweld.Part0 = owner.Character:findFirstChild("Right Arm")
- limbcolliderweld.Part1 = limbcollider
- limbcolliderweld.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2) * CFrame.new(-0.3,0,0)
- local limbcollider2 = Instance.new("Part", owner.Character:findFirstChild("Left Arm"))
- limbcollider2.Size = Vector3.new(1.4,1,1)
- limbcollider2.Shape = "Cylinder"
- limbcollider2.Transparency = 1
- limbcollider2.Name = "LimbCollider"
- local limbcolliderweld2 = Instance.new("Weld", limbcollider)
- limbcolliderweld2.Part0 = owner.Character:findFirstChild("Left Arm")
- limbcolliderweld2.Part1 = limbcollider2
- limbcolliderweld2.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2) * CFrame.new(-0.3,0,0)
- local limbcollider3 = Instance.new("Part", owner.Character:findFirstChild("Right Leg"))
- limbcollider3.Size = Vector3.new(1.3,1,1)
- limbcollider3.Shape = "Cylinder"
- limbcollider3.Transparency = 1
- limbcollider3.Name = "LimbCollider"
- local limbcolliderweld3 = Instance.new("Weld", limbcollider)
- limbcolliderweld3.Part0 = owner.Character:findFirstChild("Right Leg")
- limbcolliderweld3.Part1 = limbcollider3
- limbcolliderweld3.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2) * CFrame.new(-0.3,0,0)
- local limbcollider4 = Instance.new("Part", owner.Character:findFirstChild("Left Leg"))
- limbcollider4.Size = Vector3.new(1.3,1,1)
- limbcollider4.Shape = "Cylinder"
- limbcollider4.Transparency = 1
- limbcollider4.Name = "LimbCollider"
- local limbcolliderweld4 = Instance.new("Weld", limbcollider)
- limbcolliderweld4.Part0 = owner.Character:findFirstChild("Left Leg")
- limbcolliderweld4.Part1 = limbcollider4
- limbcolliderweld4.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2) * CFrame.new(-0.3,0,0)
- local limbcollider5 = Instance.new("Part", owner.Character.Head)
- limbcollider5.Size = Vector3.new(1,1,1)
- limbcollider5.Shape = "Cylinder"
- limbcollider5.Transparency = 1
- limbcollider5.Name = "LimbCollider"
- local limbcolliderweld5 = Instance.new("Weld", limbcollider)
- limbcolliderweld5.Part0 = owner.Character.Head
- limbcolliderweld5.Part1 = limbcollider5
- limbcolliderweld5.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2) * CFrame.new(0,0,0)
- function killfunction(part)
- if owner.Character.HumanoidRootPart.Velocity.x <= -17 or owner.Character.HumanoidRootPart.Velocity.x >= 17 or owner.Character.HumanoidRootPart.Velocity.z <= -17 or owner.Character.HumanoidRootPart.Velocity.z >= 17 then
- if not isragdoll then
- isragdoll = true
- bodyhit:Play()
- for i,v in pairs(owner.Character:GetDescendants()) do
- if v:IsA("Motor6D") and v.Parent.Name ~= "HumanoidRootPart" then
- local Socket = Instance.new("BallSocketConstraint")
- local a1 = Instance.new("Attachment")
- local a2 = Instance.new("Attachment")
- a1.Parent = v.Part0
- a2.Parent = v.Part1
- Socket.Parent = v.Parent
- Socket.Attachment0 = a1
- Socket.Attachment1 = a2
- a1.CFrame = v.C0
- a2.CFrame = v.C1
- Socket.LimitsEnabled = false
- Socket.TwistLimitsEnabled = true
- v:Destroy()
- end
- end
- end
- owner.Character.Humanoid.RequiresNeck = false
- owner.Character.Humanoid.PlatformStand = true
- wait(2.5)
- for i,v in pairs(owner.Character:GetDescendants()) do
- if v:IsA("BallSocketConstraint") then
- v.UpperAngle = 0
- v.TwistUpperAngle = 0
- v.TwistLowerAngle = 0
- local Joints = Instance.new("Motor6D",v.Parent)
- Joints.Part0 = v.Attachment0.Parent
- Joints.Part1 = v.Attachment1.Parent
- Joints.C0 = v.Attachment0.CFrame
- Joints.C1 = v.Attachment1.CFrame
- owner.Character.HumanoidRootPart.CFrame = owner.Character.HumanoidRootPart.CFrame + Vector3.new(0,2,0)
- v:Destroy()
- end
- end
- owner.Character.Humanoid.PlatformStand = false
- wait(0.5)
- isragdoll = false
- end
- end
- for i,v in pairs(owner.Character:GetDescendants()) do
- if v:IsA("BasePart") then
- v.Touched:connect(killfunction)
- end
- end
Add Comment
Please, Sign In to add comment