KrYn0MoRe

m1911

Sep 10th, 2020 (edited)
306
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 66.44 KB | None | 0 0
  1. local plr = owner
  2. local char = plr.Character
  3. local hum = char:FindFirstChildOfClass("Humanoid")
  4. local torso = char:FindFirstChild("Torso") or char:FindFirstChild("UpperTorso")
  5. local rootpart = char:FindFirstChild("HumanoidRootPart")
  6.  
  7. local debris = game:GetService("Debris")
  8. local tween = game:GetService("TweenService")
  9.  
  10. local gun = Instance.new("Tool")
  11. local han = Instance.new("Part")
  12. local SpecialMesh2 = Instance.new("SpecialMesh")
  13. gun.Name = "M1911"
  14. gun.Parent = plr['Backpack']
  15. gun.Grip = CFrame.new(-0.633802414, -0.236455202, 0.0327377915, 7.54978942e-08, 0, -1, 0, 1, 0, 1, 0, 7.54978942e-08)
  16. han.Name = "Handle"
  17. han.Parent = gun
  18. han.CFrame = CFrame.new(-12.3359985, 1.12099993, -5.07400703, -1, 0, -8.74227766e-08, 0, 1, 0, 8.74227766e-08, 0, -1)
  19. han.Orientation = Vector3.new(0, -180, 0)
  20. han.Position = Vector3.new(-12.3359985, 1.12099993, -5.07400703)
  21. han.Rotation = Vector3.new(-180, 0, -180)
  22. han.Size = Vector3.new(1.91400003, 1.296, 0.259000003)
  23. han.BottomSurface = Enum.SurfaceType.Smooth
  24. han.TopSurface = Enum.SurfaceType.Smooth
  25. SpecialMesh2.Parent = han
  26. SpecialMesh2.MeshId = "rbxassetid://623102664"
  27. SpecialMesh2.Scale = Vector3.new(0.00999999978, 0.00999999978, 0.00999999978)
  28. SpecialMesh2.TextureId = "rbxassetid://623102879"
  29. SpecialMesh2.MeshType = Enum.MeshType.FileMesh
  30.  
  31. local effect_part = Instance.new("Part")
  32. local smoke = Instance.new("ParticleEmitter")
  33. local flash = Instance.new("ParticleEmitter")
  34. local light = Instance.new("PointLight")
  35. effect_part.Name = "effect"
  36. effect_part.Parent = gun
  37. effect_part.CFrame = CFrame.new(-14.3099976, 2.64201403, -6.57999992, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  38. effect_part.Position = Vector3.new(-14.3099976, 2.64201403, -6.57999992)
  39. effect_part.Transparency = 1
  40. effect_part.Size = Vector3.new(0.100000001, 0.100000001, 0.100000001)
  41. effect_part.BottomSurface = Enum.SurfaceType.Smooth
  42. effect_part.CanCollide = false
  43. effect_part.TopSurface = Enum.SurfaceType.Smooth
  44. smoke.Name = "smoke"
  45. smoke.Parent = effect_part
  46. smoke.Speed = NumberRange.new(5, 7)
  47. smoke.Rotation = NumberRange.new(0, 360)
  48. smoke.Color = ColorSequence.new(Color3.new(0.27451, 0.27451, 0.27451),Color3.new(0.27451, 0.27451, 0.27451))
  49. smoke.Enabled = false
  50. smoke.LightEmission = 0.10000000149012
  51. smoke.Texture = "http://www.roblox.com/asset/?id=244514423"
  52. smoke.Transparency = NumberSequence.new(0.60000002384186,1)
  53. smoke.Size = NumberSequence.new(0.99999964237213,3)
  54. smoke.Lifetime = NumberRange.new(1.25, 1.5)
  55. smoke.Rate = 100
  56. smoke.RotSpeed = NumberRange.new(10, 10)
  57. smoke.SpreadAngle = Vector2.new(15, 15)
  58. smoke.VelocitySpread = 15
  59. flash.Name = "flash"
  60. flash.Parent = effect_part
  61. flash.Speed = NumberRange.new(0, 0)
  62. flash.Rotation = NumberRange.new(0, 90)
  63. flash.Color = ColorSequence.new(Color3.new(1, 1, 0.498039),Color3.new(1, 1, 0.498039))
  64. flash.Enabled = false
  65. flash.LightEmission = 1
  66. flash.Texture = "http://www.roblox.com/asset/?id=3419963"
  67. flash.Transparency = NumberSequence.new(0.75,1)
  68. flash.Size = NumberSequence.new(0.20000000298023,0.20000000298023)
  69. flash.Lifetime = NumberRange.new(0.050000000745058, 0.075000002980232)
  70. flash.Rate = 1000
  71. light.Name = "light"
  72. light.Parent = effect_part
  73. light.Color = Color3.new(1, 1, 0.498039)
  74. light.Enabled = false
  75. light.Range = 6
  76. light.Brightness = 10
  77. light.Shadows = true
  78.  
  79. local weld = Instance.new("Weld")
  80. weld.Part0 = han
  81. weld.Part1 = effect_part
  82. weld.C1 = weld.C1 * CFrame.new(-(han.Size.X/2),-0.5,0)
  83. weld.Parent = effect_part
  84.  
  85. local cols = {BrickColor.new("Neon orange"),BrickColor.new("Really red"),BrickColor.new("Bright red"),BrickColor.new("Br. yellowish orange"),BrickColor.new("Bright yellow")}
  86. local taunts = {298689061,2743459732,2852509470,1018518369}
  87. local using = false
  88. local op = false
  89. local bulletfire = 1
  90. local shootwait = 0.15*bulletfire
  91. local max_ammo = 8
  92. local ammo = max_ammo
  93. local hitpos = nil
  94. local shooting = false
  95. local equipped = false
  96.  
  97. local shoot_s = Instance.new("Sound")
  98. shoot_s.Name = 'shoot'
  99. shoot_s.SoundId = 'rbxassetid://744979172'
  100. shoot_s.Volume = 4
  101. shoot_s.Parent = han
  102.  
  103. local reload_s = Instance.new("Sound")
  104. reload_s.SoundId = 'rbxassetid://205151554'
  105. reload_s.Volume = 0.7
  106. reload_s.Parent = han
  107.  
  108. local wbreak = Instance.new("Sound")
  109. wbreak.Parent = han
  110. wbreak.SoundId = "rbxassetid://627558611"
  111. wbreak.TimePosition = .1
  112. wbreak.Volume = 0.7
  113.  
  114. function CheckIfAlive()
  115.     local alive = false
  116.     if plr and char and char.Parent and torso and torso.Parent and hum and hum.Parent and hum.Health > 0 then
  117.         alive = true
  118.     end
  119.     return alive
  120. end
  121. function limb_collide(obj,mode)
  122.     if (obj:IsA("UnionOperation") or obj:IsA("BasePart")) and not obj:FindFirstChild('limb') then else return end
  123.     local exists = pcall(game:GetService("PhysicsService").GetCollisionGroupId, game:GetService("PhysicsService"), 'Limb Collide')
  124.     if not exists then
  125.         game:GetService("PhysicsService"):CreateCollisionGroup('Limb Collide')
  126.     end
  127.     game:GetService("PhysicsService"):CollisionGroupSetCollidable('Limb Collide','Limb Collide',false)
  128.     --
  129.     local t = {}
  130.     --
  131.     local cb = Instance.new("Part")
  132.     cb.Name = 'limb'
  133.     cb.Transparency = 1
  134.     cb.CanCollide = true
  135.     cb.Anchored = false
  136.     cb.CFrame = obj.CFrame
  137.     cb.Size = obj.Size
  138.     cb.Massless = true
  139.     cb.Locked = true
  140.     game:GetService("PhysicsService"):SetPartCollisionGroup(cb,'Limb Collide')
  141.     game:GetService("PhysicsService"):SetPartCollisionGroup(obj,'Limb Collide')
  142.     local weld = Instance.new("Weld")
  143.     weld.Part0 = cb
  144.     weld.Part1 = obj
  145.     weld.Parent = cb
  146.     obj.Massless = true
  147.     obj.Anchored = false
  148.     if mode or obj:FindFirstChild("Dismembered") then
  149.         cb.Parent = obj -- .Parent
  150.     else
  151.         cb.Parent = script
  152.         table.insert(t,1,cb)
  153.     end
  154.     --
  155.     if not string.match(obj.Name:lower(),'torso') and not string.match(obj.Name:lower(),'rootpart') and not string.match(obj.Name:lower(),'head') then
  156.         local lv = Vector3.new() -- Vector3.new(cb.Size.X,0,cb.Size.Z)
  157.         local cb2 = Instance.new("Part")
  158.         cb2.Name = 'limb'
  159.         cb2.Transparency = 1
  160.         cb2.CanCollide = true
  161.         cb2.Anchored = false
  162.         cb2.CFrame = obj.CFrame
  163.         cb2.Size = lv
  164.         cb2.Massless = true
  165.         cb2.Locked = true
  166.         local weld2 = Instance.new("Weld")
  167.         weld2.Part0 = cb
  168.         weld2.Part1 = cb2
  169.         weld2.C1 = CFrame.new(0,(cb.Size.Y/2),0)
  170.         weld2.Parent = cb2
  171.         if mode or obj:FindFirstChild("Dismembered") then
  172.             cb2.Parent = obj -- .Parent
  173.         else
  174.             cb2.Parent = script
  175.             table.insert(t,1,cb2)
  176.         end
  177.     end
  178.     --
  179.     return t
  180. end
  181. function Ragdoll(targchar,headless,insta,kill)
  182.     local pc = targchar
  183.     local targhum = pc:FindFirstChild("Humanoid")
  184.     local js,js2 = {},{}
  185.     for _,obj in pairs(pc:GetDescendants()) do
  186.         if obj:IsA("BasePart") or obj:IsA("UnionOperation") then
  187.             obj.Massless = true
  188.             obj.Locked = true
  189.         end
  190.     end
  191.     if kill == true then
  192.         pc.Archivable = true
  193.         local old_pc = pc
  194.         pc = pc:Clone()
  195.         for i,v in pairs(pc:GetDescendants()) do
  196.             limb_collide(v,true)
  197.             if v:IsA("ParticleEmitter") then
  198.                 v.Enabled = false
  199.             end
  200.             if v:IsA("SelectionBox") or v:IsA("BodyVelocity") or v:IsA("BodyPosition") or v:IsA("BodyAngularVelocity") or v:IsA("BodyForce") or v:IsA("BodyGyro") or v:IsA("BodyThrust") or v:IsA("BodyMover") then
  201.                 if v:IsA("BodyVelocity") then
  202.                     game:GetService("Debris"):AddItem(v,0.15)
  203.                 else
  204.                     v:Destroy()
  205.                 end
  206.             end
  207.             if (v:IsA("Script") and v.Name == 'Health') or (v:IsA("LocalScript") and v.Name == 'Animate') then
  208.                 v:Destroy()
  209.             end
  210.             if v:IsA("Humanoid") then
  211.                 v.BreakJointsOnDeath = false
  212.                 v.Health = 0
  213.                 v.HealthDisplayType = Enum.HumanoidHealthDisplayType.AlwaysOff
  214.                 v.PlatformStand = true
  215.             end
  216.         end
  217.         for i,v in pairs(old_pc:GetDescendants()) do
  218.             if v:IsA("BasePart") or v:IsA("UnionOperation") or v:IsA("ForceField") or v:IsA("Accessory") or v:IsA("Decal") or v:IsA("Texture") or v:IsA("SurfaceGui") then
  219.                 v:destroy()
  220.             end
  221.             if v:IsA("Humanoid") then
  222.                 v.BreakJointsOnDeath = true
  223.                 v.Health = 0
  224.                 v.HealthDisplayType = Enum.HumanoidHealthDisplayType.AlwaysOff
  225.                 v.PlatformStand = true
  226.             end
  227.         end
  228.         pc.Parent = workspace
  229.         game:GetService("Debris"):AddItem(pc,30)
  230.     end
  231.     --if kill and targhum:FindFirstChild("Ragdolled") then return; end;
  232.     if pc ~= nil then
  233.         local hum = pc:FindFirstChild'Humanoid'
  234.         local LArm = pc:FindFirstChild'Left Arm'
  235.         local RArm = pc:FindFirstChild'Right Arm'
  236.         local LLeg = pc:FindFirstChild'Left Leg'
  237.         local RLeg = pc:FindFirstChild'Right Leg'
  238.         local torso = pc:FindFirstChild'Torso'
  239.         local head = pc:FindFirstChild'Head'
  240.        
  241.        
  242.         local LUA = pc:FindFirstChild'LeftUpperArm'
  243.         local LLA = pc:FindFirstChild'LeftLowerArm'
  244.         local LH = pc:FindFirstChild'LeftHand'
  245.        
  246.         local RUA = pc:FindFirstChild'RightUpperArm'
  247.         local RLA = pc:FindFirstChild'RightLowerArm'
  248.         local RH = pc:FindFirstChild'RightHand'
  249.        
  250.         local LUL = pc:FindFirstChild'LeftUpperLeg'
  251.         local LLL = pc:FindFirstChild'LeftLowerLeg'
  252.         local LF = pc:FindFirstChild'LeftFoot'
  253.        
  254.         local RUL = pc:FindFirstChild'RightUpperLeg'
  255.         local RLL = pc:FindFirstChild'RightLowerLeg'
  256.         local RF = pc:FindFirstChild'RightFoot'
  257.        
  258.         local UT = pc:FindFirstChild'UpperTorso'
  259.         local LT = pc:FindFirstChild'LowerTorso'
  260.        
  261.         if hum and LArm and RArm and LLeg and RLeg and head then
  262.             hum.BreakJointsOnDeath = false
  263.             if insta then
  264.                 if hum.RigType==Enum.HumanoidRigType.R6 then
  265.                     for _,v in pairs(torso:GetDescendants()) do
  266.                         if (v:IsA('Motor6D') or v:IsA('Motor') or v:IsA('Weld') or v:IsA("BallSocketConstraint")) and (not string.match(v.Name:lower(),'root')) then
  267.                             if not kill then
  268.                                 table.insert(js2,1,{obj = v,par = v.Parent})
  269.                                 v.Parent = nil
  270.                             elseif kill then
  271.                                 v:Destroy()
  272.                             end
  273.                         end
  274.                     end
  275.                     local vis = false
  276.                     local vis2 = false
  277.                     if LArm and not LArm:FindFirstChild('Dismembered') then
  278.                         local at1 = Instance.new("Attachment")
  279.                         at1.Parent = torso
  280.                         at1.Visible = vis
  281.                         at1.Orientation = torso.Orientation + Vector3.new(0,180,0)
  282.                         at1.Position = Vector3.new(-1,1,0)
  283.                        
  284.                         local at1p2 = Instance.new("Attachment")
  285.                         at1p2.Parent = LArm
  286.                         at1p2.Visible = vis
  287.                         at1p2.Orientation = LArm.Orientation + Vector3.new(0,180,0)
  288.                         at1p2.Position = Vector3.new(.5,1,0)
  289.                        
  290.                         local bis = Instance.new("BallSocketConstraint")
  291.                         bis.Parent = LArm
  292.                         bis.Attachment0 = at1
  293.                         bis.Attachment1 = at1p2
  294.                         bis.LimitsEnabled = true
  295.                         bis.UpperAngle = 15
  296.                         bis.Visible = vis2
  297.                         bis.TwistLimitsEnabled = true
  298.                         bis.UpperAngle = -45
  299.                         bis.TwistLowerAngle = -45
  300.                         table.insert(js,1,bis)
  301.                     end
  302.                     if RArm and not RArm:FindFirstChild('Dismembered') then    
  303.                         local at2 = Instance.new("Attachment")
  304.                         at2.Parent = torso
  305.                         at2.Visible = vis
  306.                         at2.Orientation = torso.Orientation + Vector3.new(0,0,0)
  307.                         at2.Position = Vector3.new(1,1,0)
  308.                        
  309.                         local at2p2 = Instance.new("Attachment")
  310.                         at2p2.Parent = RArm
  311.                         at2p2.Visible = vis
  312.                         at2p2.Orientation = RArm.Orientation + Vector3.new(0,0,0)
  313.                         at2p2.Position = Vector3.new(-.5,1,0)
  314.                        
  315.                         local bis2 = Instance.new("BallSocketConstraint")
  316.                         bis2.Parent = RArm
  317.                         bis2.Attachment0 = at2
  318.                         bis2.Attachment1 = at2p2
  319.                         bis2.LimitsEnabled = true
  320.                         bis2.UpperAngle = 15
  321.                         bis2.Visible = vis2
  322.                         bis2.TwistLimitsEnabled = true
  323.                         bis2.UpperAngle = -45
  324.                         bis2.TwistLowerAngle = -45
  325.                         table.insert(js,1,bis2)
  326.                     end
  327.                     if RLeg and not RLeg:FindFirstChild('Dismembered') then
  328.                         local at3 = Instance.new("Attachment")
  329.                         at3.Parent = torso
  330.                         at3.Visible = vis
  331.                         at3.Orientation = torso.Orientation + Vector3.new(90,0,-90)
  332.                         at3.Position = Vector3.new(.5,-1,0)
  333.                        
  334.                         local at3p2 = Instance.new("Attachment")
  335.                         at3p2.Parent = RLeg
  336.                         at3p2.Visible = vis
  337.                         at3p2.Orientation = RLeg.Orientation + Vector3.new(90,0,-90)
  338.                         at3p2.Position = Vector3.new(0,1,0)
  339.                        
  340.                         local bis3 = Instance.new("BallSocketConstraint")
  341.                         bis3.Parent = RLeg
  342.                         bis3.Attachment0 = at3
  343.                         bis3.Attachment1 = at3p2
  344.                         bis3.LimitsEnabled = true
  345.                         bis3.UpperAngle = 180-15
  346.                         bis3.Visible = vis2
  347.                         table.insert(js,1,bis3)
  348.                     end
  349.                    
  350.                     if LLeg and not LLeg:FindFirstChild('Dismembered') then  
  351.                         local at4 = Instance.new("Attachment")
  352.                         at4.Parent = torso
  353.                         at4.Visible = vis
  354.                         at4.Orientation = torso.Orientation + Vector3.new(90,0,-90)
  355.                         at4.Position = Vector3.new(-.5,-1,0)
  356.                        
  357.                         local at4p2 = Instance.new("Attachment")
  358.                         at4p2.Parent = LLeg
  359.                         at4p2.Visible = vis
  360.                         at4p2.Orientation = LLeg.Orientation + Vector3.new(90,0,-90)
  361.                         at4p2.Position = Vector3.new(0,1,0)
  362.                        
  363.                         local bis4 = Instance.new("BallSocketConstraint")
  364.                         bis4.Parent = LLeg
  365.                         bis4.Attachment0 = at4
  366.                         bis4.Attachment1 = at4p2
  367.                         bis4.LimitsEnabled = true
  368.                         bis4.UpperAngle = 180-15
  369.                         bis4.Visible = vis2
  370.                         table.insert(js,1,bis4)
  371.                     end
  372.                    
  373.                     if head and not headless and not head:FindFirstChild('Dismembered') then  
  374.                         local at5 = Instance.new("Attachment")
  375.                         at5.Parent = torso
  376.                         at5.Visible = vis
  377.                         at5.Orientation = torso.Orientation + Vector3.new(180,90,0)
  378.                         at5.Position = Vector3.new(0,1,0)
  379.                        
  380.                         local at5p2 = Instance.new("Attachment")
  381.                         at5p2.Parent = head
  382.                         at5p2.Visible = vis
  383.                         at5p2.Orientation = head.Orientation + Vector3.new(180,90,0)
  384.                         at5p2.Position = Vector3.new(0,-.5,0)
  385.                        
  386.                         local bis5 = Instance.new("BallSocketConstraint")
  387.                         bis5.Parent = head
  388.                         bis5.Attachment0 = at5p2
  389.                         bis5.Attachment1 = at5
  390.                         bis5.LimitsEnabled = true
  391.                         bis5.UpperAngle = 75
  392.                         bis5.Visible = vis2
  393.                         bis5.TwistLimitsEnabled = true
  394.                         bis5.UpperAngle = -45
  395.                         bis5.TwistLowerAngle = -45
  396.                         table.insert(js,1,bis5)
  397.                     else
  398.                         --head:BreakJoints()
  399.                     end
  400.                 end
  401.             else
  402.                 hum.Died:Connect(function()
  403.                     if hum.RigType==Enum.HumanoidRigType.R6 then
  404.                         for _,v in pairs(torso:GetDescendants()) do
  405.                             if (v:IsA('Motor6D') or v:IsA('Motor') or v:IsA('Weld') or v:IsA("BallSocketConstraint")) and (not string.match(v.Name:lower(),'root')) then
  406.                                 if not kill then
  407.                                     table.insert(js2,1,{obj = v,par = v.Parent})
  408.                                     v.Parent = nil
  409.                                 elseif kill then
  410.                                     v:Destroy()
  411.                                 end
  412.                             end
  413.                         end
  414.                         local vis = false
  415.                         local vis2 = false
  416.                         if LArm and not LArm:FindFirstChild('Dismembered') then
  417.                             local at1 = Instance.new("Attachment")
  418.                             at1.Parent = torso
  419.                             at1.Visible = vis
  420.                             at1.Orientation = torso.Orientation + Vector3.new(0,180,0)
  421.                             at1.Position = Vector3.new(-1,1,0)
  422.                            
  423.                             local at1p2 = Instance.new("Attachment")
  424.                             at1p2.Parent = LArm
  425.                             at1p2.Visible = vis
  426.                             at1p2.Orientation = LArm.Orientation + Vector3.new(0,180,0)
  427.                             at1p2.Position = Vector3.new(.5,1,0)
  428.                            
  429.                             local bis = Instance.new("BallSocketConstraint")
  430.                             bis.Parent = LArm
  431.                             bis.Attachment0 = at1
  432.                             bis.Attachment1 = at1p2
  433.                             bis.LimitsEnabled = true
  434.                             bis.UpperAngle = 15
  435.                             bis.Visible = vis2
  436.                             bis.TwistLimitsEnabled = true
  437.                             bis.UpperAngle = -45
  438.                             bis.TwistLowerAngle = -45
  439.                             table.insert(js,1,bis)
  440.                         end
  441.                         if RArm and not RArm:FindFirstChild('Dismembered') then    
  442.                             local at2 = Instance.new("Attachment")
  443.                             at2.Parent = torso
  444.                             at2.Visible = vis
  445.                             at2.Orientation = torso.Orientation + Vector3.new(0,0,0)
  446.                             at2.Position = Vector3.new(1,1,0)
  447.                            
  448.                             local at2p2 = Instance.new("Attachment")
  449.                             at2p2.Parent = RArm
  450.                             at2p2.Visible = vis
  451.                             at2p2.Orientation = RArm.Orientation + Vector3.new(0,0,0)
  452.                             at2p2.Position = Vector3.new(-.5,1,0)
  453.                            
  454.                             local bis2 = Instance.new("BallSocketConstraint")
  455.                             bis2.Parent = RArm
  456.                             bis2.Attachment0 = at2
  457.                             bis2.Attachment1 = at2p2
  458.                             bis2.LimitsEnabled = true
  459.                             bis2.UpperAngle = 15
  460.                             bis2.Visible = vis2
  461.                             bis2.TwistLimitsEnabled = true
  462.                             bis2.UpperAngle = -45
  463.                             bis2.TwistLowerAngle = -45
  464.                             table.insert(js,1,bis2)
  465.                         end
  466.                         if RLeg and not RLeg:FindFirstChild('Dismembered') then
  467.                             local at3 = Instance.new("Attachment")
  468.                             at3.Parent = torso
  469.                             at3.Visible = vis
  470.                             at3.Orientation = torso.Orientation + Vector3.new(90,0,-90)
  471.                             at3.Position = Vector3.new(.5,-1,0)
  472.                            
  473.                             local at3p2 = Instance.new("Attachment")
  474.                             at3p2.Parent = RLeg
  475.                             at3p2.Visible = vis
  476.                             at3p2.Orientation = RLeg.Orientation + Vector3.new(90,0,-90)
  477.                             at3p2.Position = Vector3.new(0,1,0)
  478.                            
  479.                             local bis3 = Instance.new("BallSocketConstraint")
  480.                             bis3.Parent = RLeg
  481.                             bis3.Attachment0 = at3
  482.                             bis3.Attachment1 = at3p2
  483.                             bis3.LimitsEnabled = true
  484.                             bis3.UpperAngle = 180-15
  485.                             bis3.Visible = vis2
  486.                             table.insert(js,1,bis3)
  487.                         end
  488.                        
  489.                         if LLeg and not LLeg:FindFirstChild('Dismembered') then  
  490.                             local at4 = Instance.new("Attachment")
  491.                             at4.Parent = torso
  492.                             at4.Visible = vis
  493.                             at4.Orientation = torso.Orientation + Vector3.new(90,0,-90)
  494.                             at4.Position = Vector3.new(-.5,-1,0)
  495.                            
  496.                             local at4p2 = Instance.new("Attachment")
  497.                             at4p2.Parent = LLeg
  498.                             at4p2.Visible = vis
  499.                             at4p2.Orientation = LLeg.Orientation + Vector3.new(90,0,-90)
  500.                             at4p2.Position = Vector3.new(0,1,0)
  501.                            
  502.                             local bis4 = Instance.new("BallSocketConstraint")
  503.                             bis4.Parent = LLeg
  504.                             bis4.Attachment0 = at4
  505.                             bis4.Attachment1 = at4p2
  506.                             bis4.LimitsEnabled = true
  507.                             bis4.UpperAngle = 180-15
  508.                             bis4.Visible = vis2
  509.                             table.insert(js,1,bis4)
  510.                         end
  511.                        
  512.                         if head and not headless and not head:FindFirstChild('Dismembered') then  
  513.                             local at5 = Instance.new("Attachment")
  514.                             at5.Parent = torso
  515.                             at5.Visible = vis
  516.                             at5.Orientation = torso.Orientation + Vector3.new(180,90,0)
  517.                             at5.Position = Vector3.new(0,1,0)
  518.                            
  519.                             local at5p2 = Instance.new("Attachment")
  520.                             at5p2.Parent = head
  521.                             at5p2.Visible = vis
  522.                             at5p2.Orientation = head.Orientation + Vector3.new(180,90,0)
  523.                             at5p2.Position = Vector3.new(0,-.5,0)
  524.                            
  525.                             local bis5 = Instance.new("BallSocketConstraint")
  526.                             bis5.Parent = head
  527.                             bis5.Attachment0 = at5p2
  528.                             bis5.Attachment1 = at5
  529.                             bis5.LimitsEnabled = true
  530.                             bis5.UpperAngle = 75
  531.                             bis5.Visible = vis2
  532.                             bis5.TwistLimitsEnabled = true
  533.                             bis5.UpperAngle = -45
  534.                             bis5.TwistLowerAngle = -45
  535.                             table.insert(js,1,bis5)
  536.                         else
  537.                             --head:BreakJoints()
  538.                         end
  539.                     end
  540.                 end)
  541.             end
  542.         elseif head and hum then
  543.             hum.BreakJointsOnDeath = false
  544.             if insta then
  545.                 if hum.RigType==Enum.HumanoidRigType.R15 then
  546.                     for _,v in pairs(pc:GetDescendants()) do
  547.                         if (v:IsA('Motor6D') or v:IsA('Motor') or v:IsA("BallSocketConstraint")) and (not string.match(v.Name:lower(),'root')) then
  548.                             if not kill then
  549.                                 table.insert(js2,1,{obj = v,par = v.Parent})
  550.                                 v.Parent = nil
  551.                             elseif kill then
  552.                                 v:Destroy()
  553.                             end
  554.                         end
  555.                     end
  556.                     local vis = false
  557.                     local vis2 = false
  558.                    
  559.                     if LF and not LF:FindFirstChild('Dismembered') then  
  560.                         local bsc1 = Instance.new("BallSocketConstraint",LF)
  561.                         bsc1.Attachment0 = LF.LeftAnkleRigAttachment
  562.                         bsc1.Attachment1 = LLL.LeftAnkleRigAttachment
  563.                         table.insert(js,1,bsc1)
  564.                     end
  565.                     if LLL and not LLL:FindFirstChild('Dismembered') then  
  566.                         local bsc2 = Instance.new("BallSocketConstraint",LLL)
  567.                         bsc2.Attachment0 = LLL.LeftKneeRigAttachment
  568.                         bsc2.Attachment1 = LUL.LeftKneeRigAttachment
  569.                         table.insert(js,1,bsc2)
  570.                     end
  571.                     if LUL and not LUL:FindFirstChild('Dismembered') then  
  572.                         local bsc3 = Instance.new("BallSocketConstraint",LUL)
  573.                         bsc3.Attachment0 = LUL.LeftHipRigAttachment
  574.                         bsc3.Attachment1 = LT.LeftHipRigAttachment
  575.                         table.insert(js,1,bsc3)
  576.                     end
  577.                     if RF and not RF:FindFirstChild('Dismembered') then  
  578.                         local bsc4 = Instance.new("BallSocketConstraint",RF)
  579.                         bsc4.Attachment0 = RF.RightAnkleRigAttachment
  580.                         bsc4.Attachment1 = RLL.RightAnkleRigAttachment
  581.                         table.insert(js,1,bsc4)
  582.                     end
  583.                     if RLL and not RLL:FindFirstChild('Dismembered') then  
  584.                         local bsc5 = Instance.new("BallSocketConstraint",RLL)
  585.                         bsc5.Attachment0 = RLL.RightKneeRigAttachment
  586.                         bsc5.Attachment1 = RUL.RightKneeRigAttachment
  587.                         table.insert(js,1,bsc5)
  588.                     end
  589.                     if RUL and not RUL:FindFirstChild('Dismembered') then  
  590.                         local bsc6 = Instance.new("BallSocketConstraint",RUL)
  591.                         bsc6.Attachment0 = RUL.RightHipRigAttachment
  592.                         bsc6.Attachment1 = LT.RightHipRigAttachment
  593.                         table.insert(js,1,bsc6)
  594.                     end
  595.                     if LH and not LH:FindFirstChild('Dismembered') then  
  596.                         local bsc7 = Instance.new("BallSocketConstraint",LH)
  597.                         bsc7.Attachment0 = LH.LeftWristRigAttachment
  598.                         bsc7.Attachment1 = LLA.LeftWristRigAttachment
  599.                         table.insert(js,1,bsc7)
  600.                     end
  601.                     if LLA and not LLA:FindFirstChild('Dismembered') then  
  602.                         local bsc8 = Instance.new("BallSocketConstraint",LLA)
  603.                         bsc8.Attachment0 = LLA.LeftElbowRigAttachment
  604.                         bsc8.Attachment1 = LUA.LeftElbowRigAttachment
  605.                         table.insert(js,1,bsc8)
  606.                     end
  607.                     if LUA and not LUA:FindFirstChild('Dismembered') then  
  608.                         local bsc9 = Instance.new("BallSocketConstraint",LUA)
  609.                         bsc9.Attachment0 = LUA.LeftShoulderAttachment
  610.                         bsc9.Attachment1 = UT.LeftCollarAttachment
  611.                         table.insert(js,1,bsc9)
  612.                     end
  613.                     if RH and not RH:FindFirstChild('Dismembered') then  
  614.                         local bsc10 = Instance.new("BallSocketConstraint",RH)
  615.                         bsc10.Attachment0 = RH.RightWristRigAttachment
  616.                         bsc10.Attachment1 = RLA.RightWristRigAttachment
  617.                         table.insert(js,1,bsc10)
  618.                     end
  619.                     if RLA and not RLA:FindFirstChild('Dismembered') then  
  620.                         local bsc11 = Instance.new("BallSocketConstraint",RLA)
  621.                         bsc11.Attachment0 = RLA.RightElbowRigAttachment
  622.                         bsc11.Attachment1 = RUA.RightElbowRigAttachment
  623.                         table.insert(js,1,bsc11)
  624.                     end
  625.                     if RUA and not RUA:FindFirstChild('Dismembered') then  
  626.                         local bsc12 = Instance.new("BallSocketConstraint",RUA)
  627.                         bsc12.Attachment0 = RUA.RightShoulderAttachment
  628.                         bsc12.Attachment1 = UT.RightCollarAttachment
  629.                         table.insert(js,1,bsc12)
  630.                     end
  631.                     if LT and not LT:FindFirstChild('Dismembered') then  
  632.                         local bsc13 = Instance.new("BallSocketConstraint",LT)
  633.                         bsc13.Attachment0 = LT.WaistRigAttachment
  634.                         bsc13.Attachment1 = UT.WaistRigAttachment
  635.                         table.insert(js,1,bsc13)
  636.                     end
  637.                     if head and not headless and not head:FindFirstChild('Dismembered')  then
  638.                         local bsc14 = Instance.new("BallSocketConstraint",head)
  639.                         bsc14.Attachment0 = UT.NeckRigAttachment
  640.                         bsc14.Attachment1 = head.NeckRigAttachment
  641.                         bsc14.LimitsEnabled = true
  642.                         bsc14.UpperAngle = -75
  643.                         bsc14.TwistLimitsEnabled = true
  644.                         bsc14.UpperAngle = -45
  645.                         bsc14.TwistLowerAngle = -45
  646.                         table.insert(js,1,bsc14)
  647.                     else
  648.                         --head:BreakJoints()
  649.                     end
  650.                 end
  651.             else
  652.                 hum.Died:Connect(function()
  653.                     if hum.RigType==Enum.HumanoidRigType.R15 then
  654.                         for _,v in pairs(pc:GetDescendants()) do
  655.                             if (v:IsA('Motor6D') or v:IsA('Motor') or v:IsA("BallSocketConstraint")) and (not string.match(v.Name:lower(),'root')) then
  656.                                 if not kill then
  657.                                     table.insert(js2,1,{obj = v,par = v.Parent})
  658.                                     v.Parent = nil
  659.                                 elseif kill then
  660.                                     v:Destroy()
  661.                                 end
  662.                             end
  663.                         end
  664.                         local vis = false
  665.                         local vis2 = false
  666.                        
  667.                         if LF and not LF:FindFirstChild('Dismembered') then  
  668.                             local bsc1 = Instance.new("BallSocketConstraint",LF)
  669.                             bsc1.Attachment0 = LF.LeftAnkleRigAttachment
  670.                             bsc1.Attachment1 = LLL.LeftAnkleRigAttachment
  671.                             table.insert(js,1,bsc1)
  672.                         end
  673.                         if LLL and not LLL:FindFirstChild('Dismembered') then  
  674.                             local bsc2 = Instance.new("BallSocketConstraint",LLL)
  675.                             bsc2.Attachment0 = LLL.LeftKneeRigAttachment
  676.                             bsc2.Attachment1 = LUL.LeftKneeRigAttachment
  677.                             table.insert(js,1,bsc2)
  678.                         end
  679.                         if LUL and not LUL:FindFirstChild('Dismembered') then  
  680.                             local bsc3 = Instance.new("BallSocketConstraint",LUL)
  681.                             bsc3.Attachment0 = LUL.LeftHipRigAttachment
  682.                             bsc3.Attachment1 = LT.LeftHipRigAttachment
  683.                             table.insert(js,1,bsc3)
  684.                         end
  685.                         if RF and not RF:FindFirstChild('Dismembered') then  
  686.                             local bsc4 = Instance.new("BallSocketConstraint",RF)
  687.                             bsc4.Attachment0 = RF.RightAnkleRigAttachment
  688.                             bsc4.Attachment1 = RLL.RightAnkleRigAttachment
  689.                             table.insert(js,1,bsc4)
  690.                         end
  691.                         if RLL and not RLL:FindFirstChild('Dismembered') then  
  692.                             local bsc5 = Instance.new("BallSocketConstraint",RLL)
  693.                             bsc5.Attachment0 = RLL.RightKneeRigAttachment
  694.                             bsc5.Attachment1 = RUL.RightKneeRigAttachment
  695.                             table.insert(js,1,bsc5)
  696.                         end
  697.                         if RUL and not RUL:FindFirstChild('Dismembered') then  
  698.                             local bsc6 = Instance.new("BallSocketConstraint",RUL)
  699.                             bsc6.Attachment0 = RUL.RightHipRigAttachment
  700.                             bsc6.Attachment1 = LT.RightHipRigAttachment
  701.                             table.insert(js,1,bsc6)
  702.                         end
  703.                         if LH and not LH:FindFirstChild('Dismembered') then  
  704.                             local bsc7 = Instance.new("BallSocketConstraint",LH)
  705.                             bsc7.Attachment0 = LH.LeftWristRigAttachment
  706.                             bsc7.Attachment1 = LLA.LeftWristRigAttachment
  707.                             table.insert(js,1,bsc7)
  708.                         end
  709.                         if LLA and not LLA:FindFirstChild('Dismembered') then  
  710.                             local bsc8 = Instance.new("BallSocketConstraint",LLA)
  711.                             bsc8.Attachment0 = LLA.LeftElbowRigAttachment
  712.                             bsc8.Attachment1 = LUA.LeftElbowRigAttachment
  713.                             table.insert(js,1,bsc8)
  714.                         end
  715.                         if LUA and not LUA:FindFirstChild('Dismembered') then  
  716.                             local bsc9 = Instance.new("BallSocketConstraint",LUA)
  717.                             bsc9.Attachment0 = LUA.LeftShoulderAttachment
  718.                             bsc9.Attachment1 = UT.LeftCollarAttachment
  719.                             table.insert(js,1,bsc9)
  720.                         end
  721.                         if RH and not RH:FindFirstChild('Dismembered') then  
  722.                             local bsc10 = Instance.new("BallSocketConstraint",RH)
  723.                             bsc10.Attachment0 = RH.RightWristRigAttachment
  724.                             bsc10.Attachment1 = RLA.RightWristRigAttachment
  725.                             table.insert(js,1,bsc10)
  726.                         end
  727.                         if RLA and not RLA:FindFirstChild('Dismembered') then  
  728.                             local bsc11 = Instance.new("BallSocketConstraint",RLA)
  729.                             bsc11.Attachment0 = RLA.RightElbowRigAttachment
  730.                             bsc11.Attachment1 = RUA.RightElbowRigAttachment
  731.                             table.insert(js,1,bsc11)
  732.                         end
  733.                         if RUA and not RUA:FindFirstChild('Dismembered') then  
  734.                             local bsc12 = Instance.new("BallSocketConstraint",RUA)
  735.                             bsc12.Attachment0 = RUA.RightShoulderAttachment
  736.                             bsc12.Attachment1 = UT.RightCollarAttachment
  737.                             table.insert(js,1,bsc12)
  738.                         end
  739.                         if LT and not LT:FindFirstChild('Dismembered') then  
  740.                             local bsc13 = Instance.new("BallSocketConstraint",LT)
  741.                             bsc13.Attachment0 = LT.WaistRigAttachment
  742.                             bsc13.Attachment1 = UT.WaistRigAttachment
  743.                             table.insert(js,1,bsc13)
  744.                         end
  745.                         if head and not headless and not head:FindFirstChild('Dismembered')  then
  746.                             local bsc14 = Instance.new("BallSocketConstraint",head)
  747.                             bsc14.Attachment0 = UT.NeckRigAttachment
  748.                             bsc14.Attachment1 = head.NeckRigAttachment
  749.                             bsc14.LimitsEnabled = true
  750.                             bsc14.UpperAngle = -75
  751.                             bsc14.TwistLimitsEnabled = true
  752.                             bsc14.UpperAngle = -45
  753.                             bsc14.TwistLowerAngle = -45
  754.                             table.insert(js,1,bsc14)
  755.                         else
  756.                             --head:BreakJoints()
  757.                         end
  758.                     end
  759.                 end)
  760.             end
  761.         end
  762.     end
  763.     return js,js2
  764. end
  765. function kill(obj,headshot,lookVector)
  766.     local targchar,targhead,targtorso,targhum,killval
  767.     pcall(function()
  768.         targchar = obj.Parent
  769.     end)
  770.     for i,v in pairs(game:GetService("Players"):GetPlayers()) do
  771.         if v and v.Character and obj:IsDescendantOf(v.Character) then
  772.             targchar = v.Character
  773.         end
  774.     end
  775.     pcall(function()
  776.         targtorso = targchar:FindFirstChild("Torso") or targchar:FindFirstChild("UpperTorso") or targchar:FindFirstChild("HumanoidRootPart")
  777.     end)
  778.     pcall(function()
  779.         targhead = targchar:FindFirstChild("Head")
  780.     end)
  781.     pcall(function()
  782.         targhum = targchar:FindFirstChildOfClass("Humanoid")
  783.     end)
  784.     pcall(function()
  785.         killval = targhum:FindFirstChild("killer")
  786.     end)
  787.     pcall(function()
  788.         decapval = targhum:FindFirstChild("decapped " .. targchar.Name)
  789.     end)
  790.     if targchar and targhead and targtorso and targhum and targhum ~= hum and using then
  791.         targhum:TakeDamage(1/0)
  792.         if 0 >= targhum.Health then
  793.             if (not decapval and headshot) or not killval then
  794.                 if not killval then
  795.                     local tempkillval = Instance.new("ObjectValue",targhum)
  796.                     tempkillval.Name = "killer"
  797.                     tempkillval.Value = plr
  798.                 end
  799.                 local kb = 15
  800.                 local bv = Instance.new("BodyVelocity")
  801.                 bv.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
  802.                 bv.Velocity = lookVector*kb+Vector3.new(0,kb,0)
  803.                 bv.Parent = targtorso
  804.                 game:GetService("Debris"):AddItem(bv,0.1)
  805.                 local ragval = Instance.new("ObjectValue")
  806.                 ragval.Name = 'Ragdolled'
  807.                 ragval.Parent = targhum
  808.                 Ragdoll(targchar,headshot,true,true)
  809.                 --bleed2(targtorso,targhum,true,5,true)
  810.             end
  811.             if headshot and not decapval then
  812.                 local tempdecapval = Instance.new("ObjectValue",targhum)
  813.                 tempdecapval.Name = ("decapped " .. targchar.Name)
  814.                 --[[
  815.                 local decap_bleed = Instance.new("Sound")
  816.                 decap_bleed.SoundId = 'rbxassetid://244502094'
  817.                 decap_bleed.Volume = 0.5
  818.                 decap_bleed.Parent = targtorso
  819.                 decap_bleed:Play()
  820.                 local decap_head = Instance.new("Sound")
  821.                 decap_head.SoundId = 'rbxassetid://1255040462' --222406108
  822.                 decap_head.Volume = 1
  823.                 decap_head.Parent = targtorso
  824.                 decap_head:Play()
  825.                 ]]
  826.                 remote:FireClient(plr,1,'rbxassetid://244502094',nil,0.5,targtorso)
  827.                 remote:FireClient(plr,1,'rbxassetid://1255040462',nil,1,targtorso)
  828.                 local att = Instance.new("Attachment")
  829.                 att.Parent = targtorso
  830.                 att.Position = Vector3.new(0,targtorso.Size.Y/2,0)
  831.                 local blood_emitter = Instance.new("ParticleEmitter")
  832.                 blood_emitter.Name = "Blood2"
  833.                 blood_emitter.Parent = att
  834.                 blood_emitter.Speed = NumberRange.new(5, 14)
  835.                 blood_emitter.Color = ColorSequence.new(Color3.new(0.45098, 0, 0),Color3.new(0.45098, 0, 0))
  836.                 blood_emitter.LightEmission = 0.20000000298023
  837.                 blood_emitter.LightInfluence = 1
  838.                 blood_emitter.Texture = "http://www.roblox.com/asset/?id=134531274"
  839.                 blood_emitter.Transparency = NumberSequence.new(0.30000001192093,0.30000001192093)
  840.                 blood_emitter.ZOffset = 0
  841.                 blood_emitter.Size = NumberSequence.new(0.12499988079071,0)
  842.                 blood_emitter.Acceleration = Vector3.new(0, -20, 0)
  843.                 blood_emitter.Lifetime = NumberRange.new(0.5, 1.5)
  844.                 blood_emitter.Rate = 100000
  845.                 blood_emitter.SpreadAngle = Vector2.new(90, 90)
  846.                 blood_emitter.VelocitySpread = 90
  847.                 blood_emitter.Enabled = true
  848.                 spawn(function()
  849.                     wait(5)
  850.                     blood_emitter.Enabled = false
  851.                     game:GetService("Debris"):AddItem(blood_emitter,2)
  852.                 end)
  853.             end
  854.         end
  855.     end
  856. end
  857. function bleed2(frick,targhum,can_hurt,t,splat)
  858.     --spawn(function()
  859.     if not frick:FindFirstChild("bleeding from kry's " .. gun.Name) then else return end
  860.     local tempbleedval = Instance.new("ObjectValue")
  861.     tempbleedval.Name = "bleeding from kry's " .. gun.Name
  862.     tempbleedval.Parent = frick
  863.     local bleeding = true
  864.     local rig = targhum.RigType
  865.     local limbs = {'Head','Left Arm','Right Arm','Left Leg','Right Leg','RightUpperLeg','LeftUpperLeg','RightUpperArm','LeftUpperArm','RightLowerLeg','LeftLowerLeg','RightLowerArm','LeftLowerArm','RightFoot','LeftFoot','RightHand','LeftHand'}
  866.     spawn(function()
  867.         wait(t)
  868.         bleeding = false
  869.         tempbleedval:Destroy()
  870.     end)
  871.     while bleeding and frick and frick.Parent do
  872.         if --[[(targhum and targhum.Parent and targhum.Health > 0) or]] (not frick or not frick.Parent or not targhum or not targhum.Parent) then
  873.             break
  874.         end
  875.         local max_limbs = 0
  876.         local current_limbs = 0
  877.         local gone_limbs = 0
  878.         local targchar = targhum.Parent
  879.         if rig == Enum.HumanoidRigType.R6 then
  880.             max_limbs = 5
  881.         elseif rig == Enum.HumanoidRigType.R15 then
  882.             max_limbs = 13
  883.         end
  884.         for i,v in pairs(targchar:GetChildren()) do
  885.             local found = false
  886.             for i,n in pairs(limbs) do if n == v.Name then found = true; end; end;
  887.             if found and not v:FindFirstChild("Dismembered") then
  888.                 current_limbs = current_limbs + 1
  889.             end
  890.         end
  891.         gone_limbs = (max_limbs-current_limbs)
  892.         if targhum and can_hurt then
  893.             if gone_limbs >= 1 then
  894.                 targhum:TakeDamage(0.5*gone_limbs)
  895.             else
  896.                 targhum:TakeDamage(0.5)
  897.             end
  898.         end
  899.         spawn(function()
  900.             local thing = Instance.new('Part')
  901.             thing.Parent = workspace
  902.             thing.Size = Vector3.new(0.1,0.1,0.1)
  903.             thing.CFrame = frick.CFrame*CFrame.new(0,frick.Size.Y/2,0)
  904.             if splat then
  905.                 thing.Transparency = 0
  906.             elseif not splat then
  907.                 thing.Transparency = 1
  908.             end
  909.             thing.Color = Color3.fromRGB(75, 0, 0)
  910.             thing.Material = Enum.Material.Glass
  911.             thing.Name = "blood_drop"
  912.             thing.CanCollide =false
  913.             thing:BreakJoints()
  914.             local mesh = Instance.new('SpecialMesh')
  915.             mesh.MeshType = Enum.MeshType.Sphere
  916.             mesh.Parent = thing
  917.             --game:GetService("Debris"):AddItem(thing,5)
  918.             local att1,att2 = Instance.new("Attachment"),Instance.new("Attachment")
  919.             att1.Parent = thing
  920.             att1.Position = Vector3.new(0,-(thing.Size.Y/2),0)
  921.             att2.Parent = thing
  922.             att2.Position = Vector3.new(0,(thing.Size.Y/2),0)
  923.             if splat then
  924.                 local trail_drop = Instance.new("Trail")
  925.                 trail_drop.Parent = thing
  926.                 trail_drop.Attachment0 = att1
  927.                 trail_drop.Attachment1 = att2
  928.                 trail_drop.Color = ColorSequence.new(Color3.new(0.294118, 0, 0),Color3.new(0.294118, 0, 0))
  929.                 trail_drop.FaceCamera = true
  930.                 trail_drop.LightInfluence = 1
  931.                 trail_drop.Transparency = NumberSequence.new(0.1,1)
  932.                 trail_drop.Lifetime = 1
  933.                 trail_drop.MinLength = 0
  934.             end
  935.             local rawrxd = Instance.new('BodyForce')
  936.             rawrxd.Parent = thing
  937.             if splat then
  938.                 rawrxd.Force = frick.CFrame.upVector+Vector3.new(math.random(-5, 5)/10,3,math.random(-5, 5)/10)
  939.             elseif not splat then
  940.                 rawrxd.Force = frick.CFrame.upVector*(math.random()*2)+Vector3.new(math.random(-5, 5)/10,1.5,0)
  941.             end
  942.             game:GetService("Debris"):AddItem(rawrxd,0.01)
  943.             thing.Touched:connect(function(tou)
  944.                 if tou and tou.Parent and not tou:IsDescendantOf(targchar) and not tou.Parent:FindFirstChildOfClass("Humanoid") and not tou.Parent.Parent:FindFirstChildOfClass("Humanoid") and not tou.Parent:IsA("Accessory") and tou.Name ~= 'Handle' and tou.Parent.Name ~= 'Handle' and not tou.Parent:IsA("Tool") and not string.match(tou.Name:lower(),'blood_drop') and not string.match(tou.Name:lower(),'bullet') and not string.match(tou.Name:lower(),'bone') and not string.match(tou.Name:lower(),'gun mag') and not string.match(tou.Name:lower(),'limb') then
  945.                     local pos = Vector3.new(thing.Position.X,(tou.Position.Y+(tou.Size.Y/2))+(0.02/2),thing.Position.Z)
  946.                     local Point1 = pos-Vector3.new(0.01,0.01,0.01)
  947.                     local Point2 = pos+Vector3.new(0.01,0.01,0.01)
  948.                     local Region = Region3.new(Point1,Point2)
  949.                     for _,Part in pairs(game.Workspace:FindPartsInRegion3(Region,nil,math.huge)) do
  950.                         if Part.Name == "blood" then
  951.                             tou = Part
  952.                         end
  953.                     end
  954.                     thing:Destroy()
  955.                     if tou.Name == "blood" then
  956.                         local reee = tou.CFrame
  957.                         if tou.Transparency > -0.2 then
  958.                             tou.Transparency = tou.Transparency - 0.1
  959.                         end
  960.                         if tou.Size.X < 5 then
  961.                             tou.Size = tou.Size+Vector3.new(0.4,0,0.4)
  962.                             tou.CFrame = reee
  963.                         elseif tou.Size.X < 7.5 then
  964.                             tou.Size = tou.Size+Vector3.new(0.3,0,0.3)
  965.                             tou.CFrame = reee
  966.                         elseif tou.Size.X < 10 then
  967.                             tou.Size = tou.Size+Vector3.new(0.2,0,0.2)
  968.                             tou.CFrame = reee
  969.                         end
  970.                     elseif tou.CanCollide == true then
  971.                         local bloodlol = Instance.new('Part')
  972.                         if gone_limbs >= 1 then
  973.                             bloodlol.Size = Vector3.new(1*gone_limbs,0.2,1*gone_limbs)
  974.                         else
  975.                             bloodlol.Size = Vector3.new(1,0.2,1)
  976.                         end
  977.                         bloodlol.Name = "blood"
  978.                         bloodlol.Anchored = true
  979.                         bloodlol.CanCollide = false
  980.                         bloodlol.Material = Enum.Material.Glass
  981.                         bloodlol.Color = Color3.fromRGB(75, 0, 0)
  982.                         local mesh = Instance.new('SpecialMesh')
  983.                         mesh.MeshType = Enum.MeshType.Sphere
  984.                         mesh.Parent = bloodlol
  985.                         bloodlol.Parent = workspace
  986.                         bloodlol.CFrame = CFrame.new(pos)
  987.                         while bloodlol and bloodlol.Parent ~= nil do
  988.                             if bloodlol.Transparency < 1 then
  989.                                 bloodlol.Transparency = bloodlol.Transparency + 0.05
  990.                             else
  991.                                 bloodlol:Destroy()
  992.                             end
  993.                             wait(0.1)
  994.                         end
  995.                     end
  996.                 end
  997.             end)
  998.         end)
  999.         wait(0.1)
  1000.     end
  1001.     tempbleedval:Destroy()
  1002.     --end)
  1003. end
  1004.  
  1005. function Reload()
  1006.     if max_ammo > ammo then else return end
  1007.     using = true
  1008.     reload_s:Play()
  1009.     local mag = Instance.new("Part")
  1010.     mag.Name = 'gun mag'
  1011.     mag.Size = Vector3.new(0.53, 0.94, 0.23)
  1012.     mag.Color = han.Color
  1013.     mag.Parent = workspace
  1014.     mag.CFrame = han.CFrame * CFrame.new(0.7,0,0)
  1015.     debris:AddItem(mag,10)
  1016.     repeat wait() until not reload_s.IsPlaying
  1017.     ammo = max_ammo
  1018.     game:GetService("Debris"):AddItem(mag,10)
  1019.     using = false
  1020. end
  1021.  
  1022. function breakwindow(hit)
  1023.     if hit and not string.match(hit.Name:lower(),"window shatter") and not string.match(hit.Name:lower(),"blood") then else return end
  1024.     local wbreakc = wbreak:Clone()
  1025.     wbreakc.Parent = hit
  1026.     wbreakc:Play()
  1027.     local sx,sy,sz=hit.Size.x,hit.Size.y,hit.Size.z
  1028.     hit.Name = "window shatter"
  1029.     for x=1,4 do
  1030.         for y=1,4 do
  1031.             local part=hit:Clone()
  1032.             local position=Vector3.new(x-2.1,y-2.1,0)*Vector3.new(sx/4,sy/4,sz)
  1033.             part.Size=Vector3.new(sx/4,sy/4,sz)
  1034.             part.CFrame=hit.CFrame*(CFrame.new(part.Size/8)-hit.Size/8+position)           
  1035.             part.Velocity=Vector3.new(math.random(-10,10),math.random(-10,10),math.random(-10,10))
  1036.             part.Name="window shatter"
  1037.             part.Parent=hit.Parent
  1038.             debris:AddItem(part,2)
  1039.             spawn(function()
  1040.                 wait(0.5)
  1041.                 for i=1,10 do
  1042.                     part.Transparency=part.Transparency+0.05
  1043.                     wait(0.05)
  1044.                 end
  1045.                 part:Destroy()
  1046.             end)
  1047.             part.Anchored=false
  1048.         end
  1049.     end
  1050.     hit:Destroy()
  1051. end
  1052.  
  1053. function raycast(Pos,Dir,Max,Ignore)
  1054.     return workspace:FindPartOnRayWithIgnoreList(Ray.new(Pos, Dir * (Max or 999.999)), (Ignore or {}), false, true)
  1055. end
  1056.  
  1057. local objhit = {}
  1058. local oldobjhit = {}
  1059.  
  1060. function make_hole(pos,obj,col)
  1061.     local BulletHolePart = Instance.new("Part")
  1062.     BulletHolePart.Massless = true
  1063.     BulletHolePart.Anchored = false
  1064.     BulletHolePart.CanCollide = false
  1065.     BulletHolePart.Locked = true
  1066.     BulletHolePart.FormFactor = "Custom"
  1067.     BulletHolePart.TopSurface, BulletHolePart.BottomSurface, BulletHolePart.RightSurface, BulletHolePart.LeftSurface, BulletHolePart.FrontSurface, BulletHolePart.BackSurface = "SmoothNoOutlines", "SmoothNoOutlines", "SmoothNoOutlines", "SmoothNoOutlines", "SmoothNoOutlines", "SmoothNoOutlines"
  1068.     BulletHolePart.Name = "Bullet Hole"
  1069.     BulletHolePart.Material = "Plastic"
  1070.     BulletHolePart.Reflectance = 0
  1071.     BulletHolePart.Transparency = 1
  1072.     BulletHolePart.BrickColor = BrickColor.new("Medium stone grey")
  1073.     BulletHolePart.Size = Vector3.new(0.3, 0, 0.3)
  1074.     BulletHolePart:BreakJoints()
  1075.     BulletHolePart.CFrame = pos
  1076.     BulletHolePart.Parent = script
  1077.     local weld = Instance.new("WeldConstraint")
  1078.     weld.Part0 = obj
  1079.     weld.Part1 = BulletHolePart
  1080.     weld.Parent = obj
  1081.     -- game:GetService("Debris"):AddItem(BulletHolePart, 5)
  1082.     --[[
  1083.     local BulletHoleDecal = Instance.new("Decal")
  1084.     BulletHoleDecal.Color3 = Color3.new(col.r, col.g, col.b)
  1085.     BulletHoleDecal.Face = "Top"
  1086.     BulletHoleDecal.Texture = "rbxassetid://359667865"
  1087.     BulletHoleDecal.Transparency = 0
  1088.     BulletHoleDecal.Parent = BulletHolePart
  1089.     ]]
  1090.     remote:FireClient(plr,2,"rbxassetid://359667865","Top",0,BulletHolePart)
  1091.     return BulletHolePart
  1092. end
  1093.  
  1094. 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
  1095.  
  1096. local e_s = 1
  1097.  
  1098. function add_decal(f,t,obj)
  1099.     --spawn(function()
  1100.     local texture = Instance.new("Texture")
  1101.     texture.Parent = obj
  1102.     texture.Face = f
  1103.     texture.Texture = 'rbxassetid://' .. t
  1104.     if f == 'Left' or f == 'Right' then
  1105.         texture.StudsPerTileV = obj.Size.Y + e_s
  1106.         if (obj.Size.X > obj.Size.Z) then
  1107.             texture.StudsPerTileV = obj.Size.Z + e_s
  1108.         elseif (obj.Size.Z > obj.Size.X) then
  1109.             texture.StudsPerTileU = obj.Size.X + e_s
  1110.         else
  1111.             texture.StudsPerTileU = obj.Size.X + e_s
  1112.         end
  1113.     elseif f == 'Front' or f == 'Back' then
  1114.         texture.StudsPerTileV = obj.Size.Y + e_s
  1115.         if (obj.Size.X > obj.Size.Z) then
  1116.             texture.StudsPerTileV = obj.Size.X + e_s
  1117.         elseif (obj.Size.Z > obj.Size.X) then
  1118.             texture.StudsPerTileU = obj.Size.Z + e_s
  1119.         else
  1120.             texture.StudsPerTileU = obj.Size.X + e_s
  1121.         end
  1122.     elseif f == 'Top' or f == 'Bottom' then
  1123.         texture.StudsPerTileV = obj.Size.X + e_s
  1124.         texture.StudsPerTileU = obj.Size.Z + e_s
  1125.     end
  1126.     --end)
  1127. end
  1128.  
  1129. function add_blood(obj)
  1130.     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)]
  1131.     add_decal('Top',t1,obj)
  1132.     add_decal('Bottom',t2,obj)
  1133.     add_decal('Left',t3,obj)
  1134.     add_decal('Right',t4,obj)
  1135.     add_decal('Front',t5,obj)
  1136.     add_decal('Back',t6,obj)
  1137. end
  1138.  
  1139. function make_bone(obj,targtorso)
  1140.     if obj.Name == 'Left Arm' or obj.Name == 'LeftUpperArm' then
  1141.         local bone = Instance.new("Part")
  1142.         bone.name = 'bone'
  1143.         bone.CanCollide = false
  1144.         bone.Anchored = false
  1145.         bone.CFrame = targtorso.CFrame
  1146.         bone.Size = targtorso.Size
  1147.         bone.Massless = true
  1148.         bone.Locked = true
  1149.         local exists = pcall(game:GetService("PhysicsService").GetCollisionGroupId, game:GetService("PhysicsService"), 'Limb Collide')
  1150.         if not exists then
  1151.             game:GetService("PhysicsService"):CreateCollisionGroup('Limb Collide')
  1152.         end
  1153.         game:GetService("PhysicsService"):CollisionGroupSetCollidable('Limb Collide','Limb Collide',false)
  1154.         game:GetService("PhysicsService"):SetPartCollisionGroup(bone,'Limb Collide')
  1155.         game:GetService("PhysicsService"):SetPartCollisionGroup(targtorso,'Limb Collide')
  1156.         local weld = Instance.new("Weld")
  1157.         weld.Part0 = bone
  1158.         weld.Part1 = targtorso
  1159.         weld.C1 = CFrame.new(-0.61,0.77,0.03)*CFrame.Angles(math.rad(90),0,math.rad(90))
  1160.         weld.Parent = bone
  1161.         targtorso.Anchored = false
  1162.         bone.Parent = script
  1163.         local mesh = Instance.new("SpecialMesh")
  1164.         mesh.MeshId = 'rbxassetid://1076136382'
  1165.         mesh.TextureId = 'rbxassetid://1076137938'
  1166.         mesh.Scale = Vector3.new(0.03,0.03,0.03)
  1167.         mesh.Parent = bone
  1168.         --
  1169.         local bone = Instance.new("Part")
  1170.         bone.Name = 'bone'
  1171.         bone.CanCollide = false
  1172.         bone.Anchored = false
  1173.         bone.CFrame = obj.CFrame
  1174.         bone.Size = obj.Size
  1175.         bone.Massless = true
  1176.         bone.Locked = true
  1177.         local exists = pcall(game:GetService("PhysicsService").GetCollisionGroupId, game:GetService("PhysicsService"), 'Limb Collide')
  1178.         if not exists then
  1179.             game:GetService("PhysicsService"):CreateCollisionGroup('Limb Collide')
  1180.         end
  1181.         game:GetService("PhysicsService"):CollisionGroupSetCollidable('Limb Collide','Limb Collide',false)
  1182.         game:GetService("PhysicsService"):SetPartCollisionGroup(bone,'Limb Collide')
  1183.         game:GetService("PhysicsService"):SetPartCollisionGroup(obj,'Limb Collide')
  1184.         local weld = Instance.new("Weld")
  1185.         weld.Part0 = bone
  1186.         weld.Part1 = obj
  1187.         weld.C1 = CFrame.new(0.13,0.26,0)
  1188.         weld.Parent = bone
  1189.         obj.Anchored = false
  1190.         bone.Parent = script
  1191.         local mesh = Instance.new("SpecialMesh")
  1192.         mesh.MeshId = 'rbxassetid://36780032'
  1193.         mesh.TextureId = 'rbxassetid://36780292'
  1194.         mesh.Parent = bone
  1195.     elseif obj.Name == 'Right Arm' or obj.Name == 'RightUpperArm' then
  1196.         local bone = Instance.new("Part")
  1197.         bone.Name = 'bone'
  1198.         bone.CanCollide = false
  1199.         bone.Anchored = false
  1200.         bone.CFrame = targtorso.CFrame
  1201.         bone.Size = targtorso.Size
  1202.         bone.Massless = true
  1203.         bone.Locked = true
  1204.         local exists = pcall(game:GetService("PhysicsService").GetCollisionGroupId, game:GetService("PhysicsService"), 'Limb Collide')
  1205.         if not exists then
  1206.             game:GetService("PhysicsService"):CreateCollisionGroup('Limb Collide')
  1207.         end
  1208.         game:GetService("PhysicsService"):CollisionGroupSetCollidable('Limb Collide','Limb Collide',false)
  1209.         game:GetService("PhysicsService"):SetPartCollisionGroup(bone,'Limb Collide')
  1210.         game:GetService("PhysicsService"):SetPartCollisionGroup(targtorso,'Limb Collide')
  1211.         local weld = Instance.new("Weld")
  1212.         weld.Part0 = bone
  1213.         weld.Part1 = targtorso
  1214.         weld.C1 = CFrame.new(0.61,0.77,0.03)*CFrame.Angles(math.rad(90),0,math.rad(-90))
  1215.         weld.Parent = bone
  1216.         targtorso.Anchored = false
  1217.         bone.Parent = script
  1218.         local mesh = Instance.new("SpecialMesh")
  1219.         mesh.MeshId = 'rbxassetid://1076136382'
  1220.         mesh.TextureId = 'rbxassetid://1076137938'
  1221.         mesh.Scale = Vector3.new(0.03,0.03,0.03)
  1222.         mesh.Parent = bone
  1223.         --
  1224.         local bone = Instance.new("Part")
  1225.         bone.Name = 'bone'
  1226.         bone.CanCollide = false
  1227.         bone.Anchored = false
  1228.         bone.CFrame = obj.CFrame
  1229.         bone.Size = obj.Size
  1230.         bone.Massless = true
  1231.         bone.Locked = true
  1232.         local exists = pcall(game:GetService("PhysicsService").GetCollisionGroupId, game:GetService("PhysicsService"), 'Limb Collide')
  1233.         if not exists then
  1234.             game:GetService("PhysicsService"):CreateCollisionGroup('Limb Collide')
  1235.         end
  1236.         game:GetService("PhysicsService"):CollisionGroupSetCollidable('Limb Collide','Limb Collide',false)
  1237.         game:GetService("PhysicsService"):SetPartCollisionGroup(bone,'Limb Collide')
  1238.         game:GetService("PhysicsService"):SetPartCollisionGroup(obj,'Limb Collide')
  1239.         local weld = Instance.new("Weld")
  1240.         weld.Part0 = bone
  1241.         weld.Part1 = obj
  1242.         weld.C1 = CFrame.new(-0.13,0.26,0)
  1243.         weld.Parent = bone
  1244.         obj.Anchored = false
  1245.         bone.Parent = script
  1246.         local mesh = Instance.new("SpecialMesh")
  1247.         mesh.MeshId = 'rbxassetid://36780156'
  1248.         mesh.TextureId = 'rbxassetid://36780292'
  1249.         mesh.Parent = bone
  1250.     elseif obj.Name == 'Left Leg' or obj.Name == 'LeftUpperLeg' then
  1251.         local bone = Instance.new("Part")
  1252.         bone.Name = 'bone'
  1253.         bone.CanCollide = false
  1254.         bone.Anchored = false
  1255.         bone.CFrame = targtorso.CFrame
  1256.         bone.Size = targtorso.Size
  1257.         bone.Massless = true
  1258.         bone.Locked = true
  1259.         local exists = pcall(game:GetService("PhysicsService").GetCollisionGroupId, game:GetService("PhysicsService"), 'Limb Collide')
  1260.         if not exists then
  1261.             game:GetService("PhysicsService"):CreateCollisionGroup('Limb Collide')
  1262.         end
  1263.         game:GetService("PhysicsService"):CollisionGroupSetCollidable('Limb Collide','Limb Collide',false)
  1264.         game:GetService("PhysicsService"):SetPartCollisionGroup(bone,'Limb Collide')
  1265.         game:GetService("PhysicsService"):SetPartCollisionGroup(targtorso,'Limb Collide')
  1266.         local weld = Instance.new("Weld")
  1267.         weld.Part0 = bone
  1268.         weld.Part1 = targtorso
  1269.         weld.C1 = CFrame.new(-0.6,-0.64,0.11)*CFrame.Angles(0,0,math.rad(180))
  1270.         weld.Parent = bone
  1271.         targtorso.Anchored = false
  1272.         bone.Parent = script
  1273.         local mesh = Instance.new("SpecialMesh")
  1274.         mesh.MeshId = 'rbxassetid://1076136382'
  1275.         mesh.TextureId = 'rbxassetid://1076137938'
  1276.         mesh.Scale = Vector3.new(0.03,0.03,0.03)
  1277.         mesh.Parent = bone
  1278.         --
  1279.         local bone = Instance.new("Part")
  1280.         bone.Name = 'bone'
  1281.         bone.CanCollide = false
  1282.         bone.Anchored = false
  1283.         bone.CFrame = obj.CFrame
  1284.         bone.Size = obj.Size
  1285.         bone.Massless = true
  1286.         bone.Locked = true
  1287.         local exists = pcall(game:GetService("PhysicsService").GetCollisionGroupId, game:GetService("PhysicsService"), 'Limb Collide')
  1288.         if not exists then
  1289.             game:GetService("PhysicsService"):CreateCollisionGroup('Limb Collide')
  1290.         end
  1291.         game:GetService("PhysicsService"):CollisionGroupSetCollidable('Limb Collide','Limb Collide',false)
  1292.         game:GetService("PhysicsService"):SetPartCollisionGroup(bone,'Limb Collide')
  1293.         game:GetService("PhysicsService"):SetPartCollisionGroup(obj,'Limb Collide')
  1294.         local weld = Instance.new("Weld")
  1295.         weld.Part0 = bone
  1296.         weld.Part1 = obj
  1297.         weld.C1 = CFrame.new(0,0.09,0.13)
  1298.         weld.Parent = bone
  1299.         obj.Anchored = false
  1300.         bone.Parent = script
  1301.         local mesh = Instance.new("SpecialMesh")
  1302.         mesh.MeshId = 'rbxassetid://36780156'
  1303.         mesh.TextureId = 'rbxassetid://36780292'
  1304.         mesh.Parent = bone
  1305.     elseif obj.Name == 'Right Leg' or obj.Name == 'RightUpperLeg' then
  1306.         local bone = Instance.new("Part")
  1307.         bone.Name = 'bone'
  1308.         bone.CanCollide = false
  1309.         bone.Anchored = false
  1310.         bone.CFrame = targtorso.CFrame
  1311.         bone.Size = targtorso.Size
  1312.         bone.Massless = true
  1313.         bone.Locked = true
  1314.         local exists = pcall(game:GetService("PhysicsService").GetCollisionGroupId, game:GetService("PhysicsService"), 'Limb Collide')
  1315.         if not exists then
  1316.             game:GetService("PhysicsService"):CreateCollisionGroup('Limb Collide')
  1317.         end
  1318.         game:GetService("PhysicsService"):CollisionGroupSetCollidable('Limb Collide','Limb Collide',false)
  1319.         game:GetService("PhysicsService"):SetPartCollisionGroup(bone,'Limb Collide')
  1320.         game:GetService("PhysicsService"):SetPartCollisionGroup(targtorso,'Limb Collide')
  1321.         local weld = Instance.new("Weld")
  1322.         weld.Part0 = bone
  1323.         weld.Part1 = targtorso
  1324.         weld.C1 = CFrame.new(0.6,-0.64,0.11)*CFrame.Angles(0,0,math.rad(180))
  1325.         weld.Parent = bone
  1326.         targtorso.Anchored = false
  1327.         bone.Parent = script
  1328.         local mesh = Instance.new("SpecialMesh")
  1329.         mesh.MeshId = 'rbxassetid://1076136382'
  1330.         mesh.TextureId = 'rbxassetid://1076137938'
  1331.         mesh.Scale = Vector3.new(0.03,0.03,0.03)
  1332.         mesh.Parent = bone
  1333.         --
  1334.         local bone = Instance.new("Part")
  1335.         bone.Name = 'bone'
  1336.         bone.CanCollide = false
  1337.         bone.Anchored = false
  1338.         bone.CFrame = obj.CFrame
  1339.         bone.Size = obj.Size
  1340.         bone.Massless = true
  1341.         bone.Locked = true
  1342.         local exists = pcall(game:GetService("PhysicsService").GetCollisionGroupId, game:GetService("PhysicsService"), 'Limb Collide')
  1343.         if not exists then
  1344.             game:GetService("PhysicsService"):CreateCollisionGroup('Limb Collide')
  1345.         end
  1346.         game:GetService("PhysicsService"):CollisionGroupSetCollidable('Limb Collide','Limb Collide',false)
  1347.         game:GetService("PhysicsService"):SetPartCollisionGroup(bone,'Limb Collide')
  1348.         game:GetService("PhysicsService"):SetPartCollisionGroup(obj,'Limb Collide')
  1349.         local weld = Instance.new("Weld")
  1350.         weld.Part0 = bone
  1351.         weld.Part1 = obj
  1352.         weld.C1 = CFrame.new(0,0.09,0.13)
  1353.         weld.Parent = bone
  1354.         obj.Anchored = false
  1355.         bone.Parent = script
  1356.         local mesh = Instance.new("SpecialMesh")
  1357.         mesh.MeshId = 'rbxassetid://36780195'
  1358.         mesh.TextureId = 'rbxassetid://36780292'
  1359.         mesh.Parent = bone
  1360.     elseif obj.Name == 'Head' then
  1361.         local bone = Instance.new("Part")
  1362.         bone.Name = 'bone'
  1363.         bone.CanCollide = false
  1364.         bone.Anchored = false
  1365.         bone.CFrame = targtorso.CFrame
  1366.         bone.Size = targtorso.Size
  1367.         bone.Massless = true
  1368.         bone.Locked = true
  1369.         local exists = pcall(game:GetService("PhysicsService").GetCollisionGroupId, game:GetService("PhysicsService"), 'Limb Collide')
  1370.         if not exists then
  1371.             game:GetService("PhysicsService"):CreateCollisionGroup('Limb Collide')
  1372.         end
  1373.         game:GetService("PhysicsService"):CollisionGroupSetCollidable('Limb Collide','Limb Collide',false)
  1374.         game:GetService("PhysicsService"):SetPartCollisionGroup(bone,'Limb Collide')
  1375.         game:GetService("PhysicsService"):SetPartCollisionGroup(targtorso,'Limb Collide')
  1376.         local weld = Instance.new("Weld")
  1377.         weld.Part0 = bone
  1378.         weld.Part1 = targtorso
  1379.         weld.C1 = CFrame.new(0,0.66,0)
  1380.         weld.Parent = bone
  1381.         targtorso.Anchored = false
  1382.         bone.Parent = script
  1383.         local mesh = Instance.new("SpecialMesh")
  1384.         mesh.MeshId = 'rbxassetid://1076136382'
  1385.         mesh.TextureId = 'rbxassetid://1076137938'
  1386.         mesh.Scale = Vector3.new(0.03,0.03,0.03)
  1387.         mesh.Parent = bone
  1388.         --
  1389.         local bone = Instance.new("Part")
  1390.         bone.Name = 'bone'
  1391.         bone.CanCollide = false
  1392.         bone.Anchored = false
  1393.         bone.CFrame = obj.CFrame
  1394.         bone.Size = obj.Size
  1395.         bone.Massless = true
  1396.         bone.Locked = true
  1397.         local exists = pcall(game:GetService("PhysicsService").GetCollisionGroupId, game:GetService("PhysicsService"), 'Limb Collide')
  1398.         if not exists then
  1399.             game:GetService("PhysicsService"):CreateCollisionGroup('Limb Collide')
  1400.         end
  1401.         game:GetService("PhysicsService"):CollisionGroupSetCollidable('Limb Collide','Limb Collide',false)
  1402.         game:GetService("PhysicsService"):SetPartCollisionGroup(bone,'Limb Collide')
  1403.         game:GetService("PhysicsService"):SetPartCollisionGroup(obj,'Limb Collide')
  1404.         local weld = Instance.new("Weld")
  1405.         weld.Part0 = bone
  1406.         weld.Part1 = obj
  1407.         weld.C1 = CFrame.new(0,-0.23,0)*CFrame.Angles(0,math.rad(-90),0)
  1408.         weld.Parent = bone
  1409.         obj.Anchored = false
  1410.         bone.Parent = script
  1411.         local mesh = Instance.new("SpecialMesh")
  1412.         mesh.MeshId = 'rbxassetid://1076136382'
  1413.         mesh.TextureId = 'rbxassetid://1076137938'
  1414.         mesh.Scale = Vector3.new(0.03,0.03,0.03)
  1415.         mesh.Parent = bone
  1416.     end
  1417. end
  1418.  
  1419. function break_limb(obj,rig,targtorso,targhum)
  1420.     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
  1421.     local confirm = Instance.new("ObjectValue")
  1422.     confirm.Name = 'Dismembered'
  1423.     confirm.Parent = obj
  1424.     local bsc = obj:FindFirstChildOfClass("BallSocketConstraint")
  1425.     if bsc then
  1426.         bsc:Destroy()
  1427.     end
  1428.     --bleed2(obj,targhum,false,5,false)
  1429.     add_blood(obj)
  1430.     make_bone(obj,targtorso)
  1431.     local kb = 15
  1432.     local bv = Instance.new("BodyVelocity")
  1433.     bv.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
  1434.     bv.Velocity = han.CFrame.lookVector*kb+Vector3.new(0,kb,0)
  1435.     bv.Parent = obj
  1436.     game:GetService("Debris"):AddItem(bv,0.1)
  1437.     if rig == Enum.HumanoidRigType.R6 then
  1438.         local bsc = obj:FindFirstChildOfClass("BallSocketConstraint")
  1439.         if bsc then
  1440.             bsc:Destroy()
  1441.         end
  1442.         for i,v in pairs(targtorso:GetChildren()) do
  1443.             if v:IsA("Motor6D") then
  1444.                 if obj.Name == 'Head' and v.Name == 'Neck' then
  1445.                     v:Destroy()
  1446.                 elseif obj.Name == 'Left Arm' and v.Name == 'Left Shouldver' then
  1447.                     v:Destroy()
  1448.                 elseif obj.Name == 'Right Arm' and v.Name == 'Right Shoulder' then
  1449.                     v:Destroy()
  1450.                 elseif obj.Name == 'Left Leg' and v.Name == 'Left Hip' then
  1451.                     if obj.Parent:FindFirstChild("Right Leg") then
  1452.                         targhum.WalkSpeed = targhum.WalkSpeed/2
  1453.                     else
  1454.                         targhum.WalkSpeed = 0
  1455.                     end
  1456.                     v:Destroy()
  1457.                 elseif obj.Name == 'Right Leg' and v.Name == 'Right Hip' then
  1458.                     if obj.Parent:FindFirstChild("Left Leg") then
  1459.                         targhum.WalkSpeed = targhum.WalkSpeed/2
  1460.                     else
  1461.                         targhum.WalkSpeed = 0
  1462.                     end
  1463.                     v:Destroy()
  1464.                 end
  1465.             end
  1466.         end
  1467.     elseif rig == Enum.HumanoidRigType.R15 then
  1468.         for i,v in pairs(obj:GetChildren()) do
  1469.             if v:IsA("Motor6D") then
  1470.                 if (obj.Name == 'LeftUpperLeg' and obj.Parent:FindFirstChild("RightUpperLeg")) or (obj.Name == 'RightUpperLeg' and obj.Parent:FindFirstChild("LeftUpperLeg")) then
  1471.                     targhum.WalkSpeed = targhum.WalkSpeed/2
  1472.                 elseif obj.Name == 'RightUpperLeg' or obj.Name == 'LeftUpperLeg' then
  1473.                     targhum.WalkSpeed = 0
  1474.                 end
  1475.                 v:Destroy()
  1476.             end
  1477.         end
  1478.     end
  1479.     local cb = Instance.new("Part")
  1480.     cb.Name = 'limb'
  1481.     cb.Transparency = 1
  1482.     cb.CanCollide = true
  1483.     cb.Anchored = false
  1484.     cb.CFrame = obj.CFrame
  1485.     cb.Size = obj.Size
  1486.     cb.Massless = true
  1487.     cb.Locked = true
  1488.     local exists = pcall(game:GetService("PhysicsService").GetCollisionGroupId, game:GetService("PhysicsService"), 'Limb Collide')
  1489.     if not exists then
  1490.         game:GetService("PhysicsService"):CreateCollisionGroup('Limb Collide')
  1491.     end
  1492.     game:GetService("PhysicsService"):CollisionGroupSetCollidable('Limb Collide','Limb Collide',false)
  1493.     game:GetService("PhysicsService"):SetPartCollisionGroup(cb,'Limb Collide')
  1494.     game:GetService("PhysicsService"):SetPartCollisionGroup(obj,'Limb Collide')
  1495.     local weld = Instance.new("Weld")
  1496.     weld.Part0 = cb
  1497.     weld.Part1 = obj
  1498.     weld.Parent = cb
  1499.     obj.Massless = true
  1500.     obj.Anchored = false
  1501.     cb.Parent = script
  1502. end
  1503.  
  1504. function check(toughness,obj,objpos,p,rays,rot)
  1505.     local plrhit = false
  1506.     if obj and not obj:FindFirstChild('Dismembered') then else return; end;
  1507.     local targchar,targtorso,targhum,targhead
  1508.     pcall(function()
  1509.         targchar = obj.Parent
  1510.     end)
  1511.     for i,v in pairs(game:GetService("Players"):GetPlayers()) do
  1512.         if v and v.Character and obj:IsDescendantOf(v.Character) then
  1513.             targchar = v.Character
  1514.         end
  1515.     end
  1516.     pcall(function()
  1517.         targtorso = targchar:FindFirstChild("Torso") or targchar:FindFirstChild("UpperTorso") or targchar:FindFirstChild("HumanoidRootPart")
  1518.     end)
  1519.     pcall(function()
  1520.         targhum = targchar:FindFirstChildOfClass("Humanoid")
  1521.     end)
  1522.     pcall(function()
  1523.         targhead = targchar:FindFirstChild("Head")
  1524.     end)
  1525.     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
  1526.         plrhit = true
  1527.         local confirm = Instance.new("IntValue")
  1528.         confirm.Parent = targhum
  1529.         confirm.Name = ("hit " .. targchar.Name .. " with " .. gun.Name .. " by " .. plr.Name)
  1530.         debris:AddItem(confirm,shootwait)
  1531.         local dmg = math.random(20,30)
  1532.         if obj == targhead then
  1533.             dmg = math.random(40,50)
  1534.             targhum:TakeDamage(dmg)
  1535.         elseif not op then
  1536.             dmg = math.random(20,30)
  1537.             targhum:TakeDamage(dmg)
  1538.         elseif op then
  1539.             targhum.MaxHealth = 0
  1540.             targhum.Health = 0
  1541.             targhum.Parent:BreakJoints()
  1542.         end
  1543.         if math.random(1,4) == 1 then
  1544.             break_limb(obj,targhum.RigType,targtorso,targhum)
  1545.         end
  1546.         add_blood(obj)
  1547.         --[[
  1548.         local bleeding = Instance.new("Sound")
  1549.         bleeding.SoundId = 'rbxassetid://360007673'
  1550.         bleeding.Volume = 1
  1551.         bleeding.Parent = targtorso
  1552.         bleeding:Play()
  1553.         ]]
  1554.         remote:FireClient(plr,1,'rbxassetid://360007673',nil,1,targtorso)
  1555.         if 0 >= targhum.Health and obj == targhead then
  1556.             kill(obj,true,p.CFrame.lookVector)
  1557.         elseif 0 >= targhum.Health then
  1558.             kill(obj,false,p.CFrame.lookVector)
  1559.         elseif targhum.Health > 0 then
  1560.             --bleed2(targtorso,targhum,true,5,false)
  1561.         end
  1562.     else
  1563.         table.insert(objhit,1,obj)
  1564.         local mat = obj.Material
  1565.         local mathit = obj:FindFirstChild('material hit ' .. plr.Name)
  1566.         if not mathit and toughness > 0 and 1 > obj.Transparency then
  1567.             --print('old: ' .. toughness)
  1568.             if (mat == Enum.Material.Glass or mat == Enum.Material.Ice) then
  1569.                 breakwindow(obj)
  1570.             elseif (mat == Enum.Material.Wood or mat == Enum.Material.WoodPlanks) then
  1571.                 toughness = toughness - 1.5
  1572.             elseif (mat == Enum.Material.Metal or mat == Enum.Material.DiamondPlate or mat == Enum.Material.CorrodedMetal) then
  1573.                 toughness = toughness - 5
  1574.             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
  1575.                 toughness = toughness - 3
  1576.             else
  1577.                 toughness = toughness - 1
  1578.             end
  1579.             --print('new: ' .. toughness)
  1580.             local libruary = {
  1581.                 ['wizz'] = {342190005, 342190012, 342190017, 342190024},
  1582.                 ['crackSmall'] = {873119768, 873119788, 873119811, 873119845, 873119886, 873119904},
  1583.                 ['crackBig'] = {873119597, 873119653, 873119679, 873119703, 873119724, 873119744},
  1584.                 ['whizz'] = {873121840, 873121858, 873121876, 873121896, 873121913, 873121936},
  1585.                 ['woodhit'] = {342204157, 342204164, 342204170, 342204175, 871705143, 871705174}, --871705195, 871705217, 871705237, 871705264
  1586.                 ['stonehit'] = {871701076, 871701134, 871701190, 871701241, 871701297, 871701346},
  1587.                 ['metalhit'] = {871704182, 871704259, 871704297, 871704329, 871704362, 871704395},
  1588.                 ['grasshit'] = {871709869, 871709832, 871709789, 871709755, 871709708, 871709643},
  1589.                 ['impact'] = {525720625},
  1590.             }
  1591.             local soundfont=({
  1592.                 Brick="stonehit";
  1593.                 Cobblestone="stonehit";
  1594.                 Concrete="stonehit";
  1595.                 CorrodedMetal="metalhit";
  1596.                 DiamondPlate="metalhit";
  1597.                 Fabric=nil;
  1598.                 Foil="metalhit";
  1599.                 Granite="stonehit";
  1600.                 Grass="grasshit";
  1601.                 Ice="stonehit";
  1602.                 Marble="stonehit";
  1603.                 Metal="metalhit";
  1604.                 Neon=nil;
  1605.                 Pebble="stonehit";
  1606.                 Plastic="metalhit";
  1607.                 Sand=nil;
  1608.                 Slate="stonehit";
  1609.                 SmoothPlastic="metalhit";
  1610.                 Wood="woodhit";
  1611.                 WoodPlanks="woodhit";
  1612.             })[mat.Name]
  1613.             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)
  1614.             --[[
  1615.             local BulletHoleSound = Instance.new("Sound")
  1616.             BulletHoleSound.Volume = 3
  1617.             BulletHoleSound.Pitch = math.random(9,11)/10
  1618.             ]]
  1619.             local _id = ''
  1620.             if soundfont ~= nil then
  1621.                 --[[BulletHoleSound.SoundId]]_id = "rbxassetid://"..libruary[soundfont][math.random(1,6)]
  1622.             else
  1623.                 --[[BulletHoleSound.SoundId]]_id = "rbxassetid://"..libruary['impact'][1]
  1624.             end
  1625.             --BulletHoleSound.Parent = part
  1626.             --BulletHoleSound:Play()
  1627.             remote:FireClient(plr,1,_id,nil,3,part)
  1628.             local tempmathit = Instance.new("ObjectValue")
  1629.             tempmathit.Name = ('material hit ' .. plr.Name)
  1630.             tempmathit.Parent = obj
  1631.             game:GetService("Debris"):AddItem(tempmathit,shootwait/bulletfire)
  1632.             game:GetService("Debris"):AddItem(part,7)
  1633.         end
  1634.     end
  1635.     if toughness > 0 and rays > 0 then
  1636.         local found = false
  1637.         for i,v in pairs(oldobjhit) do if v and obj:IsDescendantOf(v) then found = true; end; end;
  1638.         oldobjhit = objhit
  1639.         if not plrhit and not found then
  1640.             rays = rays - 1
  1641.             wait()
  1642.         end
  1643.         local ig = {char,gun,script,unpack(objhit)}
  1644.         local _obj,_vec,_rot = raycast(objpos,(hitpos-han.Position).Unit, nil, ig) -- (hitpos-objpos).Unit
  1645.         check(toughness,_obj,_vec,p,rays,_rot)
  1646.     else
  1647.         p:Destroy()
  1648.     end
  1649. end
  1650.  
  1651. function drop_shell()
  1652.     local Shell = Instance.new("Part")
  1653.     Shell.Color = Color3.new(1, 1, 0)
  1654.     Shell.Size = Vector3.new(0.530001819, 0.132500455, 0.132500455)
  1655.     Shell.BottomSurface = Enum.SurfaceType.Smooth
  1656.     Shell.BrickColor = BrickColor.new("New Yeller")
  1657.     Shell.Material = Enum.Material.Metal
  1658.     Shell.Shape = Enum.PartType.Cylinder
  1659.     Shell.CFrame = han.CFrame
  1660.     Shell.Parent = script
  1661.     local bvs = Instance.new("BodyVelocity")
  1662.     bvs.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
  1663.     bvs.Velocity = han.CFrame.lookVector+Vector3.new(0,10,-5)
  1664.     bvs.Parent = Shell
  1665.     game:GetService("Debris"):AddItem(bvs,0.1)
  1666.     game:GetService("Debris"):AddItem(Shell,10)
  1667. end
  1668.  
  1669. function Shoot()
  1670.     if not using and CheckIfAlive() and ammo > 0 then
  1671.         using = true
  1672.         wait()
  1673.         tween:Create(gun,TweenInfo.new(0.1),({Grip = CFrame.new(-0.634399951, -0.178856403, 0.0327377915, 7.36220827e-08, 0.221527815, -0.975154042, -1.67248828e-08, 0.975154042, 0.221527815, 1, 0, 7.54978942e-08)})):Play()
  1674.         spawn(function()
  1675.             flash.Enabled = true
  1676.             light.Enabled = true
  1677.             smoke.Enabled = true
  1678.             wait()
  1679.             flash.Enabled = false
  1680.             light.Enabled = false
  1681.             smoke.Enabled = false
  1682.         end)
  1683.         spawn(function()
  1684.             for i = 1,bulletfire do
  1685.                 ammo = ammo - 1
  1686.                 drop_shell()
  1687.                 --shoot_s.SoundId = 'rbxassetid://' .. sh[math.random(1,#shots)]
  1688.                 shoot_s:Play()
  1689.                 for i,v in ipairs(objhit) do table.remove(objhit,i); end;
  1690.                 for i,v in ipairs(objhit) do table.remove(oldobjhit,i); end;
  1691.                 spawn(function()
  1692.                     local p = Instance.new("Part")
  1693.                     p.Name = "bullet"
  1694.                     p.Massless = true
  1695.                     p.Anchored = false
  1696.                     p.CanCollide = false
  1697.                     p.Color = Color3.fromRGB(255, 255, 0)
  1698.                     p.Size = Vector3.new(0.5,0.5,1)
  1699.                     p.Transparency = 0
  1700.                     p.Position = han.Position
  1701.                     p.CFrame = CFrame.new(han.Position,hitpos)
  1702.                     p.Velocity = p.CFrame.lookVector * 2000
  1703.                     p.Material = Enum.Material.Neon
  1704.                     p.Parent = script
  1705.                     local mesh = Instance.new("SpecialMesh")
  1706.                     mesh.MeshType = Enum.MeshType.Sphere
  1707.                     mesh.Parent = p
  1708.                     --tween:Create(p,TweenInfo.new(((hitpos)-han.Position).Magnitude/10000),{Position = p.Position + ((hitpos)-han.Position).Unit*1000}):Play()
  1709.                     local body_vel = Instance.new("BodyVelocity")
  1710.                     body_vel.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
  1711.                     body_vel.Velocity = p.CFrame.lookVector * 2000
  1712.                     body_vel.Parent = p
  1713.                     debris:AddItem(p,3)
  1714.                     game:GetService("TweenService"):Create(p,TweenInfo.new(3),{Size = Vector3.new(0.5,0.5,10),Transparency = 1}):Play()
  1715.                     local toughness = 5
  1716.                     local rays = 5
  1717.                     local ig = {char,gun,script}
  1718.                     local obj,vec,rot = raycast(han.Position,(hitpos-han.Position).Unit, nil, ig)
  1719.                     check(toughness,obj,vec,p,rays,rot)
  1720.                 end)
  1721.                 remote:FireClient(plr,1,shoot_s.SoundId,shoot_s,5,han)
  1722.                 wait(shootwait/bulletfire)
  1723.             end
  1724.         end)
  1725.         spawn(function()
  1726.             wait(0.1)
  1727.             tween:Create(gun,TweenInfo.new(0.1),({Grip = CFrame.new(-0.633802414, -0.236455202, 0.0327377915, 7.54978942e-08, 0, -1, 0, 1, 0, 1, 0, 7.54978942e-08)})):Play()
  1728.         end)
  1729.         wait(shootwait)
  1730.         using = false
  1731.     end
  1732. end
  1733.  
  1734. gun.Activated:Connect(function()
  1735.     if not using and CheckIfAlive() and 0 >= ammo then
  1736.         Reload()
  1737.     end
  1738. end)
  1739.  
  1740. gun.Equipped:Connect(function()
  1741.     equipped = true
  1742.     pcall(function()
  1743.         char = gun.Parent
  1744.         plr = game:GetService("Players"):GetPlayerFromCharacter(char)
  1745.         hum = char:FindFirstChildOfClass("Humanoid")
  1746.         torso = char:FindFirstChild("Torso") or char:FindFirstChild("UpperTorso")
  1747.         rootpart = char:FindFirstChild("HumanoidRootPart")
  1748.         if not CheckIfAlive() then gun.Parent = nil return end
  1749.     end)
  1750. end)
  1751.  
  1752. gun.Unequipped:Connect(function()
  1753.     equipped = false
  1754. end)
  1755.  
  1756. remote = Instance.new("RemoteEvent")
  1757. remote.Name = 'm1911_remote'
  1758. remote.Parent = gun
  1759.  
  1760. remote.OnServerEvent:Connect(function(player,mode,data,data2)
  1761.     if equipped then else return end
  1762.     if plr == player and mode == 1 then
  1763.         if data ~= nil then
  1764.             hitpos = data
  1765.         end
  1766.         if data2 ~= nil then
  1767.             shooting = data2
  1768.         end
  1769.         if shooting then
  1770.             Shoot()
  1771.         end
  1772.     elseif not shooting and not using and CheckIfAlive() and plr == player and mode == 2 and data == 'reload' then
  1773.         Reload()
  1774.     end
  1775. end)
  1776.  
  1777. local ls = [[
  1778.     local plr = game:GetService("Players").LocalPlayer
  1779.     local mouse = plr:GetMouse()
  1780.     local char = plr.Character
  1781.     local remote = script.Parent
  1782.     local tool = remote.Parent
  1783.     local shooting = false
  1784.     local lh = Vector3.new()
  1785.     tool.Equipped:Connect(function()
  1786.         pcall(function()
  1787.             char = tool.Parent
  1788.         end)
  1789.         pcall(function()
  1790.             plr = game:GetService("Players"):GetPlayerFromCharacter(char)
  1791.         end)
  1792.         pcall(function()
  1793.             mouse = plr:GetMouse()
  1794.         end)
  1795.         if mouse then
  1796.             mouse.KeyDown:Connect(function(key)
  1797.                 if key == 'r' then
  1798.                     remote:FireServer(2,'reload')
  1799.                 end
  1800.             end)
  1801.             mouse.Button1Down:Connect(function()
  1802.                 local pos
  1803.                 if mouse.Hit then
  1804.                     pos = mouse.Hit.Position
  1805.                 end
  1806.                 lh = pos or Vector3.new()
  1807.                 remote:FireServer(1,pos,true)
  1808.                 wait(0.15)
  1809.                 remote:FireServer(1,lh,false)
  1810.             end)
  1811.         end
  1812.     end)
  1813.     remote.OnClientEvent:Connect(function(mode,data,inst,v,p)
  1814.         if mode == 1 then
  1815.             if inst then inst.Volume = 0; end;
  1816.             local sound = Instance.new("Sound")
  1817.             sound.SoundId = data
  1818.             sound.Volume = v
  1819.             sound.Parent = p
  1820.             sound:Play()
  1821.         elseif mode == 2 then
  1822.             --if inst then inst.Transparency = 1; end;
  1823.             local decal = Instance.new("Decal")
  1824.             decal.Texture = data
  1825.             decal.Transparency = v
  1826.             decal.Parent = p
  1827.             decal.Face = inst
  1828.         end
  1829.     end)
  1830. ]]
  1831.  
  1832. NLS(ls,remote)
Add Comment
Please, Sign In to add comment