Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --By Rufus14
- local deaglebegin = Instance.new("RemoteEvent", game.ReplicatedStorage)
- deaglebegin.Name = "DeagleStart"
- local deagleshoot = Instance.new("RemoteEvent", game.ReplicatedStorage)
- deagleshoot.Name = "DeagleShoot"
- local deaglelook = Instance.new("RemoteEvent", game.ReplicatedStorage)
- deaglelook.Name = "DeagleLook"
- local deaglesuicide = Instance.new("RemoteEvent", game.ReplicatedStorage)
- deaglesuicide.Name = "DeagleSuicide"
- currentplayer = nil
- function start(player)
- if currentplayer == nil then
- currentplayer = player
- local isshooting = Instance.new("BoolValue", player.Character)
- isshooting.Name = "isshooting"
- local rightarm = Instance.new("Weld", player.Character.Torso)
- rightarm.Part0 = player.Character.Torso
- rightarm.Part1 = player.Character["Right Arm"]
- rightarm.C0 = CFrame.new(1.5,0,0)
- rightarm.Name = "RightArmWeld"
- for i = 0,0.7 , 0.07 do
- rightarm.C0 = rightarm.C0:lerp(CFrame.new(1.65201187, 0.226355314, 0, 0.925655842, -0.37836656, 0, 0.37836653, 0.925655782, -1.77635684e-15, 0, 1.77635684e-15, 1),i)
- wait()
- end
- for i = 0.3,1 , 0.07 do
- rightarm.C0 = rightarm.C0:lerp(CFrame.new(1.12998009, 0.0345094204, 0.516162872, 0.817034721, 0.557074904, -0.148734018, -0.299987584, 0.630993366, 0.715440214, 0.492403984, -0.539921165, 0.68265909),i)
- wait()
- end
- --Converted with ttyyuu12345's model to script plugin v4
- local function sandbox(var,func)
- local env = getfenv(func)
- local newenv = setmetatable({},{
- __index = function(self,k)
- if k=="script" then
- return var
- else
- return env[k]
- end
- end,
- })
- setfenv(func,newenv)
- return func
- end
- local cors = {}
- local mas = Instance.new("Model",game:GetService("Lighting"))
- local Deagle = Instance.new("Part")
- local SpecialMesh1 = Instance.new("SpecialMesh")
- Deagle.Name = "Deagle"
- Deagle.Parent = mas
- Deagle.CFrame = CFrame.new(29.4999924, 0.500003994, 15.7999983, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Deagle.Position = Vector3.new(29.4999924, 0.500003994, 15.7999983)
- Deagle.Size = Vector3.new(0.399999619, 1, 2)
- Deagle.BottomSurface = Enum.SurfaceType.Smooth
- Deagle.TopSurface = Enum.SurfaceType.Smooth
- SpecialMesh1.Parent = Deagle
- SpecialMesh1.MeshId = "rbxassetid://437241640"
- SpecialMesh1.Scale = Vector3.new(0.00150000001, 0.00150000001, 0.00150000001)
- SpecialMesh1.TextureId = "rbxassetid://437241646"
- SpecialMesh1.MeshType = Enum.MeshType.FileMesh
- for i,v in pairs(mas:GetChildren()) do
- v.Parent = workspace
- pcall(function() v:MakeJoints() end)
- end
- mas:Destroy()
- for i,v in pairs(cors) do
- spawn(function()
- pcall(v)
- end)
- end
- Deagle.Parent = player.Character
- local skin = math.random(1,3)
- if skin == 1 then
- SpecialMesh1.TextureId = "rbxassetid://435840335"
- end
- if skin == 2 then
- SpecialMesh1.TextureId = "rbxassetid://437837326"
- end
- local sound = Instance.new("Sound", Deagle)
- sound.SoundId = "rbxassetid://255048411"
- sound.Volume = 1
- local deflect = Instance.new("Sound", Deagle)
- deflect.MaxDistance = 100
- deflect.Volume = 1
- deflect.SoundId = "rbxassetid://341519743"
- deflect.Looped = true
- local deagleweld = Instance.new("Weld", Deagle)
- deagleweld.Part0 = player.Character["Right Arm"]
- deagleweld.Part1 = Deagle
- deagleweld.C0 = CFrame.new(0.00705909729, -1.33079731, -0.368835449, -0.999332964, 0.0327772535, -0.0161077864, 0.0158357508, -0.00854244363, -0.999838173, -0.0329095535, -0.999426186, 0.00801769271) * CFrame.fromEulerAnglesXYZ(0.1,-0.2,0)
- deagleweld.Name = "DeagleWeld"
- for i = 0,0.7 , 0.07 do
- rightarm.C0 = rightarm.C0:lerp(CFrame.new(1.65201187, 0.226355314, 0, 0.925655842, -0.37836656, 0, 0.37836653, 0.925655782, -1.77635684e-15, 0, 1.77635684e-15, 1),i)
- wait()
- end
- local leftarm = Instance.new("Weld", player.Character["Right Arm"])
- leftarm.Part0 = player.Character["Right Arm"]
- leftarm.Part1 = player.Character["Left Arm"]
- leftarm.C0 = CFrame.new(-3.02089119, 0.127462864, -0.0794887543, 0.998161912, 0.0509746782, -0.0327772535, -0.0507204421, 0.99867624, 0.00854244363, 0.033169318, -0.00686426461, 0.999426186) * CFrame.new(0,1,0)
- leftarm.Name = "LeftArmWeld"
- for i = 0,1 , 0.05 do
- leftarm.C0 = leftarm.C0:lerp(CFrame.new( -1.06814194, -0.0316505432, 0, 0.642787576, -0.766044497, 1.38708486e-07, 0.766044617, 0.642787576, 4.12916563e-08, -3.89626535e-08, 3.68418398e-08, 0.999999881),i)
- rightarm.C0 = rightarm.C0:lerp(CFrame.new(1.0086174, 0.500000238, -1.14449883, 0.98480767, 0.173648193, -2.06955857e-08, 3.82449947e-08, -3.37138744e-07, -0.99999994, -0.173648193, 0.98480773, -3.38861582e-07),i)
- wait()
- end
- rightarm.C1 = CFrame.new(0,1,0)
- player.Character.Torso.Neck.C1 = CFrame.new(0,-0.7,0)
- local bodygyr = Instance.new("BodyGyro", player.Character.HumanoidRootPart)
- local canlook = true
- local function lookat(player, position, origin)
- if player == currentplayer and canlook then
- player.Character.Torso.Neck.C0 = CFrame.new(0,0.8,0) * CFrame.fromEulerAnglesXYZ(math.asin((position-origin).unit.y),0,0)
- rightarm.C0 = CFrame.new(1.2,0.4,0) * CFrame.fromEulerAnglesXYZ(math.asin((position-origin).unit.y),0,0) * CFrame.fromEulerAnglesXYZ(1.7,0,-0.2)
- end
- end
- deaglelook.OnServerEvent:connect(lookat)
- local function deadforreal()
- Deagle.CanCollide = false
- player.Character.Archivable = true
- local zombiecorpse = player.Character:Clone()
- player.Character:destroy()
- zombiecorpse.Parent = workspace
- game.Debris:AddItem(zombiecorpse, 30)
- local Humanoid = zombiecorpse:findFirstChildOfClass("Humanoid")
- local Torso = zombiecorpse.Torso
- Humanoid.PlatformStand = true
- Humanoid:SetStateEnabled("Dead", false)
- for i,v in pairs(Humanoid.Parent.Torso:GetChildren()) do
- if v.ClassName == 'Motor6D' or v.ClassName == 'Weld' then
- v:destroy()
- end
- end
- for i,v in pairs(Humanoid.Parent["Right Arm"]:GetChildren()) do
- if v.ClassName == 'Motor6D' or v.ClassName == 'Weld' then
- v:destroy()
- end
- end
- for i,v in pairs(zombiecorpse:GetChildren()) do
- if v.ClassName == "Part" then
- for q,w in pairs(v:GetChildren()) do
- if w.ClassName == "BodyPosition" or w.ClassName == "BodyVelocity" then
- w:destroy()
- end
- end
- end
- end
- local function makeconnections(limb, attachementone, attachmenttwo, twistlower, twistupper, upperangle)
- local connection = Instance.new('BallSocketConstraint', limb)
- connection.LimitsEnabled = true
- connection.Attachment0 = attachementone
- connection.Attachment1 = attachmenttwo
- connection.TwistLimitsEnabled = true
- connection.TwistLowerAngle = twistlower
- connection.TwistUpperAngle = twistupper
- connection.UpperAngle = 70
- end
- local function makehingeconnections(limb, attachementone, attachmenttwo, twistlower, twistupper, upperangle)
- local connection = Instance.new('HingeConstraint', limb)
- connection.Attachment0 = attachementone
- connection.Attachment1 = attachmenttwo
- connection.LimitsEnabled = true
- connection.LowerAngle = twistlower
- connection.UpperAngle = twistupper
- end
- Humanoid.Parent['Right Arm'].RightShoulderAttachment.Position = Vector3.new(0, 0.5, 0)
- Torso.RightCollarAttachment.Position = Vector3.new(1.5, 0.5, 0)
- Humanoid.Parent['Left Arm'].LeftShoulderAttachment.Position = Vector3.new(0, 0.5, 0)
- Torso.LeftCollarAttachment.Position = Vector3.new(-1.5, 0.5, 0)
- local RightLegAttachment = Instance.new("Attachment", Humanoid.Parent["Right Leg"])
- RightLegAttachment.Position = Vector3.new(0, 1, 0)
- local TorsoRightLegAttachment = Instance.new("Attachment", Torso)
- TorsoRightLegAttachment.Position = Vector3.new(0.5, -1, 0)
- --
- local LeftLegAttachment = Instance.new("Attachment", Humanoid.Parent["Left Leg"])
- LeftLegAttachment.Position = Vector3.new(0, 1, 0)
- local TorsoLeftLegAttachment = Instance.new("Attachment", Torso)
- TorsoLeftLegAttachment.Position = Vector3.new(-0.5, -1, 0)
- --
- if Humanoid.Parent:findFirstChild("Head") then
- local HeadAttachment = Instance.new("Attachment", Humanoid.Parent.Head)
- HeadAttachment.Position = Vector3.new(0, -0.5, 0)
- makehingeconnections(Humanoid.Parent.Head, HeadAttachment, Torso.NeckAttachment, -20, 20, 70)
- end
- makeconnections(Humanoid.Parent['Right Arm'], Humanoid.Parent['Right Arm'].RightShoulderAttachment, Torso.RightCollarAttachment, -80, 80)
- makeconnections(Humanoid.Parent['Left Arm'], Humanoid.Parent['Left Arm'].LeftShoulderAttachment, Torso.LeftCollarAttachment, -80, 80)
- makeconnections(Humanoid.Parent['Right Leg'], RightLegAttachment, TorsoRightLegAttachment, -80, 80, 70)
- makeconnections(Humanoid.Parent['Left Leg'], LeftLegAttachment, TorsoLeftLegAttachment, -80, 80, 70)
- if Humanoid.Parent:findFirstChild("Right Arm") then
- local limbcollider = Instance.new("Part", Humanoid.Parent["Right Arm"])
- limbcollider.Size = Vector3.new(1,1.3,1)
- limbcollider.Shape = "Cylinder"
- limbcollider.Transparency = 1
- local limbcolliderweld = Instance.new("Weld", limbcollider)
- limbcolliderweld.Part0 = Humanoid.Parent["Right Arm"]
- limbcolliderweld.Part1 = limbcollider
- limbcolliderweld.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2) * CFrame.new(-0.4,0,0)
- end
- --
- if Humanoid.Parent:findFirstChild("Left Arm") then
- local limbcollider = Instance.new("Part", Humanoid.Parent["Left Arm"])
- limbcollider.Size = Vector3.new(1,1.3,1)
- limbcollider.Shape = "Cylinder"
- limbcollider.Transparency = 1
- local limbcolliderweld = Instance.new("Weld", limbcollider)
- limbcolliderweld.Part0 = Humanoid.Parent["Left Arm"]
- limbcolliderweld.Part1 = limbcollider
- limbcolliderweld.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2) * CFrame.new(-0.4,0,0)
- end
- --
- if Humanoid.Parent:findFirstChild("Left Leg") then
- local limbcollider = Instance.new("Part", Humanoid.Parent["Left Leg"])
- limbcollider.Size = Vector3.new(1,1.3,1)
- limbcollider.Shape = "Cylinder"
- limbcollider.Transparency = 1
- local limbcolliderweld = Instance.new("Weld", limbcollider)
- limbcolliderweld.Part0 = Humanoid.Parent["Left Leg"]
- limbcolliderweld.Part1 = limbcollider
- limbcolliderweld.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2) * CFrame.new(-0.4,0,0)
- end
- --
- if Humanoid.Parent:findFirstChild("Right Leg") then
- local limbcollider = Instance.new("Part", Humanoid.Parent["Right Leg"])
- limbcollider.Size = Vector3.new(1,1.3,1)
- limbcollider.Shape = "Cylinder"
- limbcollider.Transparency = 1
- local limbcolliderweld = Instance.new("Weld", limbcollider)
- limbcolliderweld.Part0 = Humanoid.Parent["Right Leg"]
- limbcolliderweld.Part1 = limbcollider
- limbcolliderweld.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2) * CFrame.new(-0.4,0,0)
- end
- local ragdoll = zombiecorpse
- if ragdoll:findFirstChild("HumanoidRootPart") then
- ragdoll.HumanoidRootPart:destroy()
- end
- end
- player.Character.Humanoid.Died:connect(deadforreal)
- local function literally_kys(player)
- if player == currentplayer and isshooting.Value == false then
- isshooting.Value = true
- canlook = false
- rightarm.C1 = CFrame.new(0,0,0)
- player.Character.Torso.Neck.C0 = CFrame.new(0,1.5,0)
- player.Character.Torso.Neck.C1 = CFrame.new(0,0,0)
- for i = 0,1 , 0.05 do
- player.Character.Torso.Neck.C0 = player.Character.Torso.Neck.C0:lerp(CFrame.new(0,1.5,0),i)
- deagleweld.C0 = deagleweld.C0:lerp(CFrame.new(-0.196274757, -0.632213593, -0.205355883, 0.66243422, 0.315613568, -0.679388463, 0.749095082, -0.271707386, 0.604178309, 0.00609206362, -0.909155071, -0.41641292),i)
- leftarm.C0 = leftarm.C0:lerp(CFrame.new(-1.06814194, -0.0316505432, 0, 0.642787576, -0.766044497, 1.38708486e-07, 0.766044617, 0.642787576, 4.12916563e-08, -3.89626535e-08, 3.68418398e-08, 0.999999881),i)
- rightarm.C0 = rightarm.C0:lerp(CFrame.new(1.0086174, 0.500000238, -1.14449883, 0.98480767, 0.173648193, -2.06955857e-08, 3.82449947e-08, -3.37138744e-07, -0.99999994, -0.173648193, 0.98480773, -3.38861582e-07) * CFrame.fromEulerAnglesXYZ(0,0,-0.2),i)
- wait()
- end
- wait(math.random(1,1.5))
- local point = Instance.new("PointLight", Deagle)
- point.Brightness = 5
- sound:Play()
- wait()
- point:Destroy()
- Deagle.CanCollide = false
- player.Character.Archivable = true
- local zombiecorpse = player.Character:Clone()
- player.Character:destroy()
- zombiecorpse.Parent = workspace
- game.Debris:AddItem(zombiecorpse, 30)
- local Humanoid = zombiecorpse:findFirstChildOfClass("Humanoid")
- local Torso = zombiecorpse.Torso
- Humanoid.PlatformStand = true
- Humanoid:SetStateEnabled("Dead", false)
- for i,v in pairs(Humanoid.Parent.Torso:GetChildren()) do
- if v.ClassName == 'Motor6D' or v.ClassName == 'Weld' then
- v:destroy()
- end
- end
- for i,v in pairs(Humanoid.Parent["Right Arm"]:GetChildren()) do
- if v.ClassName == 'Motor6D' or v.ClassName == 'Weld' then
- v:destroy()
- end
- end
- for i,v in pairs(zombiecorpse:GetChildren()) do
- if v.ClassName == "Part" then
- for q,w in pairs(v:GetChildren()) do
- if w.ClassName == "BodyPosition" or w.ClassName == "BodyVelocity" then
- w:destroy()
- end
- end
- end
- end
- local function makeconnections(limb, attachementone, attachmenttwo, twistlower, twistupper, upperangle)
- local connection = Instance.new('BallSocketConstraint', limb)
- connection.LimitsEnabled = true
- connection.Attachment0 = attachementone
- connection.Attachment1 = attachmenttwo
- connection.TwistLimitsEnabled = true
- connection.TwistLowerAngle = twistlower
- connection.TwistUpperAngle = twistupper
- connection.UpperAngle = 70
- end
- local function makehingeconnections(limb, attachementone, attachmenttwo, twistlower, twistupper, upperangle)
- local connection = Instance.new('HingeConstraint', limb)
- connection.Attachment0 = attachementone
- connection.Attachment1 = attachmenttwo
- connection.LimitsEnabled = true
- connection.LowerAngle = twistlower
- connection.UpperAngle = twistupper
- end
- Humanoid.Parent['Right Arm'].RightShoulderAttachment.Position = Vector3.new(0, 0.5, 0)
- Torso.RightCollarAttachment.Position = Vector3.new(1.5, 0.5, 0)
- Humanoid.Parent['Left Arm'].LeftShoulderAttachment.Position = Vector3.new(0, 0.5, 0)
- Torso.LeftCollarAttachment.Position = Vector3.new(-1.5, 0.5, 0)
- local RightLegAttachment = Instance.new("Attachment", Humanoid.Parent["Right Leg"])
- RightLegAttachment.Position = Vector3.new(0, 1, 0)
- local TorsoRightLegAttachment = Instance.new("Attachment", Torso)
- TorsoRightLegAttachment.Position = Vector3.new(0.5, -1, 0)
- --
- local LeftLegAttachment = Instance.new("Attachment", Humanoid.Parent["Left Leg"])
- LeftLegAttachment.Position = Vector3.new(0, 1, 0)
- local TorsoLeftLegAttachment = Instance.new("Attachment", Torso)
- TorsoLeftLegAttachment.Position = Vector3.new(-0.5, -1, 0)
- --
- if Humanoid.Parent:findFirstChild("Head") then
- local HeadAttachment = Instance.new("Attachment", Humanoid.Parent.Head)
- HeadAttachment.Position = Vector3.new(0, -0.5, 0)
- makehingeconnections(Humanoid.Parent.Head, HeadAttachment, Torso.NeckAttachment, -20, 20, 70)
- end
- makeconnections(Humanoid.Parent['Right Arm'], Humanoid.Parent['Right Arm'].RightShoulderAttachment, Torso.RightCollarAttachment, -80, 80)
- makeconnections(Humanoid.Parent['Left Arm'], Humanoid.Parent['Left Arm'].LeftShoulderAttachment, Torso.LeftCollarAttachment, -80, 80)
- makeconnections(Humanoid.Parent['Right Leg'], RightLegAttachment, TorsoRightLegAttachment, -80, 80, 70)
- makeconnections(Humanoid.Parent['Left Leg'], LeftLegAttachment, TorsoLeftLegAttachment, -80, 80, 70)
- if Humanoid.Parent:findFirstChild("Right Arm") then
- local limbcollider = Instance.new("Part", Humanoid.Parent["Right Arm"])
- limbcollider.Size = Vector3.new(1,1.3,1)
- limbcollider.Shape = "Cylinder"
- limbcollider.Transparency = 1
- local limbcolliderweld = Instance.new("Weld", limbcollider)
- limbcolliderweld.Part0 = Humanoid.Parent["Right Arm"]
- limbcolliderweld.Part1 = limbcollider
- limbcolliderweld.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2) * CFrame.new(-0.4,0,0)
- end
- --
- if Humanoid.Parent:findFirstChild("Left Arm") then
- local limbcollider = Instance.new("Part", Humanoid.Parent["Left Arm"])
- limbcollider.Size = Vector3.new(1,1.3,1)
- limbcollider.Shape = "Cylinder"
- limbcollider.Transparency = 1
- local limbcolliderweld = Instance.new("Weld", limbcollider)
- limbcolliderweld.Part0 = Humanoid.Parent["Left Arm"]
- limbcolliderweld.Part1 = limbcollider
- limbcolliderweld.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2) * CFrame.new(-0.4,0,0)
- end
- --
- if Humanoid.Parent:findFirstChild("Left Leg") then
- local limbcollider = Instance.new("Part", Humanoid.Parent["Left Leg"])
- limbcollider.Size = Vector3.new(1,1.3,1)
- limbcollider.Shape = "Cylinder"
- limbcollider.Transparency = 1
- local limbcolliderweld = Instance.new("Weld", limbcollider)
- limbcolliderweld.Part0 = Humanoid.Parent["Left Leg"]
- limbcolliderweld.Part1 = limbcollider
- limbcolliderweld.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2) * CFrame.new(-0.4,0,0)
- end
- --
- if Humanoid.Parent:findFirstChild("Right Leg") then
- local limbcollider = Instance.new("Part", Humanoid.Parent["Right Leg"])
- limbcollider.Size = Vector3.new(1,1.3,1)
- limbcollider.Shape = "Cylinder"
- limbcollider.Transparency = 1
- local limbcolliderweld = Instance.new("Weld", limbcollider)
- limbcolliderweld.Part0 = Humanoid.Parent["Right Leg"]
- limbcolliderweld.Part1 = limbcollider
- limbcolliderweld.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2) * CFrame.new(-0.4,0,0)
- end
- local ragdoll = zombiecorpse
- if ragdoll:findFirstChild("HumanoidRootPart") then
- ragdoll.HumanoidRootPart:destroy()
- end
- end
- end
- deaglesuicide.OnServerEvent:connect(literally_kys)
- local function shootbullet(player)
- if player == currentplayer and isshooting.Value == false then
- isshooting.Value = true
- sound:Play()
- local bullet = Instance.new("Part", player.Character)
- local def = deflect:Clone()
- def.Parent = bullet
- def:Play()
- bullet.Size = Vector3.new(0.3,0.3,3.5)
- bullet.Material = "Neon"
- bullet.CFrame = Deagle.CFrame * CFrame.new(0,0,3)
- bullet.CanCollide = false
- local velocity = Instance.new("BodyVelocity", bullet)
- velocity.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
- velocity.Velocity = Deagle.CFrame.lookVector * -700
- game.Debris:AddItem(bullet, 5)
- local function kys(part)
- local damage = math.random(60,110)
- if part ~= bullet and part.Parent ~= "Accessory" and part.Parent.Parent ~= "Accessory" and part ~= "Accessory" then
- bullet:destroy()
- local humanoid = part.Parent:findFirstChildOfClass("Humanoid")
- if humanoid then
- bullet:destroy()
- if humanoid.MaxHealth > 300 then
- humanoid.MaxHealth = 300
- humanoid.Health = 300
- end
- if part.Name == "Head" then
- local velocitycorpse = Instance.new("BodyVelocity", part)
- velocitycorpse.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
- velocitycorpse.Velocity = player.Character.Torso.CFrame.lookVector * 15
- wait(0.1)
- humanoid.Health = 0
- end
- if humanoid.Health <= damage then
- if humanoid.Parent:findFirstChild("Torso") then
- if humanoid.Parent.Torso:findFirstChild("BodyBackAttachment") then
- humanoid.Parent.Archivable = true
- local zombiecorpse = humanoid.Parent:Clone()
- humanoid.Parent:destroy()
- zombiecorpse.Parent = workspace
- game.Debris:AddItem(zombiecorpse, 20)
- local Humanoid = zombiecorpse:findFirstChildOfClass("Humanoid")
- local Torso = zombiecorpse.Torso
- Humanoid.PlatformStand = true
- Humanoid:SetStateEnabled("Dead", false)
- for i,v in pairs(Humanoid.Parent.Torso:GetChildren()) do
- if v.ClassName == 'Motor6D' or v.ClassName == 'Weld' then
- v:destroy()
- end
- end
- for i,v in pairs(zombiecorpse:GetChildren()) do
- if v.ClassName == "Part" then
- for q,w in pairs(v:GetChildren()) do
- if w.ClassName == "BodyPosition" or w.ClassName == "BodyVelocity" then
- w:destroy()
- end
- end
- end
- end
- local function makeconnections(limb, attachementone, attachmenttwo, twistlower, twistupper, upperangle)
- local connection = Instance.new('BallSocketConstraint', limb)
- connection.LimitsEnabled = true
- connection.Attachment0 = attachementone
- connection.Attachment1 = attachmenttwo
- connection.TwistLimitsEnabled = true
- connection.TwistLowerAngle = twistlower
- connection.TwistUpperAngle = twistupper
- connection.UpperAngle = 70
- end
- local function makehingeconnections(limb, attachementone, attachmenttwo, twistlower, twistupper, upperangle)
- local connection = Instance.new('HingeConstraint', limb)
- connection.Attachment0 = attachementone
- connection.Attachment1 = attachmenttwo
- connection.LimitsEnabled = true
- connection.LowerAngle = twistlower
- connection.UpperAngle = twistupper
- end
- Humanoid.Parent['Right Arm'].RightShoulderAttachment.Position = Vector3.new(0, 0.5, 0)
- Torso.RightCollarAttachment.Position = Vector3.new(1.5, 0.5, 0)
- Humanoid.Parent['Left Arm'].LeftShoulderAttachment.Position = Vector3.new(0, 0.5, 0)
- Torso.LeftCollarAttachment.Position = Vector3.new(-1.5, 0.5, 0)
- local RightLegAttachment = Instance.new("Attachment", Humanoid.Parent["Right Leg"])
- RightLegAttachment.Position = Vector3.new(0, 1, 0)
- local TorsoRightLegAttachment = Instance.new("Attachment", Torso)
- TorsoRightLegAttachment.Position = Vector3.new(0.5, -1, 0)
- --
- local LeftLegAttachment = Instance.new("Attachment", Humanoid.Parent["Left Leg"])
- LeftLegAttachment.Position = Vector3.new(0, 1, 0)
- local TorsoLeftLegAttachment = Instance.new("Attachment", Torso)
- TorsoLeftLegAttachment.Position = Vector3.new(-0.5, -1, 0)
- --
- if Humanoid.Parent:findFirstChild("Head") then
- local HeadAttachment = Instance.new("Attachment", Humanoid.Parent.Head)
- HeadAttachment.Position = Vector3.new(0, -0.5, 0)
- makehingeconnections(Humanoid.Parent.Head, HeadAttachment, Torso.NeckAttachment, -20, 20, 70)
- end
- makeconnections(Humanoid.Parent['Right Arm'], Humanoid.Parent['Right Arm'].RightShoulderAttachment, Torso.RightCollarAttachment, -80, 80)
- makeconnections(Humanoid.Parent['Left Arm'], Humanoid.Parent['Left Arm'].LeftShoulderAttachment, Torso.LeftCollarAttachment, -80, 80)
- makeconnections(Humanoid.Parent['Right Leg'], RightLegAttachment, TorsoRightLegAttachment, -80, 80, 70)
- makeconnections(Humanoid.Parent['Left Leg'], LeftLegAttachment, TorsoLeftLegAttachment, -80, 80, 70)
- if Humanoid.Parent:findFirstChild("Right Arm") then
- local limbcollider = Instance.new("Part", Humanoid.Parent["Right Arm"])
- limbcollider.Size = Vector3.new(1,1.3,1)
- limbcollider.Shape = "Cylinder"
- limbcollider.Transparency = 1
- local limbcolliderweld = Instance.new("Weld", limbcollider)
- limbcolliderweld.Part0 = Humanoid.Parent["Right Arm"]
- limbcolliderweld.Part1 = limbcollider
- limbcolliderweld.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2) * CFrame.new(-0.4,0,0)
- for i,v in pairs(zombiecorpse["Right Arm"]:GetChildren()) do
- if v.ClassName == 'Motor6D' or v.ClassName == 'Weld' then
- v:destroy()
- end
- end
- end
- --
- if Humanoid.Parent:findFirstChild("Left Arm") then
- local limbcollider = Instance.new("Part", Humanoid.Parent["Left Arm"])
- limbcollider.Size = Vector3.new(1,1.3,1)
- limbcollider.Shape = "Cylinder"
- limbcollider.Transparency = 1
- local limbcolliderweld = Instance.new("Weld", limbcollider)
- limbcolliderweld.Part0 = Humanoid.Parent["Left Arm"]
- limbcolliderweld.Part1 = limbcollider
- limbcolliderweld.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2) * CFrame.new(-0.4,0,0)
- end
- --
- if Humanoid.Parent:findFirstChild("Left Leg") then
- local limbcollider = Instance.new("Part", Humanoid.Parent["Left Leg"])
- limbcollider.Size = Vector3.new(1,1.3,1)
- limbcollider.Shape = "Cylinder"
- limbcollider.Transparency = 1
- local limbcolliderweld = Instance.new("Weld", limbcollider)
- limbcolliderweld.Part0 = Humanoid.Parent["Left Leg"]
- limbcolliderweld.Part1 = limbcollider
- limbcolliderweld.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2) * CFrame.new(-0.4,0,0)
- end
- --
- if Humanoid.Parent:findFirstChild("Right Leg") then
- local limbcollider = Instance.new("Part", Humanoid.Parent["Right Leg"])
- limbcollider.Size = Vector3.new(1,1.3,1)
- limbcollider.Shape = "Cylinder"
- limbcollider.Transparency = 1
- local limbcolliderweld = Instance.new("Weld", limbcollider)
- limbcolliderweld.Part0 = Humanoid.Parent["Right Leg"]
- limbcolliderweld.Part1 = limbcollider
- limbcolliderweld.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2) * CFrame.new(-0.4,0,0)
- end
- local ragdoll = zombiecorpse
- if ragdoll:findFirstChild("HumanoidRootPart") then
- ragdoll.HumanoidRootPart.CanCollide = false
- ragdoll.HumanoidRootPart:destroy()
- end
- end
- else
- if humanoid.Parent:findFirstChild("UpperTorso") then
- if humanoid.Parent.UpperTorso:findFirstChild("BodyBackAttachment") then
- humanoid.Parent.Archivable = true
- local zombiecorpse = humanoid.Parent:Clone()
- humanoid.Parent:destroy()
- zombiecorpse.Parent = workspace
- game.Debris:AddItem(zombiecorpse, 20)
- for i,v in pairs(zombiecorpse:GetChildren()) do
- if v.ClassName == "Part" or v.ClassName == "MeshPart" then
- for q,w in pairs(v:GetChildren()) do
- if w.ClassName == "BodyPosition" or w.ClassName == "BodyVelocity" then
- w:destroy()
- end
- end
- end
- end
- local UpperTorso = zombiecorpse.UpperTorso
- local Humanoid = zombiecorpse:findFirstChildOfClass("Humanoid")
- Humanoid.PlatformStand = true
- local function makeballconnections(limb, attachementone, attachmenttwo, twistlower, twistupper)
- local connection = Instance.new('BallSocketConstraint', limb)
- connection.LimitsEnabled = true
- connection.Attachment0 = attachementone
- connection.Attachment1 = attachmenttwo
- connection.TwistLimitsEnabled = true
- connection.TwistLowerAngle = twistlower
- connection.TwistUpperAngle = twistupper
- local limbcollider = Instance.new("Part", limb)
- limbcollider.Size = Vector3.new(0.1,1,1)
- limbcollider.Shape = "Cylinder"
- limbcollider.Transparency = 1
- limbcollider:BreakJoints()
- local limbcolliderweld = Instance.new("Weld", limbcollider)
- limbcolliderweld.Part0 = limb
- limbcolliderweld.Part1 = limbcollider
- limbcolliderweld.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2)
- end
- local function makehingeconnections(limb, attachementone, attachmenttwo, lower, upper)
- local connection = Instance.new('HingeConstraint', limb)
- connection.LimitsEnabled = true
- connection.Attachment0 = attachementone
- connection.Attachment1 = attachmenttwo
- connection.LimitsEnabled = true
- connection.LowerAngle = lower
- connection.UpperAngle = upper
- local limbcollider = Instance.new("Part", limb)
- limbcollider.Size = Vector3.new(0.1,1,1)
- limbcollider.Shape = "Cylinder"
- limbcollider.Transparency = 1
- limbcollider:BreakJoints()
- local limbcolliderweld = Instance.new("Weld", limbcollider)
- limbcolliderweld.Part0 = limb
- limbcolliderweld.Part1 = limbcollider
- limbcolliderweld.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2)
- end
- local HeadAttachment = Instance.new("Attachment", Humanoid.Parent.Head)
- HeadAttachment.Position = Vector3.new(0, -0.5, 0)
- makehingeconnections(Humanoid.Parent.Head, HeadAttachment, UpperTorso.NeckAttachment, -50, 50)
- makehingeconnections(Humanoid.Parent.LowerTorso, Humanoid.Parent.LowerTorso.WaistRigAttachment, Humanoid.Parent.UpperTorso.WaistRigAttachment, -50, 50)
- makeballconnections(Humanoid.Parent.LeftUpperArm, Humanoid.Parent.LeftUpperArm.LeftShoulderRigAttachment, Humanoid.Parent.UpperTorso.LeftShoulderRigAttachment, -50, 50)
- makehingeconnections(Humanoid.Parent.LeftLowerArm, Humanoid.Parent.LeftLowerArm.LeftElbowRigAttachment, Humanoid.Parent.LeftUpperArm.LeftElbowRigAttachment, 0, -60)
- makehingeconnections(Humanoid.Parent.LeftHand, Humanoid.Parent.LeftHand.LeftWristRigAttachment, Humanoid.Parent.LeftLowerArm.LeftWristRigAttachment, -20, 20)
- --
- makeballconnections(Humanoid.Parent.RightUpperArm, Humanoid.Parent.RightUpperArm.RightShoulderRigAttachment, Humanoid.Parent.UpperTorso.RightShoulderRigAttachment, -50, 50)
- makehingeconnections(Humanoid.Parent.RightLowerArm, Humanoid.Parent.RightLowerArm.RightElbowRigAttachment, Humanoid.Parent.RightUpperArm.RightElbowRigAttachment, 0, -60)
- makehingeconnections(Humanoid.Parent.RightHand, Humanoid.Parent.RightHand.RightWristRigAttachment, Humanoid.Parent.RightLowerArm.RightWristRigAttachment, -20, 20)
- --
- makeballconnections(Humanoid.Parent.RightUpperLeg, Humanoid.Parent.RightUpperLeg.RightHipRigAttachment, Humanoid.Parent.LowerTorso.RightHipRigAttachment, -360, 360)
- makehingeconnections(Humanoid.Parent.RightLowerLeg, Humanoid.Parent.RightLowerLeg.RightKneeRigAttachment, Humanoid.Parent.RightUpperLeg.RightKneeRigAttachment, 0, 60)
- makehingeconnections(Humanoid.Parent.RightFoot, Humanoid.Parent.RightFoot.RightAnkleRigAttachment, Humanoid.Parent.RightLowerLeg.RightAnkleRigAttachment, -20, 20)
- --
- makeballconnections(Humanoid.Parent.LeftUpperLeg, Humanoid.Parent.LeftUpperLeg.LeftHipRigAttachment, Humanoid.Parent.LowerTorso.LeftHipRigAttachment, -360, 360)
- makehingeconnections(Humanoid.Parent.LeftLowerLeg, Humanoid.Parent.LeftLowerLeg.LeftKneeRigAttachment, Humanoid.Parent.LeftUpperLeg.LeftKneeRigAttachment, 0, 60)
- makehingeconnections(Humanoid.Parent.LeftFoot, Humanoid.Parent.LeftFoot.LeftAnkleRigAttachment, Humanoid.Parent.LeftLowerLeg.LeftAnkleRigAttachment, -20, 20)
- for i,v in pairs(Humanoid.Parent:GetChildren()) do
- if v.ClassName == "Accessory" then
- local attachment1 = v.Handle:findFirstChildOfClass("Attachment")
- if attachment1 then
- for q,w in pairs(Humanoid.Parent:GetChildren()) do
- if w.ClassName == "Part" then
- local attachment2 = w:findFirstChild(attachment1.Name)
- if attachment2 then
- local hinge = Instance.new("HingeConstraint", v.Handle)
- hinge.Attachment0 = attachment1
- hinge.Attachment1 = attachment2
- hinge.LimitsEnabled = true
- hinge.LowerAngle = 0
- hinge.UpperAngle = 0
- end
- end
- end
- end
- end
- end
- for i,v in pairs(zombiecorpse:GetChildren()) do
- for q,w in pairs(v:GetChildren()) do
- if w.ClassName == "Motor6D" and w.Name ~= "Neck" then
- w:destroy()
- end
- end
- end
- local ragdoll = zombiecorpse
- if ragdoll:findFirstChild("HumanoidRootPart") then
- ragdoll.HumanoidRootPart.Anchored = true
- ragdoll.HumanoidRootPart.CanCollide = false
- end
- end
- end
- end
- else
- humanoid:TakeDamage(damage)
- end
- end
- end
- end
- bullet.Touched:connect(kys)
- local point = Instance.new("PointLight", Deagle)
- point.Brightness = 5
- for i = 1,10 do
- player.Character.Torso.Neck.C1 = player.Character.Torso.Neck.C1 * CFrame.fromEulerAnglesXYZ(-0.03,0,0)
- rightarm.C1 = rightarm.C1 * CFrame.new(0,-0.08,0) * CFrame.fromEulerAnglesXYZ(-0.05,0,0)
- end
- wait()
- point:destroy()
- for i = 1,10 do
- player.Character.Torso.Neck.C1 = player.Character.Torso.Neck.C1 * CFrame.fromEulerAnglesXYZ(0.03,0,0)
- rightarm.C1 = rightarm.C1 * CFrame.new(0,0.08,0) * CFrame.fromEulerAnglesXYZ(0.05,0,0)
- wait()
- end
- player.Character.Torso.Neck.C1 = CFrame.new(0,-0.7,0)
- rightarm.C1 = CFrame.new(0,1,0)
- isshooting.Value = false
- end
- end
- deagleshoot.OnServerEvent:connect(shootbullet)
- end
- end
- deaglebegin.OnServerEvent:connect(start)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement