Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local plr = game.Players.LocalPlayer
- local char = plr.Character
- local mouse = plr:GetMouse()
- local torso = char.Torso
- local head = char.Head
- local ra = char["Right Arm"]
- local la = char["Left Arm"]
- local rl = char["Right Leg"]
- local ll = char["Left Leg"]
- local human = char["Humanoid"]
- local camera = workspace.CurrentCamera
- local rs = torso:findFirstChild("Right Shoulder")
- local ls = torso:findFirstChild("Left Shoulder")
- local neck = torso:findFirstChild("Neck")
- local NO_moar_shooting = false
- local RunService = game:service'RunService'
- local ammo = 999999999999
- local sound = Instance.new("Sound", head)
- sound.SoundId = "http://roblox.com/asset/?id=11944350"
- sound.Volume = 1
- local reloads = Instance.new("Sound", head)
- reloads.SoundId = "http://roblox.com/asset/?id=106626233"
- reloads.Volume = 1
- local activate = Instance.new("Sound", head)
- activate.SoundId = "http://roblox.com/asset/?id=106626233"
- activate.Volume = 1
- local equipped = false
- local debounce = false
- local face = head.face
- release = Instance.new("Part", nil)
- release.FormFactor = "Custom"
- release.Size = Vector3.new(0.0, 0.0, 0.0)
- release.BrickColor = BrickColor.Black()
- local weld = Instance.new("Weld", release)
- weld.Part0 = release
- release.Locked = true
- weld.Part1 = head
- weld.C0 = CFrame.new(0, -0.5, -0.2) * CFrame.Angles(math.pi/2, 0, 0)
- local mesh = Instance.new("CylinderMesh", release)
- release2 = Instance.new("Part", nil)
- release2.FormFactor = "Custom"
- release2.Size = Vector3.new(0.0, 0.0, 0.0)
- release2.BrickColor = BrickColor.Black()
- release2.Locked = true
- local weld2 = Instance.new("Weld", release2)
- weld2.Part0 = release2
- weld2.Part1 = head
- weld2.C0 = CFrame.new(0, -0.5, 0) * CFrame.Angles(math.pi/2, 0, 0)
- local mesh2 = Instance.new("CylinderMesh", release2)
- headext = Instance.new("Part", nil)
- headext.Position = torso.Position
- headext.FormFactor = "Custom"
- headext.Transparency = 1
- headext:BreakJoints()
- headext.Size = Vector3.new(2, 1, 1)
- headextw = Instance.new("Weld", headext)
- headextw.C0 = CFrame.new(Vector3.new(0, 1.5, 0))
- headextw.Part0 = torso
- headextw.Part1 = headext
- headextw.C1 = CFrame.new()
- headweld = Instance.new("Weld", headext)
- game:service("RunService").Stepped:connect(function()
- headweld.C0 = CFrame.new(Vector3.new(0,0,0), torso.CFrame:pointToObjectSpace(mouse.Hit.p)) * CFrame.Angles(0, 0, 0)
- end)
- headweld.Part0 = headext
- headweld.C1 = CFrame.new()
- headweld.Part1 = head
- local Screen = Instance.new("ScreenGui", plr:findFirstChild("PlayerGui"))
- local TextBox = Instance.new("TextLabel", Screen)
- TextBox.Position = UDim2.new(0.1, 0, 0.95, 0)
- TextBox.Size = UDim2.new(0, 200, 0.05, 0)
- TextBox.BackgroundTransparency = 1
- game:service'RunService'.Stepped:connect(function()
- TextBox.Text = ("Ammo: "..ammo)
- end)
- TextBox.Font = "SourceSansBold"
- TextBox.TextColor3 = Color3.new(1, 1, 1)
- TextBox.FontSize = "Size36"
- TextBox.TextStrokeTransparency = 0
- local pl = Instance.new("PointLight", release)
- pl.Range = 16
- pl.Brightness = 5
- pl.Color = Color3.new(1, 199/255, 67/255)
- pl.Enabled = false
- function reload()
- if ammo > 7 then return end
- reloads:play()
- ammo = ammo + 1
- activate:play()
- wait(0.3)
- debounce = false
- end
- mouse.KeyDown:connect(function(key)
- if key == "r" then
- if debounce then return end
- if not equipped then return end
- if ammo > 7 then return end
- debounce = true
- reload()
- end
- if key == "q" then
- equipped = not equipped
- if equipped then
- headext.Parent = char
- release.Parent = char
- release2.Parent = char
- for scale = 0, 1, 0.2 do
- weld2.C0 = CFrame.new(0, -scale + 0.5, 0) * CFrame.Angles(math.pi/2, 0, 0)
- weld.C0 = CFrame.new(0, -scale + 0.5, -0.2) * CFrame.Angles(math.pi/2, 0, 0)
- mesh.Scale = Vector3.new(1, scale, 1)
- mesh2.Scale = Vector3.new(1, scale, 1)
- wait()
- end
- else
- face.Parent = head
- release.Parent = nil
- release2.Parent = nil
- headext.Parent = nil
- end
- end
- end)
- mouse.Button1Down:connect(function()
- if not equipped then return end
- if ammo < 1 then return end
- if debounce then return end
- debounce = true
- sound:play()
- pl.Enabled = true
- ammo = ammo - 1
- coroutine.wrap(function()
- wait(0.07)
- pl.Enabled = false
- end)()
- coroutine.wrap(function()
- for scale = 0.7, 1, 0.1 do
- mesh.Scale = Vector3.new(1, scale, 1)
- wait()
- end
- end)()
- for bullet = 0, 5 do
- coroutine.wrap(function()
- if char.Humanoid.Health < 1 then return end
- local rayPart = Instance.new("Part")
- rayPart.Name = "RayPart"
- rayPart.BrickColor = BrickColor.Green()
- rayPart.Anchored = true
- rayPart.CanCollide = false
- rayPart.Locked = true
- rayPart.TopSurface = Enum.SurfaceType.Smooth
- rayPart.BottomSurface = Enum.SurfaceType.Smooth
- rayPart.formFactor = Enum.FormFactor.Custom
- rayPart.Size = Vector3.new(0.2, 0.2, 4)
- Instance.new("BlockMesh", rayPart).Scale = Vector3.new(0.2, 0.2, 0.5)
- local bulletposition = release.Position
- local bulletvelocity = (Vector3.new(math.random(-7,7), math.random(-7,7), math.random(-7,7)))+( mouse.Hit.p - bulletposition).unit*150
- local bulletlastposition = bulletposition
- rayPart.CFrame = CFrame.new( bulletposition, bulletposition+bulletvelocity )
- coroutine.resume(coroutine.create(function()
- while true do
- local dt = wait()
- bulletlastposition = bulletposition
- bulletvelocity = bulletvelocity + (Vector3.new(0, -9.81*10, 0)*dt)
- bulletposition = bulletposition + (bulletvelocity*dt)
- rayPart.Parent = workspace
- local ray = Ray.new(bulletlastposition, (bulletposition - bulletlastposition))
- local hit, hitposition = workspace:FindPartOnRayWithIgnoreList( ray, { char, rayPart} )
- if (torso.Position - rayPart.Position).magnitude > 440 then
- rayPart:Destroy()
- break
- end
- if hit then
- local damage = math.random(9999999, 99999999)
- if hit.Parent:findFirstChild("Humanoid") ~= nil then
- hit.Parent.Humanoid.Health = hit.Parent.Humanoid.Health - damage
- coroutine.wrap(function()
- local prt = Instance.new("Part", char)
- prt.FormFactor = "Custom"
- prt.Size = Vector3.new(0.1, 0.1, 0.1)
- prt.Transparency = 1
- prt.CanCollide = false
- prt.CFrame = CFrame.new(rayPart.CFrame.x, rayPart.CFrame.y, rayPart.CFrame.z)
- prt.Anchored = true
- coroutine.resume(coroutine.create(function()
- for i = 2, 10, 0.1 do
- if prt == nil then return end
- prt.CFrame = prt.CFrame * CFrame.new(0, 0.05, 0)
- game:service'RunService'.Stepped:wait()
- end
- end))
- local bg = Instance.new("BillboardGui")
- bg.Parent = prt
- bg.Adornee = prt
- bg.Size = UDim2.new(4, 0, 3.5, 0)
- bg.ExtentsOffset = Vector3.new(0, 0, 0)
- local lol = Instance.new("TextLabel")
- lol.Size = UDim2.new(1.3, 0, 0.4, 0)
- lol.TextScaled = true
- lol.TextWrapped = true
- lol.BackgroundTransparency = 1
- lol.Parent = bg
- lol.FontSize = "Size24"
- lol.TextColor3 = Color3.new(1, 0, 0)
- lol.TextStrokeTransparency = 0
- lol.Font = "ArialBold"
- lol.Text = "-"..damage
- wait(3)
- prt:Destroy()
- end)()
- end
- if hit.Parent:IsA("Hat") and hit.Parent.Parent:findFirstChild("Humanoid") ~= nil then
- hit.Parent.Parent.Humanoid.Health = hit.Parent.Parent.Humanoid.Health - damage
- coroutine.wrap(function()
- local prt = Instance.new("Part", char)
- prt.FormFactor = "Custom"
- prt.Size = Vector3.new(0.1, 0.1, 0.1)
- prt.Transparency = 1
- prt.CanCollide = false
- prt.CFrame = CFrame.new(rayPart.CFrame.x, rayPart.CFrame.y, rayPart.CFrame.z)
- prt.Anchored = true
- coroutine.resume(coroutine.create(function()
- for i = 2, 10, 0.1 do
- if prt == nil then return end
- prt.CFrame = prt.CFrame * CFrame.new(0, 0.05, 0)
- game:service'RunService'.Stepped:wait()
- end
- end))
- local bg = Instance.new("BillboardGui")
- bg.Parent = prt
- bg.Adornee = prt
- bg.Size = UDim2.new(4, 0, 3.5, 0)
- bg.ExtentsOffset = Vector3.new(0, 0, 0)
- local lol = Instance.new("TextLabel")
- lol.Size = UDim2.new(1.3, 0, 0.4, 0)
- lol.TextScaled = true
- lol.TextWrapped = true
- lol.BackgroundTransparency = 1
- lol.Parent = bg
- lol.FontSize = "Size24"
- lol.TextColor3 = Color3.new(1, 0, 0)
- lol.TextStrokeTransparency = 0
- lol.Font = "ArialBold"
- lol.Text = "-"..damage
- wait(3)
- prt:Destroy()
- end)()
- end
- bulletposition = hitposition
- rayPart.CFrame = CFrame.new(bulletposition, bulletposition+bulletvelocity)
- rayPart:Destroy()
- break
- end
- rayPart.CFrame = CFrame.new(bulletposition, bulletposition+bulletvelocity)
- end
- end))
- end)()
- end
- wait(0.3)
- debounce = false
- end)
- if graphic then
- graphicid = graphic.Graphic
- end
- caninfect = true
- invisible = false
- function targettool()
- local torso = mouse.Target.Parent:findFirstChild("Torso")
- local humanoid = mouse.Target.Parent:findFirstChild("Humanoid")
- if torso and humanoid then
- target = torso
- print("You are now targetting "..torso.Parent.Name)
- end
- end
- mouse.Button1Down:connect(targettool)
- function inv(key)
- if key == "q" then
- invisible = not invisible
- if invisible then
- game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = 40
- for i,v in pairs(game.Players.LocalPlayer.Character:GetChildren()) do
- if v.ClassName == "Part" then
- if v.Name == "HumanoidRootPart" then
- else
- v.Transparency = 1
- end
- end
- game.Players.LocalPlayer.Character.Head.face.Transparency = 1
- for q,w in pairs(game.Players.LocalPlayer.Character:GetChildren()) do
- if w.ClassName == "Shirt Graphic" then
- w.Graphic = "rbxassetid://0"
- end
- end
- for e,r in pairs(game.Players.LocalPlayer.Character:GetChildren()) do
- if r.ClassName == "Accessory" or r.ClassName == "Hat" then
- r.Handle.Transparency = 1
- end
- end
- end
- end
- if not invisible then
- game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = 16
- for i,v in pairs(game.Players.LocalPlayer.Character:GetChildren()) do
- if v.ClassName == "Part" then
- if v.Name == "HumanoidRootPart" then
- else
- v.Transparency = 0
- end
- end
- game.Players.LocalPlayer.Character.Head.face.Transparency = 0
- for q,w in pairs(game.Players.LocalPlayer.Character:GetChildren()) do
- if w.ClassName == "Shirt Graphic" then
- w.Graphic = graphicid
- end
- end
- for e,r in pairs(game.Players.LocalPlayer.Character:GetChildren()) do
- if r.ClassName == "Accessory" or r.ClassName == "Hat" then
- r.Handle.Transparency = 0
- end
- end
- end
- end
- end
- end
- mouse.KeyDown:connect(inv)
- function zawmbie(part)
- if part.Parent then
- torso = part.Parent:findFirstChild("Torso")
- humanoid = part.Parent:findFirstChild("Humanoid")
- end
- if caninfect and torso and humanoid ~= nil and part.Parent ~= nil then
- if torso.Parent.Name == "Infected Player" then
- --nono
- else
- torso.Parent.Archivable = true
- local zombieclone = torso.Parent:Clone()
- zombieclone.Name = "Infected Player"
- torso.Anchored = true
- humanoid.Health = 0
- for i,v in pairs(torso.Parent:GetChildren()) do
- if v.ClassName == "Part" then
- v.CFrame = v.CFrame * CFrame.new(0,50,0)
- v.Anchored = true
- v.Transparency = 1
- end
- if v.ClassName == "Hat" or v.ClassName == "Accessory" then
- v:destroy()
- end
- end
- local infectionsound = Instance.new("Sound", torso.Parent.Head)
- infectionsound.SoundId = "rbxassetid://130976109"
- infectionsound.Volume = 10
- infectionsound:Play()
- zombieclone.Parent = workspace
- local function die()
- wait(5)
- zombieclone:destroy()
- end
- zombieclone.Humanoid.Died:connect(die)
- local face = zombieclone.Head:findFirstChild("face")
- if face ~= nil then
- face.Texture = "rbxassetid://19986263"
- end
- zombieclone.Torso.CFrame = zombieclone.Torso.CFrame * CFrame.new(4,0,4)
- zombieclone.Humanoid.MaxHealth = humanoid.MaxHealth * 2
- zombieclone.Humanoid.Health = zombieclone.Humanoid.MaxHealth
- zombieclone.Humanoid.WalkSpeed = 1
- local rarmfornow = zombieclone.Torso:findFirstChild("Right Shoulder")
- local larmfornow = zombieclone.Torso:findFirstChild("Left Shoulder")
- if rarmfornow ~= nil then
- for i = 1,2 do
- wait()
- rarmfornow.C0 = rarmfornow.C0 * CFrame.Angles(0,0,0.09)
- end
- for i = 1,3 do
- wait()
- rarmfornow.C0 = rarmfornow.C0 * CFrame.Angles(0,0,0.11)
- end
- for i = 1,6 do
- wait()
- rarmfornow.C0 = rarmfornow.C0 * CFrame.Angles(0,0,0.12)
- end
- for i = 1,3 do
- wait()
- rarmfornow.C0 = rarmfornow.C0 * CFrame.Angles(0,0,0.11)
- end
- for i = 1,2 do
- wait()
- rarmfornow.C0 = rarmfornow.C0 * CFrame.Angles(0,0,0.09)
- end
- end
- if larmfornow ~= nil then
- for i = 1,2 do
- wait()
- larmfornow.C0 = larmfornow.C0 * CFrame.Angles(0,0,-0.09)
- end
- for i = 1,3 do
- wait()
- larmfornow.C0 = larmfornow.C0 * CFrame.Angles(0,0,-0.11)
- end
- for i = 1,6 do
- wait()
- larmfornow.C0 = larmfornow.C0 * CFrame.Angles(0,0,-0.12)
- end
- for i = 1,3 do
- wait()
- larmfornow.C0 = larmfornow.C0 * CFrame.Angles(0,0,-0.11)
- end
- for i = 1,2 do
- wait()
- larmfornow.C0 = larmfornow.C0 * CFrame.Angles(0,0,-0.09)
- end
- end
- wait(3)
- zombieclone.Torso.Touched:connect(zawmbie)
- canchange = true
- function change()
- if canchange then
- canchange = false
- ply = game.Players:GetPlayers()[math.random(game.Players.NumPlayers)]
- local plytorso = ply.Character:findFirstChild("Torso")
- local plyhumanoid = ply.Character:findFirstChild("Humanoid")
- if ply.Name == game.Players.LocalPlayer.Name or not plyhumanoid or not plytorso or plytorso.Transparency == 1 then
- change()
- else
- target = ply.Character.Torso
- print(target.Parent.Name)
- end
- wait(5)
- canchange = true
- end
- end
- zombieclone.Torso.Touched:connect(change)
- while true do
- wait()
- for i,v in pairs(game.Players:GetChildren()) do
- local char = v:findFirstChild("Character")
- if char ~= nil then
- local ws = v.Character:findFirstChild("Humanoid")
- if ws ~= nil then
- if ws.WalkSpeed >= 41 then
- ws.WalkSpeed = 16
- end
- end
- end
- end
- local targethum = target.Parent:findFirstChild("Humanoid")
- if targethum ~= nil then
- for i,v in pairs(workspace:GetChildren()) do
- if v.ClassName == "Model" and v.Name == "Infected Player" then
- if zombieclone.Humanoid.WalkSpeed <= 17 then
- zombieclone.Humanoid.WalkSpeed = zombieclone.Humanoid.WalkSpeed + 1
- end
- if zombieclone.Humanoid.WalkSpeed >= 17 then
- zombieclone.Humanoid.WalkSpeed = 17
- end
- v.Humanoid.WalkToPoint = target.Position
- local rleg = zombieclone.Torso:findFirstChild("Right Hip")
- local lleg = zombieclone.Torso:findFirstChild("Left Hip")
- if rleg ~= nil and lleg ~= nil then
- for i = 1,5 do
- wait()
- lleg.C0 = lleg.C0 * CFrame.Angles(0,0,0.13)
- rleg.C0 = rleg.C0 * CFrame.Angles(0,0,0.13)
- end
- v.Humanoid.WalkToPoint = target.Position
- for i = 1,10 do
- wait()
- lleg.C0 = lleg.C0 * CFrame.Angles(0,0,-0.13)
- rleg.C0 = rleg.C0 * CFrame.Angles(0,0,-0.13)
- end
- v.Humanoid.WalkToPoint = target.Position
- for i = 1,5 do
- wait()
- lleg.C0 = lleg.C0 * CFrame.Angles(0,0,0.13)
- rleg.C0 = rleg.C0 * CFrame.Angles(0,0,0.13)
- end
- end
- end
- end
- end
- end
- end
- end
- end
- game.Players.LocalPlayer.Character.Torso.Touched:connect(zawmbie)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement