Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Model0 = Instance.new("Model")
- Part1 = Instance.new("Part")
- Part2 = Instance.new("Part")
- Part3 = Instance.new("Part")
- Part4 = Instance.new("Part")
- Part5 = Instance.new("Part")
- Part6 = Instance.new("Part")
- Part7 = Instance.new("Part")
- Part8 = Instance.new("Part")
- Part9 = Instance.new("Part")
- Model10 = Instance.new("Model")
- Model11 = Instance.new("Model")
- Part12 = Instance.new("Part")
- ParticleEmitter13 = Instance.new("ParticleEmitter")
- ParticleEmitter14 = Instance.new("ParticleEmitter")
- ParticleEmitter15 = Instance.new("ParticleEmitter")
- UnionOperation16 = Instance.new("UnionOperation")
- UnionOperation17 = Instance.new("UnionOperation")
- UnionOperation18 = Instance.new("UnionOperation")
- Part19 = Instance.new("Part")
- PointLight20 = Instance.new("PointLight")
- PointLight21 = Instance.new("PointLight")
- Part22 = Instance.new("Part")
- Part23 = Instance.new("Part")
- Part24 = Instance.new("Part")
- Part25 = Instance.new("Part")
- Part26 = Instance.new("Part")
- Part27 = Instance.new("Part")
- Part28 = Instance.new("Part")
- Part29 = Instance.new("Part")
- Part30 = Instance.new("Part")
- Part31 = Instance.new("Part")
- Part32 = Instance.new("Part")
- Part33 = Instance.new("Part")
- WedgePart34 = Instance.new("WedgePart")
- WedgePart35 = Instance.new("WedgePart")
- Part36 = Instance.new("Part")
- WedgePart37 = Instance.new("WedgePart")
- Model38 = Instance.new("Model")
- Model39 = Instance.new("Model")
- Part40 = Instance.new("Part")
- ParticleEmitter41 = Instance.new("ParticleEmitter")
- ParticleEmitter42 = Instance.new("ParticleEmitter")
- ParticleEmitter43 = Instance.new("ParticleEmitter")
- UnionOperation44 = Instance.new("UnionOperation")
- UnionOperation45 = Instance.new("UnionOperation")
- UnionOperation46 = Instance.new("UnionOperation")
- Part47 = Instance.new("Part")
- PointLight48 = Instance.new("PointLight")
- PointLight49 = Instance.new("PointLight")
- Part50 = Instance.new("Part")
- Part51 = Instance.new("Part")
- Part52 = Instance.new("Part")
- Part53 = Instance.new("Part")
- WedgePart54 = Instance.new("WedgePart")
- WedgePart55 = Instance.new("WedgePart")
- Part56 = Instance.new("Part")
- Part57 = Instance.new("Part")
- WedgePart58 = Instance.new("WedgePart")
- Part59 = Instance.new("Part")
- Part60 = Instance.new("Part")
- Part61 = Instance.new("Part")
- WedgePart62 = Instance.new("WedgePart")
- Part63 = Instance.new("Part")
- Part64 = Instance.new("Part")
- Part65 = Instance.new("Part")
- Model66 = Instance.new("Model")
- Part67 = Instance.new("Part")
- Part68 = Instance.new("Part")
- Part69 = Instance.new("Part")
- Part70 = Instance.new("Part")
- Part71 = Instance.new("Part")
- Part72 = Instance.new("Part")
- Part73 = Instance.new("Part")
- Part74 = Instance.new("Part")
- Part75 = Instance.new("Part")
- Part76 = Instance.new("Part")
- SurfaceGui77 = Instance.new("SurfaceGui")
- TextBox78 = Instance.new("TextBox")
- ClickDetector79 = Instance.new("ClickDetector")
- Part80 = Instance.new("Part")
- SurfaceGui81 = Instance.new("SurfaceGui")
- TextBox82 = Instance.new("TextBox")
- ClickDetector83 = Instance.new("ClickDetector")
- Model0.Name = "pvp map"
- Model0.Parent = script
- Part1.Parent = Model0
- Part1.CFrame = CFrame.new(-27, 14.5, 51.5, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part1.Position = Vector3.new(-27, 14.5, 51.5)
- Part1.Size = Vector3.new(84, 29, 1)
- Part1.Anchored = true
- Part1.BottomSurface = Enum.SurfaceType.Smooth
- Part1.Locked = true
- Part1.Material = Enum.Material.DiamondPlate
- Part1.TopSurface = Enum.SurfaceType.Smooth
- Part2.Parent = Model0
- Part2.CFrame = CFrame.new(30, 0.5, 151, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part2.Position = Vector3.new(30, 0.5, 151)
- Part2.Color = Color3.new(0.156863, 0.498039, 0.278431)
- Part2.Size = Vector3.new(198, 1, 198)
- Part2.Anchored = true
- Part2.BottomSurface = Enum.SurfaceType.Smooth
- Part2.BrickColor = BrickColor.new("Dark green")
- Part2.Locked = true
- Part2.Material = Enum.Material.Grass
- Part2.TopSurface = Enum.SurfaceType.Smooth
- Part2.brickColor = BrickColor.new("Dark green")
- Part3.Parent = Model0
- Part3.CFrame = CFrame.new(-15, 14, 109, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part3.Position = Vector3.new(-15, 14, 109)
- Part3.Color = Color3.new(0.411765, 0.25098, 0.156863)
- Part3.Size = Vector3.new(2, 4, 10)
- Part3.Anchored = true
- Part3.BottomSurface = Enum.SurfaceType.Smooth
- Part3.BrickColor = BrickColor.new("Reddish brown")
- Part3.Locked = true
- Part3.Material = Enum.Material.WoodPlanks
- Part3.TopSurface = Enum.SurfaceType.Smooth
- Part3.brickColor = BrickColor.new("Reddish brown")
- Part4.Parent = Model0
- Part4.CFrame = CFrame.new(-15, 8.5, 101.5, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part4.Position = Vector3.new(-15, 8.5, 101.5)
- Part4.Color = Color3.new(0.411765, 0.25098, 0.156863)
- Part4.Size = Vector3.new(2, 15, 5)
- Part4.Anchored = true
- Part4.BottomSurface = Enum.SurfaceType.Smooth
- Part4.BrickColor = BrickColor.new("Reddish brown")
- Part4.Locked = true
- Part4.Material = Enum.Material.WoodPlanks
- Part4.TopSurface = Enum.SurfaceType.Smooth
- Part4.brickColor = BrickColor.new("Reddish brown")
- Part5.Parent = Model0
- Part5.CFrame = CFrame.new(-15, 8, 109, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part5.Position = Vector3.new(-15, 8, 109)
- Part5.Color = Color3.new(0, 1, 1)
- Part5.Transparency = 0.60000002384186
- Part5.Size = Vector3.new(2, 8, 10)
- Part5.Anchored = true
- Part5.BottomSurface = Enum.SurfaceType.Smooth
- Part5.BrickColor = BrickColor.new("Toothpaste")
- Part5.Locked = true
- Part5.Material = Enum.Material.Glass
- Part5.Reflectance = 1
- Part5.TopSurface = Enum.SurfaceType.Smooth
- Part5.brickColor = BrickColor.new("Toothpaste")
- Part6.Parent = Model0
- Part6.CFrame = CFrame.new(-15, 2.5, 109, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part6.Position = Vector3.new(-15, 2.5, 109)
- Part6.Color = Color3.new(0.411765, 0.25098, 0.156863)
- Part6.Size = Vector3.new(2, 3, 10)
- Part6.Anchored = true
- Part6.BottomSurface = Enum.SurfaceType.Smooth
- Part6.BrickColor = BrickColor.new("Reddish brown")
- Part6.Locked = true
- Part6.Material = Enum.Material.WoodPlanks
- Part6.TopSurface = Enum.SurfaceType.Smooth
- Part6.brickColor = BrickColor.new("Reddish brown")
- Part7.Parent = Model0
- Part7.CFrame = CFrame.new(-15, 8.5, 116, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part7.Position = Vector3.new(-15, 8.5, 116)
- Part7.Color = Color3.new(0.411765, 0.25098, 0.156863)
- Part7.Size = Vector3.new(2, 15, 4)
- Part7.Anchored = true
- Part7.BottomSurface = Enum.SurfaceType.Smooth
- Part7.BrickColor = BrickColor.new("Reddish brown")
- Part7.Locked = true
- Part7.Material = Enum.Material.WoodPlanks
- Part7.TopSurface = Enum.SurfaceType.Smooth
- Part7.brickColor = BrickColor.new("Reddish brown")
- Part8.Parent = Model0
- Part8.CFrame = CFrame.new(-11, 7.5, 76, 0, 0, 1, -1, 0, 0, 0, -1, 0)
- Part8.Orientation = Vector3.new(0, 90, -90)
- Part8.Position = Vector3.new(-11, 7.5, 76)
- Part8.Rotation = Vector3.new(-90, 90, 0)
- Part8.Color = Color3.new(0.356863, 0.364706, 0.411765)
- Part8.Size = Vector3.new(13, 12, 12)
- Part8.Anchored = true
- Part8.BottomSurface = Enum.SurfaceType.Smooth
- Part8.BrickColor = BrickColor.new("Smoky grey")
- Part8.Locked = true
- Part8.Material = Enum.Material.Marble
- Part8.TopSurface = Enum.SurfaceType.Smooth
- Part8.brickColor = BrickColor.new("Smoky grey")
- Part8.Shape = Enum.PartType.Cylinder
- Part9.Parent = Model0
- Part9.CFrame = CFrame.new(43, 7.5, 126, 0, 0, 1, -1, 0, 0, 0, -1, 0)
- Part9.Orientation = Vector3.new(0, 90, -90)
- Part9.Position = Vector3.new(43, 7.5, 126)
- Part9.Rotation = Vector3.new(-90, 90, 0)
- Part9.Color = Color3.new(0.356863, 0.364706, 0.411765)
- Part9.Size = Vector3.new(13, 12, 12)
- Part9.Anchored = true
- Part9.BottomSurface = Enum.SurfaceType.Smooth
- Part9.BrickColor = BrickColor.new("Smoky grey")
- Part9.Locked = true
- Part9.Material = Enum.Material.Marble
- Part9.TopSurface = Enum.SurfaceType.Smooth
- Part9.brickColor = BrickColor.new("Smoky grey")
- Part9.Shape = Enum.PartType.Cylinder
- Model10.Name = "WallTorch"
- Model10.Parent = Model0
- Model11.Name = "Torch"
- Model11.Parent = Model10
- Part12.Name = "Effects"
- Part12.Parent = Model11
- Part12.CFrame = CFrame.new(-53.5426407, 7.71180916, 138.235062, 0.965925217, 0.258821428, 1.73094108e-11, -0.258821428, 0.965925276, 1.84496562e-09, 4.60797012e-10, -1.78657877e-09, 1)
- Part12.Orientation = Vector3.new(0, 0, -15)
- Part12.Position = Vector3.new(-53.5426407, 7.71180916, 138.235062)
- Part12.Rotation = Vector3.new(0, 0, -15)
- Part12.Transparency = 1
- Part12.Size = Vector3.new(0.300000012, 0.400000006, 0.300000012)
- Part12.Anchored = true
- Part12.BottomSurface = Enum.SurfaceType.Smooth
- Part12.TopSurface = Enum.SurfaceType.Smooth
- Part12.FormFactor = Enum.FormFactor.Custom
- Part12.formFactor = Enum.FormFactor.Custom
- ParticleEmitter13.Name = "Fire"
- ParticleEmitter13.Parent = Part12
- ParticleEmitter13.Speed = NumberRange.new(0.25, 0.25)
- ParticleEmitter13.Rotation = NumberRange.new(-20, 20)
- ParticleEmitter13.Color = ColorSequence.new(Color3.new(1, 0.784314, 0.592157),Color3.new(0.976471, 0.52549, 0.129412))
- ParticleEmitter13.LightEmission = 0.5
- ParticleEmitter13.Texture = "http://www.roblox.com/asset/?id=242102147"
- ParticleEmitter13.Transparency = NumberSequence.new(1,0.43124997615814,0.33125001192093,0.3125,1,1)
- ParticleEmitter13.ZOffset = 0.5
- ParticleEmitter13.Size = NumberSequence.new(0.43749988079071,0)
- ParticleEmitter13.Acceleration = Vector3.new(0, 5, 0)
- ParticleEmitter13.Lifetime = NumberRange.new(0.75, 0.85000002384186)
- ParticleEmitter13.Rate = 75
- ParticleEmitter13.RotSpeed = NumberRange.new(-10, 10)
- ParticleEmitter13.SpreadAngle = Vector2.new(25, 25)
- ParticleEmitter13.VelocitySpread = 25
- ParticleEmitter14.Name = "Glow"
- ParticleEmitter14.Parent = Part12
- ParticleEmitter14.Speed = NumberRange.new(3, 3)
- ParticleEmitter14.Color = ColorSequence.new(Color3.new(1, 0.784314, 0.592157),Color3.new(0.976471, 0.52549, 0.129412))
- ParticleEmitter14.LightEmission = 1
- ParticleEmitter14.Texture = "http://www.roblox.com/asset/?id=241923041"
- ParticleEmitter14.Transparency = NumberSequence.new(1,0.96249997615814,1,1)
- ParticleEmitter14.ZOffset = 0.5
- ParticleEmitter14.Size = NumberSequence.new(2.8749995231628,0)
- ParticleEmitter14.Acceleration = Vector3.new(0, 10, 0)
- ParticleEmitter14.Lifetime = NumberRange.new(0.25, 0.5)
- ParticleEmitter14.Rate = 35
- ParticleEmitter14.SpreadAngle = Vector2.new(45, 45)
- ParticleEmitter14.VelocitySpread = 45
- ParticleEmitter15.Name = "Smoke"
- ParticleEmitter15.Parent = Part12
- ParticleEmitter15.Speed = NumberRange.new(1, 1)
- ParticleEmitter15.Rotation = NumberRange.new(-180, 180)
- ParticleEmitter15.Color = ColorSequence.new(Color3.new(0.541176, 0.419608, 0.227451),Color3.new(0.152941, 0.152941, 0.152941))
- ParticleEmitter15.LightEmission = 0.25
- ParticleEmitter15.Texture = "http://www.roblox.com/asset/?id=241922778"
- ParticleEmitter15.Transparency = NumberSequence.new(1,0,0,1)
- ParticleEmitter15.Size = NumberSequence.new(0.56249976158142,2.0625)
- ParticleEmitter15.Acceleration = Vector3.new(0, 5, 0)
- ParticleEmitter15.Lifetime = NumberRange.new(1, 1.5)
- ParticleEmitter15.Rate = 10
- ParticleEmitter15.RotSpeed = NumberRange.new(-90, 90)
- ParticleEmitter15.SpreadAngle = Vector2.new(25, 25)
- ParticleEmitter15.VelocitySpread = 25
- UnionOperation16.Name = "Holder"
- UnionOperation16.Parent = Model11
- UnionOperation16.CFrame = CFrame.new(-54.0720596, 6.52022314, 138.23497, 0.965925217, 0.258821458, 1.82674409e-08, -0.258821458, 0.965925217, 1.23815802e-08, -1.44403618e-08, -1.66876859e-08, 1)
- UnionOperation16.Orientation = Vector3.new(0, 0, -15)
- UnionOperation16.Position = Vector3.new(-54.0720596, 6.52022314, 138.23497)
- UnionOperation16.Rotation = Vector3.new(0, 0, -15)
- UnionOperation16.Color = Color3.new(0.105882, 0.164706, 0.207843)
- UnionOperation16.Size = Vector3.new(0.823072314, 0.441888571, 0.376728863)
- UnionOperation16.Anchored = true
- UnionOperation16.BrickColor = BrickColor.new("Black")
- UnionOperation16.Material = Enum.Material.Metal
- UnionOperation16.brickColor = BrickColor.new("Black")
- UnionOperation16.UsePartColor = true
- UnionOperation17.Name = "Handle"
- UnionOperation17.Parent = Model11
- UnionOperation17.CFrame = CFrame.new(-53.853157, 6.55270195, 138.235031, 0.965925217, 0.258821428, 1.73094108e-11, -0.258821428, 0.965925276, 1.84496562e-09, 4.60797012e-10, -1.78657877e-09, 1)
- UnionOperation17.Orientation = Vector3.new(0, 0, -15)
- UnionOperation17.Position = Vector3.new(-53.853157, 6.55270195, 138.235031)
- UnionOperation17.Rotation = Vector3.new(0, 0, -15)
- UnionOperation17.Color = Color3.new(0.411765, 0.25098, 0.156863)
- UnionOperation17.Size = Vector3.new(0.525000036, 3, 0.525000036)
- UnionOperation17.Anchored = true
- UnionOperation17.BrickColor = BrickColor.new("Reddish brown")
- UnionOperation17.Material = Enum.Material.Wood
- UnionOperation17.brickColor = BrickColor.new("Reddish brown")
- UnionOperation18.Name = "End"
- UnionOperation18.Parent = Model11
- UnionOperation18.CFrame = CFrame.new(-53.5911942, 7.53066397, 138.235062, 0.965925217, 0.258821428, 1.73094108e-11, -0.258821428, 0.965925276, 1.84496562e-09, 4.60797012e-10, -1.78657877e-09, 1)
- UnionOperation18.Orientation = Vector3.new(0, 0, -15)
- UnionOperation18.Position = Vector3.new(-53.5911942, 7.53066397, 138.235062)
- UnionOperation18.Rotation = Vector3.new(0, 0, -15)
- UnionOperation18.Color = Color3.new(0.843137, 0.772549, 0.603922)
- UnionOperation18.Size = Vector3.new(0.600000143, 0.750000119, 0.600000024)
- UnionOperation18.Anchored = true
- UnionOperation18.BrickColor = BrickColor.new("Brick yellow")
- UnionOperation18.Material = Enum.Material.Grass
- UnionOperation18.brickColor = BrickColor.new("Brick yellow")
- Part19.Parent = Model10
- Part19.CFrame = CFrame.new(-53.4732437, 6.50000191, 138.235062, 1, 2.13164962e-13, -5.96861861e-13, -2.13164962e-13, 1, -2.5024028e-12, 5.96861861e-13, 2.5024028e-12, 1)
- Part19.Position = Vector3.new(-53.4732437, 6.50000191, 138.235062)
- Part19.Transparency = 1
- Part19.Size = Vector3.new(2, 3, 2)
- Part19.Anchored = true
- Part19.CanCollide = false
- Part19.FormFactor = Enum.FormFactor.Symmetric
- Part19.formFactor = Enum.FormFactor.Symmetric
- PointLight20.Name = "NearLight"
- PointLight20.Parent = Part19
- PointLight20.Color = Color3.new(1, 0.756863, 0.360784)
- PointLight20.Range = 12
- PointLight20.Brightness = 0.5
- PointLight20.Shadows = true
- PointLight21.Name = "FarLight"
- PointLight21.Parent = Part19
- PointLight21.Color = Color3.new(1, 0.756863, 0.360784)
- PointLight21.Range = 32
- PointLight21.Brightness = 0.25
- PointLight21.Shadows = true
- Part22.Parent = Model0
- Part22.CFrame = CFrame.new(-55.5, 8.5, 123, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part22.Position = Vector3.new(-55.5, 8.5, 123)
- Part22.Color = Color3.new(0.411765, 0.25098, 0.156863)
- Part22.Size = Vector3.new(1, 15, 46)
- Part22.Anchored = true
- Part22.BottomSurface = Enum.SurfaceType.Smooth
- Part22.BrickColor = BrickColor.new("Reddish brown")
- Part22.Locked = true
- Part22.Material = Enum.Material.WoodPlanks
- Part22.TopSurface = Enum.SurfaceType.Smooth
- Part22.brickColor = BrickColor.new("Reddish brown")
- Part23.Parent = Model0
- Part23.CFrame = CFrame.new(-36.5, 14, 99.5, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part23.Position = Vector3.new(-36.5, 14, 99.5)
- Part23.Color = Color3.new(0.411765, 0.25098, 0.156863)
- Part23.Size = Vector3.new(11, 4, 1)
- Part23.Anchored = true
- Part23.BottomSurface = Enum.SurfaceType.Smooth
- Part23.BrickColor = BrickColor.new("Reddish brown")
- Part23.Locked = true
- Part23.Material = Enum.Material.WoodPlanks
- Part23.TopSurface = Enum.SurfaceType.Smooth
- Part23.brickColor = BrickColor.new("Reddish brown")
- Part24.Parent = Model0
- Part24.CFrame = CFrame.new(-23.5, 8.5, 145.5, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part24.Position = Vector3.new(-23.5, 8.5, 145.5)
- Part24.Color = Color3.new(0.411765, 0.25098, 0.156863)
- Part24.Size = Vector3.new(15, 15, 1)
- Part24.Anchored = true
- Part24.BottomSurface = Enum.SurfaceType.Smooth
- Part24.BrickColor = BrickColor.new("Reddish brown")
- Part24.Locked = true
- Part24.Material = Enum.Material.WoodPlanks
- Part24.TopSurface = Enum.SurfaceType.Smooth
- Part24.brickColor = BrickColor.new("Reddish brown")
- Part25.Parent = Model0
- Part25.CFrame = CFrame.new(-36.5, 2.5, 145.5, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part25.Position = Vector3.new(-36.5, 2.5, 145.5)
- Part25.Color = Color3.new(0.411765, 0.25098, 0.156863)
- Part25.Size = Vector3.new(11, 3, 1)
- Part25.Anchored = true
- Part25.BottomSurface = Enum.SurfaceType.Smooth
- Part25.BrickColor = BrickColor.new("Reddish brown")
- Part25.Locked = true
- Part25.Material = Enum.Material.WoodPlanks
- Part25.TopSurface = Enum.SurfaceType.Smooth
- Part25.brickColor = BrickColor.new("Reddish brown")
- Part26.Parent = Model0
- Part26.CFrame = CFrame.new(-48.5, 8.5, 145.5, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part26.Position = Vector3.new(-48.5, 8.5, 145.5)
- Part26.Color = Color3.new(0.411765, 0.25098, 0.156863)
- Part26.Size = Vector3.new(13, 15, 1)
- Part26.Anchored = true
- Part26.BottomSurface = Enum.SurfaceType.Smooth
- Part26.BrickColor = BrickColor.new("Reddish brown")
- Part26.Locked = true
- Part26.Material = Enum.Material.WoodPlanks
- Part26.TopSurface = Enum.SurfaceType.Smooth
- Part26.brickColor = BrickColor.new("Reddish brown")
- Part27.Parent = Model0
- Part27.CFrame = CFrame.new(-36.5, 14, 145.5, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part27.Position = Vector3.new(-36.5, 14, 145.5)
- Part27.Color = Color3.new(0.411765, 0.25098, 0.156863)
- Part27.Size = Vector3.new(11, 4, 1)
- Part27.Anchored = true
- Part27.BottomSurface = Enum.SurfaceType.Smooth
- Part27.BrickColor = BrickColor.new("Reddish brown")
- Part27.Locked = true
- Part27.Material = Enum.Material.WoodPlanks
- Part27.TopSurface = Enum.SurfaceType.Smooth
- Part27.brickColor = BrickColor.new("Reddish brown")
- Part28.Parent = Model0
- Part28.CFrame = CFrame.new(-36.5, 8, 145.5, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part28.Position = Vector3.new(-36.5, 8, 145.5)
- Part28.Color = Color3.new(0, 1, 1)
- Part28.Transparency = 0.60000002384186
- Part28.Size = Vector3.new(11, 8, 1)
- Part28.Anchored = true
- Part28.BottomSurface = Enum.SurfaceType.Smooth
- Part28.BrickColor = BrickColor.new("Toothpaste")
- Part28.Locked = true
- Part28.Material = Enum.Material.Glass
- Part28.Reflectance = 1
- Part28.TopSurface = Enum.SurfaceType.Smooth
- Part28.brickColor = BrickColor.new("Toothpaste")
- Part29.Parent = Model0
- Part29.CFrame = CFrame.new(104, 7.5, 122, 0, 0, 1, -1, 0, 0, 0, -1, 0)
- Part29.Orientation = Vector3.new(0, 90, -90)
- Part29.Position = Vector3.new(104, 7.5, 122)
- Part29.Rotation = Vector3.new(-90, 90, 0)
- Part29.Color = Color3.new(0.356863, 0.364706, 0.411765)
- Part29.Size = Vector3.new(13, 12, 12)
- Part29.Anchored = true
- Part29.BottomSurface = Enum.SurfaceType.Smooth
- Part29.BrickColor = BrickColor.new("Smoky grey")
- Part29.Locked = true
- Part29.Material = Enum.Material.Marble
- Part29.TopSurface = Enum.SurfaceType.Smooth
- Part29.brickColor = BrickColor.new("Smoky grey")
- Part29.Shape = Enum.PartType.Cylinder
- Part30.Parent = Model0
- Part30.CFrame = CFrame.new(-9, 7.5, 191, 0, 0, 1, -1, 0, 0, 0, -1, 0)
- Part30.Orientation = Vector3.new(0, 90, -90)
- Part30.Position = Vector3.new(-9, 7.5, 191)
- Part30.Rotation = Vector3.new(-90, 90, 0)
- Part30.Color = Color3.new(0.356863, 0.364706, 0.411765)
- Part30.Size = Vector3.new(13, 12, 12)
- Part30.Anchored = true
- Part30.BottomSurface = Enum.SurfaceType.Smooth
- Part30.BrickColor = BrickColor.new("Smoky grey")
- Part30.Locked = true
- Part30.Material = Enum.Material.Marble
- Part30.TopSurface = Enum.SurfaceType.Smooth
- Part30.brickColor = BrickColor.new("Smoky grey")
- Part30.Shape = Enum.PartType.Cylinder
- Part31.Parent = Model0
- Part31.CFrame = CFrame.new(87, 14.5, 51.5, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part31.Position = Vector3.new(87, 14.5, 51.5)
- Part31.Size = Vector3.new(84, 29, 1)
- Part31.Anchored = true
- Part31.BottomSurface = Enum.SurfaceType.Smooth
- Part31.Locked = true
- Part31.Material = Enum.Material.DiamondPlate
- Part31.TopSurface = Enum.SurfaceType.Smooth
- Part32.Parent = Model0
- Part32.CFrame = CFrame.new(-49, 8.5, 99.5, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part32.Position = Vector3.new(-49, 8.5, 99.5)
- Part32.Color = Color3.new(0.411765, 0.25098, 0.156863)
- Part32.Size = Vector3.new(14, 15, 1)
- Part32.Anchored = true
- Part32.BottomSurface = Enum.SurfaceType.Smooth
- Part32.BrickColor = BrickColor.new("Reddish brown")
- Part32.Locked = true
- Part32.Material = Enum.Material.WoodPlanks
- Part32.TopSurface = Enum.SurfaceType.Smooth
- Part32.brickColor = BrickColor.new("Reddish brown")
- Part33.Parent = Model0
- Part33.CFrame = CFrame.new(-35, 16.5, 122.5, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part33.Position = Vector3.new(-35, 16.5, 122.5)
- Part33.Color = Color3.new(0.411765, 0.25098, 0.156863)
- Part33.Size = Vector3.new(42, 1, 47)
- Part33.Anchored = true
- Part33.BottomSurface = Enum.SurfaceType.Smooth
- Part33.BrickColor = BrickColor.new("Reddish brown")
- Part33.Locked = true
- Part33.Material = Enum.Material.WoodPlanks
- Part33.TopSurface = Enum.SurfaceType.Smooth
- Part33.brickColor = BrickColor.new("Reddish brown")
- WedgePart34.Parent = Model0
- WedgePart34.CFrame = CFrame.new(-35, 21, 134.5, -1, 0, 0, 0, 1, 0, 0, 0, -1)
- WedgePart34.Orientation = Vector3.new(0, 180, 0)
- WedgePart34.Position = Vector3.new(-35, 21, 134.5)
- WedgePart34.Rotation = Vector3.new(-180, 0, -180)
- WedgePart34.Color = Color3.new(0.411765, 0.25098, 0.156863)
- WedgePart34.Size = Vector3.new(42, 8, 23)
- WedgePart34.Anchored = true
- WedgePart34.BottomSurface = Enum.SurfaceType.Smooth
- WedgePart34.BrickColor = BrickColor.new("Reddish brown")
- WedgePart34.Locked = true
- WedgePart34.Material = Enum.Material.Wood
- WedgePart34.brickColor = BrickColor.new("Reddish brown")
- WedgePart35.Parent = Model0
- WedgePart35.CFrame = CFrame.new(-35, 21, 111, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- WedgePart35.Position = Vector3.new(-35, 21, 111)
- WedgePart35.Color = Color3.new(0.411765, 0.25098, 0.156863)
- WedgePart35.Size = Vector3.new(42, 8, 24)
- WedgePart35.Anchored = true
- WedgePart35.BottomSurface = Enum.SurfaceType.Smooth
- WedgePart35.BrickColor = BrickColor.new("Reddish brown")
- WedgePart35.Locked = true
- WedgePart35.Material = Enum.Material.Wood
- WedgePart35.brickColor = BrickColor.new("Reddish brown")
- Part36.Parent = Model0
- Part36.CFrame = CFrame.new(-23.5, 8.5, 99.5, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part36.Position = Vector3.new(-23.5, 8.5, 99.5)
- Part36.Color = Color3.new(0.411765, 0.25098, 0.156863)
- Part36.Size = Vector3.new(15, 15, 1)
- Part36.Anchored = true
- Part36.BottomSurface = Enum.SurfaceType.Smooth
- Part36.BrickColor = BrickColor.new("Reddish brown")
- Part36.Locked = true
- Part36.Material = Enum.Material.WoodPlanks
- Part36.TopSurface = Enum.SurfaceType.Smooth
- Part36.brickColor = BrickColor.new("Reddish brown")
- WedgePart37.Parent = Model0
- WedgePart37.CFrame = CFrame.new(32.5, 6, 75.5, -1, 0, 0, 0, 1, 0, 0, 0, -1)
- WedgePart37.Orientation = Vector3.new(0, 180, 0)
- WedgePart37.Position = Vector3.new(32.5, 6, 75.5)
- WedgePart37.Rotation = Vector3.new(-180, 0, -180)
- WedgePart37.Size = Vector3.new(13, 10, 21)
- WedgePart37.Anchored = true
- WedgePart37.BottomSurface = Enum.SurfaceType.Smooth
- WedgePart37.Locked = true
- WedgePart37.Material = Enum.Material.DiamondPlate
- Model38.Name = "WallTorch"
- Model38.Parent = Model0
- Model39.Name = "Torch"
- Model39.Parent = Model38
- Part40.Name = "Effects"
- Part40.Parent = Model39
- Part40.CFrame = CFrame.new(-53.5426407, 7.71180916, 109.235062, 0.965925217, 0.258821428, 1.73094108e-11, -0.258821428, 0.965925276, 1.84496562e-09, 4.60797012e-10, -1.78657877e-09, 1)
- Part40.Orientation = Vector3.new(0, 0, -15)
- Part40.Position = Vector3.new(-53.5426407, 7.71180916, 109.235062)
- Part40.Rotation = Vector3.new(0, 0, -15)
- Part40.Transparency = 1
- Part40.Size = Vector3.new(0.300000012, 0.400000006, 0.300000012)
- Part40.Anchored = true
- Part40.BottomSurface = Enum.SurfaceType.Smooth
- Part40.TopSurface = Enum.SurfaceType.Smooth
- Part40.FormFactor = Enum.FormFactor.Custom
- Part40.formFactor = Enum.FormFactor.Custom
- ParticleEmitter41.Name = "Fire"
- ParticleEmitter41.Parent = Part40
- ParticleEmitter41.Speed = NumberRange.new(0.25, 0.25)
- ParticleEmitter41.Rotation = NumberRange.new(-20, 20)
- ParticleEmitter41.Color = ColorSequence.new(Color3.new(1, 0.784314, 0.592157),Color3.new(0.976471, 0.52549, 0.129412))
- ParticleEmitter41.LightEmission = 0.5
- ParticleEmitter41.Texture = "http://www.roblox.com/asset/?id=242102147"
- ParticleEmitter41.Transparency = NumberSequence.new(1,0.43124997615814,0.33125001192093,0.3125,1,1)
- ParticleEmitter41.ZOffset = 0.5
- ParticleEmitter41.Size = NumberSequence.new(0.43749988079071,0)
- ParticleEmitter41.Acceleration = Vector3.new(0, 5, 0)
- ParticleEmitter41.Lifetime = NumberRange.new(0.75, 0.85000002384186)
- ParticleEmitter41.Rate = 75
- ParticleEmitter41.RotSpeed = NumberRange.new(-10, 10)
- ParticleEmitter41.SpreadAngle = Vector2.new(25, 25)
- ParticleEmitter41.VelocitySpread = 25
- ParticleEmitter42.Name = "Glow"
- ParticleEmitter42.Parent = Part40
- ParticleEmitter42.Speed = NumberRange.new(3, 3)
- ParticleEmitter42.Color = ColorSequence.new(Color3.new(1, 0.784314, 0.592157),Color3.new(0.976471, 0.52549, 0.129412))
- ParticleEmitter42.LightEmission = 1
- ParticleEmitter42.Texture = "http://www.roblox.com/asset/?id=241923041"
- ParticleEmitter42.Transparency = NumberSequence.new(1,0.96249997615814,1,1)
- ParticleEmitter42.ZOffset = 0.5
- ParticleEmitter42.Size = NumberSequence.new(2.8749995231628,0)
- ParticleEmitter42.Acceleration = Vector3.new(0, 10, 0)
- ParticleEmitter42.Lifetime = NumberRange.new(0.25, 0.5)
- ParticleEmitter42.Rate = 35
- ParticleEmitter42.SpreadAngle = Vector2.new(45, 45)
- ParticleEmitter42.VelocitySpread = 45
- ParticleEmitter43.Name = "Smoke"
- ParticleEmitter43.Parent = Part40
- ParticleEmitter43.Speed = NumberRange.new(1, 1)
- ParticleEmitter43.Rotation = NumberRange.new(-180, 180)
- ParticleEmitter43.Color = ColorSequence.new(Color3.new(0.541176, 0.419608, 0.227451),Color3.new(0.152941, 0.152941, 0.152941))
- ParticleEmitter43.LightEmission = 0.25
- ParticleEmitter43.Texture = "http://www.roblox.com/asset/?id=241922778"
- ParticleEmitter43.Transparency = NumberSequence.new(1,0,0,1)
- ParticleEmitter43.Size = NumberSequence.new(0.56249976158142,2.0625)
- ParticleEmitter43.Acceleration = Vector3.new(0, 5, 0)
- ParticleEmitter43.Lifetime = NumberRange.new(1, 1.5)
- ParticleEmitter43.Rate = 10
- ParticleEmitter43.RotSpeed = NumberRange.new(-90, 90)
- ParticleEmitter43.SpreadAngle = Vector2.new(25, 25)
- ParticleEmitter43.VelocitySpread = 25
- UnionOperation44.Name = "Holder"
- UnionOperation44.Parent = Model39
- UnionOperation44.CFrame = CFrame.new(-54.0720596, 6.52022314, 109.23497, 0.965925217, 0.258821458, 1.82674409e-08, -0.258821458, 0.965925217, 1.23815802e-08, -1.44403618e-08, -1.66876859e-08, 1)
- UnionOperation44.Orientation = Vector3.new(0, 0, -15)
- UnionOperation44.Position = Vector3.new(-54.0720596, 6.52022314, 109.23497)
- UnionOperation44.Rotation = Vector3.new(0, 0, -15)
- UnionOperation44.Color = Color3.new(0.105882, 0.164706, 0.207843)
- UnionOperation44.Size = Vector3.new(0.823072314, 0.441888571, 0.376728863)
- UnionOperation44.Anchored = true
- UnionOperation44.BrickColor = BrickColor.new("Black")
- UnionOperation44.Material = Enum.Material.Metal
- UnionOperation44.brickColor = BrickColor.new("Black")
- UnionOperation44.UsePartColor = true
- UnionOperation45.Name = "Handle"
- UnionOperation45.Parent = Model39
- UnionOperation45.CFrame = CFrame.new(-53.853157, 6.55270195, 109.235031, 0.965925217, 0.258821428, 1.73094108e-11, -0.258821428, 0.965925276, 1.84496562e-09, 4.60797012e-10, -1.78657877e-09, 1)
- UnionOperation45.Orientation = Vector3.new(0, 0, -15)
- UnionOperation45.Position = Vector3.new(-53.853157, 6.55270195, 109.235031)
- UnionOperation45.Rotation = Vector3.new(0, 0, -15)
- UnionOperation45.Color = Color3.new(0.411765, 0.25098, 0.156863)
- UnionOperation45.Size = Vector3.new(0.525000036, 3, 0.525000036)
- UnionOperation45.Anchored = true
- UnionOperation45.BrickColor = BrickColor.new("Reddish brown")
- UnionOperation45.Material = Enum.Material.Wood
- UnionOperation45.brickColor = BrickColor.new("Reddish brown")
- UnionOperation46.Name = "End"
- UnionOperation46.Parent = Model39
- UnionOperation46.CFrame = CFrame.new(-53.5911942, 7.53066397, 109.235062, 0.965925217, 0.258821428, 1.73094108e-11, -0.258821428, 0.965925276, 1.84496562e-09, 4.60797012e-10, -1.78657877e-09, 1)
- UnionOperation46.Orientation = Vector3.new(0, 0, -15)
- UnionOperation46.Position = Vector3.new(-53.5911942, 7.53066397, 109.235062)
- UnionOperation46.Rotation = Vector3.new(0, 0, -15)
- UnionOperation46.Color = Color3.new(0.843137, 0.772549, 0.603922)
- UnionOperation46.Size = Vector3.new(0.600000143, 0.750000119, 0.600000024)
- UnionOperation46.Anchored = true
- UnionOperation46.BrickColor = BrickColor.new("Brick yellow")
- UnionOperation46.Material = Enum.Material.Grass
- UnionOperation46.brickColor = BrickColor.new("Brick yellow")
- Part47.Parent = Model38
- Part47.CFrame = CFrame.new(-53.4732437, 6.50000191, 109.235062, 1, 2.13164962e-13, -5.96861861e-13, -2.13164962e-13, 1, -2.5024028e-12, 5.96861861e-13, 2.5024028e-12, 1)
- Part47.Position = Vector3.new(-53.4732437, 6.50000191, 109.235062)
- Part47.Transparency = 1
- Part47.Size = Vector3.new(2, 3, 2)
- Part47.Anchored = true
- Part47.CanCollide = false
- Part47.FormFactor = Enum.FormFactor.Symmetric
- Part47.formFactor = Enum.FormFactor.Symmetric
- PointLight48.Name = "NearLight"
- PointLight48.Parent = Part47
- PointLight48.Color = Color3.new(1, 0.756863, 0.360784)
- PointLight48.Range = 12
- PointLight48.Brightness = 0.5
- PointLight48.Shadows = true
- PointLight49.Name = "FarLight"
- PointLight49.Parent = Part47
- PointLight49.Color = Color3.new(1, 0.756863, 0.360784)
- PointLight49.Range = 32
- PointLight49.Brightness = 0.25
- PointLight49.Shadows = true
- Part50.Parent = Model0
- Part50.CFrame = CFrame.new(-15, 2.5, 137, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part50.Position = Vector3.new(-15, 2.5, 137)
- Part50.Color = Color3.new(0.411765, 0.25098, 0.156863)
- Part50.Size = Vector3.new(2, 3, 10)
- Part50.Anchored = true
- Part50.BottomSurface = Enum.SurfaceType.Smooth
- Part50.BrickColor = BrickColor.new("Reddish brown")
- Part50.Locked = true
- Part50.Material = Enum.Material.WoodPlanks
- Part50.TopSurface = Enum.SurfaceType.Smooth
- Part50.brickColor = BrickColor.new("Reddish brown")
- Part51.Parent = Model0
- Part51.CFrame = CFrame.new(76.5, 5.5, 90.5, 0, 0, 1, 0, 1, -0, -1, 0, 0)
- Part51.Orientation = Vector3.new(0, 90, 0)
- Part51.Position = Vector3.new(76.5, 5.5, 90.5)
- Part51.Rotation = Vector3.new(0, 90, 0)
- Part51.Color = Color3.new(0.835294, 0.45098, 0.239216)
- Part51.Size = Vector3.new(11, 9, 19)
- Part51.Anchored = true
- Part51.BottomSurface = Enum.SurfaceType.Smooth
- Part51.BrickColor = BrickColor.new("Neon orange")
- Part51.Locked = true
- Part51.Material = Enum.Material.WoodPlanks
- Part51.TopSurface = Enum.SurfaceType.Smooth
- Part51.brickColor = BrickColor.new("Neon orange")
- Part52.Parent = Model0
- Part52.CFrame = CFrame.new(75.5, 5.5, 164.5, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part52.Position = Vector3.new(75.5, 5.5, 164.5)
- Part52.Color = Color3.new(0.835294, 0.45098, 0.239216)
- Part52.Size = Vector3.new(11, 9, 19)
- Part52.Anchored = true
- Part52.BottomSurface = Enum.SurfaceType.Smooth
- Part52.BrickColor = BrickColor.new("Neon orange")
- Part52.Locked = true
- Part52.Material = Enum.Material.WoodPlanks
- Part52.TopSurface = Enum.SurfaceType.Smooth
- Part52.brickColor = BrickColor.new("Neon orange")
- Part53.Parent = Model0
- Part53.CFrame = CFrame.new(30, 14.5, 250.5, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part53.Position = Vector3.new(30, 14.5, 250.5)
- Part53.Size = Vector3.new(200, 29, 1)
- Part53.Anchored = true
- Part53.BottomSurface = Enum.SurfaceType.Smooth
- Part53.Locked = true
- Part53.Material = Enum.Material.DiamondPlate
- Part53.TopSurface = Enum.SurfaceType.Smooth
- WedgePart54.Parent = Model0
- WedgePart54.CFrame = CFrame.new(86.5, 6, 208.5, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- WedgePart54.Position = Vector3.new(86.5, 6, 208.5)
- WedgePart54.Size = Vector3.new(13, 10, 21)
- WedgePart54.Anchored = true
- WedgePart54.BottomSurface = Enum.SurfaceType.Smooth
- WedgePart54.Locked = true
- WedgePart54.Material = Enum.Material.Metal
- WedgePart55.Parent = Model0
- WedgePart55.CFrame = CFrame.new(100.5, 6, 174.5, 0, 0, 1, 0, 1, -0, -1, 0, 0)
- WedgePart55.Orientation = Vector3.new(0, 90, 0)
- WedgePart55.Position = Vector3.new(100.5, 6, 174.5)
- WedgePart55.Rotation = Vector3.new(0, 90, 0)
- WedgePart55.Size = Vector3.new(13, 10, 21)
- WedgePart55.Anchored = true
- WedgePart55.BottomSurface = Enum.SurfaceType.Smooth
- WedgePart55.Locked = true
- WedgePart55.Material = Enum.Material.Slate
- Part56.Parent = Model0
- Part56.CFrame = CFrame.new(-69.5, 14.5, 151, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part56.Position = Vector3.new(-69.5, 14.5, 151)
- Part56.Size = Vector3.new(1, 29, 200)
- Part56.Anchored = true
- Part56.BottomSurface = Enum.SurfaceType.Smooth
- Part56.Locked = true
- Part56.Material = Enum.Material.DiamondPlate
- Part56.TopSurface = Enum.SurfaceType.Smooth
- Part57.Parent = Model0
- Part57.CFrame = CFrame.new(-15, 8, 137, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part57.Position = Vector3.new(-15, 8, 137)
- Part57.Color = Color3.new(0, 1, 1)
- Part57.Transparency = 0.60000002384186
- Part57.Size = Vector3.new(2, 8, 10)
- Part57.Anchored = true
- Part57.BottomSurface = Enum.SurfaceType.Smooth
- Part57.BrickColor = BrickColor.new("Toothpaste")
- Part57.Locked = true
- Part57.Material = Enum.Material.Glass
- Part57.Reflectance = 1
- Part57.TopSurface = Enum.SurfaceType.Smooth
- Part57.brickColor = BrickColor.new("Toothpaste")
- WedgePart58.Parent = Model0
- WedgePart58.CFrame = CFrame.new(14.5, 6, 148.5, 0, 0, -1, 0, 1, 0, 1, 0, 0)
- WedgePart58.Orientation = Vector3.new(0, -90, 0)
- WedgePart58.Position = Vector3.new(14.5, 6, 148.5)
- WedgePart58.Rotation = Vector3.new(0, -90, 0)
- WedgePart58.Size = Vector3.new(13, 10, 21)
- WedgePart58.Anchored = true
- WedgePart58.BottomSurface = Enum.SurfaceType.Smooth
- WedgePart58.Locked = true
- WedgePart58.Material = Enum.Material.Slate
- Part59.Parent = Model0
- Part59.CFrame = CFrame.new(-15, 14, 137, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part59.Position = Vector3.new(-15, 14, 137)
- Part59.Color = Color3.new(0.411765, 0.25098, 0.156863)
- Part59.Size = Vector3.new(2, 4, 10)
- Part59.Anchored = true
- Part59.BottomSurface = Enum.SurfaceType.Smooth
- Part59.BrickColor = BrickColor.new("Reddish brown")
- Part59.Locked = true
- Part59.Material = Enum.Material.WoodPlanks
- Part59.TopSurface = Enum.SurfaceType.Smooth
- Part59.brickColor = BrickColor.new("Reddish brown")
- Part60.Parent = Model0
- Part60.CFrame = CFrame.new(-36.5, 8, 99.5, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part60.Position = Vector3.new(-36.5, 8, 99.5)
- Part60.Color = Color3.new(0, 1, 1)
- Part60.Transparency = 0.60000002384186
- Part60.Size = Vector3.new(11, 8, 1)
- Part60.Anchored = true
- Part60.BottomSurface = Enum.SurfaceType.Smooth
- Part60.BrickColor = BrickColor.new("Toothpaste")
- Part60.Locked = true
- Part60.Material = Enum.Material.Glass
- Part60.Reflectance = 1
- Part60.TopSurface = Enum.SurfaceType.Smooth
- Part60.brickColor = BrickColor.new("Toothpaste")
- Part61.Parent = Model0
- Part61.CFrame = CFrame.new(-15, 8.5, 144, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part61.Position = Vector3.new(-15, 8.5, 144)
- Part61.Color = Color3.new(0.411765, 0.25098, 0.156863)
- Part61.Size = Vector3.new(2, 15, 4)
- Part61.Anchored = true
- Part61.BottomSurface = Enum.SurfaceType.Smooth
- Part61.BrickColor = BrickColor.new("Reddish brown")
- Part61.Locked = true
- Part61.Material = Enum.Material.WoodPlanks
- Part61.TopSurface = Enum.SurfaceType.Smooth
- Part61.brickColor = BrickColor.new("Reddish brown")
- WedgePart62.Parent = Model0
- WedgePart62.CFrame = CFrame.new(28.5000019, 6, 189.5, 0, 0, 1, 0, 1, -0, -1, 0, 0)
- WedgePart62.Orientation = Vector3.new(0, 90, 0)
- WedgePart62.Position = Vector3.new(28.5000019, 6, 189.5)
- WedgePart62.Rotation = Vector3.new(0, 90, 0)
- WedgePart62.Size = Vector3.new(13, 10, 21)
- WedgePart62.Anchored = true
- WedgePart62.BottomSurface = Enum.SurfaceType.Smooth
- WedgePart62.Locked = true
- WedgePart62.Material = Enum.Material.DiamondPlate
- Part63.Parent = Model0
- Part63.CFrame = CFrame.new(-15, 14, 123, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part63.Position = Vector3.new(-15, 14, 123)
- Part63.Color = Color3.new(0.411765, 0.25098, 0.156863)
- Part63.Size = Vector3.new(2, 4, 10)
- Part63.Anchored = true
- Part63.BottomSurface = Enum.SurfaceType.Smooth
- Part63.BrickColor = BrickColor.new("Reddish brown")
- Part63.Locked = true
- Part63.Material = Enum.Material.WoodPlanks
- Part63.TopSurface = Enum.SurfaceType.Smooth
- Part63.brickColor = BrickColor.new("Reddish brown")
- Part64.Parent = Model0
- Part64.CFrame = CFrame.new(-15, 8.5, 130, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part64.Position = Vector3.new(-15, 8.5, 130)
- Part64.Color = Color3.new(0.411765, 0.25098, 0.156863)
- Part64.Size = Vector3.new(2, 15, 4)
- Part64.Anchored = true
- Part64.BottomSurface = Enum.SurfaceType.Smooth
- Part64.BrickColor = BrickColor.new("Reddish brown")
- Part64.Locked = true
- Part64.Material = Enum.Material.WoodPlanks
- Part64.TopSurface = Enum.SurfaceType.Smooth
- Part64.brickColor = BrickColor.new("Reddish brown")
- Part65.Parent = Model0
- Part65.CFrame = CFrame.new(-36.5, 2.5, 99.5, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part65.Position = Vector3.new(-36.5, 2.5, 99.5)
- Part65.Color = Color3.new(0.411765, 0.25098, 0.156863)
- Part65.Size = Vector3.new(11, 3, 1)
- Part65.Anchored = true
- Part65.BottomSurface = Enum.SurfaceType.Smooth
- Part65.BrickColor = BrickColor.new("Reddish brown")
- Part65.Locked = true
- Part65.Material = Enum.Material.WoodPlanks
- Part65.TopSurface = Enum.SurfaceType.Smooth
- Part65.brickColor = BrickColor.new("Reddish brown")
- Model66.Name = "Spawns"
- Model66.Parent = Model0
- Part67.Parent = Model66
- Part67.CFrame = CFrame.new(-43.9799995, 0.550017118, 68.0599899, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part67.Position = Vector3.new(-43.9799995, 0.550017118, 68.0599899)
- Part67.Transparency = 1
- Part67.Size = Vector3.new(5, 1, 5)
- Part67.Anchored = true
- Part67.BottomSurface = Enum.SurfaceType.Smooth
- Part67.CanCollide = false
- Part67.Locked = true
- Part67.TopSurface = Enum.SurfaceType.Smooth
- Part68.Parent = Model66
- Part68.CFrame = CFrame.new(-43.9799995, 0.550017118, 168.469971, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part68.Position = Vector3.new(-43.9799995, 0.550017118, 168.469971)
- Part68.Transparency = 1
- Part68.Size = Vector3.new(5, 1, 5)
- Part68.Anchored = true
- Part68.BottomSurface = Enum.SurfaceType.Smooth
- Part68.CanCollide = false
- Part68.Locked = true
- Part68.TopSurface = Enum.SurfaceType.Smooth
- Part69.Parent = Model66
- Part69.CFrame = CFrame.new(6.60999727, 0.550017118, 223.669937, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part69.Position = Vector3.new(6.60999727, 0.550017118, 223.669937)
- Part69.Transparency = 1
- Part69.Size = Vector3.new(5, 1, 5)
- Part69.Anchored = true
- Part69.BottomSurface = Enum.SurfaceType.Smooth
- Part69.CanCollide = false
- Part69.Locked = true
- Part69.TopSurface = Enum.SurfaceType.Smooth
- Part70.Parent = Model66
- Part70.CFrame = CFrame.new(105.819992, 0.550017118, 211.359909, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part70.Position = Vector3.new(105.819992, 0.550017118, 211.359909)
- Part70.Transparency = 1
- Part70.Size = Vector3.new(5, 1, 5)
- Part70.Anchored = true
- Part70.BottomSurface = Enum.SurfaceType.Smooth
- Part70.CanCollide = false
- Part70.Locked = true
- Part70.TopSurface = Enum.SurfaceType.Smooth
- Part71.Parent = Model66
- Part71.CFrame = CFrame.new(105.819992, 0.550017118, 156.049942, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part71.Position = Vector3.new(105.819992, 0.550017118, 156.049942)
- Part71.Transparency = 1
- Part71.Size = Vector3.new(5, 1, 5)
- Part71.Anchored = true
- Part71.BottomSurface = Enum.SurfaceType.Smooth
- Part71.CanCollide = false
- Part71.Locked = true
- Part71.TopSurface = Enum.SurfaceType.Smooth
- Part72.Parent = Model66
- Part72.CFrame = CFrame.new(105.819992, 0.550017118, 82.2399521, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part72.Position = Vector3.new(105.819992, 0.550017118, 82.2399521)
- Part72.Transparency = 1
- Part72.Size = Vector3.new(5, 1, 5)
- Part72.Anchored = true
- Part72.BottomSurface = Enum.SurfaceType.Smooth
- Part72.CanCollide = false
- Part72.Locked = true
- Part72.TopSurface = Enum.SurfaceType.Smooth
- Part73.Parent = Model66
- Part73.CFrame = CFrame.new(56.810009, 0.550017118, 82.2399521, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part73.Position = Vector3.new(56.810009, 0.550017118, 82.2399521)
- Part73.Transparency = 1
- Part73.Size = Vector3.new(5, 1, 5)
- Part73.Anchored = true
- Part73.BottomSurface = Enum.SurfaceType.Smooth
- Part73.CanCollide = false
- Part73.Locked = true
- Part73.TopSurface = Enum.SurfaceType.Smooth
- Part74.Parent = Model66
- Part74.CFrame = CFrame.new(28.1100197, 0.550017118, 129.799957, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part74.Position = Vector3.new(28.1100197, 0.550017118, 129.799957)
- Part74.Transparency = 1
- Part74.Size = Vector3.new(5, 1, 5)
- Part74.Anchored = true
- Part74.BottomSurface = Enum.SurfaceType.Smooth
- Part74.CanCollide = false
- Part74.Locked = true
- Part74.TopSurface = Enum.SurfaceType.Smooth
- Part75.Parent = Model0
- Part75.CFrame = CFrame.new(129.5, 14.5, 151, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part75.Position = Vector3.new(129.5, 14.5, 151)
- Part75.Size = Vector3.new(1, 29, 200)
- Part75.Anchored = true
- Part75.BottomSurface = Enum.SurfaceType.Smooth
- Part75.Locked = true
- Part75.Material = Enum.Material.DiamondPlate
- Part75.TopSurface = Enum.SurfaceType.Smooth
- Part76.Name = "join button"
- Part76.Parent = Model0
- Part76.CFrame = CFrame.new(29.9999962, 14.5, 51.25, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part76.Position = Vector3.new(29.9999962, 14.5, 51.25)
- Part76.Color = Color3.new(1, 0, 0)
- Part76.Size = Vector3.new(30.0100002, 29, 0.5)
- Part76.Anchored = true
- Part76.BottomSurface = Enum.SurfaceType.Smooth
- Part76.BrickColor = BrickColor.new("Really red")
- Part76.Locked = true
- Part76.Material = Enum.Material.DiamondPlate
- Part76.TopSurface = Enum.SurfaceType.Smooth
- Part76.brickColor = BrickColor.new("Really red")
- SurfaceGui77.Parent = Part76
- SurfaceGui77.LightInfluence = 1
- SurfaceGui77.ClipsDescendants = true
- SurfaceGui77.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
- TextBox78.Parent = SurfaceGui77
- TextBox78.Size = UDim2.new(1, 0, 1, 0)
- TextBox78.BackgroundColor = BrickColor.new("Institutional white")
- TextBox78.BackgroundColor3 = Color3.new(1, 1, 1)
- TextBox78.BackgroundTransparency = 1
- TextBox78.Font = Enum.Font.SourceSans
- TextBox78.FontSize = Enum.FontSize.Size14
- TextBox78.Text = "Click to join!"
- TextBox78.TextColor = BrickColor.new("Really black")
- TextBox78.TextColor3 = Color3.new(0, 0, 0)
- TextBox78.TextScaled = true
- TextBox78.TextSize = 14
- TextBox78.TextWrap = true
- TextBox78.TextWrapped = true
- ClickDetector79.Parent = Part76
- ClickDetector79.MaxActivationDistance = 50
- Part80.Name = "leave button"
- Part80.Parent = Model0
- Part80.CFrame = CFrame.new(29.9999962, 14.5, 51.75, -1, 0, 0, 0, 1, 0, 0, 0, -1)
- Part80.Orientation = Vector3.new(0, 180, 0)
- Part80.Position = Vector3.new(29.9999962, 14.5, 51.75)
- Part80.Rotation = Vector3.new(-180, 0, -180)
- Part80.Color = Color3.new(1, 0, 0)
- Part80.Size = Vector3.new(30.0100002, 29, 0.5)
- Part80.Anchored = true
- Part80.BottomSurface = Enum.SurfaceType.Smooth
- Part80.BrickColor = BrickColor.new("Really red")
- Part80.Locked = true
- Part80.Material = Enum.Material.DiamondPlate
- Part80.TopSurface = Enum.SurfaceType.Smooth
- Part80.brickColor = BrickColor.new("Really red")
- SurfaceGui81.Parent = Part80
- SurfaceGui81.LightInfluence = 1
- SurfaceGui81.ClipsDescendants = true
- SurfaceGui81.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
- TextBox82.Parent = SurfaceGui81
- TextBox82.Size = UDim2.new(1, 0, 1, 0)
- TextBox82.BackgroundColor = BrickColor.new("Institutional white")
- TextBox82.BackgroundColor3 = Color3.new(1, 1, 1)
- TextBox82.BackgroundTransparency = 1
- TextBox82.Font = Enum.Font.SourceSans
- TextBox82.FontSize = Enum.FontSize.Size14
- TextBox82.Text = "Click to leave!"
- TextBox82.TextColor = BrickColor.new("Really black")
- TextBox82.TextColor3 = Color3.new(0, 0, 0)
- TextBox82.TextScaled = true
- TextBox82.TextSize = 14
- TextBox82.TextWrap = true
- TextBox82.TextWrapped = true
- ClickDetector83.Parent = Part80
- ClickDetector83.MaxActivationDistance = 50
- function give_weapons(plr)
- spawn(function()
- local char = plr.Character
- local hum = char:FindFirstChildOfClass("Humanoid")
- local torso = char:FindFirstChild("Torso") or char:FindFirstChild("UpperTorso")
- local rootpart = char:FindFirstChild("HumanoidRootPart")
- local debris = game:GetService("Debris")
- local tween = game:GetService("TweenService")
- local gun = Instance.new("Tool")
- local han = Instance.new("Part")
- local SpecialMesh2 = Instance.new("SpecialMesh")
- gun.Name = "FAMAS G2"
- gun.Parent = plr['Backpack']
- gun.Grip = CFrame.new(0.355400085, -0.188222155, -0.00732704997, -4.37113883e-08, 0, 1, 0, 0.99999994, 0, -1, 0, -4.37113883e-08)
- han.Name = "Handle"
- han.Parent = gun
- han.CFrame = CFrame.new(-12.4460001, 1.07099998, -5.64400005, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- han.Position = Vector3.new(-12.4460001, 1.07099998, -5.64400005)
- han.Size = Vector3.new(5.08, 1.824, 0.21)
- han.Color = Color3.fromRGB(27, 42, 53)
- han.BottomSurface = Enum.SurfaceType.Smooth
- han.TopSurface = Enum.SurfaceType.Smooth
- SpecialMesh2.Parent = han
- SpecialMesh2.MeshId = "rbxassetid://1877852381"
- SpecialMesh2.Scale = Vector3.new(0.007, 0.007, 0.007)
- SpecialMesh2.TextureId = ""
- SpecialMesh2.MeshType = Enum.MeshType.FileMesh
- local effect_part = Instance.new("Part")
- local smoke = Instance.new("ParticleEmitter")
- local flash = Instance.new("ParticleEmitter")
- local light = Instance.new("PointLight")
- effect_part.Name = "effect"
- effect_part.Parent = gun
- effect_part.CFrame = CFrame.new(-14.3099976, 2.64201403, -6.57999992, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- effect_part.Position = Vector3.new(-14.3099976, 2.64201403, -6.57999992)
- effect_part.Transparency = 1
- effect_part.Size = Vector3.new(0.100000001, 0.100000001, 0.100000001)
- effect_part.BottomSurface = Enum.SurfaceType.Smooth
- effect_part.CanCollide = false
- effect_part.TopSurface = Enum.SurfaceType.Smooth
- smoke.Name = "smoke"
- smoke.Parent = effect_part
- smoke.Speed = NumberRange.new(5, 7)
- smoke.Rotation = NumberRange.new(0, 360)
- smoke.Color = ColorSequence.new(Color3.new(0.27451, 0.27451, 0.27451),Color3.new(0.27451, 0.27451, 0.27451))
- smoke.Enabled = false
- smoke.LightEmission = 0.10000000149012
- smoke.Texture = "http://www.roblox.com/asset/?id=244514423"
- smoke.Transparency = NumberSequence.new(0.60000002384186,1)
- smoke.Size = NumberSequence.new(0.99999964237213,3)
- smoke.Lifetime = NumberRange.new(1.25, 1.5)
- smoke.Rate = 100
- smoke.RotSpeed = NumberRange.new(10, 10)
- smoke.SpreadAngle = Vector2.new(15, 15)
- smoke.VelocitySpread = 15
- flash.Name = "flash"
- flash.Parent = effect_part
- flash.Speed = NumberRange.new(0, 0)
- flash.Rotation = NumberRange.new(0, 90)
- flash.Color = ColorSequence.new(Color3.new(1, 1, 0.498039),Color3.new(1, 1, 0.498039))
- flash.Enabled = false
- flash.LightEmission = 1
- flash.Texture = "http://www.roblox.com/asset/?id=3419963"
- flash.Transparency = NumberSequence.new(0.75,1)
- flash.Size = NumberSequence.new(0.20000000298023,0.20000000298023)
- flash.Lifetime = NumberRange.new(0.050000000745058, 0.075000002980232)
- flash.Rate = 1000
- light.Name = "light"
- light.Parent = effect_part
- light.Color = Color3.new(1, 1, 0.498039)
- light.Enabled = false
- light.Range = 6
- light.Brightness = 10
- light.Shadows = true
- local weld = Instance.new("Weld")
- weld.Part0 = han
- weld.Part1 = effect_part
- weld.C1 = weld.C1 * CFrame.new(2.5,-0.2,0)
- weld.Parent = effect_part
- local cols = {BrickColor.new("Neon orange"),BrickColor.new("Really red"),BrickColor.new("Bright red"),BrickColor.new("Br. yellowish orange"),BrickColor.new("Bright yellow")}
- local taunts = {298689061,2743459732,2852509470,1018518369}
- local using = false
- local op = false
- local bulletfire = 3
- local shootwait = 0.0666666667*bulletfire
- local max_ammo = 30
- local ammo = max_ammo
- local hitpos = nil
- local shooting = false
- local equipped = false
- local equip = Instance.new("Sound")
- equip.SoundId = 'rbxassetid://3667098999'
- equip.Volume = 0.8
- equip.Parent = han
- local shoot_s = Instance.new("Sound")
- shoot_s.SoundId = 'rbxassetid://1112949558'
- shoot_s.Volume = 3
- shoot_s.Parent = han
- local shoot_s2 = shoot_s:Clone()
- shoot_s2.Parent = han
- local shoot_s3 = shoot_s:Clone()
- shoot_s3.Parent = han
- local reload_s = Instance.new("Sound")
- reload_s.SoundId = 'rbxassetid://3667100111'
- reload_s.Volume = 0.7
- reload_s.Parent = han
- local wbreak = Instance.new("Sound")
- wbreak.Parent = han
- wbreak.SoundId = "rbxassetid://627558611"
- wbreak.TimePosition = .1
- wbreak.Volume = 0.7
- local function CheckIfAlive()
- local alive = false
- if plr and char and char.Parent and torso and torso.Parent and hum and hum.Parent and hum.Health > 0 then
- alive = true
- end
- return alive
- end
- local function Ragdoll(targchar,headless,insta)
- local pc = targchar
- pc.Archivable = true
- local pc_torso
- for _,obj in pairs(pc:GetDescendants()) do
- obj.Archivable = true
- if obj:IsA("BasePart") or obj:IsA("UnionOperation") then
- obj.Massless = true
- obj.Locked = true
- obj.CanCollide = true
- end
- 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
- pc_torso = torso
- 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('BallSocketConstraint') or v:IsA('Attachment')]] then
- v:Destroy()
- end
- end
- --pc:BreakJoints()
- local vis = false
- local vis2 = false
- if 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
- end
- if 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
- end
- if 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
- end
- if 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
- end
- if 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
- 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('BallSocketConstraint') or v:IsA('Attachment')]] then
- v:Destroy()
- end
- end
- --pc:BreakJoints()
- local vis = false
- local vis2 = false
- if 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
- end
- if 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
- end
- if 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
- end
- if 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
- end
- if 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
- else
- --head:BreakJoints()
- end
- end
- end)
- end
- elseif head and hum then
- pc_torso = pc:FindFirstChild("HumanoidRootPart")
- 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('BallSocketConstraint') or v:IsA('Attachment')]] then
- v:Destroy()
- end
- end
- --pc:BreakJoints()
- local vis = false
- local vis2 = false
- if not LF:FindFirstChild('Dismembered') then
- local bsc1 = Instance.new("BallSocketConstraint",LF)
- bsc1.Attachment0 = LF.LeftAnkleRigAttachment
- bsc1.Attachment1 = LLL.LeftAnkleRigAttachment
- end
- if not LLL:FindFirstChild('Dismembered') then
- local bsc2 = Instance.new("BallSocketConstraint",LLL)
- bsc2.Attachment0 = LLL.LeftKneeRigAttachment
- bsc2.Attachment1 = LUL.LeftKneeRigAttachment
- end
- if not LUL:FindFirstChild('Dismembered') then
- local bsc3 = Instance.new("BallSocketConstraint",LUL)
- bsc3.Attachment0 = LUL.LeftHipRigAttachment
- bsc3.Attachment1 = LT.LeftHipRigAttachment
- end
- if not RF:FindFirstChild('Dismembered') then
- local bsc4 = Instance.new("BallSocketConstraint",RF)
- bsc4.Attachment0 = RF.RightAnkleRigAttachment
- bsc4.Attachment1 = RLL.RightAnkleRigAttachment
- end
- if not RLL:FindFirstChild('Dismembered') then
- local bsc5 = Instance.new("BallSocketConstraint",RLL)
- bsc5.Attachment0 = RLL.RightKneeRigAttachment
- bsc5.Attachment1 = RUL.RightKneeRigAttachment
- end
- if not RUL:FindFirstChild('Dismembered') then
- local bsc6 = Instance.new("BallSocketConstraint",RUL)
- bsc6.Attachment0 = RUL.RightHipRigAttachment
- bsc6.Attachment1 = LT.RightHipRigAttachment
- end
- if not LH:FindFirstChild('Dismembered') then
- local bsc7 = Instance.new("BallSocketConstraint",LH)
- bsc7.Attachment0 = LH.LeftWristRigAttachment
- bsc7.Attachment1 = LLA.LeftWristRigAttachment
- end
- if not LLA:FindFirstChild('Dismembered') then
- local bsc8 = Instance.new("BallSocketConstraint",LLA)
- bsc8.Attachment0 = LLA.LeftElbowRigAttachment
- bsc8.Attachment1 = LUA.LeftElbowRigAttachment
- end
- if not LUA:FindFirstChild('Dismembered') then
- local bsc9 = Instance.new("BallSocketConstraint",LUA)
- bsc9.Attachment0 = LUA.LeftShoulderAttachment
- bsc9.Attachment1 = UT.LeftCollarAttachment
- end
- if not RH:FindFirstChild('Dismembered') then
- local bsc10 = Instance.new("BallSocketConstraint",RH)
- bsc10.Attachment0 = RH.RightWristRigAttachment
- bsc10.Attachment1 = RLA.RightWristRigAttachment
- end
- if not RLA:FindFirstChild('Dismembered') then
- local bsc11 = Instance.new("BallSocketConstraint",RLA)
- bsc11.Attachment0 = RLA.RightElbowRigAttachment
- bsc11.Attachment1 = RUA.RightElbowRigAttachment
- end
- if not RUA:FindFirstChild('Dismembered') then
- local bsc12 = Instance.new("BallSocketConstraint",RUA)
- bsc12.Attachment0 = RUA.RightShoulderAttachment
- bsc12.Attachment1 = UT.RightCollarAttachment
- end
- if not LT:FindFirstChild('Dismembered') then
- local bsc13 = Instance.new("BallSocketConstraint",LT)
- bsc13.Attachment0 = LT.WaistRigAttachment
- bsc13.Attachment1 = UT.WaistRigAttachment
- end
- if 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
- 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('BallSocketConstraint') or v:IsA('Attachment')]] then
- v:Destroy()
- end
- end
- --pc:BreakJoints()
- local vis = false
- local vis2 = false
- if not LF:FindFirstChild('Dismembered') then
- local bsc1 = Instance.new("BallSocketConstraint",LF)
- bsc1.Attachment0 = LF.LeftAnkleRigAttachment
- bsc1.Attachment1 = LLL.LeftAnkleRigAttachment
- end
- if not LLL:FindFirstChild('Dismembered') then
- local bsc2 = Instance.new("BallSocketConstraint",LLL)
- bsc2.Attachment0 = LLL.LeftKneeRigAttachment
- bsc2.Attachment1 = LUL.LeftKneeRigAttachment
- end
- if not LUL:FindFirstChild('Dismembered') then
- local bsc3 = Instance.new("BallSocketConstraint",LUL)
- bsc3.Attachment0 = LUL.LeftHipRigAttachment
- bsc3.Attachment1 = LT.LeftHipRigAttachment
- end
- if not RF:FindFirstChild('Dismembered') then
- local bsc4 = Instance.new("BallSocketConstraint",RF)
- bsc4.Attachment0 = RF.RightAnkleRigAttachment
- bsc4.Attachment1 = RLL.RightAnkleRigAttachment
- end
- if not RLL:FindFirstChild('Dismembered') then
- local bsc5 = Instance.new("BallSocketConstraint",RLL)
- bsc5.Attachment0 = RLL.RightKneeRigAttachment
- bsc5.Attachment1 = RUL.RightKneeRigAttachment
- end
- if not RUL:FindFirstChild('Dismembered') then
- local bsc6 = Instance.new("BallSocketConstraint",RUL)
- bsc6.Attachment0 = RUL.RightHipRigAttachment
- bsc6.Attachment1 = LT.RightHipRigAttachment
- end
- if not LH:FindFirstChild('Dismembered') then
- local bsc7 = Instance.new("BallSocketConstraint",LH)
- bsc7.Attachment0 = LH.LeftWristRigAttachment
- bsc7.Attachment1 = LLA.LeftWristRigAttachment
- end
- if not LLA:FindFirstChild('Dismembered') then
- local bsc8 = Instance.new("BallSocketConstraint",LLA)
- bsc8.Attachment0 = LLA.LeftElbowRigAttachment
- bsc8.Attachment1 = LUA.LeftElbowRigAttachment
- end
- if not LUA:FindFirstChild('Dismembered') then
- local bsc9 = Instance.new("BallSocketConstraint",LUA)
- bsc9.Attachment0 = LUA.LeftShoulderAttachment
- bsc9.Attachment1 = UT.LeftCollarAttachment
- end
- if not RH:FindFirstChild('Dismembered') then
- local bsc10 = Instance.new("BallSocketConstraint",RH)
- bsc10.Attachment0 = RH.RightWristRigAttachment
- bsc10.Attachment1 = RLA.RightWristRigAttachment
- end
- if not RLA:FindFirstChild('Dismembered') then
- local bsc11 = Instance.new("BallSocketConstraint",RLA)
- bsc11.Attachment0 = RLA.RightElbowRigAttachment
- bsc11.Attachment1 = RUA.RightElbowRigAttachment
- end
- if not RUA:FindFirstChild('Dismembered') then
- local bsc12 = Instance.new("BallSocketConstraint",RUA)
- bsc12.Attachment0 = RUA.RightShoulderAttachment
- bsc12.Attachment1 = UT.RightCollarAttachment
- end
- if not LT:FindFirstChild('Dismembered') then
- local bsc13 = Instance.new("BallSocketConstraint",LT)
- bsc13.Attachment0 = LT.WaistRigAttachment
- bsc13.Attachment1 = UT.WaistRigAttachment
- end
- if 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
- else
- --head:BreakJoints()
- end
- end
- end)
- end
- end
- end
- return pc,pc_torso
- end
- local function bleed2(frick,targhum,can_hurt,t,splat)
- spawn(function()
- if not frick:FindFirstChild("bleeding from kry's " .. gun.Name) then else return end
- local tempbleedval = Instance.new("ObjectValue")
- tempbleedval.Name = "bleeding from kry's " .. gun.Name
- 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
- 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
- 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"
- 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.Parent and tou.Parent:IsA('Tool') == false and tou.Parent.Parent:FindFirstChildOfClass('Humanoid') == nil and tou.Parent:FindFirstChildOfClass('Humanoid') == nil and tou.name ~= "mini_blood" and tou.Name ~= "Blood" and tou.Parent ~= char and tou.Parent.ClassName ~= "Accessory" and tou.Parent.Name ~= 'mini_blood' 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)
- while bloodlol and bloodlol.Parent ~= nil do
- if bloodlol.Transparency < 1 then
- bloodlol.Transparency = bloodlol.Transparency + 0.05
- else
- bloodlol:Destroy()
- end
- wait(0.1)
- end
- end
- end
- end)
- end)
- wait(0.1)
- end
- tempbleedval:Destroy()
- end)
- end
- local function kill(obj,headshot,lookVector)
- local targchar,targhead,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") or targchar:FindFirstChild("HumanoidRootPart")
- end)
- pcall(function()
- targhead = targchar:FindFirstChild("Head")
- end)
- pcall(function()
- targhum = targchar:FindFirstChildOfClass("Humanoid")
- end)
- pcall(function()
- killval = targhum:FindFirstChild("killer")
- end)
- pcall(function()
- decapval = targhum:FindFirstChild("decapped " .. targchar.Name)
- end)
- pcall(function()
- hitval = targhum:FindFirstChild("hit " .. targchar.Name .. " with famas g2 by " .. plr.Name)
- end)
- if targchar and targhead and targtorso and targhum and targhum ~= hum --[[and not hitval]] and using then
- targhum:TakeDamage(1/0)
- if 0 >= targhum.Health then
- if (not decapval and headshot) or not killval then
- if not killval then
- local tempkillval = Instance.new("ObjectValue",targhum)
- tempkillval.Name = "killer"
- tempkillval.Value = plr
- end
- spawn(function()
- local kb = 30
- local b = Instance.new("BodyVelocity")
- b.Parent = targtorso
- b.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
- b.Velocity = lookVector*kb + Vector3.new(0,2,0)
- game:GetService("Debris"):AddItem(b,0.15)
- end)
- pcall(function()
- Ragdoll(targchar,headshot,true)
- end)
- bleed2(targtorso,targhum,true,5,true)
- end
- if headshot and not decapval then
- local tempdecapval = Instance.new("ObjectValue",targhum)
- tempdecapval.Name = ("decapped " .. targchar.Name)
- local decap_bleed = Instance.new("Sound")
- decap_bleed.SoundId = 'rbxassetid://244502094'
- decap_bleed.Volume = 0.5
- decap_bleed.Parent = targtorso
- decap_bleed:Play()
- local decap_head = Instance.new("Sound")
- decap_head.SoundId = 'rbxassetid://1255040462' --222406108
- decap_head.Volume = 1
- decap_head.Parent = targtorso
- decap_head:Play()
- local att = Instance.new("Attachment")
- att.Parent = targtorso
- att.Position = Vector3.new(0,targtorso.Size.Y/2,0)
- local blood_emitter = Instance.new("ParticleEmitter")
- blood_emitter.Name = "Blood2"
- blood_emitter.Parent = att
- blood_emitter.Speed = NumberRange.new(5, 14)
- blood_emitter.Color = ColorSequence.new(Color3.new(0.45098, 0, 0),Color3.new(0.45098, 0, 0))
- blood_emitter.LightEmission = 0.20000000298023
- blood_emitter.LightInfluence = 1
- blood_emitter.Texture = "http://www.roblox.com/asset/?id=134531274"
- blood_emitter.Transparency = NumberSequence.new(0.30000001192093,0.30000001192093)
- blood_emitter.ZOffset = 1
- blood_emitter.Size = NumberSequence.new(0.12499988079071,0)
- blood_emitter.Acceleration = Vector3.new(0, -20, 0)
- blood_emitter.Lifetime = NumberRange.new(0.5, 1.5)
- blood_emitter.Rate = 100000
- blood_emitter.SpreadAngle = Vector2.new(90, 90)
- blood_emitter.VelocitySpread = 90
- blood_emitter.Enabled = true
- end
- end
- end
- end
- local function Reload()
- if max_ammo > ammo then else return end
- using = true
- reload_s:Play()
- local mag = Instance.new("Part")
- mag.Size = Vector3.new(0.47, 0.86, 0.16)
- mag.Color = han.Color
- mag.Parent = workspace
- mag.CFrame = han.CFrame * CFrame.new(1.2,-0.5,0)
- --debris:AddItem(mag,3)
- wait(reload_s.TimeLength)
- ammo = max_ammo
- game:GetService("Debris"):AddItem(mag,10)
- using = false
- end
- local function breakwindow(hit)
- if hit and hit.Name:lower() ~= "window shatter" and hit.Name:lower() ~= "blood" and hit.Name:lower() ~= "mini_blood" then else return end
- local wbreakc = wbreak:Clone()
- wbreakc.Parent = hit
- wbreakc: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
- 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
- local function raycast(Pos,Dir,Max,Ignore)
- return workspace:FindPartOnRayWithIgnoreList(Ray.new(Pos, Dir * (Max or 999.999)), (Ignore or {}), false, true)
- end
- local objhit = {}
- local oldobjhit = {}
- local function make_hole(pos,obj,col)
- local BulletHolePart = Instance.new("Part")
- BulletHolePart.Massless = true
- BulletHolePart.Anchored = false
- BulletHolePart.CanCollide = false
- BulletHolePart.Locked = true
- BulletHolePart.FormFactor = "Custom"
- BulletHolePart.TopSurface, BulletHolePart.BottomSurface, BulletHolePart.RightSurface, BulletHolePart.LeftSurface, BulletHolePart.FrontSurface, BulletHolePart.BackSurface = "SmoothNoOutlines", "SmoothNoOutlines", "SmoothNoOutlines", "SmoothNoOutlines", "SmoothNoOutlines", "SmoothNoOutlines"
- BulletHolePart.Name = "Bullet Hole"
- BulletHolePart.Material = "Plastic"
- BulletHolePart.Reflectance = 0
- BulletHolePart.Transparency = 1
- BulletHolePart.BrickColor = BrickColor.new("Medium stone grey")
- BulletHolePart.Size = Vector3.new(0.3, 0, 0.3)
- BulletHolePart:BreakJoints()
- BulletHolePart.CFrame = pos
- BulletHolePart.Parent = script
- local weld = Instance.new("WeldConstraint")
- weld.Part0 = obj
- weld.Part1 = BulletHolePart
- weld.Parent = obj
- -- game:GetService("Debris"):AddItem(BulletHolePart, 5)
- local BulletHoleDecal = Instance.new("Decal")
- BulletHoleDecal.Color3 = Color3.new(col.r, col.g, col.b)
- BulletHoleDecal.Face = "Top"
- BulletHoleDecal.Texture = "rbxassetid://359667865"
- BulletHoleDecal.Transparency = 0
- BulletHoleDecal.Parent = BulletHolePart
- return BulletHolePart
- 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
- local function add_decal(f,t,obj)
- spawn(function()
- local texture = Instance.new("Texture")
- texture.Parent = obj
- texture.Face = f
- texture.Texture = 'rbxassetid://' .. t
- 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
- local function add_blood(obj)
- 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)
- add_decal('Bottom',t2,obj)
- add_decal('Left',t3,obj)
- add_decal('Right',t4,obj)
- add_decal('Front',t5,obj)
- add_decal('Back',t6,obj)
- end
- local function make_bone(obj,targtorso)
- if obj.Name == 'Left Arm' or obj.Name == 'LeftUpperArm' then
- local bone = Instance.new("Part")
- 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.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.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.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.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.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.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.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.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.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
- local function break_limb(obj,rig,targtorso,targhum)
- if not obj:FindFirstChild('Dismembered') and obj.Name ~= 'Torso' and obj.Name ~= 'HumanoidRootPart' and obj.Name ~= 'UpperTorso' and obj.Name ~= 'LowerTorso' then else return end
- local confirm = Instance.new("ObjectValue")
- confirm.Name = 'Dismembered'
- confirm.Parent = obj
- local bsc = obj:FindFirstChildOfClass("BallSocketConstraint")
- if bsc then
- bsc:Destroy()
- end
- bleed2(obj,targhum,false,5,false)
- make_bone(obj,targtorso)
- local kb = 10
- local b = Instance.new("BodyVelocity")
- b.Parent = targtorso
- b.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
- b.Velocity = han.CFrame.lookVector*kb + Vector3.new(0,2,0)
- game:GetService("Debris"):AddItem(b,0.1)
- if rig == Enum.HumanoidRigType.R6 then
- local bsc = obj:FindFirstChildOfClass("BallSocketConstraint")
- if bsc then
- bsc:Destroy()
- end
- for i,v in pairs(targtorso:GetChildren()) do
- if v:IsA("Motor6D") then
- if obj.Name == 'Head' and v.Name == 'Neck' then
- v:Destroy()
- elseif obj.Name == 'Left Arm' and v.Name == 'Left Shouldver' then
- v:Destroy()
- elseif obj.Name == 'Right Arm' and v.Name == 'Right Shoulder' then
- v:Destroy()
- elseif obj.Name == 'Left Leg' and v.Name == 'Left Hip' then
- if obj.Parent:FindFirstChild("Right Leg") then
- targhum.WalkSpeed = targhum.WalkSpeed/2
- else
- targhum.WalkSpeed = 0
- end
- v:Destroy()
- elseif obj.Name == 'Right Leg' and v.Name == 'Right Hip' then
- if obj.Parent:FindFirstChild("Left Leg") then
- targhum.WalkSpeed = targhum.WalkSpeed/2
- else
- targhum.WalkSpeed = 0
- end
- v:Destroy()
- end
- end
- end
- elseif rig == Enum.HumanoidRigType.R15 then
- for i,v in pairs(obj:GetChildren()) do
- if v:IsA("Motor6D") then
- if (obj.Name == 'LeftUpperLeg' and obj.Parent:FindFirstChild("RightUpperLeg")) or (obj.Name == 'RightUpperLeg' and obj.Parent:FindFirstChild("LeftUpperLeg")) then
- targhum.WalkSpeed = targhum.WalkSpeed/2
- elseif obj.Name == 'RightUpperLeg' or obj.Name == 'LeftUpperLeg' then
- targhum.WalkSpeed = 0
- end
- v:Destroy()
- end
- end
- end
- local cb = Instance.new("Part")
- cb.Transparency = 1
- cb.CanCollide = true
- cb.Anchored = false
- cb.CFrame = obj.CFrame
- cb.Size = obj.Size
- cb.Massless = true
- cb.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(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
- cb.Parent = script
- end
- local function check(toughness,obj,objpos,p,rays,rot)
- local plrhit = false
- if obj and not obj:FindFirstChild('Dismembered') then else return; end;
- local targchar,targtorso,targhum,targhead
- 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") or targchar:FindFirstChild("HumanoidRootPart")
- end)
- pcall(function()
- targhum = targchar:FindFirstChildOfClass("Humanoid")
- end)
- pcall(function()
- targhead = targchar:FindFirstChild("Head")
- end)
- if targchar and targchar.Parent and targtorso and targtorso.Parent and targhum and targhum.Parent and targhum ~= hum and targhead and targhead.Parent and not targhum:FindFirstChild("hit " .. targchar.Name .. " with " .. gun.Name .. " by " .. plr.Name) then
- plrhit = true
- local confirm = Instance.new("IntValue")
- confirm.Parent = targhum
- confirm.Name = ("hit " .. targchar.Name .. " with " .. gun.Name .. " by " .. plr.Name)
- debris:AddItem(confirm,shootwait)
- local dmg = math.random(30,40)
- if obj == targhead then
- dmg = math.random(50,60)
- targhum:TakeDamage(dmg)
- elseif not op then
- dmg = math.random(30,40)
- targhum:TakeDamage(dmg)
- elseif op then
- targhum.MaxHealth = 0
- targhum.Health = 0
- targhum.Parent:BreakJoints()
- end
- if math.random(1,3) == 1 then
- break_limb(obj,targhum.RigType,targtorso,targhum)
- end
- add_blood(obj)
- local bleeding = Instance.new("Sound")
- bleeding.SoundId = 'rbxassetid://360007673'
- bleeding.Volume = 1
- bleeding.Parent = targtorso
- bleeding:Play()
- if 0 >= targhum.Health and obj == targhead then
- kill(obj,true,p.CFrame.lookVector)
- elseif 0 >= targhum.Health then
- kill(obj,false,p.CFrame.lookVector)
- elseif targhum.Health > 0 then
- bleed2(targtorso,targhum,true,5,false)
- end
- else
- table.insert(objhit,1,obj)
- local mat = obj.Material
- local mathit = obj:FindFirstChild('material hit ' .. plr.Name)
- if not mathit and toughness > 0 and 1 > obj.Transparency then
- --print('old: ' .. toughness)
- if (mat == Enum.Material.Glass or mat == Enum.Material.Ice) then
- breakwindow(obj)
- elseif (mat == Enum.Material.Wood or mat == Enum.Material.WoodPlanks) then
- toughness = toughness - 1.5
- elseif (mat == Enum.Material.Metal or mat == Enum.Material.DiamondPlate or mat == Enum.Material.CorrodedMetal) then
- toughness = toughness - 5
- elseif (mat == Enum.Material.Brick or mat == Enum.Material.Concrete or mat == Enum.Material.Cobblestone or mat == Enum.Material.Granite or mat == Enum.Material.Slate or mat == Enum.Material.Pebble) then
- toughness = toughness - 3
- else
- toughness = toughness - 1
- end
- --print('new: ' .. toughness)
- local libruary = {
- ['wizz'] = {342190005, 342190012, 342190017, 342190024},
- ['crackSmall'] = {873119768, 873119788, 873119811, 873119845, 873119886, 873119904},
- ['crackBig'] = {873119597, 873119653, 873119679, 873119703, 873119724, 873119744},
- ['whizz'] = {873121840, 873121858, 873121876, 873121896, 873121913, 873121936},
- ['woodhit'] = {342204157, 342204164, 342204170, 342204175, 871705143, 871705174}, --871705195, 871705217, 871705237, 871705264
- ['stonehit'] = {871701076, 871701134, 871701190, 871701241, 871701297, 871701346},
- ['metalhit'] = {871704182, 871704259, 871704297, 871704329, 871704362, 871704395},
- ['grasshit'] = {871709869, 871709832, 871709789, 871709755, 871709708, 871709643},
- ['impact'] = {525720625},
- }
- local soundfont=({
- Brick="stonehit";
- Cobblestone="stonehit";
- Concrete="stonehit";
- CorrodedMetal="metalhit";
- DiamondPlate="metalhit";
- Fabric=nil;
- Foil="metalhit";
- Granite="stonehit";
- Grass="grasshit";
- Ice="stonehit";
- Marble="stonehit";
- Metal="metalhit";
- Neon=nil;
- Pebble="stonehit";
- Plastic="metalhit";
- Sand=nil;
- Slate="stonehit";
- SmoothPlastic="metalhit";
- Wood="woodhit";
- WoodPlanks="woodhit";
- })[mat.Name]
- local part = make_hole(CFrame.new(objpos, objpos - rot) * CFrame.Angles(math.rad(90), math.rad(0), math.rad(0)) * CFrame.Angles(math.rad(0), math.rad(math.random(-360, 360)), math.rad(0)), obj, obj.BrickColor)
- local BulletHoleSound = Instance.new("Sound")
- BulletHoleSound.Volume = 0.5
- BulletHoleSound.Pitch = math.random(9,11)/10
- if soundfont ~= nil then
- BulletHoleSound.SoundId = "rbxassetid://"..libruary[soundfont][math.random(1,6)]
- else
- BulletHoleSound.SoundId = "rbxassetid://"..libruary['impact'][1]
- end
- BulletHoleSound.Parent = part
- BulletHoleSound:Play()
- local tempmathit = Instance.new("ObjectValue")
- tempmathit.Name = ('material hit ' .. plr.Name)
- tempmathit.Parent = obj
- game:GetService("Debris"):AddItem(tempmathit,shootwait)
- end
- end
- if toughness > 0 and rays > 0 then
- local found = false
- for i,v in pairs(oldobjhit) do if v and obj:IsDescendantOf(v) then found = true; end; end;
- oldobjhit = objhit
- if not plrhit and not found then
- rays = rays - 1
- wait()
- end
- local ig = {char,gun,script,unpack(objhit)}
- local _obj,_vec,_rot = raycast(objpos,(hitpos-objpos).Unit, nil, ig)
- check(toughness,_obj,_vec,p,rays,_rot)
- else
- p:Destroy()
- end
- end
- local function drop_shell()
- local Shell = Instance.new("Part")
- Shell.Color = Color3.new(1, 1, 0)
- Shell.Size = Vector3.new(0.530001819, 0.132500455, 0.132500455)
- Shell.BottomSurface = Enum.SurfaceType.Smooth
- Shell.BrickColor = BrickColor.new("New Yeller")
- Shell.Material = Enum.Material.Metal
- Shell.Shape = Enum.PartType.Cylinder
- Shell.CFrame = han.CFrame
- Shell.Parent = script
- local bvs = Instance.new("BodyVelocity")
- bvs.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
- bvs.Velocity = han.CFrame.lookVector+Vector3.new(0,10,-5)
- bvs.Parent = Shell
- game:GetService("Debris"):AddItem(bvs,0.1)
- game:GetService("Debris"):AddItem(Shell,10)
- end
- local function Shoot()
- if not using and CheckIfAlive() and ammo > 0 then
- using = true
- wait()
- ammo = ammo - 1
- tween:Create(gun,TweenInfo.new(0.1),({Grip = CFrame.new(0.364753544, -0.169386029, -0.00732704997, -4.3651621e-08, -0.0522755384, 0.998632669, -2.2850366e-09, 0.99863261, 0.0522755422, -1, 0, -4.37113883e-08)})):Play()
- spawn(function()
- flash.Enabled = true
- light.Enabled = true
- smoke.Enabled = true
- wait()
- flash.Enabled = false
- light.Enabled = false
- smoke.Enabled = false
- end)
- for i = 1,bulletfire do
- drop_shell()
- local mrd = math.random(1,3)
- if mrd == 1 then
- shoot_s:Play()
- elseif mrd == 2 then
- shoot_s2:Play()
- elseif mrd == 3 then
- shoot_s3:Play()
- end
- for i,v in ipairs(objhit) do table.remove(objhit,i); end;
- for i,v in ipairs(objhit) do table.remove(oldobjhit,i); end;
- spawn(function()
- local p = Instance.new("Part")
- p.Name = "bullet"
- p.Massless = true
- p.Anchored = false
- p.CanCollide = false
- p.Color = Color3.fromRGB(255, 255, 0)
- p.Size = Vector3.new(0.5,0.5,1)
- p.Transparency = 0
- p.Position = han.Position
- p.CFrame = CFrame.new(han.Position,hitpos)
- p.Velocity = p.CFrame.lookVector * 1000
- p.Material = Enum.Material.Neon
- p.Parent = script
- local mesh = Instance.new("SpecialMesh")
- mesh.MeshType = Enum.MeshType.Sphere
- mesh.Parent = p
- --tween:Create(p,TweenInfo.new(((hitpos)-han.Position).Magnitude/10000),{Position = p.Position + ((hitpos)-han.Position).Unit*1000}):Play()
- local body_vel = Instance.new("BodyVelocity")
- body_vel.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
- body_vel.Velocity = p.CFrame.lookVector * 1000
- body_vel.Parent = p
- debris:AddItem(p,3)
- local toughness = 5
- local rays = 5
- local ig = {char,gun,script}
- local obj,vec,rot = raycast(han.Position,(hitpos-han.Position).Unit, nil, ig)
- check(toughness,obj,vec,p,rays,rot)
- end)
- end
- spawn(function()
- wait(0.1)
- tween:Create(gun,TweenInfo.new(0.1),({Grip = CFrame.new(0.355400085, -0.188222155, -0.00732704997, -4.37113883e-08, 0, 1, 0, 0.99999994, 0, -1, 0, -4.37113883e-08)})):Play()
- end)
- wait(shootwait)
- using = false
- end
- end
- gun.Activated:Connect(function()
- if not using and CheckIfAlive() and 0 >= ammo then
- Reload()
- end
- end)
- gun.Equipped:Connect(function()
- equipped = true
- pcall(function()
- char = gun.Parent
- plr = game:GetService("Players"):GetPlayerFromCharacter(char)
- hum = char:FindFirstChildOfClass("Humanoid")
- torso = char:FindFirstChild("Torso") or char:FindFirstChild("UpperTorso")
- rootpart = char:FindFirstChild("HumanoidRootPart")
- if not CheckIfAlive() then gun.Parent = nil return end
- end)
- end)
- gun.Unequipped:Connect(function()
- equipped = false
- end)
- local remote = Instance.new("RemoteEvent")
- remote.Name = 'famasg2_remote'
- remote.Parent = gun
- remote.OnServerEvent:Connect(function(player,mode,data,data2)
- if equipped then else return end
- if plr == player and mode == 1 then
- if data ~= nil then
- hitpos = data
- end
- if data2 ~= nil then
- shooting = data2
- end
- if shooting then
- Shoot()
- end
- elseif not shooting and not using and CheckIfAlive() and plr == player and mode == 2 and data == 'reload' then
- Reload()
- end
- end)
- local ls = [[
- local plr = game:GetService("Players").LocalPlayer
- local mouse = plr:GetMouse()
- local char = plr.Character
- local remote = script.Parent
- local tool = remote.Parent
- tool.Equipped:Connect(function()
- pcall(function()
- char = tool.Parent
- end)
- pcall(function()
- plr = game:GetService("Players"):GetPlayerFromCharacter(char)
- end)
- pcall(function()
- mouse = plr:GetMouse()
- end)
- if mouse then
- mouse.KeyDown:Connect(function(key)
- if key == 'r' then
- remote:FireServer(2,'reload')
- end
- end)
- mouse.Button1Down:Connect(function()
- local pos
- pcall(function()
- pos = mouse.Hit.p
- end)
- remote:FireServer(1,pos,true)
- wait(0.2)
- remote:FireServer(1,nil,false)
- end)
- end
- end)
- ]]
- NLS(ls,remote)
- end)
- spawn(function()
- local char = plr.Character
- local hum = char:FindFirstChildOfClass("Humanoid")
- local torso = char:FindFirstChild("Torso") or char:FindFirstChild("UpperTorso")
- local rootpart = char:FindFirstChild("HumanoidRootPart")
- local debris = game:GetService("Debris")
- local tween = game:GetService("TweenService")
- local gun = Instance.new("Tool")
- local han = Instance.new("Part")
- local SpecialMesh2 = Instance.new("SpecialMesh")
- gun.Name = "AUG A2"
- gun.Parent = plr['Backpack']
- gun.Grip = CFrame.new(0.355400085, -0.188222155, -0.00732704997, -4.37113883e-08, 0, 1, 0, 0.99999994, 0, -1, 0, -4.37113883e-08)
- han.Name = "Handle"
- han.Parent = gun
- han.CFrame = CFrame.new(-12.4460001, 1.07099998, -5.64400005, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- han.Position = Vector3.new(-12.4460001, 1.07099998, -5.64400005)
- han.Size = Vector3.new(3.46399999, 2.14199996, 0.529999971)
- han.Color = Color3.fromRGB(75, 151, 75)
- han.BottomSurface = Enum.SurfaceType.Smooth
- han.TopSurface = Enum.SurfaceType.Smooth
- SpecialMesh2.Parent = han
- SpecialMesh2.MeshId = "rbxassetid://1877851197"
- SpecialMesh2.Scale = Vector3.new(0.006, 0.006, 0.006)
- SpecialMesh2.TextureId = ""
- SpecialMesh2.MeshType = Enum.MeshType.FileMesh
- local effect_part = Instance.new("Part")
- local smoke = Instance.new("ParticleEmitter")
- local flash = Instance.new("ParticleEmitter")
- local light = Instance.new("PointLight")
- effect_part.Name = "effect"
- effect_part.Parent = gun
- effect_part.CFrame = CFrame.new(-14.3099976, 2.64201403, -6.57999992, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- effect_part.Position = Vector3.new(-14.3099976, 2.64201403, -6.57999992)
- effect_part.Transparency = 1
- effect_part.Size = Vector3.new(0.100000001, 0.100000001, 0.100000001)
- effect_part.BottomSurface = Enum.SurfaceType.Smooth
- effect_part.CanCollide = false
- effect_part.TopSurface = Enum.SurfaceType.Smooth
- smoke.Name = "smoke"
- smoke.Parent = effect_part
- smoke.Speed = NumberRange.new(5, 7)
- smoke.Rotation = NumberRange.new(0, 360)
- smoke.Color = ColorSequence.new(Color3.new(0.27451, 0.27451, 0.27451),Color3.new(0.27451, 0.27451, 0.27451))
- smoke.Enabled = false
- smoke.LightEmission = 0.10000000149012
- smoke.Texture = "http://www.roblox.com/asset/?id=244514423"
- smoke.Transparency = NumberSequence.new(0.60000002384186,1)
- smoke.Size = NumberSequence.new(0.99999964237213,3)
- smoke.Lifetime = NumberRange.new(1.25, 1.5)
- smoke.Rate = 100
- smoke.RotSpeed = NumberRange.new(10, 10)
- smoke.SpreadAngle = Vector2.new(15, 15)
- smoke.VelocitySpread = 15
- flash.Name = "flash"
- flash.Parent = effect_part
- flash.Speed = NumberRange.new(0, 0)
- flash.Rotation = NumberRange.new(0, 90)
- flash.Color = ColorSequence.new(Color3.new(1, 1, 0.498039),Color3.new(1, 1, 0.498039))
- flash.Enabled = false
- flash.LightEmission = 1
- flash.Texture = "http://www.roblox.com/asset/?id=3419963"
- flash.Transparency = NumberSequence.new(0.75,1)
- flash.Size = NumberSequence.new(0.20000000298023,0.20000000298023)
- flash.Lifetime = NumberRange.new(0.050000000745058, 0.075000002980232)
- flash.Rate = 1000
- light.Name = "light"
- light.Parent = effect_part
- light.Color = Color3.new(1, 1, 0.498039)
- light.Enabled = false
- light.Range = 6
- light.Brightness = 10
- light.Shadows = true
- local weld = Instance.new("Weld")
- weld.Part0 = han
- weld.Part1 = effect_part
- weld.C1 = weld.C1 * CFrame.new(han.Size.X-0.7,-0.3,0)
- weld.Parent = effect_part
- local cols = {BrickColor.new("Neon orange"),BrickColor.new("Really red"),BrickColor.new("Bright red"),BrickColor.new("Br. yellowish orange"),BrickColor.new("Bright yellow")}
- local taunts = {298689061,2743459732,2852509470,1018518369}
- local using = false
- local op = false
- local bulletfire = 1
- local shootwait = 0.0833333333*bulletfire
- local max_ammo = 30
- local ammo = max_ammo
- local hitpos = nil
- local shooting = false
- local equipped = false
- local equip = Instance.new("Sound")
- equip.SoundId = 'rbxassetid://3667098999'
- equip.Volume = 0.8
- equip.Parent = han
- local shoot_s = Instance.new("Sound")
- shoot_s.SoundId = 'rbxassetid://336413490'
- shoot_s.Volume = 3
- shoot_s.Parent = han
- local reload_s = Instance.new("Sound")
- reload_s.SoundId = 'rbxassetid://3667100111'
- reload_s.Volume = 0.7
- reload_s.Parent = han
- local wbreak = Instance.new("Sound")
- wbreak.Parent = han
- wbreak.SoundId = "rbxassetid://627558611"
- wbreak.TimePosition = .1
- wbreak.Volume = 0.7
- local function CheckIfAlive()
- local alive = false
- if plr and char and char.Parent and torso and torso.Parent and hum and hum.Parent and hum.Health > 0 then
- alive = true
- end
- return alive
- end
- local function Ragdoll(targchar,headless,insta)
- local pc = targchar
- pc.Archivable = true
- local pc_torso
- for _,obj in pairs(pc:GetDescendants()) do
- obj.Archivable = true
- if obj:IsA("BasePart") or obj:IsA("UnionOperation") then
- obj.Massless = true
- obj.Locked = true
- obj.CanCollide = true
- end
- 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
- pc_torso = torso
- 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('BallSocketConstraint') or v:IsA('Attachment')]] then
- v:Destroy()
- end
- end
- --pc:BreakJoints()
- local vis = false
- local vis2 = false
- if 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
- end
- if 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
- end
- if 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
- end
- if 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
- end
- if 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
- 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('BallSocketConstraint') or v:IsA('Attachment')]] then
- v:Destroy()
- end
- end
- --pc:BreakJoints()
- local vis = false
- local vis2 = false
- if 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
- end
- if 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
- end
- if 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
- end
- if 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
- end
- if 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
- else
- --head:BreakJoints()
- end
- end
- end)
- end
- elseif head and hum then
- pc_torso = pc:FindFirstChild("HumanoidRootPart")
- 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('BallSocketConstraint') or v:IsA('Attachment')]] then
- v:Destroy()
- end
- end
- --pc:BreakJoints()
- local vis = false
- local vis2 = false
- if not LF:FindFirstChild('Dismembered') then
- local bsc1 = Instance.new("BallSocketConstraint",LF)
- bsc1.Attachment0 = LF.LeftAnkleRigAttachment
- bsc1.Attachment1 = LLL.LeftAnkleRigAttachment
- end
- if not LLL:FindFirstChild('Dismembered') then
- local bsc2 = Instance.new("BallSocketConstraint",LLL)
- bsc2.Attachment0 = LLL.LeftKneeRigAttachment
- bsc2.Attachment1 = LUL.LeftKneeRigAttachment
- end
- if not LUL:FindFirstChild('Dismembered') then
- local bsc3 = Instance.new("BallSocketConstraint",LUL)
- bsc3.Attachment0 = LUL.LeftHipRigAttachment
- bsc3.Attachment1 = LT.LeftHipRigAttachment
- end
- if not RF:FindFirstChild('Dismembered') then
- local bsc4 = Instance.new("BallSocketConstraint",RF)
- bsc4.Attachment0 = RF.RightAnkleRigAttachment
- bsc4.Attachment1 = RLL.RightAnkleRigAttachment
- end
- if not RLL:FindFirstChild('Dismembered') then
- local bsc5 = Instance.new("BallSocketConstraint",RLL)
- bsc5.Attachment0 = RLL.RightKneeRigAttachment
- bsc5.Attachment1 = RUL.RightKneeRigAttachment
- end
- if not RUL:FindFirstChild('Dismembered') then
- local bsc6 = Instance.new("BallSocketConstraint",RUL)
- bsc6.Attachment0 = RUL.RightHipRigAttachment
- bsc6.Attachment1 = LT.RightHipRigAttachment
- end
- if not LH:FindFirstChild('Dismembered') then
- local bsc7 = Instance.new("BallSocketConstraint",LH)
- bsc7.Attachment0 = LH.LeftWristRigAttachment
- bsc7.Attachment1 = LLA.LeftWristRigAttachment
- end
- if not LLA:FindFirstChild('Dismembered') then
- local bsc8 = Instance.new("BallSocketConstraint",LLA)
- bsc8.Attachment0 = LLA.LeftElbowRigAttachment
- bsc8.Attachment1 = LUA.LeftElbowRigAttachment
- end
- if not LUA:FindFirstChild('Dismembered') then
- local bsc9 = Instance.new("BallSocketConstraint",LUA)
- bsc9.Attachment0 = LUA.LeftShoulderAttachment
- bsc9.Attachment1 = UT.LeftCollarAttachment
- end
- if not RH:FindFirstChild('Dismembered') then
- local bsc10 = Instance.new("BallSocketConstraint",RH)
- bsc10.Attachment0 = RH.RightWristRigAttachment
- bsc10.Attachment1 = RLA.RightWristRigAttachment
- end
- if not RLA:FindFirstChild('Dismembered') then
- local bsc11 = Instance.new("BallSocketConstraint",RLA)
- bsc11.Attachment0 = RLA.RightElbowRigAttachment
- bsc11.Attachment1 = RUA.RightElbowRigAttachment
- end
- if not RUA:FindFirstChild('Dismembered') then
- local bsc12 = Instance.new("BallSocketConstraint",RUA)
- bsc12.Attachment0 = RUA.RightShoulderAttachment
- bsc12.Attachment1 = UT.RightCollarAttachment
- end
- if not LT:FindFirstChild('Dismembered') then
- local bsc13 = Instance.new("BallSocketConstraint",LT)
- bsc13.Attachment0 = LT.WaistRigAttachment
- bsc13.Attachment1 = UT.WaistRigAttachment
- end
- if 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
- 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('BallSocketConstraint') or v:IsA('Attachment')]] then
- v:Destroy()
- end
- end
- --pc:BreakJoints()
- local vis = false
- local vis2 = false
- if not LF:FindFirstChild('Dismembered') then
- local bsc1 = Instance.new("BallSocketConstraint",LF)
- bsc1.Attachment0 = LF.LeftAnkleRigAttachment
- bsc1.Attachment1 = LLL.LeftAnkleRigAttachment
- end
- if not LLL:FindFirstChild('Dismembered') then
- local bsc2 = Instance.new("BallSocketConstraint",LLL)
- bsc2.Attachment0 = LLL.LeftKneeRigAttachment
- bsc2.Attachment1 = LUL.LeftKneeRigAttachment
- end
- if not LUL:FindFirstChild('Dismembered') then
- local bsc3 = Instance.new("BallSocketConstraint",LUL)
- bsc3.Attachment0 = LUL.LeftHipRigAttachment
- bsc3.Attachment1 = LT.LeftHipRigAttachment
- end
- if not RF:FindFirstChild('Dismembered') then
- local bsc4 = Instance.new("BallSocketConstraint",RF)
- bsc4.Attachment0 = RF.RightAnkleRigAttachment
- bsc4.Attachment1 = RLL.RightAnkleRigAttachment
- end
- if not RLL:FindFirstChild('Dismembered') then
- local bsc5 = Instance.new("BallSocketConstraint",RLL)
- bsc5.Attachment0 = RLL.RightKneeRigAttachment
- bsc5.Attachment1 = RUL.RightKneeRigAttachment
- end
- if not RUL:FindFirstChild('Dismembered') then
- local bsc6 = Instance.new("BallSocketConstraint",RUL)
- bsc6.Attachment0 = RUL.RightHipRigAttachment
- bsc6.Attachment1 = LT.RightHipRigAttachment
- end
- if not LH:FindFirstChild('Dismembered') then
- local bsc7 = Instance.new("BallSocketConstraint",LH)
- bsc7.Attachment0 = LH.LeftWristRigAttachment
- bsc7.Attachment1 = LLA.LeftWristRigAttachment
- end
- if not LLA:FindFirstChild('Dismembered') then
- local bsc8 = Instance.new("BallSocketConstraint",LLA)
- bsc8.Attachment0 = LLA.LeftElbowRigAttachment
- bsc8.Attachment1 = LUA.LeftElbowRigAttachment
- end
- if not LUA:FindFirstChild('Dismembered') then
- local bsc9 = Instance.new("BallSocketConstraint",LUA)
- bsc9.Attachment0 = LUA.LeftShoulderAttachment
- bsc9.Attachment1 = UT.LeftCollarAttachment
- end
- if not RH:FindFirstChild('Dismembered') then
- local bsc10 = Instance.new("BallSocketConstraint",RH)
- bsc10.Attachment0 = RH.RightWristRigAttachment
- bsc10.Attachment1 = RLA.RightWristRigAttachment
- end
- if not RLA:FindFirstChild('Dismembered') then
- local bsc11 = Instance.new("BallSocketConstraint",RLA)
- bsc11.Attachment0 = RLA.RightElbowRigAttachment
- bsc11.Attachment1 = RUA.RightElbowRigAttachment
- end
- if not RUA:FindFirstChild('Dismembered') then
- local bsc12 = Instance.new("BallSocketConstraint",RUA)
- bsc12.Attachment0 = RUA.RightShoulderAttachment
- bsc12.Attachment1 = UT.RightCollarAttachment
- end
- if not LT:FindFirstChild('Dismembered') then
- local bsc13 = Instance.new("BallSocketConstraint",LT)
- bsc13.Attachment0 = LT.WaistRigAttachment
- bsc13.Attachment1 = UT.WaistRigAttachment
- end
- if 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
- else
- --head:BreakJoints()
- end
- end
- end)
- end
- end
- end
- return pc,pc_torso
- end
- local function bleed2(frick,targhum,can_hurt,t,splat)
- spawn(function()
- if not frick:FindFirstChild("bleeding from kry's " .. gun.Name) then else return end
- local tempbleedval = Instance.new("ObjectValue")
- tempbleedval.Name = "bleeding from kry's " .. gun.Name
- 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
- 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
- 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"
- 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.Parent and tou.Parent:IsA('Tool') == false and tou.Parent.Parent:FindFirstChildOfClass('Humanoid') == nil and tou.Parent:FindFirstChildOfClass('Humanoid') == nil and tou.name ~= "mini_blood" and tou.Name ~= "Blood" and tou.Parent ~= char and tou.Parent.ClassName ~= "Accessory" and tou.Parent.Name ~= 'mini_blood' 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)
- while bloodlol and bloodlol.Parent ~= nil do
- if bloodlol.Transparency < 1 then
- bloodlol.Transparency = bloodlol.Transparency + 0.05
- else
- bloodlol:Destroy()
- end
- wait(0.1)
- end
- end
- end
- end)
- end)
- wait(0.1)
- end
- tempbleedval:Destroy()
- end)
- end
- local function kill(obj,headshot,lookVector)
- local targchar,targhead,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") or targchar:FindFirstChild("HumanoidRootPart")
- end)
- pcall(function()
- targhead = targchar:FindFirstChild("Head")
- end)
- pcall(function()
- targhum = targchar:FindFirstChildOfClass("Humanoid")
- end)
- pcall(function()
- killval = targhum:FindFirstChild("killer")
- end)
- pcall(function()
- decapval = targhum:FindFirstChild("decapped " .. targchar.Name)
- end)
- pcall(function()
- hitval = targhum:FindFirstChild("hit " .. targchar.Name .. " with aug a2 by " .. plr.Name)
- end)
- if targchar and targhead and targtorso and targhum and targhum ~= hum --[[and not hitval]] and using then
- targhum:TakeDamage(1/0)
- if 0 >= targhum.Health then
- if (not decapval and headshot) or not killval then
- if not killval then
- local tempkillval = Instance.new("ObjectValue",targhum)
- tempkillval.Name = "killer"
- tempkillval.Value = plr
- end
- spawn(function()
- local kb = 30
- local b = Instance.new("BodyVelocity")
- b.Parent = targtorso
- b.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
- b.Velocity = lookVector*kb + Vector3.new(0,2,0)
- game:GetService("Debris"):AddItem(b,0.15)
- end)
- pcall(function()
- Ragdoll(targchar,headshot,true)
- end)
- bleed2(targtorso,targhum,true,5,true)
- end
- if headshot and not decapval then
- local tempdecapval = Instance.new("ObjectValue",targhum)
- tempdecapval.Name = ("decapped " .. targchar.Name)
- local decap_bleed = Instance.new("Sound")
- decap_bleed.SoundId = 'rbxassetid://244502094'
- decap_bleed.Volume = 0.5
- decap_bleed.Parent = targtorso
- decap_bleed:Play()
- local decap_head = Instance.new("Sound")
- decap_head.SoundId = 'rbxassetid://1255040462' --222406108
- decap_head.Volume = 1
- decap_head.Parent = targtorso
- decap_head:Play()
- local att = Instance.new("Attachment")
- att.Parent = targtorso
- att.Position = Vector3.new(0,targtorso.Size.Y/2,0)
- local blood_emitter = Instance.new("ParticleEmitter")
- blood_emitter.Name = "Blood2"
- blood_emitter.Parent = att
- blood_emitter.Speed = NumberRange.new(5, 14)
- blood_emitter.Color = ColorSequence.new(Color3.new(0.45098, 0, 0),Color3.new(0.45098, 0, 0))
- blood_emitter.LightEmission = 0.20000000298023
- blood_emitter.LightInfluence = 1
- blood_emitter.Texture = "http://www.roblox.com/asset/?id=134531274"
- blood_emitter.Transparency = NumberSequence.new(0.30000001192093,0.30000001192093)
- blood_emitter.ZOffset = 1
- blood_emitter.Size = NumberSequence.new(0.12499988079071,0)
- blood_emitter.Acceleration = Vector3.new(0, -20, 0)
- blood_emitter.Lifetime = NumberRange.new(0.5, 1.5)
- blood_emitter.Rate = 100000
- blood_emitter.SpreadAngle = Vector2.new(90, 90)
- blood_emitter.VelocitySpread = 90
- blood_emitter.Enabled = true
- end
- end
- end
- end
- local function Reload()
- if max_ammo > ammo then else return end
- using = true
- reload_s:Play()
- local mag = Instance.new("Part")
- mag.Size = Vector3.new(0.48, 0.79, 0.14)
- mag.Color = han.Color
- mag.Parent = workspace
- mag.CFrame = han.CFrame * CFrame.new(1.2,-0.5,0)
- --debris:AddItem(mag,3)
- wait(reload_s.TimeLength)
- ammo = max_ammo
- game:GetService("Debris"):AddItem(mag,10)
- using = false
- end
- local function breakwindow(hit)
- if hit and hit.Name:lower() ~= "window shatter" and hit.Name:lower() ~= "blood" and hit.Name:lower() ~= "mini_blood" then else return end
- local wbreakc = wbreak:Clone()
- wbreakc.Parent = hit
- wbreakc: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
- 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
- local function raycast(Pos,Dir,Max,Ignore)
- return workspace:FindPartOnRayWithIgnoreList(Ray.new(Pos, Dir * (Max or 999.999)), (Ignore or {}), false, true)
- end
- local objhit = {}
- local oldobjhit = {}
- local function make_hole(pos,obj,col)
- local BulletHolePart = Instance.new("Part")
- BulletHolePart.Massless = true
- BulletHolePart.Anchored = false
- BulletHolePart.CanCollide = false
- BulletHolePart.Locked = true
- BulletHolePart.FormFactor = "Custom"
- BulletHolePart.TopSurface, BulletHolePart.BottomSurface, BulletHolePart.RightSurface, BulletHolePart.LeftSurface, BulletHolePart.FrontSurface, BulletHolePart.BackSurface = "SmoothNoOutlines", "SmoothNoOutlines", "SmoothNoOutlines", "SmoothNoOutlines", "SmoothNoOutlines", "SmoothNoOutlines"
- BulletHolePart.Name = "Bullet Hole"
- BulletHolePart.Material = "Plastic"
- BulletHolePart.Reflectance = 0
- BulletHolePart.Transparency = 1
- BulletHolePart.BrickColor = BrickColor.new("Medium stone grey")
- BulletHolePart.Size = Vector3.new(0.3, 0, 0.3)
- BulletHolePart:BreakJoints()
- BulletHolePart.CFrame = pos
- BulletHolePart.Parent = script
- local weld = Instance.new("WeldConstraint")
- weld.Part0 = obj
- weld.Part1 = BulletHolePart
- weld.Parent = obj
- -- game:GetService("Debris"):AddItem(BulletHolePart, 5)
- local BulletHoleDecal = Instance.new("Decal")
- BulletHoleDecal.Color3 = Color3.new(col.r, col.g, col.b)
- BulletHoleDecal.Face = "Top"
- BulletHoleDecal.Texture = "rbxassetid://359667865"
- BulletHoleDecal.Transparency = 0
- BulletHoleDecal.Parent = BulletHolePart
- return BulletHolePart
- 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
- local function add_decal(f,t,obj)
- spawn(function()
- local texture = Instance.new("Texture")
- texture.Parent = obj
- texture.Face = f
- texture.Texture = 'rbxassetid://' .. t
- 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
- local function add_blood(obj)
- 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)
- add_decal('Bottom',t2,obj)
- add_decal('Left',t3,obj)
- add_decal('Right',t4,obj)
- add_decal('Front',t5,obj)
- add_decal('Back',t6,obj)
- end
- local function make_bone(obj,targtorso)
- if obj.Name == 'Left Arm' or obj.Name == 'LeftUpperArm' then
- local bone = Instance.new("Part")
- 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.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.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.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.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.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.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.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.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.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
- local function break_limb(obj,rig,targtorso,targhum)
- if not obj:FindFirstChild('Dismembered') and obj.Name ~= 'Torso' and obj.Name ~= 'HumanoidRootPart' and obj.Name ~= 'UpperTorso' and obj.Name ~= 'LowerTorso' then else return end
- local confirm = Instance.new("ObjectValue")
- confirm.Name = 'Dismembered'
- confirm.Parent = obj
- local bsc = obj:FindFirstChildOfClass("BallSocketConstraint")
- if bsc then
- bsc:Destroy()
- end
- bleed2(obj,targhum,false,5,false)
- make_bone(obj,targtorso)
- local kb = 10
- local b = Instance.new("BodyVelocity")
- b.Parent = targtorso
- b.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
- b.Velocity = han.CFrame.lookVector*kb + Vector3.new(0,2,0)
- game:GetService("Debris"):AddItem(b,0.1)
- if rig == Enum.HumanoidRigType.R6 then
- local bsc = obj:FindFirstChildOfClass("BallSocketConstraint")
- if bsc then
- bsc:Destroy()
- end
- for i,v in pairs(targtorso:GetChildren()) do
- if v:IsA("Motor6D") then
- if obj.Name == 'Head' and v.Name == 'Neck' then
- v:Destroy()
- elseif obj.Name == 'Left Arm' and v.Name == 'Left Shouldver' then
- v:Destroy()
- elseif obj.Name == 'Right Arm' and v.Name == 'Right Shoulder' then
- v:Destroy()
- elseif obj.Name == 'Left Leg' and v.Name == 'Left Hip' then
- if obj.Parent:FindFirstChild("Right Leg") then
- targhum.WalkSpeed = targhum.WalkSpeed/2
- else
- targhum.WalkSpeed = 0
- end
- v:Destroy()
- elseif obj.Name == 'Right Leg' and v.Name == 'Right Hip' then
- if obj.Parent:FindFirstChild("Left Leg") then
- targhum.WalkSpeed = targhum.WalkSpeed/2
- else
- targhum.WalkSpeed = 0
- end
- v:Destroy()
- end
- end
- end
- elseif rig == Enum.HumanoidRigType.R15 then
- for i,v in pairs(obj:GetChildren()) do
- if v:IsA("Motor6D") then
- if (obj.Name == 'LeftUpperLeg' and obj.Parent:FindFirstChild("RightUpperLeg")) or (obj.Name == 'RightUpperLeg' and obj.Parent:FindFirstChild("LeftUpperLeg")) then
- targhum.WalkSpeed = targhum.WalkSpeed/2
- elseif obj.Name == 'RightUpperLeg' or obj.Name == 'LeftUpperLeg' then
- targhum.WalkSpeed = 0
- end
- v:Destroy()
- end
- end
- end
- local cb = Instance.new("Part")
- cb.Transparency = 1
- cb.CanCollide = true
- cb.Anchored = false
- cb.CFrame = obj.CFrame
- cb.Size = obj.Size
- cb.Massless = true
- cb.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(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
- cb.Parent = script
- end
- local function check(toughness,obj,objpos,p,rays,rot)
- local plrhit = false
- if obj and not obj:FindFirstChild('Dismembered') then else return; end;
- local targchar,targtorso,targhum,targhead
- 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") or targchar:FindFirstChild("HumanoidRootPart")
- end)
- pcall(function()
- targhum = targchar:FindFirstChildOfClass("Humanoid")
- end)
- pcall(function()
- targhead = targchar:FindFirstChild("Head")
- end)
- if targchar and targchar.Parent and targtorso and targtorso.Parent and targhum and targhum.Parent and targhum ~= hum and targhead and targhead.Parent and not targhum:FindFirstChild("hit " .. targchar.Name .. " with " .. gun.Name .. " by " .. plr.Name) then
- plrhit = true
- local confirm = Instance.new("IntValue")
- confirm.Parent = targhum
- confirm.Name = ("hit " .. targchar.Name .. " with " .. gun.Name .. " by " .. plr.Name)
- debris:AddItem(confirm,shootwait)
- local dmg = math.random(40,50)
- if obj == targhead then
- dmg = math.random(65,75)
- targhum:TakeDamage(dmg)
- elseif not op then
- dmg = math.random(40,50)
- targhum:TakeDamage(dmg)
- elseif op then
- targhum.MaxHealth = 0
- targhum.Health = 0
- targhum.Parent:BreakJoints()
- end
- if math.random(1,4) == 1 then
- break_limb(obj,targhum.RigType,targtorso,targhum)
- end
- add_blood(obj)
- local bleeding = Instance.new("Sound")
- bleeding.SoundId = 'rbxassetid://360007673'
- bleeding.Volume = 1
- bleeding.Parent = targtorso
- bleeding:Play()
- if 0 >= targhum.Health and obj == targhead then
- kill(obj,true,p.CFrame.lookVector)
- elseif 0 >= targhum.Health then
- kill(obj,false,p.CFrame.lookVector)
- elseif targhum.Health > 0 then
- bleed2(targtorso,targhum,true,5,false)
- end
- else
- table.insert(objhit,1,obj)
- local mat = obj.Material
- local mathit = obj:FindFirstChild('material hit ' .. plr.Name)
- if not mathit and toughness > 0 and 1 > obj.Transparency then
- --print('old: ' .. toughness)
- if (mat == Enum.Material.Glass or mat == Enum.Material.Ice) then
- breakwindow(obj)
- elseif (mat == Enum.Material.Wood or mat == Enum.Material.WoodPlanks) then
- toughness = toughness - 1.5
- elseif (mat == Enum.Material.Metal or mat == Enum.Material.DiamondPlate or mat == Enum.Material.CorrodedMetal) then
- toughness = toughness - 5
- elseif (mat == Enum.Material.Brick or mat == Enum.Material.Concrete or mat == Enum.Material.Cobblestone or mat == Enum.Material.Granite or mat == Enum.Material.Slate or mat == Enum.Material.Pebble) then
- toughness = toughness - 3
- else
- toughness = toughness - 1
- end
- --print('new: ' .. toughness)
- local libruary = {
- ['wizz'] = {342190005, 342190012, 342190017, 342190024},
- ['crackSmall'] = {873119768, 873119788, 873119811, 873119845, 873119886, 873119904},
- ['crackBig'] = {873119597, 873119653, 873119679, 873119703, 873119724, 873119744},
- ['whizz'] = {873121840, 873121858, 873121876, 873121896, 873121913, 873121936},
- ['woodhit'] = {342204157, 342204164, 342204170, 342204175, 871705143, 871705174}, --871705195, 871705217, 871705237, 871705264
- ['stonehit'] = {871701076, 871701134, 871701190, 871701241, 871701297, 871701346},
- ['metalhit'] = {871704182, 871704259, 871704297, 871704329, 871704362, 871704395},
- ['grasshit'] = {871709869, 871709832, 871709789, 871709755, 871709708, 871709643},
- ['impact'] = {525720625},
- }
- local soundfont=({
- Brick="stonehit";
- Cobblestone="stonehit";
- Concrete="stonehit";
- CorrodedMetal="metalhit";
- DiamondPlate="metalhit";
- Fabric=nil;
- Foil="metalhit";
- Granite="stonehit";
- Grass="grasshit";
- Ice="stonehit";
- Marble="stonehit";
- Metal="metalhit";
- Neon=nil;
- Pebble="stonehit";
- Plastic="metalhit";
- Sand=nil;
- Slate="stonehit";
- SmoothPlastic="metalhit";
- Wood="woodhit";
- WoodPlanks="woodhit";
- })[mat.Name]
- local part = make_hole(CFrame.new(objpos, objpos - rot) * CFrame.Angles(math.rad(90), math.rad(0), math.rad(0)) * CFrame.Angles(math.rad(0), math.rad(math.random(-360, 360)), math.rad(0)), obj, obj.BrickColor)
- local BulletHoleSound = Instance.new("Sound")
- BulletHoleSound.Volume = 0.5
- BulletHoleSound.Pitch = math.random(9,11)/10
- if soundfont ~= nil then
- BulletHoleSound.SoundId = "rbxassetid://"..libruary[soundfont][math.random(1,6)]
- else
- BulletHoleSound.SoundId = "rbxassetid://"..libruary['impact'][1]
- end
- BulletHoleSound.Parent = part
- BulletHoleSound:Play()
- local tempmathit = Instance.new("ObjectValue")
- tempmathit.Name = ('material hit ' .. plr.Name)
- tempmathit.Parent = obj
- game:GetService("Debris"):AddItem(tempmathit,shootwait)
- end
- end
- if toughness > 0 and rays > 0 then
- local found = false
- for i,v in pairs(oldobjhit) do if v and obj:IsDescendantOf(v) then found = true; end; end;
- oldobjhit = objhit
- if not plrhit and not found then
- rays = rays - 1
- wait()
- end
- local ig = {char,gun,script,unpack(objhit)}
- local _obj,_vec,_rot = raycast(objpos,(hitpos-objpos).Unit, nil, ig)
- check(toughness,_obj,_vec,p,rays,_rot)
- else
- p:Destroy()
- end
- end
- local function drop_shell()
- local Shell = Instance.new("Part")
- Shell.Color = Color3.new(1, 1, 0)
- Shell.Size = Vector3.new(0.530001819, 0.132500455, 0.132500455)
- Shell.BottomSurface = Enum.SurfaceType.Smooth
- Shell.BrickColor = BrickColor.new("New Yeller")
- Shell.Material = Enum.Material.Metal
- Shell.Shape = Enum.PartType.Cylinder
- Shell.CFrame = han.CFrame
- Shell.Parent = script
- local bvs = Instance.new("BodyVelocity")
- bvs.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
- bvs.Velocity = han.CFrame.lookVector+Vector3.new(0,10,-5)
- bvs.Parent = Shell
- game:GetService("Debris"):AddItem(bvs,0.1)
- game:GetService("Debris"):AddItem(Shell,10)
- end
- local function Shoot()
- if not using and CheckIfAlive() and ammo > 0 then
- using = true
- wait()
- ammo = ammo - 1
- shoot_s:Play()
- tween:Create(gun,TweenInfo.new(0.1),({Grip = CFrame.new(0.364753544, -0.169386029, -0.00732704997, -4.3651621e-08, -0.0522755384, 0.998632669, -2.2850366e-09, 0.99863261, 0.0522755422, -1, 0, -4.37113883e-08)})):Play()
- spawn(function()
- flash.Enabled = true
- light.Enabled = true
- smoke.Enabled = true
- wait()
- flash.Enabled = false
- light.Enabled = false
- smoke.Enabled = false
- end)
- for i = 1,bulletfire do
- drop_shell()
- for i,v in ipairs(objhit) do table.remove(objhit,i); end;
- for i,v in ipairs(objhit) do table.remove(oldobjhit,i); end;
- spawn(function()
- local p = Instance.new("Part")
- p.Name = "bullet"
- p.Massless = true
- p.Anchored = false
- p.CanCollide = false
- p.Color = Color3.fromRGB(255, 255, 0)
- p.Size = Vector3.new(0.5,0.5,1)
- p.Transparency = 0
- p.Position = han.Position
- p.CFrame = CFrame.new(han.Position,hitpos)
- p.Velocity = p.CFrame.lookVector * 1000
- p.Material = Enum.Material.Neon
- p.Parent = script
- local mesh = Instance.new("SpecialMesh")
- mesh.MeshType = Enum.MeshType.Sphere
- mesh.Parent = p
- --tween:Create(p,TweenInfo.new(((hitpos)-han.Position).Magnitude/10000),{Position = p.Position + ((hitpos)-han.Position).Unit*1000}):Play()
- local body_vel = Instance.new("BodyVelocity")
- body_vel.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
- body_vel.Velocity = p.CFrame.lookVector * 1000
- body_vel.Parent = p
- debris:AddItem(p,3)
- local toughness = 5
- local rays = 5
- local ig = {char,gun,script}
- local obj,vec,rot = raycast(han.Position,(hitpos-han.Position).Unit, nil, ig)
- check(toughness,obj,vec,p,rays,rot)
- end)
- end
- spawn(function()
- wait(0.1)
- tween:Create(gun,TweenInfo.new(0.1),({Grip = CFrame.new(0.355400085, -0.188222155, -0.00732704997, -4.37113883e-08, 0, 1, 0, 0.99999994, 0, -1, 0, -4.37113883e-08)})):Play()
- end)
- wait(shootwait)
- using = false
- end
- end
- gun.Activated:Connect(function()
- if not using and CheckIfAlive() and 0 >= ammo then
- Reload()
- end
- end)
- gun.Equipped:Connect(function()
- equipped = true
- pcall(function()
- char = gun.Parent
- plr = game:GetService("Players"):GetPlayerFromCharacter(char)
- hum = char:FindFirstChildOfClass("Humanoid")
- torso = char:FindFirstChild("Torso") or char:FindFirstChild("UpperTorso")
- rootpart = char:FindFirstChild("HumanoidRootPart")
- if not CheckIfAlive() then gun.Parent = nil return end
- end)
- end)
- gun.Unequipped:Connect(function()
- equipped = false
- end)
- local remote = Instance.new("RemoteEvent")
- remote.Name = 'auga2_remote'
- remote.Parent = gun
- remote.OnServerEvent:Connect(function(player,mode,data,data2)
- if equipped then else return end
- if plr == player and mode == 1 then
- if data ~= nil then
- hitpos = data
- end
- if data2 ~= nil then
- shooting = data2
- end
- if shooting then
- Shoot()
- end
- elseif not shooting and not using and CheckIfAlive() and plr == player and mode == 2 and data == 'reload' then
- Reload()
- end
- end)
- local ls = [[
- local plr = game:GetService("Players").LocalPlayer
- local mouse = plr:GetMouse()
- local char = plr.Character
- local remote = script.Parent
- local tool = remote.Parent
- local shooting = false
- tool.Equipped:Connect(function()
- pcall(function()
- char = tool.Parent
- end)
- pcall(function()
- plr = game:GetService("Players"):GetPlayerFromCharacter(char)
- end)
- pcall(function()
- mouse = plr:GetMouse()
- end)
- if mouse then
- mouse.KeyDown:Connect(function(key)
- if key == 'r' then
- remote:FireServer(2,'reload')
- end
- end)
- mouse.Button1Down:Connect(function()
- shooting = true
- while shooting do
- local pos
- pcall(function()
- pos = mouse.Hit.p
- end)
- remote:FireServer(1,pos,true)
- wait(0.0833333333)
- end
- remote:FireServer(1,nil,false)
- end)
- mouse.Button1Up:Connect(function()
- shooting = false
- end)
- end
- end)
- ]]
- NLS(ls,remote)
- end)
- spawn(function()
- local char = plr.Character
- local hum = char:FindFirstChildOfClass("Humanoid")
- local torso = char:FindFirstChild("Torso") or char:FindFirstChild("UpperTorso")
- local rootpart = char:FindFirstChild("HumanoidRootPart")
- local debris = game:GetService("Debris")
- local tween = game:GetService("TweenService")
- local gun = Instance.new("Tool")
- local han = Instance.new("Part")
- local SpecialMesh2 = Instance.new("SpecialMesh")
- gun.Name = "AK 47"
- gun.Parent = plr['Backpack']
- gun.Grip = CFrame.new(0.355400085, -0.188222155, -0.00732704997, -4.37113883e-08, 0, 1, 0, 0.99999994, 0, -1, 0, -4.37113883e-08)
- han.Name = "Handle"
- han.Parent = gun
- han.CFrame = CFrame.new(-12.4460001, 1.07099998, -5.64400005, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- han.Position = Vector3.new(-12.4460001, 1.07099998, -5.64400005)
- han.Size = Vector3.new(5.579, 1.578, 0.256)
- han.Color = Color3.fromRGB(91, 93, 105)
- han.BottomSurface = Enum.SurfaceType.Smooth
- han.TopSurface = Enum.SurfaceType.Smooth
- SpecialMesh2.Parent = han
- SpecialMesh2.MeshId = "rbxassetid://1877846291"
- SpecialMesh2.Scale = Vector3.new(0.006, 0.006, 0.006)
- SpecialMesh2.TextureId = ""
- SpecialMesh2.MeshType = Enum.MeshType.FileMesh
- local effect_part = Instance.new("Part")
- local smoke = Instance.new("ParticleEmitter")
- local flash = Instance.new("ParticleEmitter")
- local light = Instance.new("PointLight")
- effect_part.Name = "effect"
- effect_part.Parent = gun
- effect_part.CFrame = CFrame.new(-14.3099976, 2.64201403, -6.57999992, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- effect_part.Position = Vector3.new(-14.3099976, 2.64201403, -6.57999992)
- effect_part.Transparency = 1
- effect_part.Size = Vector3.new(0.100000001, 0.100000001, 0.100000001)
- effect_part.BottomSurface = Enum.SurfaceType.Smooth
- effect_part.CanCollide = false
- effect_part.TopSurface = Enum.SurfaceType.Smooth
- smoke.Name = "smoke"
- smoke.Parent = effect_part
- smoke.Speed = NumberRange.new(5, 7)
- smoke.Rotation = NumberRange.new(0, 360)
- smoke.Color = ColorSequence.new(Color3.new(0.27451, 0.27451, 0.27451),Color3.new(0.27451, 0.27451, 0.27451))
- smoke.Enabled = false
- smoke.LightEmission = 0.10000000149012
- smoke.Texture = "http://www.roblox.com/asset/?id=244514423"
- smoke.Transparency = NumberSequence.new(0.60000002384186,1)
- smoke.Size = NumberSequence.new(0.99999964237213,3)
- smoke.Lifetime = NumberRange.new(1.25, 1.5)
- smoke.Rate = 100
- smoke.RotSpeed = NumberRange.new(10, 10)
- smoke.SpreadAngle = Vector2.new(15, 15)
- smoke.VelocitySpread = 15
- flash.Name = "flash"
- flash.Parent = effect_part
- flash.Speed = NumberRange.new(0, 0)
- flash.Rotation = NumberRange.new(0, 90)
- flash.Color = ColorSequence.new(Color3.new(1, 1, 0.498039),Color3.new(1, 1, 0.498039))
- flash.Enabled = false
- flash.LightEmission = 1
- flash.Texture = "http://www.roblox.com/asset/?id=3419963"
- flash.Transparency = NumberSequence.new(0.75,1)
- flash.Size = NumberSequence.new(0.20000000298023,0.20000000298023)
- flash.Lifetime = NumberRange.new(0.050000000745058, 0.075000002980232)
- flash.Rate = 1000
- light.Name = "light"
- light.Parent = effect_part
- light.Color = Color3.new(1, 1, 0.498039)
- light.Enabled = false
- light.Range = 6
- light.Brightness = 10
- light.Shadows = true
- local weld = Instance.new("Weld")
- weld.Part0 = han
- weld.Part1 = effect_part
- weld.C1 = weld.C1 * CFrame.new((han.Size.X/2)+0.2,-0.5,0)
- weld.Parent = effect_part
- local cols = {BrickColor.new("Neon orange"),BrickColor.new("Really red"),BrickColor.new("Bright red"),BrickColor.new("Br. yellowish orange"),BrickColor.new("Bright yellow")}
- local taunts = {298689061,2743459732,2852509470,1018518369}
- local shots = {2290994062,2290994834,2290995643,2291000298,2291001802}
- local using = false
- local op = false
- local bulletfire = 1
- local shootwait = 0.05*bulletfire
- local max_ammo = 30
- local ammo = max_ammo
- local hitpos = nil
- local shooting = false
- local equipped = false
- local equip = Instance.new("Sound")
- equip.SoundId = 'rbxassetid://3667098999'
- equip.Volume = 0.8
- equip.Parent = han
- local shoot_s = Instance.new("Sound")
- shoot_s.SoundId = 'rbxassetid://336413490'
- shoot_s.Volume = 5
- shoot_s.Parent = han
- local reload_s = Instance.new("Sound")
- reload_s.SoundId = 'rbxassetid://3742928054'
- reload_s.Volume = 0.7
- reload_s.Parent = han
- local wbreak = Instance.new("Sound")
- wbreak.Parent = han
- wbreak.SoundId = "rbxassetid://627558611"
- wbreak.TimePosition = .1
- wbreak.Volume = 0.7
- local function CheckIfAlive()
- local alive = false
- if plr and char and char.Parent and torso and torso.Parent and hum and hum.Parent and hum.Health > 0 then
- alive = true
- end
- return alive
- end
- local function Ragdoll(targchar,headless,insta)
- local pc = targchar
- pc.Archivable = true
- local pc_torso
- for _,obj in pairs(pc:GetDescendants()) do
- obj.Archivable = true
- if obj:IsA("BasePart") or obj:IsA("UnionOperation") then
- obj.Massless = true
- obj.Locked = true
- obj.CanCollide = true
- end
- 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
- pc_torso = torso
- 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('BallSocketConstraint') or v:IsA('Attachment')]] then
- v:Destroy()
- end
- end
- --pc:BreakJoints()
- local vis = false
- local vis2 = false
- if 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
- end
- if 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
- end
- if 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
- end
- if 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
- end
- if 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
- 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('BallSocketConstraint') or v:IsA('Attachment')]] then
- v:Destroy()
- end
- end
- --pc:BreakJoints()
- local vis = false
- local vis2 = false
- if 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
- end
- if 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
- end
- if 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
- end
- if 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
- end
- if 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
- else
- --head:BreakJoints()
- end
- end
- end)
- end
- elseif head and hum then
- pc_torso = pc:FindFirstChild("HumanoidRootPart")
- 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('BallSocketConstraint') or v:IsA('Attachment')]] then
- v:Destroy()
- end
- end
- --pc:BreakJoints()
- local vis = false
- local vis2 = false
- if not LF:FindFirstChild('Dismembered') then
- local bsc1 = Instance.new("BallSocketConstraint",LF)
- bsc1.Attachment0 = LF.LeftAnkleRigAttachment
- bsc1.Attachment1 = LLL.LeftAnkleRigAttachment
- end
- if not LLL:FindFirstChild('Dismembered') then
- local bsc2 = Instance.new("BallSocketConstraint",LLL)
- bsc2.Attachment0 = LLL.LeftKneeRigAttachment
- bsc2.Attachment1 = LUL.LeftKneeRigAttachment
- end
- if not LUL:FindFirstChild('Dismembered') then
- local bsc3 = Instance.new("BallSocketConstraint",LUL)
- bsc3.Attachment0 = LUL.LeftHipRigAttachment
- bsc3.Attachment1 = LT.LeftHipRigAttachment
- end
- if not RF:FindFirstChild('Dismembered') then
- local bsc4 = Instance.new("BallSocketConstraint",RF)
- bsc4.Attachment0 = RF.RightAnkleRigAttachment
- bsc4.Attachment1 = RLL.RightAnkleRigAttachment
- end
- if not RLL:FindFirstChild('Dismembered') then
- local bsc5 = Instance.new("BallSocketConstraint",RLL)
- bsc5.Attachment0 = RLL.RightKneeRigAttachment
- bsc5.Attachment1 = RUL.RightKneeRigAttachment
- end
- if not RUL:FindFirstChild('Dismembered') then
- local bsc6 = Instance.new("BallSocketConstraint",RUL)
- bsc6.Attachment0 = RUL.RightHipRigAttachment
- bsc6.Attachment1 = LT.RightHipRigAttachment
- end
- if not LH:FindFirstChild('Dismembered') then
- local bsc7 = Instance.new("BallSocketConstraint",LH)
- bsc7.Attachment0 = LH.LeftWristRigAttachment
- bsc7.Attachment1 = LLA.LeftWristRigAttachment
- end
- if not LLA:FindFirstChild('Dismembered') then
- local bsc8 = Instance.new("BallSocketConstraint",LLA)
- bsc8.Attachment0 = LLA.LeftElbowRigAttachment
- bsc8.Attachment1 = LUA.LeftElbowRigAttachment
- end
- if not LUA:FindFirstChild('Dismembered') then
- local bsc9 = Instance.new("BallSocketConstraint",LUA)
- bsc9.Attachment0 = LUA.LeftShoulderAttachment
- bsc9.Attachment1 = UT.LeftCollarAttachment
- end
- if not RH:FindFirstChild('Dismembered') then
- local bsc10 = Instance.new("BallSocketConstraint",RH)
- bsc10.Attachment0 = RH.RightWristRigAttachment
- bsc10.Attachment1 = RLA.RightWristRigAttachment
- end
- if not RLA:FindFirstChild('Dismembered') then
- local bsc11 = Instance.new("BallSocketConstraint",RLA)
- bsc11.Attachment0 = RLA.RightElbowRigAttachment
- bsc11.Attachment1 = RUA.RightElbowRigAttachment
- end
- if not RUA:FindFirstChild('Dismembered') then
- local bsc12 = Instance.new("BallSocketConstraint",RUA)
- bsc12.Attachment0 = RUA.RightShoulderAttachment
- bsc12.Attachment1 = UT.RightCollarAttachment
- end
- if not LT:FindFirstChild('Dismembered') then
- local bsc13 = Instance.new("BallSocketConstraint",LT)
- bsc13.Attachment0 = LT.WaistRigAttachment
- bsc13.Attachment1 = UT.WaistRigAttachment
- end
- if 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
- 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('BallSocketConstraint') or v:IsA('Attachment')]] then
- v:Destroy()
- end
- end
- --pc:BreakJoints()
- local vis = false
- local vis2 = false
- if not LF:FindFirstChild('Dismembered') then
- local bsc1 = Instance.new("BallSocketConstraint",LF)
- bsc1.Attachment0 = LF.LeftAnkleRigAttachment
- bsc1.Attachment1 = LLL.LeftAnkleRigAttachment
- end
- if not LLL:FindFirstChild('Dismembered') then
- local bsc2 = Instance.new("BallSocketConstraint",LLL)
- bsc2.Attachment0 = LLL.LeftKneeRigAttachment
- bsc2.Attachment1 = LUL.LeftKneeRigAttachment
- end
- if not LUL:FindFirstChild('Dismembered') then
- local bsc3 = Instance.new("BallSocketConstraint",LUL)
- bsc3.Attachment0 = LUL.LeftHipRigAttachment
- bsc3.Attachment1 = LT.LeftHipRigAttachment
- end
- if not RF:FindFirstChild('Dismembered') then
- local bsc4 = Instance.new("BallSocketConstraint",RF)
- bsc4.Attachment0 = RF.RightAnkleRigAttachment
- bsc4.Attachment1 = RLL.RightAnkleRigAttachment
- end
- if not RLL:FindFirstChild('Dismembered') then
- local bsc5 = Instance.new("BallSocketConstraint",RLL)
- bsc5.Attachment0 = RLL.RightKneeRigAttachment
- bsc5.Attachment1 = RUL.RightKneeRigAttachment
- end
- if not RUL:FindFirstChild('Dismembered') then
- local bsc6 = Instance.new("BallSocketConstraint",RUL)
- bsc6.Attachment0 = RUL.RightHipRigAttachment
- bsc6.Attachment1 = LT.RightHipRigAttachment
- end
- if not LH:FindFirstChild('Dismembered') then
- local bsc7 = Instance.new("BallSocketConstraint",LH)
- bsc7.Attachment0 = LH.LeftWristRigAttachment
- bsc7.Attachment1 = LLA.LeftWristRigAttachment
- end
- if not LLA:FindFirstChild('Dismembered') then
- local bsc8 = Instance.new("BallSocketConstraint",LLA)
- bsc8.Attachment0 = LLA.LeftElbowRigAttachment
- bsc8.Attachment1 = LUA.LeftElbowRigAttachment
- end
- if not LUA:FindFirstChild('Dismembered') then
- local bsc9 = Instance.new("BallSocketConstraint",LUA)
- bsc9.Attachment0 = LUA.LeftShoulderAttachment
- bsc9.Attachment1 = UT.LeftCollarAttachment
- end
- if not RH:FindFirstChild('Dismembered') then
- local bsc10 = Instance.new("BallSocketConstraint",RH)
- bsc10.Attachment0 = RH.RightWristRigAttachment
- bsc10.Attachment1 = RLA.RightWristRigAttachment
- end
- if not RLA:FindFirstChild('Dismembered') then
- local bsc11 = Instance.new("BallSocketConstraint",RLA)
- bsc11.Attachment0 = RLA.RightElbowRigAttachment
- bsc11.Attachment1 = RUA.RightElbowRigAttachment
- end
- if not RUA:FindFirstChild('Dismembered') then
- local bsc12 = Instance.new("BallSocketConstraint",RUA)
- bsc12.Attachment0 = RUA.RightShoulderAttachment
- bsc12.Attachment1 = UT.RightCollarAttachment
- end
- if not LT:FindFirstChild('Dismembered') then
- local bsc13 = Instance.new("BallSocketConstraint",LT)
- bsc13.Attachment0 = LT.WaistRigAttachment
- bsc13.Attachment1 = UT.WaistRigAttachment
- end
- if 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
- else
- --head:BreakJoints()
- end
- end
- end)
- end
- end
- end
- return pc,pc_torso
- end
- local function bleed2(frick,targhum,can_hurt,t,splat)
- spawn(function()
- if not frick:FindFirstChild("bleeding from kry's " .. gun.Name) then else return end
- local tempbleedval = Instance.new("ObjectValue")
- tempbleedval.Name = "bleeding from kry's " .. gun.Name
- 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
- 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
- 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"
- 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.Parent and tou.Parent:IsA('Tool') == false and tou.Parent.Parent:FindFirstChildOfClass('Humanoid') == nil and tou.Parent:FindFirstChildOfClass('Humanoid') == nil and tou.name ~= "mini_blood" and tou.Name ~= "Blood" and tou.Parent ~= char and tou.Parent.ClassName ~= "Accessory" and tou.Parent.Name ~= 'mini_blood' 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)
- while bloodlol and bloodlol.Parent ~= nil do
- if bloodlol.Transparency < 1 then
- bloodlol.Transparency = bloodlol.Transparency + 0.05
- else
- bloodlol:Destroy()
- end
- wait(0.1)
- end
- end
- end
- end)
- end)
- wait(0.1)
- end
- tempbleedval:Destroy()
- end)
- end
- local function kill(obj,headshot,lookVector)
- local targchar,targhead,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("HumanoidRootPart")
- end)
- pcall(function()
- targhead = targchar:FindFirstChild("Head")
- end)
- pcall(function()
- targhum = targchar:FindFirstChildOfClass("Humanoid")
- end)
- pcall(function()
- killval = targhum:FindFirstChild("killer")
- end)
- pcall(function()
- decapval = targhum:FindFirstChild("decapped " .. targchar.Name)
- end)
- pcall(function()
- hitval = targhum:FindFirstChild("hit " .. targchar.Name .. " with ak 47 by " .. plr.Name)
- end)
- if targchar and targhead and targtorso and targhum and targhum ~= hum --[[and not hitval]] and using then
- targhum:TakeDamage(1/0)
- if 0 >= targhum.Health then
- if (not decapval and headshot) or not killval then
- if not killval then
- local tempkillval = Instance.new("ObjectValue",targhum)
- tempkillval.Name = "killer"
- tempkillval.Value = plr
- end
- spawn(function()
- local kb = 30
- local b = Instance.new("BodyVelocity")
- b.Parent = targtorso
- b.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
- b.Velocity = lookVector*kb + Vector3.new(0,2,0)
- game:GetService("Debris"):AddItem(b,0.15)
- end)
- pcall(function()
- Ragdoll(targchar,headshot,true)
- end)
- bleed2(targtorso,targhum,true,5,true)
- end
- if headshot and not decapval then
- local tempdecapval = Instance.new("ObjectValue",targhum)
- tempdecapval.Name = ("decapped " .. targchar.Name)
- local decap_bleed = Instance.new("Sound")
- decap_bleed.SoundId = 'rbxassetid://244502094'
- decap_bleed.Volume = 0.5
- decap_bleed.Parent = targtorso
- decap_bleed:Play()
- local decap_head = Instance.new("Sound")
- decap_head.SoundId = 'rbxassetid://1255040462' --222406108
- decap_head.Volume = 1
- decap_head.Parent = targtorso
- decap_head:Play()
- local att = Instance.new("Attachment")
- att.Parent = targtorso
- att.Position = Vector3.new(0,targtorso.Size.Y/2,0)
- local blood_emitter = Instance.new("ParticleEmitter")
- blood_emitter.Name = "Blood2"
- blood_emitter.Parent = att
- blood_emitter.Speed = NumberRange.new(5, 14)
- blood_emitter.Color = ColorSequence.new(Color3.new(0.45098, 0, 0),Color3.new(0.45098, 0, 0))
- blood_emitter.LightEmission = 0.20000000298023
- blood_emitter.LightInfluence = 1
- blood_emitter.Texture = "http://www.roblox.com/asset/?id=134531274"
- blood_emitter.Transparency = NumberSequence.new(0.30000001192093,0.30000001192093)
- blood_emitter.ZOffset = 1
- blood_emitter.Size = NumberSequence.new(0.12499988079071,0)
- blood_emitter.Acceleration = Vector3.new(0, -20, 0)
- blood_emitter.Lifetime = NumberRange.new(0.5, 1.5)
- blood_emitter.Rate = 100000
- blood_emitter.SpreadAngle = Vector2.new(90, 90)
- blood_emitter.VelocitySpread = 90
- blood_emitter.Enabled = true
- end
- end
- end
- end
- local function Reload()
- if max_ammo > ammo then else return end
- using = true
- reload_s:Play()
- local mag = Instance.new("Part")
- mag.Size = Vector3.new(0.48, 1.23, 0.14)
- mag.Color = han.Color
- mag.Parent = workspace
- mag.CFrame = han.CFrame * CFrame.new(0.1,-0.1,0)
- --debris:AddItem(mag,3)
- wait(reload_s.TimeLength)
- ammo = max_ammo
- game:GetService("Debris"):AddItem(mag,10)
- using = false
- end
- local function breakwindow(hit)
- if hit and hit.Name:lower() ~= "window shatter" and hit.Name:lower() ~= "blood" and hit.Name:lower() ~= "mini_blood" then else return end
- local wbreakc = wbreak:Clone()
- wbreakc.Parent = hit
- wbreakc: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
- 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
- local function raycast(Pos,Dir,Max,Ignore)
- return workspace:FindPartOnRayWithIgnoreList(Ray.new(Pos, Dir * (Max or 999.999)), (Ignore or {}), false, true)
- end
- local objhit = {}
- local oldobjhit = {}
- local function make_hole(pos,obj,col)
- local BulletHolePart = Instance.new("Part")
- BulletHolePart.Massless = true
- BulletHolePart.Anchored = false
- BulletHolePart.CanCollide = false
- BulletHolePart.Locked = true
- BulletHolePart.FormFactor = "Custom"
- BulletHolePart.TopSurface, BulletHolePart.BottomSurface, BulletHolePart.RightSurface, BulletHolePart.LeftSurface, BulletHolePart.FrontSurface, BulletHolePart.BackSurface = "SmoothNoOutlines", "SmoothNoOutlines", "SmoothNoOutlines", "SmoothNoOutlines", "SmoothNoOutlines", "SmoothNoOutlines"
- BulletHolePart.Name = "Bullet Hole"
- BulletHolePart.Material = "Plastic"
- BulletHolePart.Reflectance = 0
- BulletHolePart.Transparency = 1
- BulletHolePart.BrickColor = BrickColor.new("Medium stone grey")
- BulletHolePart.Size = Vector3.new(0.3, 0, 0.3)
- BulletHolePart:BreakJoints()
- BulletHolePart.CFrame = pos
- BulletHolePart.Parent = script
- local weld = Instance.new("WeldConstraint")
- weld.Part0 = obj
- weld.Part1 = BulletHolePart
- weld.Parent = obj
- -- game:GetService("Debris"):AddItem(BulletHolePart, 5)
- local BulletHoleDecal = Instance.new("Decal")
- BulletHoleDecal.Color3 = Color3.new(col.r, col.g, col.b)
- BulletHoleDecal.Face = "Top"
- BulletHoleDecal.Texture = "rbxassetid://359667865"
- BulletHoleDecal.Transparency = 0
- BulletHoleDecal.Parent = BulletHolePart
- return BulletHolePart
- 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
- local function add_decal(f,t,obj)
- spawn(function()
- local texture = Instance.new("Texture")
- texture.Parent = obj
- texture.Face = f
- texture.Texture = 'rbxassetid://' .. t
- 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
- local function add_blood(obj)
- 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)
- add_decal('Bottom',t2,obj)
- add_decal('Left',t3,obj)
- add_decal('Right',t4,obj)
- add_decal('Front',t5,obj)
- add_decal('Back',t6,obj)
- end
- local function make_bone(obj,targtorso)
- if obj.Name == 'Left Arm' or obj.Name == 'LeftUpperArm' then
- local bone = Instance.new("Part")
- 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.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.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.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.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.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.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.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.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.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
- local function break_limb(obj,rig,targtorso,targhum)
- if not obj:FindFirstChild('Dismembered') and obj.Name ~= 'Torso' and obj.Name ~= 'HumanoidRootPart' and obj.Name ~= 'UpperTorso' and obj.Name ~= 'LowerTorso' then else return end
- local confirm = Instance.new("ObjectValue")
- confirm.Name = 'Dismembered'
- confirm.Parent = obj
- local bsc = obj:FindFirstChildOfClass("BallSocketConstraint")
- if bsc then
- bsc:Destroy()
- end
- bleed2(obj,targhum,false,5,false)
- make_bone(obj,targtorso)
- local kb = 10
- local b = Instance.new("BodyVelocity")
- b.Parent = targtorso
- b.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
- b.Velocity = han.CFrame.lookVector*kb + Vector3.new(0,2,0)
- game:GetService("Debris"):AddItem(b,0.1)
- if rig == Enum.HumanoidRigType.R6 then
- local bsc = obj:FindFirstChildOfClass("BallSocketConstraint")
- if bsc then
- bsc:Destroy()
- end
- for i,v in pairs(targtorso:GetChildren()) do
- if v:IsA("Motor6D") then
- if obj.Name == 'Head' and v.Name == 'Neck' then
- v:Destroy()
- elseif obj.Name == 'Left Arm' and v.Name == 'Left Shouldver' then
- v:Destroy()
- elseif obj.Name == 'Right Arm' and v.Name == 'Right Shoulder' then
- v:Destroy()
- elseif obj.Name == 'Left Leg' and v.Name == 'Left Hip' then
- if obj.Parent:FindFirstChild("Right Leg") then
- targhum.WalkSpeed = targhum.WalkSpeed/2
- else
- targhum.WalkSpeed = 0
- end
- v:Destroy()
- elseif obj.Name == 'Right Leg' and v.Name == 'Right Hip' then
- if obj.Parent:FindFirstChild("Left Leg") then
- targhum.WalkSpeed = targhum.WalkSpeed/2
- else
- targhum.WalkSpeed = 0
- end
- v:Destroy()
- end
- end
- end
- elseif rig == Enum.HumanoidRigType.R15 then
- for i,v in pairs(obj:GetChildren()) do
- if v:IsA("Motor6D") then
- if (obj.Name == 'LeftUpperLeg' and obj.Parent:FindFirstChild("RightUpperLeg")) or (obj.Name == 'RightUpperLeg' and obj.Parent:FindFirstChild("LeftUpperLeg")) then
- targhum.WalkSpeed = targhum.WalkSpeed/2
- elseif obj.Name == 'RightUpperLeg' or obj.Name == 'LeftUpperLeg' then
- targhum.WalkSpeed = 0
- end
- v:Destroy()
- end
- end
- end
- local cb = Instance.new("Part")
- cb.Transparency = 1
- cb.CanCollide = true
- cb.Anchored = false
- cb.CFrame = obj.CFrame
- cb.Size = obj.Size
- cb.Massless = true
- cb.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(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
- cb.Parent = script
- end
- local function check(toughness,obj,objpos,p,rays,rot)
- local plrhit = false
- if obj and not obj:FindFirstChild('Dismembered') then else return; end;
- local targchar,targtorso,targhum,targhead
- 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") or targchar:FindFirstChild("HumanoidRootPart")
- end)
- pcall(function()
- targhum = targchar:FindFirstChildOfClass("Humanoid")
- end)
- pcall(function()
- targhead = targchar:FindFirstChild("Head")
- end)
- if targchar and targchar.Parent and targtorso and targtorso.Parent and targhum and targhum.Parent and targhum ~= hum and targhead and targhead.Parent and not targhum:FindFirstChild("hit " .. targchar.Name .. " with " .. gun.Name .. " by " .. plr.Name) then
- plrhit = true
- local confirm = Instance.new("IntValue")
- confirm.Parent = targhum
- confirm.Name = ("hit " .. targchar.Name .. " with " .. gun.Name .. " by " .. plr.Name)
- debris:AddItem(confirm,shootwait)
- local dmg = math.random(35,45)
- if obj == targhead then
- dmg = math.random(55,65)
- targhum:TakeDamage(dmg)
- elseif not op then
- dmg = math.random(35,45)
- targhum:TakeDamage(dmg)
- elseif op then
- targhum.MaxHealth = 0
- targhum.Health = 0
- targhum.Parent:BreakJoints()
- end
- if math.random(1,5) == 1 then
- break_limb(obj,targhum.RigType,targtorso,targhum)
- end
- add_blood(obj)
- local bleeding = Instance.new("Sound")
- bleeding.SoundId = 'rbxassetid://360007673'
- bleeding.Volume = 1
- bleeding.Parent = targtorso
- bleeding:Play()
- if 0 >= targhum.Health and obj == targhead then
- kill(obj,true,p.CFrame.lookVector)
- elseif 0 >= targhum.Health then
- kill(obj,false,p.CFrame.lookVector)
- elseif targhum.Health > 0 then
- bleed2(targtorso,targhum,true,5,false)
- end
- else
- table.insert(objhit,1,obj)
- local mat = obj.Material
- local mathit = obj:FindFirstChild('material hit ' .. plr.Name)
- if not mathit and toughness > 0 and 1 > obj.Transparency then
- --print('old: ' .. toughness)
- if (mat == Enum.Material.Glass or mat == Enum.Material.Ice) then
- breakwindow(obj)
- elseif (mat == Enum.Material.Wood or mat == Enum.Material.WoodPlanks) then
- toughness = toughness - 1.5
- elseif (mat == Enum.Material.Metal or mat == Enum.Material.DiamondPlate or mat == Enum.Material.CorrodedMetal) then
- toughness = toughness - 5
- elseif (mat == Enum.Material.Brick or mat == Enum.Material.Concrete or mat == Enum.Material.Cobblestone or mat == Enum.Material.Granite or mat == Enum.Material.Slate or mat == Enum.Material.Pebble) then
- toughness = toughness - 3
- else
- toughness = toughness - 1
- end
- --print('new: ' .. toughness)
- local libruary = {
- ['wizz'] = {342190005, 342190012, 342190017, 342190024},
- ['crackSmall'] = {873119768, 873119788, 873119811, 873119845, 873119886, 873119904},
- ['crackBig'] = {873119597, 873119653, 873119679, 873119703, 873119724, 873119744},
- ['whizz'] = {873121840, 873121858, 873121876, 873121896, 873121913, 873121936},
- ['woodhit'] = {342204157, 342204164, 342204170, 342204175, 871705143, 871705174}, --871705195, 871705217, 871705237, 871705264
- ['stonehit'] = {871701076, 871701134, 871701190, 871701241, 871701297, 871701346},
- ['metalhit'] = {871704182, 871704259, 871704297, 871704329, 871704362, 871704395},
- ['grasshit'] = {871709869, 871709832, 871709789, 871709755, 871709708, 871709643},
- ['impact'] = {525720625},
- }
- local soundfont=({
- Brick="stonehit";
- Cobblestone="stonehit";
- Concrete="stonehit";
- CorrodedMetal="metalhit";
- DiamondPlate="metalhit";
- Fabric=nil;
- Foil="metalhit";
- Granite="stonehit";
- Grass="grasshit";
- Ice="stonehit";
- Marble="stonehit";
- Metal="metalhit";
- Neon=nil;
- Pebble="stonehit";
- Plastic="metalhit";
- Sand=nil;
- Slate="stonehit";
- SmoothPlastic="metalhit";
- Wood="woodhit";
- WoodPlanks="woodhit";
- })[mat.Name]
- local part = make_hole(CFrame.new(objpos, objpos - rot) * CFrame.Angles(math.rad(90), math.rad(0), math.rad(0)) * CFrame.Angles(math.rad(0), math.rad(math.random(-360, 360)), math.rad(0)), obj, obj.BrickColor)
- local BulletHoleSound = Instance.new("Sound")
- BulletHoleSound.Volume = 0.5
- BulletHoleSound.Pitch = math.random(9,11)/10
- if soundfont ~= nil then
- BulletHoleSound.SoundId = "rbxassetid://"..libruary[soundfont][math.random(1,6)]
- else
- BulletHoleSound.SoundId = "rbxassetid://"..libruary['impact'][1]
- end
- BulletHoleSound.Parent = part
- BulletHoleSound:Play()
- local tempmathit = Instance.new("ObjectValue")
- tempmathit.Name = ('material hit ' .. plr.Name)
- tempmathit.Parent = obj
- game:GetService("Debris"):AddItem(tempmathit,shootwait)
- end
- end
- if toughness > 0 and rays > 0 then
- local found = false
- for i,v in pairs(oldobjhit) do if v and obj:IsDescendantOf(v) then found = true; end; end;
- oldobjhit = objhit
- if not plrhit and not found then
- rays = rays - 1
- wait()
- end
- local ig = {char,gun,script,unpack(objhit)}
- local _obj,_vec,_rot = raycast(objpos,(hitpos-objpos).Unit, nil, ig)
- check(toughness,_obj,_vec,p,rays,_rot)
- else
- p:Destroy()
- end
- end
- local function drop_shell()
- local Shell = Instance.new("Part")
- Shell.Color = Color3.new(1, 1, 0)
- Shell.Size = Vector3.new(0.530001819, 0.132500455, 0.132500455)
- Shell.BottomSurface = Enum.SurfaceType.Smooth
- Shell.BrickColor = BrickColor.new("New Yeller")
- Shell.Material = Enum.Material.Metal
- Shell.Shape = Enum.PartType.Cylinder
- Shell.CFrame = han.CFrame
- Shell.Parent = script
- local bvs = Instance.new("BodyVelocity")
- bvs.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
- bvs.Velocity = han.CFrame.lookVector+Vector3.new(0,10,-5)
- bvs.Parent = Shell
- game:GetService("Debris"):AddItem(bvs,0.1)
- game:GetService("Debris"):AddItem(Shell,10)
- end
- local function Shoot()
- if not using and CheckIfAlive() and ammo > 0 then
- using = true
- wait()
- ammo = ammo - 1
- shoot_s.SoundId = 'rbxassetid://' .. shots[math.random(1,#shots)]
- shoot_s:Play()
- tween:Create(gun,TweenInfo.new(0.1),({Grip = CFrame.new(0.364753544, -0.169386029, -0.00732704997, -4.3651621e-08, -0.0522755384, 0.998632669, -2.2850366e-09, 0.99863261, 0.0522755422, -1, 0, -4.37113883e-08)})):Play()
- spawn(function()
- flash.Enabled = true
- light.Enabled = true
- smoke.Enabled = true
- wait()
- flash.Enabled = false
- light.Enabled = false
- smoke.Enabled = false
- end)
- for i = 1,bulletfire do
- drop_shell()
- for i,v in ipairs(objhit) do table.remove(objhit,i); end;
- for i,v in ipairs(objhit) do table.remove(oldobjhit,i); end;
- spawn(function()
- local p = Instance.new("Part")
- p.Name = "bullet"
- p.Massless = true
- p.Anchored = false
- p.CanCollide = false
- p.Color = Color3.fromRGB(255, 255, 0)
- p.Size = Vector3.new(0.5,0.5,1)
- p.Transparency = 0
- p.Position = han.Position
- p.CFrame = CFrame.new(han.Position,hitpos)
- p.Velocity = p.CFrame.lookVector * 1000
- p.Material = Enum.Material.Neon
- p.Parent = script
- local mesh = Instance.new("SpecialMesh")
- mesh.MeshType = Enum.MeshType.Sphere
- mesh.Parent = p
- --tween:Create(p,TweenInfo.new(((hitpos)-han.Position).Magnitude/10000),{Position = p.Position + ((hitpos)-han.Position).Unit*1000}):Play()
- local body_vel = Instance.new("BodyVelocity")
- body_vel.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
- body_vel.Velocity = p.CFrame.lookVector * 1000
- body_vel.Parent = p
- debris:AddItem(p,3)
- local toughness = 5
- local rays = 5
- local ig = {char,gun,script}
- local obj,vec,rot = raycast(han.Position,(hitpos-han.Position).Unit, nil, ig)
- check(toughness,obj,vec,p,rays,rot)
- end)
- end
- spawn(function()
- wait(0.1)
- tween:Create(gun,TweenInfo.new(0.1),({Grip = CFrame.new(0.355400085, -0.188222155, -0.00732704997, -4.37113883e-08, 0, 1, 0, 0.99999994, 0, -1, 0, -4.37113883e-08)})):Play()
- end)
- wait(shootwait)
- using = false
- end
- end
- gun.Activated:Connect(function()
- if not using and CheckIfAlive() and 0 >= ammo then
- Reload()
- end
- end)
- gun.Equipped:Connect(function()
- equipped = true
- pcall(function()
- char = gun.Parent
- plr = game:GetService("Players"):GetPlayerFromCharacter(char)
- hum = char:FindFirstChildOfClass("Humanoid")
- torso = char:FindFirstChild("Torso") or char:FindFirstChild("UpperTorso")
- rootpart = char:FindFirstChild("HumanoidRootPart")
- if not CheckIfAlive() then gun.Parent = nil return end
- end)
- end)
- gun.Unequipped:Connect(function()
- equipped = false
- end)
- local remote = Instance.new("RemoteEvent")
- remote.Name = 'ak47_remote'
- remote.Parent = gun
- remote.OnServerEvent:Connect(function(player,mode,data,data2)
- if equipped then else return end
- if plr == player and mode == 1 then
- if data ~= nil then
- hitpos = data
- end
- if data2 ~= nil then
- shooting = data2
- end
- if shooting then
- Shoot()
- end
- elseif not shooting and not using and CheckIfAlive() and plr == player and mode == 2 and data == 'reload' then
- Reload()
- end
- end)
- local ls = [[
- local plr = game:GetService("Players").LocalPlayer
- local mouse = plr:GetMouse()
- local char = plr.Character
- local remote = script.Parent
- local tool = remote.Parent
- local shooting = false
- tool.Equipped:Connect(function()
- pcall(function()
- char = tool.Parent
- end)
- pcall(function()
- plr = game:GetService("Players"):GetPlayerFromCharacter(char)
- end)
- pcall(function()
- mouse = plr:GetMouse()
- end)
- if mouse then
- mouse.KeyDown:Connect(function(key)
- if key == 'r' then
- remote:FireServer(2,'reload')
- end
- end)
- mouse.Button1Down:Connect(function()
- shooting = true
- while shooting do
- local pos
- pcall(function()
- pos = mouse.Hit.p
- end)
- remote:FireServer(1,pos,true)
- wait(0.05)
- end
- remote:FireServer(1,nil,false)
- end)
- mouse.Button1Up:Connect(function()
- shooting = false
- end)
- end
- end)
- ]]
- NLS(ls,remote)
- end)
- spawn(function()
- local char = plr.Character
- local hum = char:FindFirstChildOfClass("Humanoid")
- local torso = char:FindFirstChild("Torso") or char:FindFirstChild("UpperTorso")
- local rootpart = char:FindFirstChild("HumanoidRootPart")
- local debris = game:GetService("Debris")
- local tween = game:GetService("TweenService")
- local gun = Instance.new("Tool")
- local han = Instance.new("Part")
- local SpecialMesh2 = Instance.new("SpecialMesh")
- gun.Name = "Deagle"
- gun.Parent = plr['Backpack']
- gun.Grip = CFrame.new(0.751871109, -0.285601854, -0.0327377282, 1.19248806e-08, 0, 1, 0, 1, 0, -1, 0, 1.19248806e-08)
- han.Name = "Handle"
- han.Parent = gun
- han.CFrame = CFrame.new(-12.4460001, 1.07099998, -5.64400005, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- han.Position = Vector3.new(-12.4460001, 1.07099998, -5.64400005)
- han.Size = Vector3.new(3.46399999, 2.14199996, 0.529999971)
- han.BottomSurface = Enum.SurfaceType.Smooth
- han.TopSurface = Enum.SurfaceType.Smooth
- SpecialMesh2.Parent = han
- SpecialMesh2.MeshId = "rbxassetid://464797091"
- SpecialMesh2.Scale = Vector3.new(0.200000003, 0.200000003, 0.200000003)
- SpecialMesh2.TextureId = "rbxassetid://464797118"
- SpecialMesh2.MeshType = Enum.MeshType.FileMesh
- local effect_part = Instance.new("Part")
- local smoke = Instance.new("ParticleEmitter")
- local flash = Instance.new("ParticleEmitter")
- local light = Instance.new("PointLight")
- effect_part.Name = "effect"
- effect_part.Parent = gun
- effect_part.CFrame = CFrame.new(-14.3099976, 2.64201403, -6.57999992, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- effect_part.Position = Vector3.new(-14.3099976, 2.64201403, -6.57999992)
- effect_part.Transparency = 1
- effect_part.Size = Vector3.new(0.100000001, 0.100000001, 0.100000001)
- effect_part.BottomSurface = Enum.SurfaceType.Smooth
- effect_part.CanCollide = false
- effect_part.TopSurface = Enum.SurfaceType.Smooth
- smoke.Name = "smoke"
- smoke.Parent = effect_part
- smoke.Speed = NumberRange.new(5, 7)
- smoke.Rotation = NumberRange.new(0, 360)
- smoke.Color = ColorSequence.new(Color3.new(0.27451, 0.27451, 0.27451),Color3.new(0.27451, 0.27451, 0.27451))
- smoke.Enabled = false
- smoke.LightEmission = 0.10000000149012
- smoke.Texture = "http://www.roblox.com/asset/?id=244514423"
- smoke.Transparency = NumberSequence.new(0.60000002384186,1)
- smoke.Size = NumberSequence.new(0.99999964237213,3)
- smoke.Lifetime = NumberRange.new(1.25, 1.5)
- smoke.Rate = 100
- smoke.RotSpeed = NumberRange.new(10, 10)
- smoke.SpreadAngle = Vector2.new(15, 15)
- smoke.VelocitySpread = 15
- flash.Name = "flash"
- flash.Parent = effect_part
- flash.Speed = NumberRange.new(0, 0)
- flash.Rotation = NumberRange.new(0, 90)
- flash.Color = ColorSequence.new(Color3.new(1, 1, 0.498039),Color3.new(1, 1, 0.498039))
- flash.Enabled = false
- flash.LightEmission = 1
- flash.Texture = "http://www.roblox.com/asset/?id=3419963"
- flash.Transparency = NumberSequence.new(0.75,1)
- flash.Size = NumberSequence.new(0.20000000298023,0.20000000298023)
- flash.Lifetime = NumberRange.new(0.050000000745058, 0.075000002980232)
- flash.Rate = 1000
- light.Name = "light"
- light.Parent = effect_part
- light.Color = Color3.new(1, 1, 0.498039)
- light.Enabled = false
- light.Range = 6
- light.Brightness = 10
- light.Shadows = true
- local weld = Instance.new("Weld")
- weld.Part0 = han
- weld.Part1 = effect_part
- weld.C1 = weld.C1 * CFrame.new((han.Size.X/2)-0.45,-0.5,0)
- weld.Parent = effect_part
- local cols = {BrickColor.new("Neon orange"),BrickColor.new("Really red"),BrickColor.new("Bright red"),BrickColor.new("Br. yellowish orange"),BrickColor.new("Bright yellow")}
- local taunts = {298689061,2743459732,2852509470,1018518369}
- local using = false
- local op = false
- local bulletfire = 1
- local shootwait = 0.2*bulletfire
- local max_ammo = 9
- local ammo = max_ammo
- local hitpos = nil
- local shooting = false
- local equipped = false
- local shoot_s = Instance.new("Sound")
- shoot_s.SoundId = 'rbxassetid://2691732518'
- shoot_s.Volume = 4
- shoot_s.Parent = han
- local reload_s = Instance.new("Sound")
- reload_s.SoundId = 'rbxassetid://3449328664'
- reload_s.Volume = 0.7
- reload_s.Parent = han
- local wbreak = Instance.new("Sound")
- wbreak.Parent = han
- wbreak.SoundId = "rbxassetid://627558611"
- wbreak.TimePosition = .1
- wbreak.Volume = 0.7
- local function CheckIfAlive()
- local alive = false
- if plr and char and char.Parent and torso and torso.Parent and hum and hum.Parent and hum.Health > 0 then
- alive = true
- end
- return alive
- end
- local function Ragdoll(targchar,headless,insta)
- local pc = targchar
- pc.Archivable = true
- local pc_torso
- for _,obj in pairs(pc:GetDescendants()) do
- obj.Archivable = true
- if obj:IsA("BasePart") or obj:IsA("UnionOperation") then
- obj.Massless = true
- obj.Locked = true
- obj.CanCollide = true
- end
- 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
- pc_torso = torso
- 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('BallSocketConstraint') or v:IsA('Attachment')]] then
- v:Destroy()
- end
- end
- --pc:BreakJoints()
- local vis = false
- local vis2 = false
- if 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
- end
- if 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
- end
- if 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
- end
- if 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
- end
- if 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
- 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('BallSocketConstraint') or v:IsA('Attachment')]] then
- v:Destroy()
- end
- end
- --pc:BreakJoints()
- local vis = false
- local vis2 = false
- if 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
- end
- if 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
- end
- if 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
- end
- if 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
- end
- if 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
- else
- --head:BreakJoints()
- end
- end
- end)
- end
- elseif head and hum then
- pc_torso = pc:FindFirstChild("HumanoidRootPart")
- 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('BallSocketConstraint') or v:IsA('Attachment')]] then
- v:Destroy()
- end
- end
- --pc:BreakJoints()
- local vis = false
- local vis2 = false
- if not LF:FindFirstChild('Dismembered') then
- local bsc1 = Instance.new("BallSocketConstraint",LF)
- bsc1.Attachment0 = LF.LeftAnkleRigAttachment
- bsc1.Attachment1 = LLL.LeftAnkleRigAttachment
- end
- if not LLL:FindFirstChild('Dismembered') then
- local bsc2 = Instance.new("BallSocketConstraint",LLL)
- bsc2.Attachment0 = LLL.LeftKneeRigAttachment
- bsc2.Attachment1 = LUL.LeftKneeRigAttachment
- end
- if not LUL:FindFirstChild('Dismembered') then
- local bsc3 = Instance.new("BallSocketConstraint",LUL)
- bsc3.Attachment0 = LUL.LeftHipRigAttachment
- bsc3.Attachment1 = LT.LeftHipRigAttachment
- end
- if not RF:FindFirstChild('Dismembered') then
- local bsc4 = Instance.new("BallSocketConstraint",RF)
- bsc4.Attachment0 = RF.RightAnkleRigAttachment
- bsc4.Attachment1 = RLL.RightAnkleRigAttachment
- end
- if not RLL:FindFirstChild('Dismembered') then
- local bsc5 = Instance.new("BallSocketConstraint",RLL)
- bsc5.Attachment0 = RLL.RightKneeRigAttachment
- bsc5.Attachment1 = RUL.RightKneeRigAttachment
- end
- if not RUL:FindFirstChild('Dismembered') then
- local bsc6 = Instance.new("BallSocketConstraint",RUL)
- bsc6.Attachment0 = RUL.RightHipRigAttachment
- bsc6.Attachment1 = LT.RightHipRigAttachment
- end
- if not LH:FindFirstChild('Dismembered') then
- local bsc7 = Instance.new("BallSocketConstraint",LH)
- bsc7.Attachment0 = LH.LeftWristRigAttachment
- bsc7.Attachment1 = LLA.LeftWristRigAttachment
- end
- if not LLA:FindFirstChild('Dismembered') then
- local bsc8 = Instance.new("BallSocketConstraint",LLA)
- bsc8.Attachment0 = LLA.LeftElbowRigAttachment
- bsc8.Attachment1 = LUA.LeftElbowRigAttachment
- end
- if not LUA:FindFirstChild('Dismembered') then
- local bsc9 = Instance.new("BallSocketConstraint",LUA)
- bsc9.Attachment0 = LUA.LeftShoulderAttachment
- bsc9.Attachment1 = UT.LeftCollarAttachment
- end
- if not RH:FindFirstChild('Dismembered') then
- local bsc10 = Instance.new("BallSocketConstraint",RH)
- bsc10.Attachment0 = RH.RightWristRigAttachment
- bsc10.Attachment1 = RLA.RightWristRigAttachment
- end
- if not RLA:FindFirstChild('Dismembered') then
- local bsc11 = Instance.new("BallSocketConstraint",RLA)
- bsc11.Attachment0 = RLA.RightElbowRigAttachment
- bsc11.Attachment1 = RUA.RightElbowRigAttachment
- end
- if not RUA:FindFirstChild('Dismembered') then
- local bsc12 = Instance.new("BallSocketConstraint",RUA)
- bsc12.Attachment0 = RUA.RightShoulderAttachment
- bsc12.Attachment1 = UT.RightCollarAttachment
- end
- if not LT:FindFirstChild('Dismembered') then
- local bsc13 = Instance.new("BallSocketConstraint",LT)
- bsc13.Attachment0 = LT.WaistRigAttachment
- bsc13.Attachment1 = UT.WaistRigAttachment
- end
- if 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
- 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('BallSocketConstraint') or v:IsA('Attachment')]] then
- v:Destroy()
- end
- end
- --pc:BreakJoints()
- local vis = false
- local vis2 = false
- if not LF:FindFirstChild('Dismembered') then
- local bsc1 = Instance.new("BallSocketConstraint",LF)
- bsc1.Attachment0 = LF.LeftAnkleRigAttachment
- bsc1.Attachment1 = LLL.LeftAnkleRigAttachment
- end
- if not LLL:FindFirstChild('Dismembered') then
- local bsc2 = Instance.new("BallSocketConstraint",LLL)
- bsc2.Attachment0 = LLL.LeftKneeRigAttachment
- bsc2.Attachment1 = LUL.LeftKneeRigAttachment
- end
- if not LUL:FindFirstChild('Dismembered') then
- local bsc3 = Instance.new("BallSocketConstraint",LUL)
- bsc3.Attachment0 = LUL.LeftHipRigAttachment
- bsc3.Attachment1 = LT.LeftHipRigAttachment
- end
- if not RF:FindFirstChild('Dismembered') then
- local bsc4 = Instance.new("BallSocketConstraint",RF)
- bsc4.Attachment0 = RF.RightAnkleRigAttachment
- bsc4.Attachment1 = RLL.RightAnkleRigAttachment
- end
- if not RLL:FindFirstChild('Dismembered') then
- local bsc5 = Instance.new("BallSocketConstraint",RLL)
- bsc5.Attachment0 = RLL.RightKneeRigAttachment
- bsc5.Attachment1 = RUL.RightKneeRigAttachment
- end
- if not RUL:FindFirstChild('Dismembered') then
- local bsc6 = Instance.new("BallSocketConstraint",RUL)
- bsc6.Attachment0 = RUL.RightHipRigAttachment
- bsc6.Attachment1 = LT.RightHipRigAttachment
- end
- if not LH:FindFirstChild('Dismembered') then
- local bsc7 = Instance.new("BallSocketConstraint",LH)
- bsc7.Attachment0 = LH.LeftWristRigAttachment
- bsc7.Attachment1 = LLA.LeftWristRigAttachment
- end
- if not LLA:FindFirstChild('Dismembered') then
- local bsc8 = Instance.new("BallSocketConstraint",LLA)
- bsc8.Attachment0 = LLA.LeftElbowRigAttachment
- bsc8.Attachment1 = LUA.LeftElbowRigAttachment
- end
- if not LUA:FindFirstChild('Dismembered') then
- local bsc9 = Instance.new("BallSocketConstraint",LUA)
- bsc9.Attachment0 = LUA.LeftShoulderAttachment
- bsc9.Attachment1 = UT.LeftCollarAttachment
- end
- if not RH:FindFirstChild('Dismembered') then
- local bsc10 = Instance.new("BallSocketConstraint",RH)
- bsc10.Attachment0 = RH.RightWristRigAttachment
- bsc10.Attachment1 = RLA.RightWristRigAttachment
- end
- if not RLA:FindFirstChild('Dismembered') then
- local bsc11 = Instance.new("BallSocketConstraint",RLA)
- bsc11.Attachment0 = RLA.RightElbowRigAttachment
- bsc11.Attachment1 = RUA.RightElbowRigAttachment
- end
- if not RUA:FindFirstChild('Dismembered') then
- local bsc12 = Instance.new("BallSocketConstraint",RUA)
- bsc12.Attachment0 = RUA.RightShoulderAttachment
- bsc12.Attachment1 = UT.RightCollarAttachment
- end
- if not LT:FindFirstChild('Dismembered') then
- local bsc13 = Instance.new("BallSocketConstraint",LT)
- bsc13.Attachment0 = LT.WaistRigAttachment
- bsc13.Attachment1 = UT.WaistRigAttachment
- end
- if 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
- else
- --head:BreakJoints()
- end
- end
- end)
- end
- end
- end
- return pc,pc_torso
- end
- local function bleed2(frick,targhum,can_hurt,t,splat)
- spawn(function()
- if not frick:FindFirstChild("bleeding from kry's " .. gun.Name) then else return end
- local tempbleedval = Instance.new("ObjectValue")
- tempbleedval.Name = "bleeding from kry's " .. gun.Name
- 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
- 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
- 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"
- 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.Parent and tou.Parent:IsA('Tool') == false and tou.Parent.Parent:FindFirstChildOfClass('Humanoid') == nil and tou.Parent:FindFirstChildOfClass('Humanoid') == nil and tou.name ~= "mini_blood" and tou.Name ~= "Blood" and tou.Parent ~= char and tou.Parent.ClassName ~= "Accessory" and tou.Parent.Name ~= 'mini_blood' 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)
- while bloodlol and bloodlol.Parent ~= nil do
- if bloodlol.Transparency < 1 then
- bloodlol.Transparency = bloodlol.Transparency + 0.05
- else
- bloodlol:Destroy()
- end
- wait(0.1)
- end
- end
- end
- end)
- end)
- wait(0.1)
- end
- tempbleedval:Destroy()
- end)
- end
- local function kill(obj,headshot,lookVector)
- local targchar,targhead,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") or targchar:FindFirstChild("HumanoidRootPart")
- end)
- pcall(function()
- targhead = targchar:FindFirstChild("Head")
- end)
- pcall(function()
- targhum = targchar:FindFirstChildOfClass("Humanoid")
- end)
- pcall(function()
- killval = targhum:FindFirstChild("killer")
- end)
- pcall(function()
- decapval = targhum:FindFirstChild("decapped " .. targchar.Name)
- end)
- pcall(function()
- hitval = targhum:FindFirstChild("hit " .. targchar.Name .. " with deagle by " .. plr.Name)
- end)
- if targchar and targhead and targtorso and targhum and targhum ~= hum --[[and not hitval]] and using then
- targhum:TakeDamage(1/0)
- if 0 >= targhum.Health then
- if (not decapval and headshot) or not killval then
- if not killval then
- local tempkillval = Instance.new("ObjectValue",targhum)
- tempkillval.Name = "killer"
- tempkillval.Value = plr
- end
- spawn(function()
- local kb = 10
- local b = Instance.new("BodyVelocity")
- b.Parent = targtorso
- b.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
- b.Velocity = lookVector*kb + Vector3.new(0,2,0)
- game:GetService("Debris"):AddItem(b,0.15)
- end)
- pcall(function()
- Ragdoll(targchar,headshot,true)
- end)
- bleed2(targtorso,targhum,true,5,true)
- end
- if headshot and not decapval then
- local tempdecapval = Instance.new("ObjectValue",targhum)
- tempdecapval.Name = ("decapped " .. targchar.Name)
- local decap_bleed = Instance.new("Sound")
- decap_bleed.SoundId = 'rbxassetid://244502094'
- decap_bleed.Volume = 0.5
- decap_bleed.Parent = targtorso
- decap_bleed:Play()
- local decap_head = Instance.new("Sound")
- decap_head.SoundId = 'rbxassetid://1255040462' --222406108
- decap_head.Volume = 1
- decap_head.Parent = targtorso
- decap_head:Play()
- local att = Instance.new("Attachment")
- att.Parent = targtorso
- att.Position = Vector3.new(0,targtorso.Size.Y/2,0)
- local blood_emitter = Instance.new("ParticleEmitter")
- blood_emitter.Name = "Blood2"
- blood_emitter.Parent = att
- blood_emitter.Speed = NumberRange.new(5, 14)
- blood_emitter.Color = ColorSequence.new(Color3.new(0.45098, 0, 0),Color3.new(0.45098, 0, 0))
- blood_emitter.LightEmission = 0.20000000298023
- blood_emitter.LightInfluence = 1
- blood_emitter.Texture = "http://www.roblox.com/asset/?id=134531274"
- blood_emitter.Transparency = NumberSequence.new(0.30000001192093,0.30000001192093)
- blood_emitter.ZOffset = 1
- blood_emitter.Size = NumberSequence.new(0.12499988079071,0)
- blood_emitter.Acceleration = Vector3.new(0, -20, 0)
- blood_emitter.Lifetime = NumberRange.new(0.5, 1.5)
- blood_emitter.Rate = 100000
- blood_emitter.SpreadAngle = Vector2.new(90, 90)
- blood_emitter.VelocitySpread = 90
- blood_emitter.Enabled = true
- end
- end
- end
- end
- local function Reload()
- if max_ammo > ammo then else return end
- using = true
- reload_s:Play()
- local mag = Instance.new("Part")
- mag.Size = Vector3.new(0.53, 0.94, 0.23)
- mag.Color = han.Color
- mag.Parent = workspace
- mag.CFrame = han.CFrame * CFrame.new(0.7,0,0)
- --debris:AddItem(mag,3)
- wait(1)
- ammo = max_ammo
- game:GetService("Debris"):AddItem(mag,10)
- using = false
- end
- local function breakwindow(hit)
- if hit and hit.Name:lower() ~= "window shatter" and hit.Name:lower() ~= "blood" and hit.Name:lower() ~= "mini_blood" then else return end
- local wbreakc = wbreak:Clone()
- wbreakc.Parent = hit
- wbreakc: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
- 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
- local function raycast(Pos,Dir,Max,Ignore)
- return workspace:FindPartOnRayWithIgnoreList(Ray.new(Pos, Dir * (Max or 999.999)), (Ignore or {}), false, true)
- end
- local objhit = {}
- local oldobjhit = {}
- local function make_hole(pos,obj,col)
- local BulletHolePart = Instance.new("Part")
- BulletHolePart.Massless = true
- BulletHolePart.Anchored = false
- BulletHolePart.CanCollide = false
- BulletHolePart.Locked = true
- BulletHolePart.FormFactor = "Custom"
- BulletHolePart.TopSurface, BulletHolePart.BottomSurface, BulletHolePart.RightSurface, BulletHolePart.LeftSurface, BulletHolePart.FrontSurface, BulletHolePart.BackSurface = "SmoothNoOutlines", "SmoothNoOutlines", "SmoothNoOutlines", "SmoothNoOutlines", "SmoothNoOutlines", "SmoothNoOutlines"
- BulletHolePart.Name = "Bullet Hole"
- BulletHolePart.Material = "Plastic"
- BulletHolePart.Reflectance = 0
- BulletHolePart.Transparency = 1
- BulletHolePart.BrickColor = BrickColor.new("Medium stone grey")
- BulletHolePart.Size = Vector3.new(0.3, 0, 0.3)
- BulletHolePart:BreakJoints()
- BulletHolePart.CFrame = pos
- BulletHolePart.Parent = script
- local weld = Instance.new("WeldConstraint")
- weld.Part0 = obj
- weld.Part1 = BulletHolePart
- weld.Parent = obj
- -- game:GetService("Debris"):AddItem(BulletHolePart, 5)
- local BulletHoleDecal = Instance.new("Decal")
- BulletHoleDecal.Color3 = Color3.new(col.r, col.g, col.b)
- BulletHoleDecal.Face = "Top"
- BulletHoleDecal.Texture = "rbxassetid://359667865"
- BulletHoleDecal.Transparency = 0
- BulletHoleDecal.Parent = BulletHolePart
- return BulletHolePart
- 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
- local function add_decal(f,t,obj)
- spawn(function()
- local texture = Instance.new("Texture")
- texture.Parent = obj
- texture.Face = f
- texture.Texture = 'rbxassetid://' .. t
- 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
- local function add_blood(obj)
- 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)
- add_decal('Bottom',t2,obj)
- add_decal('Left',t3,obj)
- add_decal('Right',t4,obj)
- add_decal('Front',t5,obj)
- add_decal('Back',t6,obj)
- end
- local function make_bone(obj,targtorso)
- if obj.Name == 'Left Arm' or obj.Name == 'LeftUpperArm' then
- local bone = Instance.new("Part")
- 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.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.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.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.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.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.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.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.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.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
- local function break_limb(obj,rig,targtorso,targhum)
- if not obj:FindFirstChild('Dismembered') and obj.Name ~= 'Torso' and obj.Name ~= 'HumanoidRootPart' and obj.Name ~= 'UpperTorso' and obj.Name ~= 'LowerTorso' then else return end
- local confirm = Instance.new("ObjectValue")
- confirm.Name = 'Dismembered'
- confirm.Parent = obj
- local bsc = obj:FindFirstChildOfClass("BallSocketConstraint")
- if bsc then
- bsc:Destroy()
- end
- bleed2(obj,targhum,false,5,false)
- make_bone(obj,targtorso)
- local kb = 10
- local b = Instance.new("BodyVelocity")
- b.Parent = targtorso
- b.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
- b.Velocity = han.CFrame.lookVector*kb + Vector3.new(0,2,0)
- game:GetService("Debris"):AddItem(b,0.1)
- if rig == Enum.HumanoidRigType.R6 then
- local bsc = obj:FindFirstChildOfClass("BallSocketConstraint")
- if bsc then
- bsc:Destroy()
- end
- for i,v in pairs(targtorso:GetChildren()) do
- if v:IsA("Motor6D") then
- if obj.Name == 'Head' and v.Name == 'Neck' then
- v:Destroy()
- elseif obj.Name == 'Left Arm' and v.Name == 'Left Shouldver' then
- v:Destroy()
- elseif obj.Name == 'Right Arm' and v.Name == 'Right Shoulder' then
- v:Destroy()
- elseif obj.Name == 'Left Leg' and v.Name == 'Left Hip' then
- if obj.Parent:FindFirstChild("Right Leg") then
- targhum.WalkSpeed = targhum.WalkSpeed/2
- else
- targhum.WalkSpeed = 0
- end
- v:Destroy()
- elseif obj.Name == 'Right Leg' and v.Name == 'Right Hip' then
- if obj.Parent:FindFirstChild("Left Leg") then
- targhum.WalkSpeed = targhum.WalkSpeed/2
- else
- targhum.WalkSpeed = 0
- end
- v:Destroy()
- end
- end
- end
- elseif rig == Enum.HumanoidRigType.R15 then
- for i,v in pairs(obj:GetChildren()) do
- if v:IsA("Motor6D") then
- if (obj.Name == 'LeftUpperLeg' and obj.Parent:FindFirstChild("RightUpperLeg")) or (obj.Name == 'RightUpperLeg' and obj.Parent:FindFirstChild("LeftUpperLeg")) then
- targhum.WalkSpeed = targhum.WalkSpeed/2
- elseif obj.Name == 'RightUpperLeg' or obj.Name == 'LeftUpperLeg' then
- targhum.WalkSpeed = 0
- end
- v:Destroy()
- end
- end
- end
- local cb = Instance.new("Part")
- cb.Transparency = 1
- cb.CanCollide = true
- cb.Anchored = false
- cb.CFrame = obj.CFrame
- cb.Size = obj.Size
- cb.Massless = true
- cb.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(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
- cb.Parent = script
- end
- local function check(toughness,obj,objpos,p,rays,rot)
- local plrhit = false
- if obj and not obj:FindFirstChild('Dismembered') then else return; end;
- local targchar,targtorso,targhum,targhead
- 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") or targchar:FindFirstChild("HumanoidRootPart")
- end)
- pcall(function()
- targhum = targchar:FindFirstChildOfClass("Humanoid")
- end)
- pcall(function()
- targhead = targchar:FindFirstChild("Head")
- end)
- if targchar and targchar.Parent and targtorso and targtorso.Parent and targhum and targhum.Parent and targhum ~= hum and targhead and targhead.Parent and not targhum:FindFirstChild("hit " .. targchar.Name .. " with " .. gun.Name .. " by " .. plr.Name) then
- plrhit = true
- local confirm = Instance.new("IntValue")
- confirm.Parent = targhum
- confirm.Name = ("hit " .. targchar.Name .. " with " .. gun.Name .. " by " .. plr.Name)
- debris:AddItem(confirm,shootwait)
- local dmg = math.random(60,70)
- if obj == targhead then
- dmg = math.random(100,110)
- targhum:TakeDamage(dmg)
- elseif not op then
- dmg = math.random(60,70)
- targhum:TakeDamage(dmg)
- elseif op then
- targhum.MaxHealth = 0
- targhum.Health = 0
- targhum.Parent:BreakJoints()
- end
- if math.random(1,2) == 1 then
- break_limb(obj,targhum.RigType,targtorso,targhum)
- end
- add_blood(obj)
- local bleeding = Instance.new("Sound")
- bleeding.SoundId = 'rbxassetid://360007673'
- bleeding.Volume = 1
- bleeding.Parent = targtorso
- bleeding:Play()
- if 0 >= targhum.Health and obj == targhead then
- kill(obj,true,p.CFrame.lookVector)
- elseif 0 >= targhum.Health then
- kill(obj,false,p.CFrame.lookVector)
- elseif targhum.Health > 0 then
- bleed2(targtorso,targhum,true,5,false)
- end
- else
- table.insert(objhit,1,obj)
- local mat = obj.Material
- local mathit = obj:FindFirstChild('material hit ' .. plr.Name)
- if not mathit and toughness > 0 and 1 > obj.Transparency then
- --print('old: ' .. toughness)
- if (mat == Enum.Material.Glass or mat == Enum.Material.Ice) then
- breakwindow(obj)
- elseif (mat == Enum.Material.Wood or mat == Enum.Material.WoodPlanks) then
- toughness = toughness - 1.5
- elseif (mat == Enum.Material.Metal or mat == Enum.Material.DiamondPlate or mat == Enum.Material.CorrodedMetal) then
- toughness = toughness - 5
- elseif (mat == Enum.Material.Brick or mat == Enum.Material.Concrete or mat == Enum.Material.Cobblestone or mat == Enum.Material.Granite or mat == Enum.Material.Slate or mat == Enum.Material.Pebble) then
- toughness = toughness - 3
- else
- toughness = toughness - 1
- end
- --print('new: ' .. toughness)
- local libruary = {
- ['wizz'] = {342190005, 342190012, 342190017, 342190024},
- ['crackSmall'] = {873119768, 873119788, 873119811, 873119845, 873119886, 873119904},
- ['crackBig'] = {873119597, 873119653, 873119679, 873119703, 873119724, 873119744},
- ['whizz'] = {873121840, 873121858, 873121876, 873121896, 873121913, 873121936},
- ['woodhit'] = {342204157, 342204164, 342204170, 342204175, 871705143, 871705174}, --871705195, 871705217, 871705237, 871705264
- ['stonehit'] = {871701076, 871701134, 871701190, 871701241, 871701297, 871701346},
- ['metalhit'] = {871704182, 871704259, 871704297, 871704329, 871704362, 871704395},
- ['grasshit'] = {871709869, 871709832, 871709789, 871709755, 871709708, 871709643},
- ['impact'] = {525720625},
- }
- local soundfont=({
- Brick="stonehit";
- Cobblestone="stonehit";
- Concrete="stonehit";
- CorrodedMetal="metalhit";
- DiamondPlate="metalhit";
- Fabric=nil;
- Foil="metalhit";
- Granite="stonehit";
- Grass="grasshit";
- Ice="stonehit";
- Marble="stonehit";
- Metal="metalhit";
- Neon=nil;
- Pebble="stonehit";
- Plastic="metalhit";
- Sand=nil;
- Slate="stonehit";
- SmoothPlastic="metalhit";
- Wood="woodhit";
- WoodPlanks="woodhit";
- })[mat.Name]
- local part = make_hole(CFrame.new(objpos, objpos - rot) * CFrame.Angles(math.rad(90), math.rad(0), math.rad(0)) * CFrame.Angles(math.rad(0), math.rad(math.random(-360, 360)), math.rad(0)), obj, obj.BrickColor)
- local BulletHoleSound = Instance.new("Sound")
- BulletHoleSound.Volume = 0.5
- BulletHoleSound.Pitch = math.random(9,11)/10
- if soundfont ~= nil then
- BulletHoleSound.SoundId = "rbxassetid://"..libruary[soundfont][math.random(1,6)]
- else
- BulletHoleSound.SoundId = "rbxassetid://"..libruary['impact'][1]
- end
- BulletHoleSound.Parent = part
- BulletHoleSound:Play()
- local tempmathit = Instance.new("ObjectValue")
- tempmathit.Name = ('material hit ' .. plr.Name)
- tempmathit.Parent = obj
- game:GetService("Debris"):AddItem(tempmathit,shootwait)
- end
- end
- if toughness > 0 and rays > 0 then
- local found = false
- for i,v in pairs(oldobjhit) do if v and obj:IsDescendantOf(v) then found = true; end; end;
- oldobjhit = objhit
- if not plrhit and not found then
- rays = rays - 1
- wait()
- end
- local ig = {char,gun,script,unpack(objhit)}
- local _obj,_vec,_rot = raycast(objpos,(hitpos-objpos).Unit, nil, ig)
- check(toughness,_obj,_vec,p,rays,_rot)
- else
- p:Destroy()
- end
- end
- local function drop_shell()
- local Shell = Instance.new("Part")
- Shell.Color = Color3.new(1, 1, 0)
- Shell.Size = Vector3.new(0.530001819, 0.132500455, 0.132500455)
- Shell.BottomSurface = Enum.SurfaceType.Smooth
- Shell.BrickColor = BrickColor.new("New Yeller")
- Shell.Material = Enum.Material.Metal
- Shell.Shape = Enum.PartType.Cylinder
- Shell.CFrame = han.CFrame
- Shell.Parent = script
- local bvs = Instance.new("BodyVelocity")
- bvs.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
- bvs.Velocity = han.CFrame.lookVector+Vector3.new(0,10,-5)
- bvs.Parent = Shell
- game:GetService("Debris"):AddItem(bvs,0.1)
- game:GetService("Debris"):AddItem(Shell,10)
- end
- local function Shoot()
- if not using and CheckIfAlive() and ammo > 0 then
- using = true
- wait()
- ammo = ammo - 1
- shoot_s:Play()
- tween:Create(gun,TweenInfo.new(0.1),({Grip = CFrame.new(0.799432933, 0.0882362723, -0.0327377282, 1.06158744e-08, -0.455513358, 0.890228987, 5.43194245e-09, 0.890228987, 0.455513358, -1, 0, 1.19248806e-08)})):Play()
- spawn(function()
- flash.Enabled = true
- light.Enabled = true
- smoke.Enabled = true
- wait()
- flash.Enabled = false
- light.Enabled = false
- smoke.Enabled = false
- end)
- for i = 1,bulletfire do
- drop_shell()
- for i,v in ipairs(objhit) do table.remove(objhit,i); end;
- for i,v in ipairs(objhit) do table.remove(oldobjhit,i); end;
- spawn(function()
- local p = Instance.new("Part")
- p.Name = "bullet"
- p.Massless = true
- p.Anchored = false
- p.CanCollide = false
- p.Color = Color3.fromRGB(255, 255, 0)
- p.Size = Vector3.new(0.5,0.5,1)
- p.Transparency = 0
- p.Position = han.Position
- p.CFrame = CFrame.new(han.Position,hitpos)
- p.Velocity = p.CFrame.lookVector * 1000
- p.Material = Enum.Material.Neon
- p.Parent = script
- local mesh = Instance.new("SpecialMesh")
- mesh.MeshType = Enum.MeshType.Sphere
- mesh.Parent = p
- --tween:Create(p,TweenInfo.new(((hitpos)-han.Position).Magnitude/10000),{Position = p.Position + ((hitpos)-han.Position).Unit*1000}):Play()
- local body_vel = Instance.new("BodyVelocity")
- body_vel.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
- body_vel.Velocity = p.CFrame.lookVector * 1000
- body_vel.Parent = p
- debris:AddItem(p,3)
- local toughness = 5
- local rays = 5
- local ig = {char,gun,script}
- local obj,vec,rot = raycast(han.Position,(hitpos-han.Position).Unit, nil, ig)
- check(toughness,obj,vec,p,rays,rot)
- end)
- end
- spawn(function()
- wait(0.1)
- tween:Create(gun,TweenInfo.new(0.1),({Grip = CFrame.new(0.751871109, -0.285601854, -0.0327377282, 1.19248806e-08, 0, 1, 0, 1, 0, -1, 0, 1.19248806e-08)})):Play()
- end)
- wait(shootwait)
- using = false
- end
- end
- gun.Activated:Connect(function()
- if not using and CheckIfAlive() and 0 >= ammo then
- Reload()
- end
- end)
- gun.Equipped:Connect(function()
- equipped = true
- pcall(function()
- char = gun.Parent
- plr = game:GetService("Players"):GetPlayerFromCharacter(char)
- hum = char:FindFirstChildOfClass("Humanoid")
- torso = char:FindFirstChild("Torso") or char:FindFirstChild("UpperTorso")
- rootpart = char:FindFirstChild("HumanoidRootPart")
- if not CheckIfAlive() then gun.Parent = nil return end
- end)
- end)
- gun.Unequipped:Connect(function()
- equipped = false
- end)
- local remote = Instance.new("RemoteEvent")
- remote.Name = 'deagle_remote'
- remote.Parent = gun
- remote.OnServerEvent:Connect(function(player,mode,data,data2)
- if equipped then else return end
- if plr == player and mode == 1 then
- if data ~= nil then
- hitpos = data
- end
- if data2 ~= nil then
- shooting = data2
- end
- if shooting then
- Shoot()
- end
- elseif not shooting and not using and CheckIfAlive() and plr == player and mode == 2 and data == 'reload' then
- Reload()
- end
- end)
- local ls = [[
- local plr = game:GetService("Players").LocalPlayer
- local mouse = plr:GetMouse()
- local char = plr.Character
- local remote = script.Parent
- local tool = remote.Parent
- tool.Equipped:Connect(function()
- pcall(function()
- char = tool.Parent
- end)
- pcall(function()
- plr = game:GetService("Players"):GetPlayerFromCharacter(char)
- end)
- pcall(function()
- mouse = plr:GetMouse()
- end)
- if mouse then
- mouse.KeyDown:Connect(function(key)
- if key == 'r' then
- remote:FireServer(2,'reload')
- end
- end)
- mouse.Button1Down:Connect(function()
- local pos
- pcall(function()
- pos = mouse.Hit.p
- end)
- remote:FireServer(1,pos,true)
- wait(0.2)
- remote:FireServer(1,nil,false)
- end)
- end
- end)
- ]]
- NLS(ls,remote)
- end)
- end
- local tc = BrickColor.new("Really red")
- local spawns_m = Model66
- local spawns = {}
- for i,v in pairs(spawns_m:GetChildren()) do if v then table.insert(spawns,1,v) end end
- local join = ClickDetector79
- local leave = ClickDetector83
- game:GetService("Players").PlayerAdded:Connect(function(plr)
- plr.Neutral = true
- plr.TeamColor = BrickColor.White()
- if plr then
- plr.CharacterAdded:Connect(function(char)
- if tostring(plr.TeamColor) == tostring(tc) then
- spawn(function()
- wait(0.1)
- local pos = spawns[math.random(1,#spawns)].CFrame + Vector3.new(0,2,0)
- local torso = char:FindFirstChild("Torso") or char:FindFirstChild("HumanoidRootPart")
- torso.CFrame = pos
- give_weapons(plr)
- end)
- end
- end)
- end
- end)
- for i,plr in pairs(game:GetService("Players"):GetPlayers()) do
- plr.Neutral = true
- plr.TeamColor = BrickColor.White()
- if plr then
- plr.CharacterAdded:Connect(function(char)
- if tostring(plr.TeamColor) == tostring(tc) then
- spawn(function()
- wait(0.1)
- local pos = spawns[math.random(1,#spawns)].CFrame + Vector3.new(0,2,0)
- local torso = char:FindFirstChild("Torso") or char:FindFirstChild("HumanoidRootPart")
- torso.CFrame = pos
- give_weapons(plr)
- end)
- end
- end)
- end
- end
- join.MouseClick:Connect(function(plr)
- if tostring(plr.TeamColor) ~= tostring(tc) then
- plr.Neutral = false
- plr.TeamColor = tc
- plr:LoadCharacter()
- end
- end)
- leave.MouseClick:Connect(function(plr)
- plr.Neutral = true
- plr.TeamColor = BrickColor.White()
- plr:LoadCharacter()
- end)
Add Comment
Please, Sign In to add comment