Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Tool0 = Instance.new("Tool")
- Part1 = Instance.new("Part")
- SpecialMesh2 = Instance.new("SpecialMesh")
- Part3 = Instance.new("Part")
- SpecialMesh4 = Instance.new("SpecialMesh")
- Part5 = Instance.new("Part")
- SpecialMesh6 = Instance.new("SpecialMesh")
- Part7 = Instance.new("Part")
- SpecialMesh8 = Instance.new("SpecialMesh")
- Part9 = Instance.new("Part")
- Part10 = Instance.new("Part")
- ParticleEmitter11 = Instance.new("ParticleEmitter")
- Part12 = Instance.new("Part")
- Part13 = Instance.new("Part")
- Tool0.Name = "KrY's Balisong"
- Tool0.Parent = nil
- Tool0.Grip = CFrame.new(-0.488691062, 0.0183694493, -0.0276023746, -4.37113847e-08, 0.99999994, 0, 4.37113883e-08, 1.91068547e-15, 0.99999994, 1, 4.37113883e-08, -4.37113847e-08)
- Part1.Name = "Blade"
- Part1.Parent = Tool0
- Part1.CFrame = CFrame.new(-6.14499998, 1.48699999, -11.9829998, 1.91068547e-15, 4.37113883e-08, 1, 1, -4.37113883e-08, 0, 4.37113883e-08, 1, -4.37113883e-08)
- Part1.Orientation = Vector3.new(0, 90, 90)
- Part1.Position = Vector3.new(-6.14499998, 1.48699999, -11.9829998)
- Part1.Rotation = Vector3.new(90, 90, 0)
- Part1.Color = Color3.new(1, 1, 0)
- Part1.Size = Vector3.new(0.967000008, 0.231999993, 0.0529999994)
- Part1.Anchored = true
- Part1.BottomSurface = Enum.SurfaceType.Smooth
- Part1.BrickColor = BrickColor.new("New Yeller")
- Part1.Material = Enum.Material.Metal
- Part1.TopSurface = Enum.SurfaceType.Smooth
- Part1.brickColor = BrickColor.new("New Yeller")
- SpecialMesh2.Parent = Part1
- SpecialMesh2.MeshId = "rbxassetid://2186769714"
- SpecialMesh2.Scale = Vector3.new(0.158000007, 0.158000007, 0.158000007)
- SpecialMesh2.TextureId = "rbxassetid://386515810"
- SpecialMesh2.MeshType = Enum.MeshType.FileMesh
- Part3.Name = "Latch"
- Part3.Parent = Tool0
- Part3.CFrame = CFrame.new(-6.13899994, 0.0560000017, -11.9630003, 1.91068547e-15, 4.37113883e-08, 1, 1, -4.37113883e-08, 0, 4.37113883e-08, 1, -4.37113883e-08)
- Part3.Orientation = Vector3.new(0, 90, 90)
- Part3.Position = Vector3.new(-6.13899994, 0.0560000017, -11.9630003)
- Part3.Rotation = Vector3.new(90, 90, 0)
- Part3.Color = Color3.new(0.960784, 0.803922, 0.188235)
- Part3.Size = Vector3.new(0.0710000023, 0.231000006, 0.0529999994)
- Part3.Anchored = true
- Part3.BottomSurface = Enum.SurfaceType.Smooth
- Part3.BrickColor = BrickColor.new("Bright yellow")
- Part3.Material = Enum.Material.Metal
- Part3.TopSurface = Enum.SurfaceType.Smooth
- Part3.brickColor = BrickColor.new("Bright yellow")
- SpecialMesh4.Parent = Part3
- SpecialMesh4.MeshId = "rbxassetid://2186770371"
- SpecialMesh4.Scale = Vector3.new(0.158000007, 0.158000007, 0.158000007)
- SpecialMesh4.TextureId = "rbxassetid://4923218048"
- SpecialMesh4.MeshType = Enum.MeshType.FileMesh
- Part5.Name = "Bite"
- Part5.Parent = Tool0
- Part5.CFrame = CFrame.new(-6.13899994, 0.575999975, -12.0559998, 1.91068547e-15, 4.37113883e-08, 1, 1, -4.37113883e-08, 0, 4.37113883e-08, 1, -4.37113883e-08)
- Part5.Orientation = Vector3.new(0, 90, 90)
- Part5.Position = Vector3.new(-6.13899994, 0.575999975, -12.0559998)
- Part5.Rotation = Vector3.new(90, 90, 0)
- Part5.Color = Color3.new(0.960784, 0.803922, 0.188235)
- Part5.Size = Vector3.new(1.12, 0.119000003, 0.140000001)
- Part5.Anchored = true
- Part5.BottomSurface = Enum.SurfaceType.Smooth
- Part5.BrickColor = BrickColor.new("Bright yellow")
- Part5.Material = Enum.Material.Metal
- Part5.TopSurface = Enum.SurfaceType.Smooth
- Part5.brickColor = BrickColor.new("Bright yellow")
- SpecialMesh6.Parent = Part5
- SpecialMesh6.MeshId = "rbxassetid://2186769971"
- SpecialMesh6.Scale = Vector3.new(0.158000007, 0.158000007, 0.158000007)
- SpecialMesh6.TextureId = "rbxassetid://4923218048"
- SpecialMesh6.MeshType = Enum.MeshType.FileMesh
- Part7.Name = "FakeHandle"
- Part7.Parent = Tool0
- Part7.CFrame = CFrame.new(-6.13899994, 0.575999975, -11.9209995, 1.91068547e-15, 4.37113883e-08, 1, 1, -4.37113883e-08, 0, 4.37113883e-08, 1, -4.37113883e-08)
- Part7.Orientation = Vector3.new(0, 90, 90)
- Part7.Position = Vector3.new(-6.13899994, 0.575999975, -11.9209995)
- Part7.Rotation = Vector3.new(90, 90, 0)
- Part7.Color = Color3.new(0.960784, 0.803922, 0.188235)
- Part7.Size = Vector3.new(1.12, 0.119000003, 0.140000001)
- Part7.Anchored = true
- Part7.BottomSurface = Enum.SurfaceType.Smooth
- Part7.BrickColor = BrickColor.new("Bright yellow")
- Part7.Material = Enum.Material.Metal
- Part7.TopSurface = Enum.SurfaceType.Smooth
- Part7.brickColor = BrickColor.new("Bright yellow")
- SpecialMesh8.Parent = Part7
- SpecialMesh8.MeshId = "rbxassetid://2186770196"
- SpecialMesh8.Scale = Vector3.new(0.158000007, 0.158000007, 0.158000007)
- SpecialMesh8.TextureId = "rbxassetid://4923218048"
- SpecialMesh8.MeshType = Enum.MeshType.FileMesh
- Part9.Name = "lw"
- Part9.Parent = Tool0
- Part9.CFrame = CFrame.new(-6.13899994, 0.0560000017, -12.059, 1.91068547e-15, 4.37113883e-08, 1, 1, -4.37113883e-08, 0, 4.37113883e-08, 1, -4.37113883e-08)
- Part9.Orientation = Vector3.new(0, 90, 90)
- Part9.Position = Vector3.new(-6.13899994, 0.0560000017, -12.059)
- Part9.Rotation = Vector3.new(90, 90, 0)
- Part9.Color = Color3.new(0.960784, 0.803922, 0.188235)
- Part9.Transparency = 1
- Part9.Size = Vector3.new(0.0500000007, 0.0500000007, 0.0500000007)
- Part9.Anchored = true
- Part9.BottomSurface = Enum.SurfaceType.Smooth
- Part9.BrickColor = BrickColor.new("Bright yellow")
- Part9.Material = Enum.Material.Metal
- Part9.TopSurface = Enum.SurfaceType.Smooth
- Part9.brickColor = BrickColor.new("Bright yellow")
- Part10.Name = "Handle"
- Part10.Parent = Tool0
- Part10.CFrame = CFrame.new(-6.13899994, 1.00099969, -11.9804993, 1.91068547e-15, 4.37113883e-08, 1, 1, -4.37113883e-08, 0, 4.37113883e-08, 1, -4.37113883e-08)
- Part10.Orientation = Vector3.new(0, 90, 90)
- Part10.Position = Vector3.new(-6.13899994, 1.00099969, -11.9804993)
- Part10.Rotation = Vector3.new(90, 90, 0)
- Part10.Color = Color3.new(0.960784, 0.803922, 0.188235)
- Part10.Transparency = 1
- Part10.Size = Vector3.new(1.96999931, 0.237999991, 0.140000001)
- Part10.Anchored = true
- Part10.BottomSurface = Enum.SurfaceType.Smooth
- Part10.BrickColor = BrickColor.new("Bright yellow")
- Part10.Material = Enum.Material.Metal
- Part10.TopSurface = Enum.SurfaceType.Smooth
- Part10.brickColor = BrickColor.new("Bright yellow")
- ParticleEmitter11.Parent = Part10
- ParticleEmitter11.Speed = NumberRange.new(0, 0)
- ParticleEmitter11.Color = ColorSequence.new(Color3.new(1, 0, 0),Color3.new(0, 1, 0),Color3.new(0, 0, 1))
- ParticleEmitter11.LightEmission = 1
- ParticleEmitter11.LightInfluence = 1
- ParticleEmitter11.Texture = "rbxassetid://243660373"
- ParticleEmitter11.Transparency = NumberSequence.new(1,0.80000001192093,0.80000001192093,1)
- ParticleEmitter11.ZOffset = 1
- ParticleEmitter11.Lifetime = NumberRange.new(1, 1)
- ParticleEmitter11.LockedToPart = true
- ParticleEmitter11.Rate = 10
- Part12.Name = "hw"
- Part12.Parent = Tool0
- Part12.CFrame = CFrame.new(-6.13899994, 1.08600008, -11.941, 1.91068547e-15, 4.37113883e-08, 1, 1, -4.37113883e-08, 0, 4.37113883e-08, 1, -4.37113883e-08)
- Part12.Orientation = Vector3.new(0, 90, 90)
- Part12.Position = Vector3.new(-6.13899994, 1.08600008, -11.941)
- Part12.Rotation = Vector3.new(90, 90, 0)
- Part12.Color = Color3.new(0.972549, 0.972549, 0.972549)
- Part12.Transparency = 1
- Part12.Size = Vector3.new(0.0500000007, 0.0500000007, 0.0500000007)
- Part12.Anchored = true
- Part12.BottomSurface = Enum.SurfaceType.Smooth
- Part12.BrickColor = BrickColor.new("Institutional white")
- Part12.Material = Enum.Material.SmoothPlastic
- Part12.TopSurface = Enum.SurfaceType.Smooth
- Part12.brickColor = BrickColor.new("Institutional white")
- Part13.Name = "bw"
- Part13.Parent = Tool0
- Part13.CFrame = CFrame.new(-6.13899994, 1.08600008, -12.0359993, 1.91068547e-15, 4.37113883e-08, 1, 1, -4.37113883e-08, 0, 4.37113883e-08, 1, -4.37113883e-08)
- Part13.Orientation = Vector3.new(0, 90, 90)
- Part13.Position = Vector3.new(-6.13899994, 1.08600008, -12.0359993)
- Part13.Rotation = Vector3.new(90, 90, 0)
- Part13.Color = Color3.new(0.972549, 0.972549, 0.972549)
- Part13.Transparency = 1
- Part13.Size = Vector3.new(0.0500000007, 0.0500000007, 0.0500000007)
- Part13.Anchored = true
- Part13.BottomSurface = Enum.SurfaceType.Smooth
- Part13.BrickColor = BrickColor.new("Institutional white")
- Part13.Material = Enum.Material.SmoothPlastic
- Part13.TopSurface = Enum.SurfaceType.Smooth
- Part13.brickColor = BrickColor.new("Institutional white")
- local knife = Tool0
- local handle,fakehandle,blade,latch,bite
- local lwp,bwp,hwp
- local stun_duration = 0.4
- for i,v in pairs(knife:GetChildren()) do
- if v:IsA("BasePart") then
- v.Locked = true
- v.Massless = true
- v.CanCollide = false
- v.Anchored = false
- if v.Name == 'FakeHandle' then
- fakehandle = v
- elseif v.Name == 'Handle' then
- handle = v
- elseif v.Name == 'Blade' then
- blade = v
- elseif v.Name == 'Latch' then
- latch = v
- elseif v.Name == 'Bite' then
- bite = v
- elseif v.Name == 'lw' then
- lwp = v
- elseif v.Name == 'bw' then
- bwp = v
- elseif v.Name == 'hw' then
- hwp = v
- end
- end
- end
- handle.CanCollide = true
- local grip = knife.Grip
- local hw,lw,bw,_bw
- for i,v in pairs(knife:GetChildren()) do
- if v:IsA("BasePart") then
- if v.Name == 'FakeHandle' then
- hw = Instance.new("Weld",v)
- hw.Part0 = hwp
- hw.Part1 = v
- hw.C0 = CFrame.new()*CFrame.Angles(0,0,math.rad(-178.2))
- hw.C1 = CFrame.new((v.Size.X/2)-0.05,-0.02,0)
- local weld = Instance.new("Weld",handle)
- weld.Part0 = handle
- weld.Part1 = hwp
- weld.C0 = handle.CFrame:Inverse()
- weld.C1 = hwp.CFrame:Inverse()
- elseif v.Name == 'Blade' then
- _bw = Instance.new("Weld",v)
- _bw.Part0 = handle
- _bw.Part1 = v
- _bw.C0 = handle.CFrame:Inverse()
- _bw.C1 = v.CFrame:Inverse()
- elseif v.Name == 'Latch' then
- lw = Instance.new("Weld",v)
- lw.Part0 = lwp
- lw.Part1 = v
- lw.C0 = CFrame.new()*CFrame.Angles(0,0,math.rad(178.2))
- lw.C1 = CFrame.new(0,(-v.Size.Y/2)+0.02,0)
- local weld = Instance.new("Weld",bite)
- weld.Part0 = bite
- weld.Part1 = lwp
- weld.C0 = bite.CFrame:Inverse()
- weld.C1 = lwp.CFrame:Inverse()
- elseif v.Name == 'Bite' then
- bw = Instance.new("Weld",bwp)
- bw.Part0 = bwp
- bw.Part1 = v
- bw.C0 = CFrame.new()*CFrame.Angles(0,0,math.rad(178.2))
- bw.C1 = CFrame.new((v.Size.X/2)-0.05,0.02,0)
- local weld = Instance.new("Weld",handle)
- weld.Part0 = handle
- weld.Part1 = bwp
- weld.C0 = handle.CFrame:Inverse()
- weld.C1 = bwp.CFrame:Inverse()
- end
- end
- end
- --
- local a1,a2,k_trail = Instance.new("Attachment"),Instance.new("Attachment"),Instance.new("Trail")
- a1.Parent = blade
- a1.Position = Vector3.new(0, (blade.Size.X/2), 0)
- a2.Parent = blade
- a2.Position = Vector3.new(0, -(blade.Size.X/2), 0)
- k_trail.Parent = blade
- k_trail.Attachment0 = a1
- k_trail.Attachment1 = a2
- k_trail.MinLength = 0
- k_trail.LightInfluence = 1
- k_trail.Transparency = NumberSequence.new(0,1)
- k_trail.Lifetime = 0.5
- k_trail.Enabled = false
- --
- local spark = Instance.new("ParticleEmitter")
- spark.Enabled = false
- spark.Name = "spark"
- spark.Parent = blade
- spark.Speed = NumberRange.new(0.20000000298023, 0.20000000298023)
- spark.Rotation = NumberRange.new(45, 45)
- spark.Color = ColorSequence.new(Color3.new(1, 0.784314, 0), Color3.new(1, 1, 0.203922))
- spark.LightEmission = 3
- spark.Texture = "rbxassetid://134531274"
- spark.ZOffset = 2
- spark.Size = NumberSequence.new(0.24999976158142,0)
- spark.Lifetime = NumberRange.new(1, 2)
- spark.Rate = 400
- spark.Speed = NumberRange.new(0.5, 1)
- spark.RotSpeed = NumberRange.new(20, 20)
- spark.SpreadAngle = Vector2.new(180, 180)
- spark.VelocitySpread = 180
- --
- local glow = Instance.new("ParticleEmitter")
- glow.Parent = handle
- glow.Speed = NumberRange.new(0, 0)
- glow.Color = ColorSequence.new({
- ColorSequenceKeypoint.new(0,Color3.new(0, 0, 0.498039)),
- ColorSequenceKeypoint.new(1,Color3.new(1, 0, 0.498039)),
- })
- glow.LightEmission = 1
- glow.LightInfluence = 1
- glow.Texture = "rbxassetid://243660373"
- glow.Transparency = NumberSequence.new({
- NumberSequenceKeypoint.new(0,1),
- NumberSequenceKeypoint.new(0.0999,0.8),
- NumberSequenceKeypoint.new(0.798,0.8),
- NumberSequenceKeypoint.new(1,1),
- })
- glow.ZOffset = 1
- glow.Lifetime = NumberRange.new(1, 1)
- glow.LockedToPart = true
- glow.Rate = 10
- --
- local plr = owner
- local char = plr.Character
- local hum = char:FindFirstChildOfClass("Humanoid")
- local torso = char:FindFirstChild("Torso") or char:FindFirstChild("UpperTorso")
- local rootpart = char:FindFirstChild("HumanoidRootPart")
- local larm,rarm,lleg,rleg,head = char:FindFirstChild("Left Arm"),char:FindFirstChild("Right Arm"),char:FindFirstChild("Left Leg"),char:FindFirstChild("Right Leg"),char:FindFirstChild("Head")
- if larm and rarm and lleg and rleg and head--[[hum.RigType ~= Enum.HumanoidRigType.R6]] then else warn('Character must be R6.'); return; end;
- local opening = false
- local stabbing = false
- local equipped = false
- local hit_wall = false
- local wait_time = 0.4
- local stabs = {4988621662,4988621968,4988622242,4988625180}
- local wallhits = {3203893315,3203893704,3203893934}
- local skins = {
- function() -- rainbow gold
- for i,v in pairs(knife:GetDescendants()) do
- if v:IsA("SpecialMesh") then
- if v.Parent ~= blade then
- v.TextureId = 'rbxassetid://4923218048'
- elseif v.Parent == blade then
- v.TextureId = 'rbxassetid://386515810'
- end
- end
- end
- k_trail.Color = ColorSequence.new({
- ColorSequenceKeypoint.new(0,Color3.new(1, 0, 0)),
- ColorSequenceKeypoint.new(0.5,Color3.new(0, 1, 0)),
- ColorSequenceKeypoint.new(1,Color3.new(0, 0, 1)),
- })
- glow.Color = ColorSequence.new({
- ColorSequenceKeypoint.new(0,Color3.new(1, 0, 0)),
- ColorSequenceKeypoint.new(0.5,Color3.new(0, 1, 0)),
- ColorSequenceKeypoint.new(1,Color3.new(0, 0, 1)),
- })
- end,
- function() -- dark matter
- for i,v in pairs(knife:GetDescendants()) do
- if v:IsA("SpecialMesh") then
- if v.Parent ~= blade then
- v.TextureId = 'rbxassetid://654279108'
- elseif v.Parent == blade then
- v.TextureId = 'rbxassetid://725340593'
- end
- end
- end
- k_trail.Color = ColorSequence.new({
- ColorSequenceKeypoint.new(0,Color3.new(0, 0, 0.498039)),
- ColorSequenceKeypoint.new(1,Color3.new(0, 0, 0)),
- })
- glow.Color = ColorSequence.new({
- ColorSequenceKeypoint.new(0,Color3.new(0, 0, 0.498039)),
- ColorSequenceKeypoint.new(1,Color3.new(0, 0, 0)),
- })
- end,
- function() -- doppler emerald
- for i,v in pairs(knife:GetDescendants()) do
- if v:IsA("SpecialMesh") then
- if v.Parent ~= blade then
- v.TextureId = 'rbxassetid://465512235'
- elseif v.Parent == blade then
- v.TextureId = 'rbxassetid://438897259'
- end
- end
- end
- k_trail.Color = ColorSequence.new({
- ColorSequenceKeypoint.new(0,Color3.new(0, 0.666667, 0)),
- ColorSequenceKeypoint.new(1,Color3.new(0.666667, 0.666667, 1)),
- })
- glow.Color = ColorSequence.new({
- ColorSequenceKeypoint.new(0,Color3.new(0, 0.666667, 0)),
- ColorSequenceKeypoint.new(1,Color3.new(0.666667, 0.666667, 1)),
- })
- end,
- function() -- ruby
- for i,v in pairs(knife:GetDescendants()) do
- if v:IsA("SpecialMesh") then
- if v.Parent ~= blade then
- v.TextureId = 'rbxassetid://632684827'
- elseif v.Parent == blade then
- v.TextureId = 'rbxassetid://3047348663'
- end
- end
- end
- k_trail.Color = ColorSequence.new({
- ColorSequenceKeypoint.new(0,Color3.new(1, 0, 0)),
- ColorSequenceKeypoint.new(1,Color3.new(1, 0, 0.498039)),
- })
- glow.Color = ColorSequence.new({
- ColorSequenceKeypoint.new(0,Color3.new(1, 0, 0)),
- ColorSequenceKeypoint.new(1,Color3.new(1, 0, 0.498039)),
- })
- end,
- function() -- doppler galaxy
- for i,v in pairs(knife:GetDescendants()) do
- if v:IsA("SpecialMesh") then
- if v.Parent ~= blade then
- v.TextureId = 'rbxassetid://5429699047'
- elseif v.Parent == blade then
- v.TextureId = 'rbxassetid://1094064933'
- end
- end
- end
- k_trail.Color = ColorSequence.new({
- ColorSequenceKeypoint.new(0,Color3.new(0, 0, 0.498039)),
- ColorSequenceKeypoint.new(1,Color3.new(1, 0, 0.498039)),
- })
- glow.Color = ColorSequence.new({
- ColorSequenceKeypoint.new(0,Color3.new(0, 0, 0.498039)),
- ColorSequenceKeypoint.new(1,Color3.new(1, 0, 0.498039)),
- })
- end,
- function() -- pattern 1 (white and alder)
- for i,v in pairs(knife:GetDescendants()) do
- if v:IsA("SpecialMesh") then
- if v.Parent ~= blade then
- v.TextureId = 'rbxassetid://49942836'
- elseif v.Parent == blade then
- v.TextureId = 'rbxassetid://5127790558'
- end
- end
- end
- k_trail.Color = ColorSequence.new({
- ColorSequenceKeypoint.new(0,Color3.fromRGB(255, 85, 127)),
- ColorSequenceKeypoint.new(0.5,Color3.new(1, 1, 1)),
- ColorSequenceKeypoint.new(1,Color3.fromRGB(170, 85, 255)),
- })
- glow.Color = ColorSequence.new({
- ColorSequenceKeypoint.new(0,Color3.fromRGB(255, 85, 127)),
- ColorSequenceKeypoint.new(0.5,Color3.new(1, 1, 1)),
- ColorSequenceKeypoint.new(1,Color3.fromRGB(170, 85, 255)),
- })
- end,
- function() -- pattern 2 (dark red)
- for i,v in pairs(knife:GetDescendants()) do
- if v:IsA("SpecialMesh") then
- if v.Parent ~= blade then
- v.TextureId = 'rbxassetid://3196461767'
- elseif v.Parent == blade then
- v.TextureId = 'rbxassetid://3534795831'
- end
- end
- end
- k_trail.Color = ColorSequence.new({
- ColorSequenceKeypoint.new(0,Color3.fromRGB(85, 0, 0)),
- ColorSequenceKeypoint.new(1,Color3.fromRGB(170, 0, 0)),
- })
- glow.Color = ColorSequence.new({
- ColorSequenceKeypoint.new(0,Color3.fromRGB(85, 0, 0)),
- ColorSequenceKeypoint.new(1,Color3.fromRGB(170, 0, 0)),
- })
- end,
- function() -- pattern 3 (blue, yellow, green)
- for i,v in pairs(knife:GetDescendants()) do
- if v:IsA("SpecialMesh") then
- if v.Parent ~= blade then
- v.TextureId = 'rbxassetid://164867621'
- elseif v.Parent == blade then
- v.TextureId = 'rbxassetid://522913487'
- end
- end
- end
- k_trail.Color = ColorSequence.new({
- ColorSequenceKeypoint.new(0,Color3.fromRGB(0, 85, 255)),
- ColorSequenceKeypoint.new(0.5,Color3.fromRGB(255, 255, 0)),
- ColorSequenceKeypoint.new(1,Color3.fromRGB(0, 170, 0)),
- })
- glow.Color = ColorSequence.new({
- ColorSequenceKeypoint.new(0,Color3.fromRGB(0, 85, 255)),
- ColorSequenceKeypoint.new(0.5,Color3.fromRGB(255, 255, 0)),
- ColorSequenceKeypoint.new(1,Color3.fromRGB(0, 170, 0)),
- })
- end,
- function() -- pattern 4 (black and white)
- for i,v in pairs(knife:GetDescendants()) do
- if v:IsA("SpecialMesh") then
- if v.Parent ~= blade then
- v.TextureId = 'rbxassetid://148291781'
- elseif v.Parent == blade then
- v.TextureId = 'rbxassetid://82909557'
- end
- end
- end
- k_trail.Color = ColorSequence.new({
- ColorSequenceKeypoint.new(0,Color3.fromRGB(1, 1, 1)),
- ColorSequenceKeypoint.new(1,Color3.fromRGB(0, 0, 0)),
- })
- glow.Color = ColorSequence.new({
- ColorSequenceKeypoint.new(0,Color3.fromRGB(1, 1, 1)),
- ColorSequenceKeypoint.new(1,Color3.fromRGB(0, 0, 0)),
- })
- end,
- }
- local bloodlol_t = {}
- local hitwall = Instance.new("Sound")
- hitwall.SoundId = 'rbxassetid://' .. wallhits[math.random(1,#wallhits)]
- hitwall.Volume = 0.6
- hitwall.Parent = blade
- local swing_s = Instance.new("Sound")
- swing_s.SoundId = 'rbxassetid://138097048'
- swing_s.Volume = 0.4
- swing_s.Parent = blade
- local stab_s = Instance.new("Sound")
- stab_s.SoundId = 'rbxassetid://' .. stabs[math.random(1,#stabs)]
- stab_s.Volume = 0.5
- stab_s.Parent = blade
- local equip_s = Instance.new("Sound")
- equip_s.SoundId = 'rbxassetid://179662797' -- 3688156764
- equip_s.Volume = 0.7
- equip_s.Parent = blade
- --[[
- local equip_woosh_s = Instance.new("Sound")
- equip_woosh_s.SoundId = 'rbxassetid://138097048'
- equip_woosh_s.PlaybackSpeed = 1.3
- equip_woosh_s.Volume = 0.5
- equip_woosh_s.Parent = blade
- ]]
- local wbreak = Instance.new("Sound")
- wbreak.Parent = blade
- wbreak.SoundId = "rbxassetid://627558611"
- wbreak.Volume = 0.7
- wbreak.Parent = blade
- local swing_anims = {--[[33169596,]]204062532,54432537,218504594,54584713} -- 186934910
- local idleanimation = Instance.new("Animation")
- idleanimation.AnimationId = "rbxassetid://241279220"
- local idleanim = hum:LoadAnimation(idleanimation)
- local swing_animation = Instance.new("Animation")
- swing_animation.AnimationId = "rbxassetid://" .. swing_anims[math.random(1,#swing_anims)]
- local swing_anim = hum:LoadAnimation(swing_animation)
- local animval = math.random(1,#swing_anims)
- skins[math.random(1,#skins)]()
- knife.Parent = plr:FindFirstChildOfClass("Backpack")
- knife.RequiresHandle = false
- --//=================================\\
- --|| SAZERENOS' ARTIFICIAL HEARTBEAT
- --\\=================================//
- ArtificialHB = Instance.new("BindableEvent", script)
- ArtificialHB.Name = "ArtificialHB"
- script:WaitForChild("ArtificialHB")
- frame = (1/60)
- tf = 0
- allowframeloss = false
- tossremainder = false
- lastframe = tick()
- script.ArtificialHB:Fire()
- game:GetService("RunService").Heartbeat:connect(function(s, p)
- tf = tf + s
- if tf >= frame then
- if allowframeloss then
- script.ArtificialHB:Fire()
- lastframe = tick()
- else
- for i = 1, math.floor(tf / frame) do
- script.ArtificialHB:Fire()
- end
- lastframe = tick()
- end
- if tossremainder then
- tf = 0
- else
- tf = tf - frame * math.floor(tf / frame)
- end
- end
- end)
- function Swait(NUMBER)
- if NUMBER == 0 or NUMBER == nil then
- ArtificialHB.Event:wait()
- else
- for i = 1, NUMBER do
- ArtificialHB.Event:wait()
- end
- end
- end
- --//=================================\\
- --\\=================================//
- function bleed2(frick,targhum,can_hurt,t,splat)
- spawn(function()
- if not frick:FindFirstChild("bleeding from kry's combat") then else return end
- local tempbleedval = Instance.new("ObjectValue")
- tempbleedval.Name = "bleeding from kry's combat"
- tempbleedval.Parent = frick
- local bleeding = true
- local rig = targhum.RigType
- local limbs = {'Head','Left Arm','Right Arm','Left Leg','Right Leg','RightUpperLeg','LeftUpperLeg','RightUpperArm','LeftUpperArm','RightLowerLeg','LeftLowerLeg','RightLowerArm','LeftLowerArm','RightFoot','LeftFoot','RightHand','LeftHand'}
- spawn(function()
- wait(t)
- bleeding = false
- tempbleedval:Destroy()
- end)
- while bleeding and frick and frick.Parent do
- if --[[(targhum and targhum.Parent and targhum.Health > 0) or]] (not frick or not frick.Parent or not targhum or not targhum.Parent) then
- break
- end
- if targhum and 0 >= targhum.Health then
- local tempkillval = Instance.new("ObjectValue",targhum)
- tempkillval.Name = "killer"
- tempkillval.Value = plr
- pcall(function()
- Ragdoll(targhum.Parent,false,true,true)
- end)
- end
- local max_limbs = 0
- local current_limbs = 0
- local gone_limbs = 0
- local targchar = targhum.Parent
- if rig == Enum.HumanoidRigType.R6 then
- max_limbs = 5
- elseif rig == Enum.HumanoidRigType.R15 then
- max_limbs = 13
- end
- for i,v in pairs(targchar:GetChildren()) do
- local found = false
- for i,n in pairs(limbs) do if n == v.Name then found = true; end; end;
- if found and not v:FindFirstChild("Dismembered") then
- current_limbs = current_limbs + 1
- end
- end
- gone_limbs = (max_limbs-current_limbs)
- if targhum and can_hurt then
- if gone_limbs >= 1 then
- targhum:TakeDamage(0.5*gone_limbs)
- else
- targhum:TakeDamage(0.5)
- end
- end
- spawn(function()
- local thing = Instance.new('Part')
- thing.Parent = workspace
- thing.Size = Vector3.new(0.1,0.1,0.1)
- thing.CFrame = frick.CFrame*CFrame.new(0,frick.Size.Y/2,0)
- if splat then
- thing.Transparency = 0
- elseif not splat then
- thing.Transparency = 1
- end
- thing.Color = Color3.fromRGB(75, 0, 0)
- thing.Material = Enum.Material.Glass
- thing.Name = "blood_drop"
- thing.CanCollide =false
- thing:BreakJoints()
- local mesh = Instance.new('SpecialMesh')
- mesh.MeshType = Enum.MeshType.Sphere
- mesh.Parent = thing
- --game:GetService("Debris"):AddItem(thing,5)
- local att1,att2 = Instance.new("Attachment"),Instance.new("Attachment")
- att1.Parent = thing
- att1.Position = Vector3.new(0,-(thing.Size.Y/2),0)
- att2.Parent = thing
- att2.Position = Vector3.new(0,(thing.Size.Y/2),0)
- if splat then
- local trail_drop = Instance.new("Trail")
- trail_drop.Parent = thing
- trail_drop.Attachment0 = att1
- trail_drop.Attachment1 = att2
- trail_drop.Color = ColorSequence.new(Color3.new(0.294118, 0, 0),Color3.new(0.294118, 0, 0))
- trail_drop.FaceCamera = true
- trail_drop.LightInfluence = 1
- trail_drop.Transparency = NumberSequence.new(0.1,1)
- trail_drop.Lifetime = 1
- trail_drop.MinLength = 0
- end
- local rawrxd = Instance.new('BodyForce')
- rawrxd.Parent = thing
- if splat then
- rawrxd.Force = frick.CFrame.upVector+Vector3.new(math.random(-5, 5)/10,3,math.random(-5, 5)/10)
- elseif not splat then
- rawrxd.Force = frick.CFrame.upVector*(math.random()*2)+Vector3.new(math.random(-5, 5)/10,1.5,0)
- end
- game:GetService("Debris"):AddItem(rawrxd,0.01)
- thing.Touched:connect(function(tou)
- if tou and tou.Parent and not tou:IsDescendantOf(targchar) and not tou.Parent:FindFirstChildOfClass("Humanoid") and not tou.Parent.Parent:FindFirstChildOfClass("Humanoid") and not tou.Parent:IsA("Accessory") and tou.Name ~= 'Handle' and tou.Parent.Name ~= 'Handle' and not tou.Parent:IsA("Tool") and not string.match(tou.Name:lower(),'blood_drop') and not string.match(tou.Name:lower(),'bullet') and not string.match(tou.Name:lower(),'bone') and not string.match(tou.Name:lower(),'gun mag') and not string.match(tou.Name:lower(),'limb') then
- local pos = Vector3.new(thing.Position.X,(tou.Position.Y+(tou.Size.Y/2))+(0.02/2),thing.Position.Z)
- local Point1 = pos-Vector3.new(0.01,0.01,0.01)
- local Point2 = pos+Vector3.new(0.01,0.01,0.01)
- local Region = Region3.new(Point1,Point2)
- for _,Part in pairs(game.Workspace:FindPartsInRegion3(Region,nil,math.huge)) do
- if Part.Name == "blood" then
- tou = Part
- end
- end
- thing:Destroy()
- if tou.Name == "blood" then
- local reee = tou.CFrame
- if tou.Transparency > -0.2 then
- tou.Transparency = tou.Transparency - 0.1
- end
- if tou.Size.X < 5 then
- tou.Size = tou.Size+Vector3.new(0.4,0,0.4)
- tou.CFrame = reee
- elseif tou.Size.X < 7.5 then
- tou.Size = tou.Size+Vector3.new(0.3,0,0.3)
- tou.CFrame = reee
- elseif tou.Size.X < 10 then
- tou.Size = tou.Size+Vector3.new(0.2,0,0.2)
- tou.CFrame = reee
- end
- elseif tou.CanCollide == true then
- local bloodlol = Instance.new('Part')
- if gone_limbs >= 1 then
- bloodlol.Size = Vector3.new(1*gone_limbs,0.2,1*gone_limbs)
- else
- bloodlol.Size = Vector3.new(1,0.2,1)
- end
- bloodlol.Name = "blood"
- bloodlol.Anchored = true
- bloodlol.CanCollide = false
- bloodlol.Material = Enum.Material.Glass
- bloodlol.Color = Color3.fromRGB(75, 0, 0)
- local mesh = Instance.new('SpecialMesh')
- mesh.MeshType = Enum.MeshType.Sphere
- mesh.Parent = bloodlol
- bloodlol.Parent = workspace
- bloodlol.CFrame = CFrame.new(pos)
- table.insert(bloodlol_t,1,bloodlol)
- end
- end
- end)
- end)
- wait(0.1)
- end
- if targhum and 0 >= targhum.Health then
- local tempkillval = Instance.new("ObjectValue",targhum)
- tempkillval.Name = "killer"
- tempkillval.Value = plr
- pcall(function()
- Ragdoll(targhum.Parent,false,true,true)
- end)
- end
- tempbleedval:Destroy()
- end)
- end
- function make_bone(obj,targtorso)
- if obj.Name == 'Left Arm' or obj.Name == 'LeftUpperArm' then
- local bone = Instance.new("Part")
- bone.name = 'bone'
- bone.CanCollide = false
- bone.Anchored = false
- bone.CFrame = targtorso.CFrame
- bone.Size = targtorso.Size
- bone.Massless = true
- bone.Locked = true
- local exists = pcall(game:GetService("PhysicsService").GetCollisionGroupId, game:GetService("PhysicsService"), 'Limb Collide')
- if not exists then
- game:GetService("PhysicsService"):CreateCollisionGroup('Limb Collide')
- end
- game:GetService("PhysicsService"):CollisionGroupSetCollidable('Limb Collide','Limb Collide',false)
- game:GetService("PhysicsService"):SetPartCollisionGroup(bone,'Limb Collide')
- game:GetService("PhysicsService"):SetPartCollisionGroup(targtorso,'Limb Collide')
- local weld = Instance.new("Weld")
- weld.Part0 = bone
- weld.Part1 = targtorso
- weld.C1 = CFrame.new(-0.61,0.77,0.03)*CFrame.Angles(math.rad(90),0,math.rad(90))
- weld.Parent = bone
- targtorso.Anchored = false
- bone.Parent = script
- local mesh = Instance.new("SpecialMesh")
- mesh.MeshId = 'rbxassetid://1076136382'
- mesh.TextureId = 'rbxassetid://1076137938'
- mesh.Scale = Vector3.new(0.03,0.03,0.03)
- mesh.Parent = bone
- --
- local bone = Instance.new("Part")
- bone.Name = 'bone'
- bone.CanCollide = false
- bone.Anchored = false
- bone.CFrame = obj.CFrame
- bone.Size = obj.Size
- bone.Massless = true
- bone.Locked = true
- local exists = pcall(game:GetService("PhysicsService").GetCollisionGroupId, game:GetService("PhysicsService"), 'Limb Collide')
- if not exists then
- game:GetService("PhysicsService"):CreateCollisionGroup('Limb Collide')
- end
- game:GetService("PhysicsService"):CollisionGroupSetCollidable('Limb Collide','Limb Collide',false)
- game:GetService("PhysicsService"):SetPartCollisionGroup(bone,'Limb Collide')
- game:GetService("PhysicsService"):SetPartCollisionGroup(obj,'Limb Collide')
- local weld = Instance.new("Weld")
- weld.Part0 = bone
- weld.Part1 = obj
- weld.C1 = CFrame.new(0.13,0.26,0)
- weld.Parent = bone
- obj.Anchored = false
- bone.Parent = script
- local mesh = Instance.new("SpecialMesh")
- mesh.MeshId = 'rbxassetid://36780032'
- mesh.TextureId = 'rbxassetid://36780292'
- mesh.Parent = bone
- elseif obj.Name == 'Right Arm' or obj.Name == 'RightUpperArm' then
- local bone = Instance.new("Part")
- bone.Name = 'bone'
- bone.CanCollide = false
- bone.Anchored = false
- bone.CFrame = targtorso.CFrame
- bone.Size = targtorso.Size
- bone.Massless = true
- bone.Locked = true
- local exists = pcall(game:GetService("PhysicsService").GetCollisionGroupId, game:GetService("PhysicsService"), 'Limb Collide')
- if not exists then
- game:GetService("PhysicsService"):CreateCollisionGroup('Limb Collide')
- end
- game:GetService("PhysicsService"):CollisionGroupSetCollidable('Limb Collide','Limb Collide',false)
- game:GetService("PhysicsService"):SetPartCollisionGroup(bone,'Limb Collide')
- game:GetService("PhysicsService"):SetPartCollisionGroup(targtorso,'Limb Collide')
- local weld = Instance.new("Weld")
- weld.Part0 = bone
- weld.Part1 = targtorso
- weld.C1 = CFrame.new(0.61,0.77,0.03)*CFrame.Angles(math.rad(90),0,math.rad(-90))
- weld.Parent = bone
- targtorso.Anchored = false
- bone.Parent = script
- local mesh = Instance.new("SpecialMesh")
- mesh.MeshId = 'rbxassetid://1076136382'
- mesh.TextureId = 'rbxassetid://1076137938'
- mesh.Scale = Vector3.new(0.03,0.03,0.03)
- mesh.Parent = bone
- --
- local bone = Instance.new("Part")
- bone.Name = 'bone'
- bone.CanCollide = false
- bone.Anchored = false
- bone.CFrame = obj.CFrame
- bone.Size = obj.Size
- bone.Massless = true
- bone.Locked = true
- local exists = pcall(game:GetService("PhysicsService").GetCollisionGroupId, game:GetService("PhysicsService"), 'Limb Collide')
- if not exists then
- game:GetService("PhysicsService"):CreateCollisionGroup('Limb Collide')
- end
- game:GetService("PhysicsService"):CollisionGroupSetCollidable('Limb Collide','Limb Collide',false)
- game:GetService("PhysicsService"):SetPartCollisionGroup(bone,'Limb Collide')
- game:GetService("PhysicsService"):SetPartCollisionGroup(obj,'Limb Collide')
- local weld = Instance.new("Weld")
- weld.Part0 = bone
- weld.Part1 = obj
- weld.C1 = CFrame.new(-0.13,0.26,0)
- weld.Parent = bone
- obj.Anchored = false
- bone.Parent = script
- local mesh = Instance.new("SpecialMesh")
- mesh.MeshId = 'rbxassetid://36780156'
- mesh.TextureId = 'rbxassetid://36780292'
- mesh.Parent = bone
- elseif obj.Name == 'Left Leg' or obj.Name == 'LeftUpperLeg' then
- local bone = Instance.new("Part")
- bone.Name = 'bone'
- bone.CanCollide = false
- bone.Anchored = false
- bone.CFrame = targtorso.CFrame
- bone.Size = targtorso.Size
- bone.Massless = true
- bone.Locked = true
- local exists = pcall(game:GetService("PhysicsService").GetCollisionGroupId, game:GetService("PhysicsService"), 'Limb Collide')
- if not exists then
- game:GetService("PhysicsService"):CreateCollisionGroup('Limb Collide')
- end
- game:GetService("PhysicsService"):CollisionGroupSetCollidable('Limb Collide','Limb Collide',false)
- game:GetService("PhysicsService"):SetPartCollisionGroup(bone,'Limb Collide')
- game:GetService("PhysicsService"):SetPartCollisionGroup(targtorso,'Limb Collide')
- local weld = Instance.new("Weld")
- weld.Part0 = bone
- weld.Part1 = targtorso
- weld.C1 = CFrame.new(-0.6,-0.64,0.11)*CFrame.Angles(0,0,math.rad(180))
- weld.Parent = bone
- targtorso.Anchored = false
- bone.Parent = script
- local mesh = Instance.new("SpecialMesh")
- mesh.MeshId = 'rbxassetid://1076136382'
- mesh.TextureId = 'rbxassetid://1076137938'
- mesh.Scale = Vector3.new(0.03,0.03,0.03)
- mesh.Parent = bone
- --
- local bone = Instance.new("Part")
- bone.Name = 'bone'
- bone.CanCollide = false
- bone.Anchored = false
- bone.CFrame = obj.CFrame
- bone.Size = obj.Size
- bone.Massless = true
- bone.Locked = true
- local exists = pcall(game:GetService("PhysicsService").GetCollisionGroupId, game:GetService("PhysicsService"), 'Limb Collide')
- if not exists then
- game:GetService("PhysicsService"):CreateCollisionGroup('Limb Collide')
- end
- game:GetService("PhysicsService"):CollisionGroupSetCollidable('Limb Collide','Limb Collide',false)
- game:GetService("PhysicsService"):SetPartCollisionGroup(bone,'Limb Collide')
- game:GetService("PhysicsService"):SetPartCollisionGroup(obj,'Limb Collide')
- local weld = Instance.new("Weld")
- weld.Part0 = bone
- weld.Part1 = obj
- weld.C1 = CFrame.new(0,0.09,0.13)
- weld.Parent = bone
- obj.Anchored = false
- bone.Parent = script
- local mesh = Instance.new("SpecialMesh")
- mesh.MeshId = 'rbxassetid://36780156'
- mesh.TextureId = 'rbxassetid://36780292'
- mesh.Parent = bone
- elseif obj.Name == 'Right Leg' or obj.Name == 'RightUpperLeg' then
- local bone = Instance.new("Part")
- bone.Name = 'bone'
- bone.CanCollide = false
- bone.Anchored = false
- bone.CFrame = targtorso.CFrame
- bone.Size = targtorso.Size
- bone.Massless = true
- bone.Locked = true
- local exists = pcall(game:GetService("PhysicsService").GetCollisionGroupId, game:GetService("PhysicsService"), 'Limb Collide')
- if not exists then
- game:GetService("PhysicsService"):CreateCollisionGroup('Limb Collide')
- end
- game:GetService("PhysicsService"):CollisionGroupSetCollidable('Limb Collide','Limb Collide',false)
- game:GetService("PhysicsService"):SetPartCollisionGroup(bone,'Limb Collide')
- game:GetService("PhysicsService"):SetPartCollisionGroup(targtorso,'Limb Collide')
- local weld = Instance.new("Weld")
- weld.Part0 = bone
- weld.Part1 = targtorso
- weld.C1 = CFrame.new(0.6,-0.64,0.11)*CFrame.Angles(0,0,math.rad(180))
- weld.Parent = bone
- targtorso.Anchored = false
- bone.Parent = script
- local mesh = Instance.new("SpecialMesh")
- mesh.MeshId = 'rbxassetid://1076136382'
- mesh.TextureId = 'rbxassetid://1076137938'
- mesh.Scale = Vector3.new(0.03,0.03,0.03)
- mesh.Parent = bone
- --
- local bone = Instance.new("Part")
- bone.Name = 'bone'
- bone.CanCollide = false
- bone.Anchored = false
- bone.CFrame = obj.CFrame
- bone.Size = obj.Size
- bone.Massless = true
- bone.Locked = true
- local exists = pcall(game:GetService("PhysicsService").GetCollisionGroupId, game:GetService("PhysicsService"), 'Limb Collide')
- if not exists then
- game:GetService("PhysicsService"):CreateCollisionGroup('Limb Collide')
- end
- game:GetService("PhysicsService"):CollisionGroupSetCollidable('Limb Collide','Limb Collide',false)
- game:GetService("PhysicsService"):SetPartCollisionGroup(bone,'Limb Collide')
- game:GetService("PhysicsService"):SetPartCollisionGroup(obj,'Limb Collide')
- local weld = Instance.new("Weld")
- weld.Part0 = bone
- weld.Part1 = obj
- weld.C1 = CFrame.new(0,0.09,0.13)
- weld.Parent = bone
- obj.Anchored = false
- bone.Parent = script
- local mesh = Instance.new("SpecialMesh")
- mesh.MeshId = 'rbxassetid://36780195'
- mesh.TextureId = 'rbxassetid://36780292'
- mesh.Parent = bone
- elseif obj.Name == 'Head' then
- local bone = Instance.new("Part")
- bone.Name = 'bone'
- bone.CanCollide = false
- bone.Anchored = false
- bone.CFrame = targtorso.CFrame
- bone.Size = targtorso.Size
- bone.Massless = true
- bone.Locked = true
- local exists = pcall(game:GetService("PhysicsService").GetCollisionGroupId, game:GetService("PhysicsService"), 'Limb Collide')
- if not exists then
- game:GetService("PhysicsService"):CreateCollisionGroup('Limb Collide')
- end
- game:GetService("PhysicsService"):CollisionGroupSetCollidable('Limb Collide','Limb Collide',false)
- game:GetService("PhysicsService"):SetPartCollisionGroup(bone,'Limb Collide')
- game:GetService("PhysicsService"):SetPartCollisionGroup(targtorso,'Limb Collide')
- local weld = Instance.new("Weld")
- weld.Part0 = bone
- weld.Part1 = targtorso
- weld.C1 = CFrame.new(0,0.66,0)
- weld.Parent = bone
- targtorso.Anchored = false
- bone.Parent = script
- local mesh = Instance.new("SpecialMesh")
- mesh.MeshId = 'rbxassetid://1076136382'
- mesh.TextureId = 'rbxassetid://1076137938'
- mesh.Scale = Vector3.new(0.03,0.03,0.03)
- mesh.Parent = bone
- --
- local bone = Instance.new("Part")
- bone.Name = 'bone'
- bone.CanCollide = false
- bone.Anchored = false
- bone.CFrame = obj.CFrame
- bone.Size = obj.Size
- bone.Massless = true
- bone.Locked = true
- local exists = pcall(game:GetService("PhysicsService").GetCollisionGroupId, game:GetService("PhysicsService"), 'Limb Collide')
- if not exists then
- game:GetService("PhysicsService"):CreateCollisionGroup('Limb Collide')
- end
- game:GetService("PhysicsService"):CollisionGroupSetCollidable('Limb Collide','Limb Collide',false)
- game:GetService("PhysicsService"):SetPartCollisionGroup(bone,'Limb Collide')
- game:GetService("PhysicsService"):SetPartCollisionGroup(obj,'Limb Collide')
- local weld = Instance.new("Weld")
- weld.Part0 = bone
- weld.Part1 = obj
- weld.C1 = CFrame.new(0,-0.23,0)*CFrame.Angles(0,math.rad(-90),0)
- weld.Parent = bone
- obj.Anchored = false
- bone.Parent = script
- local mesh = Instance.new("SpecialMesh")
- mesh.MeshId = 'rbxassetid://1076136382'
- mesh.TextureId = 'rbxassetid://1076137938'
- mesh.Scale = Vector3.new(0.03,0.03,0.03)
- mesh.Parent = bone
- end
- end
- function check_weld(v)
- if v:IsA("Motor6D") or v:IsA("BallSocketConstraint") or v:IsA("Motor") or v:IsA("Constraint") or v:IsA("Weld") or v:IsA("ManualWeld") or v:IsA("WeldConstraint") or v:IsA("ManualGlue") or v:IsA("CylindricalConstraint") or v:IsA("NoCollisionConstraint") or v:IsA("HingeConstraint") then
- v:Destroy()
- end
- end
- function limb_collide(obj,mode)
- if (obj:IsA("UnionOperation") or obj:IsA("BasePart")) and not obj:FindFirstChild('limb') then else return end
- local exists = pcall(game:GetService("PhysicsService").GetCollisionGroupId, game:GetService("PhysicsService"), 'Limb Collide')
- if not exists then
- game:GetService("PhysicsService"):CreateCollisionGroup('Limb Collide')
- end
- game:GetService("PhysicsService"):CollisionGroupSetCollidable('Limb Collide','Limb Collide',false)
- --
- local t = {}
- --
- local cb = Instance.new("Part")
- cb.Name = 'limb'
- cb.Transparency = 1
- cb.CanCollide = true
- cb.Anchored = false
- cb.CFrame = obj.CFrame
- cb.Size = obj.Size
- cb.Massless = true
- cb.Locked = true
- game:GetService("PhysicsService"):SetPartCollisionGroup(cb,'Limb Collide')
- game:GetService("PhysicsService"):SetPartCollisionGroup(obj,'Limb Collide')
- local weld = Instance.new("Weld")
- weld.Part0 = cb
- weld.Part1 = obj
- weld.Parent = cb
- obj.Massless = true
- obj.Anchored = false
- if mode or obj:FindFirstChild("Dismembered") then
- cb.Parent = obj -- .Parent
- else
- cb.Parent = script
- table.insert(t,1,cb)
- end
- --
- if not string.match(obj.Name:lower(),'torso') and not string.match(obj.Name:lower(),'rootpart') and not string.match(obj.Name:lower(),'head') then
- local lv = Vector3.new() -- Vector3.new(cb.Size.X,0,cb.Size.Z)
- local cb2 = Instance.new("Part")
- cb2.Name = 'limb'
- cb2.Transparency = 1
- cb2.CanCollide = true
- cb2.Anchored = false
- cb2.CFrame = obj.CFrame
- cb2.Size = lv
- cb2.Massless = true
- cb2.Locked = true
- local weld2 = Instance.new("Weld")
- weld2.Part0 = cb
- weld2.Part1 = cb2
- weld2.C1 = CFrame.new(0,(cb.Size.Y/2),0)
- weld2.Parent = cb2
- if mode or obj:FindFirstChild("Dismembered") then
- cb2.Parent = obj -- .Parent
- else
- cb2.Parent = script
- table.insert(t,1,cb2)
- end
- end
- --
- return t
- end
- local blood_images = {931617584,1663434319,1391189545,4533673847,3236192667,2565888666,612591729,120362139,116830967,122022304,131339257,247766282,121678640,176677800,120361912,176678070,176678086,176677869} --305296807,256293532,148713503,176678030
- local e_s = 1
- function add_decal(f,t,obj,d,r)
- spawn(function()
- local texture = Instance.new("Texture")
- texture.Parent = obj
- texture.Face = f
- texture.Texture = 'rbxassetid://' .. t
- if not r then
- game:GetService("Debris"):AddItem(texture,d)
- end
- if f == 'Left' or f == 'Right' then
- texture.StudsPerTileV = obj.Size.Y + e_s
- if (obj.Size.X > obj.Size.Z) then
- texture.StudsPerTileV = obj.Size.Z + e_s
- elseif (obj.Size.Z > obj.Size.X) then
- texture.StudsPerTileU = obj.Size.X + e_s
- else
- texture.StudsPerTileU = obj.Size.X + e_s
- end
- elseif f == 'Front' or f == 'Back' then
- texture.StudsPerTileV = obj.Size.Y + e_s
- if (obj.Size.X > obj.Size.Z) then
- texture.StudsPerTileV = obj.Size.X + e_s
- elseif (obj.Size.Z > obj.Size.X) then
- texture.StudsPerTileU = obj.Size.Z + e_s
- else
- texture.StudsPerTileU = obj.Size.X + e_s
- end
- elseif f == 'Top' or f == 'Bottom' then
- texture.StudsPerTileV = obj.Size.X + e_s
- texture.StudsPerTileU = obj.Size.Z + e_s
- end
- end)
- end
- function add_blood(obj,t)
- local t1,t2,t3,t4,t5,t6 = blood_images[math.random(1,#blood_images)],blood_images[math.random(1,#blood_images)],blood_images[math.random(1,#blood_images)],blood_images[math.random(1,#blood_images)],blood_images[math.random(1,#blood_images)],blood_images[math.random(1,#blood_images)]
- add_decal('Top',t1,obj,5,t)
- add_decal('Bottom',t2,obj,5,t)
- add_decal('Left',t3,obj,5,t)
- add_decal('Right',t4,obj,5,t)
- add_decal('Front',t5,obj,5,t)
- add_decal('Back',t6,obj,5,t)
- end
- function break_limb(obj,rig,targtorso,targhum,dir)
- if not obj:FindFirstChild('Dismembered') and obj.Name:lower() ~= 'torso' and obj.Name:lower() ~= 'humanoidrootpart' and obj.Name:lower() ~= 'uppertorso' and obj.Name:lower() ~= 'lowertorso' then else return end
- local confirm = Instance.new("ObjectValue")
- confirm.Name = 'Dismembered'
- confirm.Parent = obj
- if rig == Enum.HumanoidRigType.R6 then
- for i,v in pairs(targtorso:GetDescendants()) do
- if check_weld(v) then
- if obj.Name == 'Head' and v.Name:lower() == 'neck' then
- v:Destroy()
- elseif obj.Name == 'Left Arm' and v.Name:lower() == 'left shoulder' then
- v:Destroy()
- elseif obj.Name == 'Right Arm' and v.Name:lower() == 'right shoulder' then
- v:Destroy()
- elseif obj.Name == 'Left Leg' and v.Name:lower() == 'left hip' then
- if v:IsA("Motor6D") and obj.Parent:FindFirstChild("Right Leg") and not obj.Parent:FindFirstChild("Right Leg"):FindFirstChild("Dismembered") then
- targhum.WalkSpeed = targhum.WalkSpeed/2
- elseif v:IsA("Motor6D") then
- targhum.WalkSpeed = 0
- end
- v:Destroy()
- elseif obj.Name == 'Right Leg' and v.Name:lower() == 'right hip' then
- if v:IsA("Motor6D") and obj.Parent:FindFirstChild("Left Leg") and not obj.Parent:FindFirstChild("Left Leg"):FindFirstChild("Dismembered") then
- targhum.WalkSpeed = targhum.WalkSpeed/2
- elseif v:IsA("Motor6D") then
- targhum.WalkSpeed = 0
- end
- v:Destroy()
- end
- end
- end
- for i,v in pairs(obj:GetChildren()) do
- if check_weld(v) then
- if obj.Name == 'Left Leg' then
- if v:IsA("Motor6D") and obj.Parent:FindFirstChild("Right Leg") and not obj.Parent:FindFirstChild("Right Leg"):FindFirstChild("Dismembered") then
- targhum.WalkSpeed = targhum.WalkSpeed/2
- elseif v:IsA("Motor6D") then
- targhum.WalkSpeed = 0
- end
- elseif obj.Name == 'Right Leg' then
- if v:IsA("Motor6D") and obj.Parent:FindFirstChild("Left Leg") and not obj.Parent:FindFirstChild("Left Leg"):FindFirstChild("Dismembered") then
- targhum.WalkSpeed = targhum.WalkSpeed/2
- elseif v:IsA("Motor6D") then
- targhum.WalkSpeed = 0
- end
- end
- v:Destroy()
- end
- end
- elseif rig == Enum.HumanoidRigType.R15 then
- for i,v in pairs(obj:GetChildren()) do
- if check_weld(v) then
- if v:IsA("Motor6D") then
- if v:IsA("Motor6D") and ((obj.Name == 'LeftUpperLeg' and obj.Parent:FindFirstChild("RightUpperLeg") and not obj.Parent:FindFirstChild("RightUpperLeg"):FindFirstChild("Dismembered")) or (obj.Name == 'RightUpperLeg' and obj.Parent:FindFirstChild("LeftUpperLeg") and not obj.Parent:FindFirstChild("LeftUpperLeg"):FindFirstChild("Dismembered"))) then
- targhum.WalkSpeed = targhum.WalkSpeed/2
- elseif v:IsA("Motor6D") and (obj.Name == 'RightUpperLeg' or obj.Name == 'LeftUpperLeg') then
- targhum.WalkSpeed = 0
- end
- end
- v:Destroy()
- end
- end
- end
- bleed2(obj,targhum,false,1,false)
- add_blood(obj)
- make_bone(obj,targtorso)
- local kb = 17
- local bv = Instance.new("BodyVelocity")
- bv.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
- bv.Velocity = dir*kb+Vector3.new(0,kb,0)
- bv.Parent = obj
- game:GetService("Debris"):AddItem(bv,0.1)
- limb_collide(obj,true)
- end
- function Ragdoll(targchar,headless,insta,kill)
- local pc = targchar
- local targhum = pc:FindFirstChild("Humanoid")
- local js,js2 = {},{}
- for _,obj in pairs(pc:GetDescendants()) do
- if obj:IsA("BasePart") or obj:IsA("UnionOperation") then
- obj.Massless = true
- obj.Locked = true
- end
- end
- if kill == true then
- pc.Archivable = true
- local old_pc = pc
- pc = pc:Clone()
- for i,v in pairs(pc:GetDescendants()) do
- limb_collide(v,true)
- if v:IsA("ParticleEmitter") then
- v.Enabled = false
- end
- if v:IsA("SelectionBox") or v:IsA("BodyVelocity") or v:IsA("BodyPosition") or v:IsA("BodyAngularVelocity") or v:IsA("BodyForce") or v:IsA("BodyGyro") or v:IsA("BodyThrust") or v:IsA("BodyMover") then
- if v:IsA("BodyVelocity") then
- game:GetService("Debris"):AddItem(v,0.15)
- else
- v:Destroy()
- end
- end
- if (v:IsA("Script") and v.Name == 'Health') or (v:IsA("LocalScript") and v.Name == 'Animate') then
- v:Destroy()
- end
- if v:IsA("Humanoid") then
- v.BreakJointsOnDeath = false
- v.Health = 0
- v.HealthDisplayType = Enum.HumanoidHealthDisplayType.AlwaysOff
- v.PlatformStand = true
- end
- end
- for i,v in pairs(old_pc:GetDescendants()) do
- if v:IsA("BasePart") or v:IsA("UnionOperation") or v:IsA("ForceField") or v:IsA("Accessory") or v:IsA("Decal") or v:IsA("Texture") or v:IsA("SurfaceGui") then
- v:destroy()
- end
- if v:IsA("Humanoid") then
- v.BreakJointsOnDeath = true
- v.Health = 0
- v.HealthDisplayType = Enum.HumanoidHealthDisplayType.AlwaysOff
- v.PlatformStand = true
- end
- end
- pc.Parent = workspace
- game:GetService("Debris"):AddItem(pc,30)
- end
- --if kill and targhum:FindFirstChild("Ragdolled") then return; end;
- 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
- if insta then
- if hum.RigType==Enum.HumanoidRigType.R6 then
- for _,v in pairs(torso:GetDescendants()) do
- if (v:IsA('Motor6D') or v:IsA('Motor') or v:IsA('Weld') or v:IsA("BallSocketConstraint")) and (not string.match(v.Name:lower(),'root')) then
- if not kill then
- table.insert(js2,1,{obj = v,par = v.Parent})
- v.Parent = nil
- elseif kill then
- v:Destroy()
- end
- end
- end
- local vis = false
- local vis2 = false
- if LArm and not LArm:FindFirstChild('Dismembered') then
- local at1 = Instance.new("Attachment")
- at1.Parent = 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")
- at1p2.Parent = 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")
- bis.Parent = LArm
- bis.Attachment0 = at1
- bis.Attachment1 = at1p2
- bis.LimitsEnabled = true
- bis.UpperAngle = 15
- bis.Visible = vis2
- bis.TwistLimitsEnabled = true
- bis.UpperAngle = -45
- bis.TwistLowerAngle = -45
- table.insert(js,1,bis)
- end
- if RArm and not RArm:FindFirstChild('Dismembered') then
- local at2 = Instance.new("Attachment")
- at2.Parent = 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")
- at2p2.Parent = 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")
- bis2.Parent = RArm
- bis2.Attachment0 = at2
- bis2.Attachment1 = at2p2
- bis2.LimitsEnabled = true
- bis2.UpperAngle = 15
- bis2.Visible = vis2
- bis2.TwistLimitsEnabled = true
- bis2.UpperAngle = -45
- bis2.TwistLowerAngle = -45
- table.insert(js,1,bis2)
- end
- if RLeg and not RLeg:FindFirstChild('Dismembered') then
- local at3 = Instance.new("Attachment")
- at3.Parent = 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")
- at3p2.Parent = 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")
- bis3.Parent = RLeg
- bis3.Attachment0 = at3
- bis3.Attachment1 = at3p2
- bis3.LimitsEnabled = true
- bis3.UpperAngle = 180-15
- bis3.Visible = vis2
- table.insert(js,1,bis3)
- end
- if LLeg and not LLeg:FindFirstChild('Dismembered') then
- local at4 = Instance.new("Attachment")
- at4.Parent = 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")
- at4p2.Parent = 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")
- bis4.Parent = LLeg
- bis4.Attachment0 = at4
- bis4.Attachment1 = at4p2
- bis4.LimitsEnabled = true
- bis4.UpperAngle = 180-15
- bis4.Visible = vis2
- table.insert(js,1,bis4)
- end
- if head and not headless and not head:FindFirstChild('Dismembered') then
- local at5 = Instance.new("Attachment")
- at5.Parent = 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")
- at5p2.Parent = 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")
- bis5.Parent = head
- bis5.Attachment0 = at5p2
- bis5.Attachment1 = at5
- bis5.LimitsEnabled = true
- bis5.UpperAngle = 75
- bis5.Visible = vis2
- bis5.TwistLimitsEnabled = true
- bis5.UpperAngle = -45
- bis5.TwistLowerAngle = -45
- table.insert(js,1,bis5)
- else
- --head:BreakJoints()
- end
- end
- else
- hum.Died:Connect(function()
- if hum.RigType==Enum.HumanoidRigType.R6 then
- for _,v in pairs(torso:GetDescendants()) do
- if (v:IsA('Motor6D') or v:IsA('Motor') or v:IsA('Weld') or v:IsA("BallSocketConstraint")) and (not string.match(v.Name:lower(),'root')) then
- if not kill then
- table.insert(js2,1,{obj = v,par = v.Parent})
- v.Parent = nil
- elseif kill then
- v:Destroy()
- end
- end
- end
- local vis = false
- local vis2 = false
- if LArm and not LArm:FindFirstChild('Dismembered') then
- local at1 = Instance.new("Attachment")
- at1.Parent = 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")
- at1p2.Parent = 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")
- bis.Parent = LArm
- bis.Attachment0 = at1
- bis.Attachment1 = at1p2
- bis.LimitsEnabled = true
- bis.UpperAngle = 15
- bis.Visible = vis2
- bis.TwistLimitsEnabled = true
- bis.UpperAngle = -45
- bis.TwistLowerAngle = -45
- table.insert(js,1,bis)
- end
- if RArm and not RArm:FindFirstChild('Dismembered') then
- local at2 = Instance.new("Attachment")
- at2.Parent = 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")
- at2p2.Parent = 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")
- bis2.Parent = RArm
- bis2.Attachment0 = at2
- bis2.Attachment1 = at2p2
- bis2.LimitsEnabled = true
- bis2.UpperAngle = 15
- bis2.Visible = vis2
- bis2.TwistLimitsEnabled = true
- bis2.UpperAngle = -45
- bis2.TwistLowerAngle = -45
- table.insert(js,1,bis2)
- end
- if RLeg and not RLeg:FindFirstChild('Dismembered') then
- local at3 = Instance.new("Attachment")
- at3.Parent = 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")
- at3p2.Parent = 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")
- bis3.Parent = RLeg
- bis3.Attachment0 = at3
- bis3.Attachment1 = at3p2
- bis3.LimitsEnabled = true
- bis3.UpperAngle = 180-15
- bis3.Visible = vis2
- table.insert(js,1,bis3)
- end
- if LLeg and not LLeg:FindFirstChild('Dismembered') then
- local at4 = Instance.new("Attachment")
- at4.Parent = 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")
- at4p2.Parent = 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")
- bis4.Parent = LLeg
- bis4.Attachment0 = at4
- bis4.Attachment1 = at4p2
- bis4.LimitsEnabled = true
- bis4.UpperAngle = 180-15
- bis4.Visible = vis2
- table.insert(js,1,bis4)
- end
- if head and not headless and not head:FindFirstChild('Dismembered') then
- local at5 = Instance.new("Attachment")
- at5.Parent = 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")
- at5p2.Parent = 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")
- bis5.Parent = head
- bis5.Attachment0 = at5p2
- bis5.Attachment1 = at5
- bis5.LimitsEnabled = true
- bis5.UpperAngle = 75
- bis5.Visible = vis2
- bis5.TwistLimitsEnabled = true
- bis5.UpperAngle = -45
- bis5.TwistLowerAngle = -45
- table.insert(js,1,bis5)
- else
- --head:BreakJoints()
- end
- end
- end)
- end
- elseif head and hum then
- hum.BreakJointsOnDeath = false
- if insta then
- if hum.RigType==Enum.HumanoidRigType.R15 then
- for _,v in pairs(pc:GetDescendants()) do
- if (v:IsA('Motor6D') or v:IsA('Motor') or v:IsA("BallSocketConstraint")) and (not string.match(v.Name:lower(),'root')) then
- if not kill then
- table.insert(js2,1,{obj = v,par = v.Parent})
- v.Parent = nil
- elseif kill then
- v:Destroy()
- end
- end
- end
- local vis = false
- local vis2 = false
- if LF and not LF:FindFirstChild('Dismembered') then
- local bsc1 = Instance.new("BallSocketConstraint",LF)
- bsc1.Attachment0 = LF.LeftAnkleRigAttachment
- bsc1.Attachment1 = LLL.LeftAnkleRigAttachment
- table.insert(js,1,bsc1)
- end
- if LLL and not LLL:FindFirstChild('Dismembered') then
- local bsc2 = Instance.new("BallSocketConstraint",LLL)
- bsc2.Attachment0 = LLL.LeftKneeRigAttachment
- bsc2.Attachment1 = LUL.LeftKneeRigAttachment
- table.insert(js,1,bsc2)
- end
- if LUL and not LUL:FindFirstChild('Dismembered') then
- local bsc3 = Instance.new("BallSocketConstraint",LUL)
- bsc3.Attachment0 = LUL.LeftHipRigAttachment
- bsc3.Attachment1 = LT.LeftHipRigAttachment
- table.insert(js,1,bsc3)
- end
- if RF and not RF:FindFirstChild('Dismembered') then
- local bsc4 = Instance.new("BallSocketConstraint",RF)
- bsc4.Attachment0 = RF.RightAnkleRigAttachment
- bsc4.Attachment1 = RLL.RightAnkleRigAttachment
- table.insert(js,1,bsc4)
- end
- if RLL and not RLL:FindFirstChild('Dismembered') then
- local bsc5 = Instance.new("BallSocketConstraint",RLL)
- bsc5.Attachment0 = RLL.RightKneeRigAttachment
- bsc5.Attachment1 = RUL.RightKneeRigAttachment
- table.insert(js,1,bsc5)
- end
- if RUL and not RUL:FindFirstChild('Dismembered') then
- local bsc6 = Instance.new("BallSocketConstraint",RUL)
- bsc6.Attachment0 = RUL.RightHipRigAttachment
- bsc6.Attachment1 = LT.RightHipRigAttachment
- table.insert(js,1,bsc6)
- end
- if LH and not LH:FindFirstChild('Dismembered') then
- local bsc7 = Instance.new("BallSocketConstraint",LH)
- bsc7.Attachment0 = LH.LeftWristRigAttachment
- bsc7.Attachment1 = LLA.LeftWristRigAttachment
- table.insert(js,1,bsc7)
- end
- if LLA and not LLA:FindFirstChild('Dismembered') then
- local bsc8 = Instance.new("BallSocketConstraint",LLA)
- bsc8.Attachment0 = LLA.LeftElbowRigAttachment
- bsc8.Attachment1 = LUA.LeftElbowRigAttachment
- table.insert(js,1,bsc8)
- end
- if LUA and not LUA:FindFirstChild('Dismembered') then
- local bsc9 = Instance.new("BallSocketConstraint",LUA)
- bsc9.Attachment0 = LUA.LeftShoulderAttachment
- bsc9.Attachment1 = UT.LeftCollarAttachment
- table.insert(js,1,bsc9)
- end
- if RH and not RH:FindFirstChild('Dismembered') then
- local bsc10 = Instance.new("BallSocketConstraint",RH)
- bsc10.Attachment0 = RH.RightWristRigAttachment
- bsc10.Attachment1 = RLA.RightWristRigAttachment
- table.insert(js,1,bsc10)
- end
- if RLA and not RLA:FindFirstChild('Dismembered') then
- local bsc11 = Instance.new("BallSocketConstraint",RLA)
- bsc11.Attachment0 = RLA.RightElbowRigAttachment
- bsc11.Attachment1 = RUA.RightElbowRigAttachment
- table.insert(js,1,bsc11)
- end
- if RUA and not RUA:FindFirstChild('Dismembered') then
- local bsc12 = Instance.new("BallSocketConstraint",RUA)
- bsc12.Attachment0 = RUA.RightShoulderAttachment
- bsc12.Attachment1 = UT.RightCollarAttachment
- table.insert(js,1,bsc12)
- end
- if LT and not LT:FindFirstChild('Dismembered') then
- local bsc13 = Instance.new("BallSocketConstraint",LT)
- bsc13.Attachment0 = LT.WaistRigAttachment
- bsc13.Attachment1 = UT.WaistRigAttachment
- table.insert(js,1,bsc13)
- end
- if head and not headless and not head:FindFirstChild('Dismembered') then
- local bsc14 = Instance.new("BallSocketConstraint",head)
- bsc14.Attachment0 = UT.NeckRigAttachment
- bsc14.Attachment1 = head.NeckRigAttachment
- bsc14.LimitsEnabled = true
- bsc14.UpperAngle = -75
- bsc14.TwistLimitsEnabled = true
- bsc14.UpperAngle = -45
- bsc14.TwistLowerAngle = -45
- table.insert(js,1,bsc14)
- else
- --head:BreakJoints()
- end
- end
- else
- hum.Died:Connect(function()
- if hum.RigType==Enum.HumanoidRigType.R15 then
- for _,v in pairs(pc:GetDescendants()) do
- if (v:IsA('Motor6D') or v:IsA('Motor') or v:IsA("BallSocketConstraint")) and (not string.match(v.Name:lower(),'root')) then
- if not kill then
- table.insert(js2,1,{obj = v,par = v.Parent})
- v.Parent = nil
- elseif kill then
- v:Destroy()
- end
- end
- end
- local vis = false
- local vis2 = false
- if LF and not LF:FindFirstChild('Dismembered') then
- local bsc1 = Instance.new("BallSocketConstraint",LF)
- bsc1.Attachment0 = LF.LeftAnkleRigAttachment
- bsc1.Attachment1 = LLL.LeftAnkleRigAttachment
- table.insert(js,1,bsc1)
- end
- if LLL and not LLL:FindFirstChild('Dismembered') then
- local bsc2 = Instance.new("BallSocketConstraint",LLL)
- bsc2.Attachment0 = LLL.LeftKneeRigAttachment
- bsc2.Attachment1 = LUL.LeftKneeRigAttachment
- table.insert(js,1,bsc2)
- end
- if LUL and not LUL:FindFirstChild('Dismembered') then
- local bsc3 = Instance.new("BallSocketConstraint",LUL)
- bsc3.Attachment0 = LUL.LeftHipRigAttachment
- bsc3.Attachment1 = LT.LeftHipRigAttachment
- table.insert(js,1,bsc3)
- end
- if RF and not RF:FindFirstChild('Dismembered') then
- local bsc4 = Instance.new("BallSocketConstraint",RF)
- bsc4.Attachment0 = RF.RightAnkleRigAttachment
- bsc4.Attachment1 = RLL.RightAnkleRigAttachment
- table.insert(js,1,bsc4)
- end
- if RLL and not RLL:FindFirstChild('Dismembered') then
- local bsc5 = Instance.new("BallSocketConstraint",RLL)
- bsc5.Attachment0 = RLL.RightKneeRigAttachment
- bsc5.Attachment1 = RUL.RightKneeRigAttachment
- table.insert(js,1,bsc5)
- end
- if RUL and not RUL:FindFirstChild('Dismembered') then
- local bsc6 = Instance.new("BallSocketConstraint",RUL)
- bsc6.Attachment0 = RUL.RightHipRigAttachment
- bsc6.Attachment1 = LT.RightHipRigAttachment
- table.insert(js,1,bsc6)
- end
- if LH and not LH:FindFirstChild('Dismembered') then
- local bsc7 = Instance.new("BallSocketConstraint",LH)
- bsc7.Attachment0 = LH.LeftWristRigAttachment
- bsc7.Attachment1 = LLA.LeftWristRigAttachment
- table.insert(js,1,bsc7)
- end
- if LLA and not LLA:FindFirstChild('Dismembered') then
- local bsc8 = Instance.new("BallSocketConstraint",LLA)
- bsc8.Attachment0 = LLA.LeftElbowRigAttachment
- bsc8.Attachment1 = LUA.LeftElbowRigAttachment
- table.insert(js,1,bsc8)
- end
- if LUA and not LUA:FindFirstChild('Dismembered') then
- local bsc9 = Instance.new("BallSocketConstraint",LUA)
- bsc9.Attachment0 = LUA.LeftShoulderAttachment
- bsc9.Attachment1 = UT.LeftCollarAttachment
- table.insert(js,1,bsc9)
- end
- if RH and not RH:FindFirstChild('Dismembered') then
- local bsc10 = Instance.new("BallSocketConstraint",RH)
- bsc10.Attachment0 = RH.RightWristRigAttachment
- bsc10.Attachment1 = RLA.RightWristRigAttachment
- table.insert(js,1,bsc10)
- end
- if RLA and not RLA:FindFirstChild('Dismembered') then
- local bsc11 = Instance.new("BallSocketConstraint",RLA)
- bsc11.Attachment0 = RLA.RightElbowRigAttachment
- bsc11.Attachment1 = RUA.RightElbowRigAttachment
- table.insert(js,1,bsc11)
- end
- if RUA and not RUA:FindFirstChild('Dismembered') then
- local bsc12 = Instance.new("BallSocketConstraint",RUA)
- bsc12.Attachment0 = RUA.RightShoulderAttachment
- bsc12.Attachment1 = UT.RightCollarAttachment
- table.insert(js,1,bsc12)
- end
- if LT and not LT:FindFirstChild('Dismembered') then
- local bsc13 = Instance.new("BallSocketConstraint",LT)
- bsc13.Attachment0 = LT.WaistRigAttachment
- bsc13.Attachment1 = UT.WaistRigAttachment
- table.insert(js,1,bsc13)
- end
- if head and not headless and not head:FindFirstChild('Dismembered') then
- local bsc14 = Instance.new("BallSocketConstraint",head)
- bsc14.Attachment0 = UT.NeckRigAttachment
- bsc14.Attachment1 = head.NeckRigAttachment
- bsc14.LimitsEnabled = true
- bsc14.UpperAngle = -75
- bsc14.TwistLimitsEnabled = true
- bsc14.UpperAngle = -45
- bsc14.TwistLowerAngle = -45
- table.insert(js,1,bsc14)
- else
- --head:BreakJoints()
- end
- end
- end)
- end
- end
- end
- return js,js2
- end
- function Damage(obj)
- local targchar,targtorso,targhum,killval,hitval
- pcall(function()
- targchar = obj.Parent
- end)
- for i,v in pairs(game:GetService("Players"):GetPlayers()) do
- if v and v.Character and obj:IsDescendantOf(v.Character) then
- targchar = v.Character
- end
- end
- pcall(function()
- targtorso = targchar:FindFirstChild("Torso") or targchar:FindFirstChild("UpperTorso")
- end)
- pcall(function()
- targrootpart = targchar:FindFirstChild("HumanoidRootPart")
- end)
- pcall(function()
- targhum = targchar:FindFirstChildOfClass("Humanoid")
- end)
- pcall(function()
- killval = targhum:FindFirstChild("killer")
- end)
- pcall(function()
- hitval = targhum:FindFirstChild("hit " .. targchar.Name .. " with balisong by " .. plr.Name)
- end)
- if targchar and targhum and targhum ~= hum and hum and hum.Health > 0 and not killval and not hitval and equipped and stabbing then
- local temphitval = Instance.new("ObjectValue",targhum)
- temphitval.Name = ("hit " .. targchar.Name .. " with balisong by " .. plr.Name)
- game:GetService("Debris"):AddItem(temphitval,wait_time)
- local distance = (rootpart or torso).Position-(targrootpart or targtorso).Position
- local direction = distance/distance.magnitude
- local dp = direction:Dot(targtorso.CFrame.lookVector)
- if targhum.Health > 0 then
- if -0.6 > dp then
- targhum:TakeDamage(1/0)
- else
- targhum:TakeDamage(math.random(15,25))
- end
- add_blood(obj)
- stab_s.SoundId = 'rbxassetid://' .. stabs[math.random(1,#stabs)]
- stab_s:Play()
- end
- if 0 >= targhum.Health then
- local tempkillval = Instance.new("ObjectValue",targhum)
- tempkillval.Name = "killer"
- tempkillval.Value = plr
- local v = 15
- local bv = Instance.new("BodyVelocity")
- bv.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
- bv.Velocity = (rootpart or torso).CFrame.lookVector*v
- bv.Parent = targtorso
- game:GetService("Debris"):AddItem(bv,0.15)
- pcall(function()
- Ragdoll(targchar,false,true,true)
- end)
- end
- bleed2(targtorso or targrootpart,targhum,true,3,false)
- end
- end
- local oid = 0
- function open()
- spawn(function()
- opening = true
- local coid = oid + 1
- oid = coid
- knife.Grip = grip*CFrame.new(0,1,0)*CFrame.Angles(math.rad(180),0,0)
- hw.C0 = CFrame.Angles(0,0,math.rad(-178.2))
- bw.C0 = CFrame.Angles(0,0,math.rad(178.2))
- lw.C0 = CFrame.Angles(0,0,math.rad(178.2))
- wait(0.1)
- k_trail.Enabled = true
- local m = 15
- local d = 22/m
- local di1,di2
- if math.random(1,2) == 1 then
- di1 = 1
- else
- di1 = -1
- end
- if math.random(1,2) == 1 then
- di2 = 1
- else
- di2 = -1
- end
- if coid ~= oid then return end
- for i = 1,m do
- --knife.Grip = grip*CFrame.new(0,1-(i/m),0)*CFrame.Angles(math.rad(180),0,0)*CFrame.Angles(math.rad(-i*8.1*d),math.rad(i*8.1*d*2*di1),math.rad(i*8.1*d*2*di2))
- --hw.C0 = CFrame.Angles(0,0,math.rad(-178.2))*CFrame.Angles(0,0,math.rad(i*8.1*d))
- --bw.C0 = CFrame.Angles(0,0,math.rad(178.2))*CFrame.Angles(0,0,math.rad(-i*8.1*d))
- --lw.C0 = CFrame.Angles(0,0,math.rad(178.2))*CFrame.Angles(0,0,math.rad(-i*8.1*d))
- game:GetService("TweenService"):Create(knife,TweenInfo.new(0.1),{Grip = grip*CFrame.new(0,1-(i/m),0)*CFrame.Angles(math.rad(180),0,0)*CFrame.Angles(math.rad(-i*8.1*d),math.rad(i*8.1*d*2*di1),math.rad(i*8.1*d*2*di2))}):Play()
- game:GetService("TweenService"):Create(hw,TweenInfo.new(0.1),{C0 = CFrame.Angles(0,0,math.rad(-178.2))*CFrame.Angles(0,0,math.rad(i*8.1*d))}):Play()
- game:GetService("TweenService"):Create(bw,TweenInfo.new(0.1),{C0 = CFrame.Angles(0,0,math.rad(178.2))*CFrame.Angles(0,0,math.rad(-i*8.1*d))}):Play()
- game:GetService("TweenService"):Create(lw,TweenInfo.new(0.1),{C0 = CFrame.Angles(0,0,math.rad(178.2))*CFrame.Angles(0,0,math.rad(-i*8.1*d))}):Play()
- if coid ~= oid then break end
- wait()
- end
- if coid ~= oid then return end
- k_trail.Enabled = false
- opening = false
- end)
- end
- function close()
- local coid = oid + 1
- oid = coid
- knife.Grip = grip*CFrame.new(0,1,0)*CFrame.Angles(math.rad(180),0,0)
- hw.C0 = CFrame.Angles(0,0,math.rad(-178.2))
- bw.C0 = CFrame.Angles(0,0,math.rad(178.2))
- lw.C0 = CFrame.Angles(0,0,math.rad(178.2))
- k_trail.Enabled = false
- if coid ~= oid then return end
- end
- function Attack()
- if not stabbing and equipped and not opening then else return end
- stabbing = true
- k_trail.Enabled = true
- Animate('attack')
- swing_s:Play()
- wait(wait_time)
- game:GetService("TweenService"):Create(knife,TweenInfo.new(0.2),{Grip = grip}):Play()
- k_trail.Enabled = false
- stabbing = false
- hit_wall = false
- end
- function Animate(mode)
- if mode == 'attack' then
- animval = animval + 1
- if animval > #swing_anims then animval = 1 end
- swing_animation.AnimationId = "rbxassetid://" .. swing_anims[animval]
- swing_anim = hum:LoadAnimation(swing_animation)
- --[[
- if animval == 1 then
- swing_anim:Play(.05,2,1+wait_time/2) -- front swing
- else
- ]]
- if animval == 1 then
- game:GetService("TweenService"):Create(knife,TweenInfo.new(0.2),{Grip = CFrame.new(-0.414838791, 0.0478739329, -0.00762927299, 1, 3.55271368e-15, -4.37113847e-08, 4.37113847e-08, 1.91068525e-15, 0.999999881, -3.55271368e-15, -0.99999994, 1.91068525e-15)}):Play()
- swing_anim:Play(.3,1.5,1.2+(1-wait_time)) -- left swing
- elseif animval == 2 then
- swing_anim:Play(.3,1.5,1+(1-wait_time)) -- right swing 2
- elseif animval == 3 then
- swing_anim:Play(.3,1.5,1+(1-wait_time)) -- left swing 2
- elseif animval == 4 then
- swing_anim:Play(.3,1.5,1+(1-wait_time)) -- right swing
- end
- end
- end
- spawn(function()
- while wait(0.1) do
- for i,v in pairs(bloodlol_t) do
- if v then
- if v.Transparency < 1 then
- v.Transparency = v.Transparency + 0.05
- else
- v:Destroy()
- end
- end
- end
- end
- end)
- function alive()
- local alive = false
- if (plr and plr.Parent and char and char.Parent and hum and hum.Parent and hum.Health > 0 and torso and torso.Parent) then
- alive = true
- end
- return alive
- end
- function breakwindow(hit)
- if hit and not string.match(hit.Name:lower(),"window shatter") and not string.match(hit.Name:lower(),"blood") then else return end
- wbreak.TimePosition = 0.1
- wbreak:Play()
- local sx,sy,sz=hit.Size.x,hit.Size.y,hit.Size.z
- hit.Name = "window shatter"
- for x=1,4 do
- for y=1,4 do
- local part=hit:Clone()
- local position=Vector3.new(x-2.1,y-2.1,0)*Vector3.new(sx/4,sy/4,sz)
- part.Size=Vector3.new(sx/4,sy/4,sz)
- part.CFrame=hit.CFrame*(CFrame.new(part.Size/8)-hit.Size/8+position)
- part.Velocity=Vector3.new(math.random(-10,10),math.random(-10,10),math.random(-10,10))
- part.Name="window shatter"
- part.Parent=hit.Parent
- game:GetService("Debris"):AddItem(part,2)
- spawn(function()
- wait(0.5)
- for i=1,10 do
- part.Transparency=part.Transparency+0.05
- wait(0.05)
- end
- part:Destroy()
- end)
- part.Anchored=false
- end
- end
- hit:Destroy()
- end
- function decide(obj)
- local targpar,targhum,killval,hitval,hitval2
- pcall(function()
- targpar = obj.Parent
- end)
- pcall(function()
- targhum = obj.Parent:FindFirstChildOfClass("Humanoid")
- end)
- pcall(function()
- killval = targhum:FindFirstChild("killer")
- end)
- pcall(function()
- hitval = targhum:FindFirstChild("hit " .. targpar.Name .. " with balisong by " .. plr.Name)
- end)
- pcall(function()
- hitval2 = targpar:FindFirstChild("hit with balisong by " .. plr.Name)
- end)
- if targpar and stabbing and targhum and targhum.Health > 0 and not killval and not hitval then
- Damage(obj)
- elseif 1 > obj.Transparency and targpar and not hit_wall and stabbing and not targhum and not killval and not hitval and not hitval2 and not obj:FindFirstChild("Dismembered") and not obj.Parent:IsA("Tool") and not obj.Parent:IsA("Accessory") and obj.Parent.Name ~= 'Handle' and not string.match(obj.Name:lower(),'blood') and not string.match(obj.Name:lower(),'bullet') and not string.match(obj.Name:lower(),'limb') then
- hit_wall = true
- local tempval = Instance.new("ObjectValue")
- tempval.Name = ("hit " .. targpar.Name .. " with balisong by " .. plr.Name)
- tempval.Parent = targpar
- hitwall.SoundId = 'rbxassetid://' .. wallhits[math.random(1,#wallhits)]
- hitwall:Play()
- spark.Enabled = true
- spawn(function()
- wait(0.1)
- spark.Enabled = false
- end)
- if (obj.Material == Enum.Material.Glass or obj.Material == Enum.Material.Ice) then
- breakwindow(obj)
- end
- end
- end
- knife.Equipped:Connect(function()
- char = knife.Parent
- plr = game:GetService("Players"):GetPlayerFromCharacter(char)
- hum = char:FindFirstChildOfClass("Humanoid")
- torso = char:FindFirstChild("Torso") or char:FindFirstChild("UpperTorso")
- rootpart = char:FindFirstChild("HumanoidRootPart")
- larm,rarm,lleg,rleg,head = char:FindFirstChild("Left Arm"),char:FindFirstChild("Right Arm"),char:FindFirstChild("Left Leg"),char:FindFirstChild("Right Leg"),char:FindFirstChild("Head")
- if alive() then else knife.Parent = workspace; return; end;
- equip_s:Play()
- idleanim = hum:LoadAnimation(idleanimation)
- idleanim:Play()
- equipped = true
- open()
- end)
- knife.Unequipped:Connect(function()
- equipped = false
- idleanim:Stop()
- swing_anim:Stop()
- close()
- end)
- knife.Activated:Connect(Attack)
- blade.Touched:Connect(decide)
- warn([[
- == KrY's Balisong v2.2 ==
- == Controls ==
- - Click to stab (backstabs do insta kill
- == Features ==
- - up to 9 skins made
- - Random skins applied when script ran
- - You can hit walls to create a sound and spark
- - Can break glass and ice materials
- - Balisong equip animation
- == Soon ==
- - more Balisong animations? lol
- ]])
Add Comment
Please, Sign In to add comment