Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local limbs = {}
- function ragdoll(PC)
- local limbcollider = Instance.new("Part", PC: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 = PC: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", PC: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 = PC: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", PC: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 = PC: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", PC: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 = PC:findFirstChild("Left Leg")
- limbcolliderweld4.Part1 = limbcollider4
- limbcolliderweld4.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2) * CFrame.new(-0.3,0,0)
- PC.Humanoid.PlatformStand = true
- table.insert(limbs,limbcollider)
- table.insert(limbs,limbcollider2)
- table.insert(limbs,limbcollider3)
- table.insert(limbs,limbcollider4)
- for i,v in pairs(PC: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 = true
- Socket.TwistLimitsEnabled = true
- v.Enabled = false
- end
- end
- end
- function unragdoll(PC)
- PC.Humanoid.PlatformStand = false
- for i,v in pairs(PC:GetDescendants()) do
- if v:IsA("Motor6D") then
- v.Enabled = true
- end
- end
- for i,v in pairs(limbs) do
- v:Destroy()
- end
- end
- Tool = Instance.new("Tool")
- Tool.Name = "Sword"
- Knife = Instance.new("Part")
- Knife2 = Instance.new("Part",Knife)
- Knife.Name = "Handle"
- Knife.Parent = Tool
- Tool.Parent = owner.Character
- Knife.Size = Vector3.new(1.25, 1.25, 1.75)
- Knife.Massless = true
- Knife.CanCollide = true
- Knife.Material = Enum.Material.SmoothPlastic
- Knife2.Size = Vector3.new(0.25, 0.5, 0.75)
- Knife2.Massless = true
- Knife2.CanCollide = true
- Knife2.Material = Enum.Material.SmoothPlastic
- Knife2.Color = Color3.fromRGB(20,20,20)
- local weld2 = Instance.new("Weld",Knife)
- weld2.Part0 = Knife2
- weld2.Part1 = Knife
- weld2.C0 = CFrame.new(-0.675,0,0.4375)
- myhum = owner.Character.Humanoid
- local stab = Instance.new("Sound", owner.character.Head)
- stab.SoundId = "rbxassetid://199607491"
- stab.Volume = 0.5
- islunging = false
- Tool.Activated:connect(function()
- islunging = true
- stab.PlaybackSpeed = math.random(80, 125)/100
- stab:Stop()
- stab:Play()
- local Anim = Instance.new("StringValue")
- Anim.Name = "toolanim"
- Anim.Value = "Lunge"
- Anim.Parent = Tool
- wait(0.5)
- islunging = false
- end)
- part = Instance.new("Part",owner.Character)
- part.Anchored = true
- part.CFrame = CFrame.new(0,1000,0)
- part.Size = Vector3.new(0.05,0.05,0.05)
- part.Transparency = 1
- local weld = Instance.new("WeldConstraint",part)
- roped = false
- whatplayer = nil
- whatpart = nil
- function thinghere(plr,action, hit, target)
- pcall(function()
- if not roped then
- local Model = target:FindFirstAncestorOfClass("Model")
- if Model then
- local who = game:GetService("Players"):GetPlayerFromCharacter(Model)
- if who then
- whatplayer = who
- ragdoll(whatplayer.Character)
- whatpart = target
- whatpart:SetNetworkOwner(owner)
- for i,v in pairs(whatpart:GetDescendants()) do
- if v:IsA("Part") then
- v.Massless = true
- end
- end
- end
- end
- elseif roped then
- for i,v in pairs(whatpart:GetDescendants()) do
- if v:IsA("Part") then
- v.Massless = false
- end
- end
- unragdoll(whatplayer.Character)
- whatpart:SetNetworkOwner(whatplayer)
- end
- end)
- if roped then
- alignposition:Destroy()
- part.Anchored = true
- roped = false
- weld.Part0 = part
- weld.Part1 = part
- else
- if islunging then
- part.Anchored = false
- roped = true
- part.CFrame = hit
- local attachment0 = Instance.new("Attachment")
- attachment0.Parent = part
- local attachment1 = Instance.new("Attachment")
- attachment1.Parent = Knife2
- alignposition = Instance.new("RopeConstraint")
- alignposition.Parent = Knife
- alignposition.Attachment0 = attachment0
- alignposition.Attachment1 = attachment1
- alignposition.Visible = true
- local distance = (owner.Character.Torso.CFrame.Position - part.CFrame.Position).magnitude
- alignposition.Length = distance
- alignposition.Thickness = 0.25
- alignposition.Restitution = 0.25
- weld.Part0 = target
- weld.Part1 = part
- end
- end
- end
- local E = Instance.new("RemoteEvent",NLS([[local E = script:FindFirstChildWhichIsA("RemoteEvent")
- local Mouse = owner:GetMouse()
- function ButtonDown()
- if Mouse.Hit ~= nil then
- E:FireServer("Down", Mouse.Hit, Mouse.Target)
- end
- end
- Mouse.Button1Down:Connect(ButtonDown)
- ]],owner.PlayerGui))
- E.OnServerEvent:Connect(thinghere)
- Tool.GripPos = Vector3.new(0,0,-0.85)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement