Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function ragdoll()
- owner.Character.Humanoid.RequiresNeck = false
- local limbcollider = Instance.new("Part", owner.Character:findFirstChild("Right Arm"))
- limbcollider.Size = Vector3.new(1.4,1,1)
- 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.Transparency = 1
- limbcollider2.Name = "LimbCollider"
- local limbcolliderweld2 = Instance.new("Weld", limbcollider2)
- 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.Head)
- limbcollider3.Size = Vector3.new(0.5,0.5,0.5)
- limbcollider3.Shape = "Ball"
- limbcollider3.Transparency = 1
- limbcollider3.Name = "LimbCollider"
- local limbcolliderweld = Instance.new("Weld", limbcollider3)
- limbcolliderweld.Part0 = owner.Character.Head
- limbcolliderweld.Part1 = limbcollider3
- limbcolliderweld.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2) * CFrame.new(-0.3,0,0)
- for i,v in pairs(owner.Character:GetDescendants()) do
- pcall(function()
- if v:IsA("Motor6D") then
- v.Enabled = false
- end
- end)
- end
- local Socket = Instance.new("BallSocketConstraint")
- local a1 = Instance.new("Attachment")
- local a2 = Instance.new("Attachment")
- a1.Parent = owner.Character["Left Arm"]
- a2.Parent = owner.Character.Torso
- Socket.Parent = owner.Character["Left Arm"]
- Socket.Attachment0 = a1
- Socket.Attachment1 = a2
- a1.CFrame = CFrame.new(0,0.45,0)
- a2.CFrame = CFrame.new(-1.5,0.65,0)
- Socket.LimitsEnabled = true
- local Socket = Instance.new("BallSocketConstraint")
- local a1 = Instance.new("Attachment")
- local a2 = Instance.new("Attachment")
- a1.Parent = owner.Character["Left Leg"]
- a2.Parent = owner.Character.Torso
- Socket.Parent = owner.Character["Left Leg"]
- Socket.Attachment0 = a1
- Socket.Attachment1 = a2
- a1.CFrame = CFrame.new(0.1,0.5,0.1)
- a2.CFrame = CFrame.new(-0.45,-1.5,-0.1)
- Socket.LimitsEnabled = true
- local Socket = Instance.new("BallSocketConstraint")
- local a1 = Instance.new("Attachment")
- local a2 = Instance.new("Attachment")
- a1.Parent = owner.Character["Right Leg"]
- a2.Parent = owner.Character.Torso
- Socket.Parent = owner.Character["Right Leg"]
- Socket.Attachment0 = a1
- Socket.Attachment1 = a2
- Socket.LimitsEnabled = true
- a1.CFrame = CFrame.new(-0.1,0.5,0.1)
- a2.CFrame =CFrame.new(0.45,-1.5,-0.1)
- local limbcollider = Instance.new("Part", owner.Character:findFirstChild("Right Leg"))
- limbcollider.Size = Vector3.new(1.4,1,1)
- limbcollider.Transparency = 1
- limbcollider.Name = "LimbCollider"
- local limbcolliderweld = Instance.new("Weld", limbcollider)
- limbcolliderweld.Part0 = owner.Character:findFirstChild("Right Leg")
- 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 Leg"))
- limbcollider2.Size = Vector3.new(1.4,1,1)
- limbcollider2.Transparency = 1
- limbcollider2.Name = "LimbCollider"
- local limbcolliderweld2 = Instance.new("Weld", limbcollider2)
- limbcolliderweld2.Part0 = owner.Character:findFirstChild("Left Leg")
- limbcolliderweld2.Part1 = limbcollider2
- limbcolliderweld2.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2) * CFrame.new(-0.3,0,0)
- local Socket = Instance.new("BallSocketConstraint")
- local a1 = Instance.new("Attachment")
- local a2 = Instance.new("Attachment")
- a1.Parent = owner.Character.HumanoidRootPart
- a2.Parent = owner.Character.Torso
- Socket.Parent = owner.Character.HumanoidRootPart
- Socket.Attachment0 = a1
- Socket.Attachment1 = a2
- Socket.LimitsEnabled = true
- local Socket = Instance.new("BallSocketConstraint")
- local a1 = Instance.new("Attachment")
- local a2 = Instance.new("Attachment")
- a1.Parent = owner.Character.Head
- a2.Parent = owner.Character.Torso
- Socket.Parent = owner.Character.Head
- Socket.Attachment0 = a1
- Socket.Attachment1 = a2
- a1.CFrame = CFrame.new(0,-0.5,0)
- a2.CFrame = CFrame.new(0,1.0625,0)
- Socket.TwistLimitsEnabled = true
- Socket.LimitsEnabled = true
- local Socket = Instance.new("BallSocketConstraint")
- local a1 = Instance.new("Attachment")
- local a2 = Instance.new("Attachment")
- a1.Parent = owner.Character["Right Arm"]
- a2.Parent = owner.Character.Torso
- Socket.Parent = owner.Character["Right Arm"]
- Socket.Attachment0 = a1
- Socket.Attachment1 = a2
- a1.CFrame = CFrame.new(0,0.45,0)
- a2.CFrame = CFrame.new(1.5,0.65,0)
- Socket.LimitsEnabled = true
- owner.Character.Humanoid.PlatformStand = true
- end
- function getup()
- for i,v in pairs(owner.Character:GetDescendants()) do
- if v:IsA("BasePart") and v.Name == "LimbCollider" then
- v:Destroy()
- elseif v:IsA("BallSocketConstraint") then
- v:Destroy()
- elseif v:IsA("Motor6D") then
- v.Enabled = true
- end
- end
- owner.Character.Humanoid.RequiresNeck = true
- owner.Character.Humanoid.PlatformStand = false
- end
- local rayblacklist = {}
- local p = Instance.new("SpawnLocation")
- p.Enabled = false
- p.Transparency = 1
- p.Size = Vector3.new(0.25,0.25,0.25)
- p.Name = "bloodyhujijahuyugtfvfyh"
- local attachment0 = Instance.new("Attachment",p)
- local attachment1 = Instance.new("Attachment",p)
- attachment1.CFrame = CFrame.new(0,0.125,0)
- attachment0.CFrame = CFrame.new(0,-0.125,0)
- local trail = Instance.new("Trail",p)
- trail.Attachment0 = attachment0
- trail.Attachment1 = attachment1
- trail.Lifetime = .5
- trail.Transparency = NumberSequence.new{NumberSequenceKeypoint.new(0, 0),NumberSequenceKeypoint.new(1, 1)}
- trail.WidthScale = NumberSequence.new{NumberSequenceKeypoint.new(0, 1),NumberSequenceKeypoint.new(1, 0)}
- trail.MaxLength = 0
- trail.MinLength = 0.1
- trail.LightEmission = 0
- trail.LightInfluence = 1
- trail.TextureLength = 1
- trail.TextureMode = "Stretch"
- trail.Color = ColorSequence.new(Color3.fromRGB(85, 0, 0))
- local min = -15
- local max = 15
- function splat(whatpart,times)
- for i = 1,(2 * times) do
- task.wait()
- coroutine.wrap(function()
- local b = p:Clone()
- b.Parent = script
- b.Position = whatpart.Position + Vector3.new(whatpart.Velocity.X,0,whatpart.Velocity.Z) * owner:GetNetworkPing()
- b.Velocity = Vector3.new(Random.new():NextNumber(min,max),Random.new():NextNumber(min,max) + 30,Random.new():NextNumber(min,max)) + whatpart.Velocity * owner:GetNetworkPing()
- table.insert(rayblacklist,b)
- b.Touched:Connect(function(what)
- if not (what:FindFirstAncestorWhichIsA("Model") and what:FindFirstAncestorWhichIsA("Model"):FindFirstChildWhichIsA("Humanoid")) and not table.find(rayblacklist,what) and what.CanCollide then
- local params = RaycastParams.new()
- params.FilterDescendantsInstances = {rayblacklist,whatpart:FindFirstAncestorWhichIsA("Model"):GetDescendants()}
- params.FilterType = Enum.RaycastFilterType.Blacklist
- local result = workspace:Raycast(b.Position,b.Velocity + Vector3.new(0,-3,0), params)
- if result then
- local bloodpartfloor = Instance.new("SpawnLocation", workspace)
- bloodpartfloor.Enabled = false
- bloodpartfloor.CanCollide = false
- bloodpartfloor.Anchored = true
- table.insert(rayblacklist,bloodpartfloor)
- bloodpartfloor.Size = Vector3.new(0.005,0.005,0.005)
- bloodpartfloor.CanCollide = false
- bloodpartfloor.Material = "Glass"
- bloodpartfloor.Shape = "Cylinder"
- b:Destroy()
- bloodpartfloor.Position = result.Position
- local whathit = result.Instance
- local currentRightVector = whathit.CFrame.RightVector
- local upVector = result.Normal
- local newFacialVector = currentRightVector:Cross(upVector)
- bloodpartfloor.CFrame = CFrame.fromMatrix(bloodpartfloor.Position, currentRightVector, upVector, newFacialVector) * CFrame.Angles(0,0,math.rad(90))
- bloodpartfloor.BrickColor = BrickColor.new("Maroon")
- game:GetService("Debris"):AddItem(bloodpartfloor,25)
- local random = Random.new():NextNumber(0.25,2)
- local tweenService = game:GetService("TweenService")
- local timeToFade = .25
- local object = bloodpartfloor
- local tweenInfo = TweenInfo.new(timeToFade)
- local goal = {}
- goal.Size = Vector3.new(0.005,random,random)
- local grow = tweenService:Create(object, tweenInfo, goal)
- grow:Play()
- end
- end
- end)
- end)()
- end
- end
- fall = {1106908323,1080610583,1106908778}
- local ow = Instance.new("Sound", owner.Character.Head)
- ow.Volume = 2
- headshotids = {6837727169, 6837727725, 6837726415,6837724677,6837689373,6837725727}
- local bodyhit = Instance.new("Sound", owner.Character.Torso)
- bodyhit.SoundId = "rbxassetid://220025741"
- bodyhit.Volume = 2
- coroutine.wrap(function()
- while true do
- while owner.Character.Torso.Velocity.y >= -70 do
- task.wait()
- end
- while owner.Character.Torso.Velocity.y < -10 do
- task.wait()
- end
- local rand = math.random(1,#headshotids)
- bodyhit.SoundId = "rbxassetid://"..headshotids[rand]
- bodyhit.TimePosition = 0.2
- bodyhit:Play()
- bodyhit.Ended:Wait(0.0625)
- end
- end)()
- local falldb = false
- local falldb2 = false
- local currentheight = 0
- local maxheight = 0
- owner.Character.Humanoid.Touched:Connect(function(what,limb)
- if falldb and what.Name ~= "LimbCollider" and limb.Name ~= "LimbCollider" and what.Name ~= "bloodyhujijahuyugtfvfyh" and what.CanCollide and not table.find(rayblacklist,what) and limb.Velocity.y < -5 and what.Parent ~= owner.Character then
- splat(limb,math.random(2,3))
- owner.Character.Humanoid.Health -= ((math.abs(maxheight) - math.abs(currentheight)))
- maxheight = owner.Character.Torso.Position.Y
- currentheight = owner.Character.Torso.Position.Y
- end
- end)
- coroutine.wrap(function()
- while task.wait() do
- if maxheight < owner.Character.Torso.Position.Y then
- maxheight = owner.Character.Torso.Position.Y
- end
- currentheight = owner.Character.Torso.Position.Y
- end
- end)()
- coroutine.wrap(function()
- while true do
- task.wait()
- if not falldb and not falldb2 then
- while owner.Character.Torso.Velocity.y >= -70 and owner.Character.Torso.Velocity.y <= 60 do
- task.wait()
- end
- falldb2 = true
- ragdoll()
- local sound = "rbxassetid://"..fall[math.random(1,3)]
- ow.Volume = 2
- if sound ~= ow.SoundId then
- ow.SoundId = sound
- else
- repeat
- task.wait()
- sound = "rbxassetid://"..fall[math.random(1,3)]
- until sound ~= ow.SoundId
- ow.SoundId = sound
- end
- ow:Play()
- end
- end
- end)()
- coroutine.wrap(function()
- while true do
- if not falldb then
- while owner.Character.Torso.Velocity.y >= -70 do
- task.wait()
- end
- task.wait()
- falldb = true
- repeat
- task.wait()
- until (owner.Character.Head.Position - (owner.Character.Head.Position + owner.Character.Head.Velocity)).Magnitude <= 1
- falldb = false
- coroutine.wrap(function()
- for i = 1, 5 do
- if not falldb then
- task.wait()
- ow.Volume = 2 - (i * 0.4)
- end
- end
- ow:Stop()
- end)()
- wait(6)
- getup()
- falldb2 = false
- end
- task.wait()
- end
- end)()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement