Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local debris = game:GetService("Debris")
- Bullet = Instance.new("Part", owner.Character)
- Bullet.Position = Vector3.new(1000000,1000000,1000000)
- Bullet.Anchored = true
- Bullet.CanCollide = false
- Tool = Instance.new("Tool")
- Tool.Name = "Ragdoll gun"
- Part = Instance.new("Part")
- Part.Name = "Handle"
- Part.Parent = Tool
- Part.Size = Vector3.new(0.47466666666,1.67733333333,3.77766666667)
- Tool.GripPos = Vector3.new(0,0,1.63883333334)
- Tool.Parent = owner.Character
- local E = Instance.new("RemoteEvent", owner.Character)
- E.Name = "The"
- Bullet.BrickColor = BrickColor.new("Bright yellow")
- Mesh = Instance.new("SpecialMesh")
- Mesh.Parent = Part
- Mesh.MeshId = "http://www.roblox.com/asset/?id=553398821"
- Mesh.TextureId = "http://www.roblox.com/asset/?id=553398915"
- Mesh.Scale = Vector3.new(0.333333333333, 0.333333333333, 0.333333333333)
- local Pow = Instance.new("Sound", owner.character.Head)
- Pow.SoundId = "rbxassetid://3810328903"
- Pow.Volume = 2
- NLS([[
- Tool = owner.Character:WaitForChild("Ragdoll gun")
- local E = owner.Character:WaitForChild("The")
- local toolout = false
- Tool.Equipped:Connect(function()
- toolout = true
- end)
- Tool.Unequipped:Connect(function()
- toolout = false
- end)
- mouse = owner:GetMouse()
- mouse.Button1Down:Connect(function()
- if toolout then
- local position = mouse.Hit.Position
- E:FireServer(position)
- end
- end)
- ]],owner.PlayerGui)
- local velocity
- function killfunction(part)
- local Model = part:FindFirstAncestorOfClass("Model")
- if Model then
- local PC = game:GetService("Players"):GetPlayerFromCharacter(Model)
- if PC then
- if PC ~= owner then
- local limbcollider = Instance.new("Part", PC.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 = PC.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", PC.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 = PC.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", PC.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 = PC.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", PC.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 = PC.Character:findFirstChild("Left Leg")
- limbcolliderweld4.Part1 = limbcollider4
- limbcolliderweld4.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2) * CFrame.new(-0.3,0,0)
- for i,v in pairs(PC.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 = true
- Socket.TwistLimitsEnabled = true
- v:Destroy()
- end
- end
- end
- end
- end
- end
- E.OnServerEvent:Connect(function(player, position)
- Pow:Play()
- local origin = Part.Position
- local direction = (position - origin).Unit*300
- local result = game.Workspace:Raycast(origin, direction)
- local intersection = result and result.Position or origin + direction
- local distance = (origin - intersection).Magnitude + 2.5
- local bullet_clone = Bullet:Clone()
- bullet_clone.Size = Vector3.new(0.1, 0.1, distance)
- bullet_clone.CFrame = CFrame.new(origin, intersection)*CFrame.new(0, 0, -distance/2)
- bullet_clone.Parent = game.Workspace
- if result then
- local part = result.Instance
- wait(0.1)
- killfunction(part)
- local humanoid = part.Parent:FindFirstChild("Humanoid") or part.Parent.Parent:FindFirstChild("Humanoid")
- if humanoid then
- if humanoid ~= owner.Character.Humanoid then
- humanoid.BreakJointsOnDeath = false
- wait(0.1)
- humanoid.Health = 0
- local velocity = Instance.new("BodyVelocity", part)
- velocity.Velocity = bullet_clone.CFrame.lookVector * 20
- velocity.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
- wait(0.125)
- velocity:Destroy()
- velocity = nil
- end
- end
- end
- wait(0.25)
- bullet_clone:Destroy()
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement