Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Converted with ttyyuu12345's model to script plugin v4
- 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
- cors = {}
- mas = Instance.new("Model",game:GetService("Lighting"))
- Model0 = Instance.new("Model")
- Part1 = Instance.new("Part")
- SpecialMesh2 = Instance.new("SpecialMesh")
- Decal3 = Instance.new("Decal")
- Part4 = Instance.new("Part")
- Part5 = Instance.new("Part")
- Part6 = Instance.new("Part")
- Humanoid7 = Instance.new("Humanoid")
- Part8 = Instance.new("Part")
- Script9 = Instance.new("Script")
- Part10 = Instance.new("Part")
- Script11 = Instance.new("Script")
- ObjectValue12 = Instance.new("ObjectValue")
- IntValue13 = Instance.new("IntValue")
- Script14 = Instance.new("Script")
- Script15 = Instance.new("Script")
- Script16 = Instance.new("Script")
- Model0.Name = "Zombie"
- Model0.Parent = mas
- Model0.PrimaryPart = Part1
- Part1.Name = "Head"
- Part1.Parent = Model0
- Part1.CFrame = CFrame.new(-179.456482, 4.50000429, 27.0912628, 3.4228453e-08, -5.1348214e-21, 0.99999696, 3.85277586e-21, 1, 5.1348214e-21, -0.99999696, 3.85276576e-21, 3.4228453e-08)
- Part1.Orientation = Vector3.new(0, 90, 0)
- Part1.Position = Vector3.new(-179.456482, 4.50000429, 27.0912628)
- Part1.Rotation = Vector3.new(0, 89.8600006, 0)
- Part1.Color = Color3.new(0.631373, 0.768627, 0.54902)
- Part1.Velocity = Vector3.new(3.64787943e-20, 0.00686328812, 3.64330182e-20)
- Part1.Size = Vector3.new(2, 1, 1)
- Part1.BrickColor = BrickColor.new("Medium green")
- Part1.RotVelocity = Vector3.new(4.07127958e-25, 3.33696291e-22, 6.94702468e-25)
- Part1.TopSurface = Enum.SurfaceType.Smooth
- Part1.brickColor = BrickColor.new("Medium green")
- Part1.FormFactor = Enum.FormFactor.Symmetric
- Part1.formFactor = Enum.FormFactor.Symmetric
- SpecialMesh2.Parent = Part1
- SpecialMesh2.Scale = Vector3.new(1.25, 1.25, 1.25)
- Decal3.Name = "face"
- Decal3.Parent = Part1
- Part4.Name = "Torso"
- Part4.Parent = Model0
- Part4.CFrame = CFrame.new(-179.456482, 3.00000906, 27.0912628, 3.4228453e-08, -5.1348214e-21, 0.99999696, 3.85277586e-21, 1, 5.1348214e-21, -0.99999696, 3.85276576e-21, 3.4228453e-08)
- Part4.Orientation = Vector3.new(0, 90, 0)
- Part4.Position = Vector3.new(-179.456482, 3.00000906, 27.0912628)
- Part4.Rotation = Vector3.new(0, 89.8600006, 0)
- Part4.Color = Color3.new(0.411765, 0.25098, 0.156863)
- Part4.Size = Vector3.new(2, 2, 1)
- Part4.BrickColor = BrickColor.new("Reddish brown")
- Part4.LeftParamA = 0
- Part4.LeftParamB = 0
- Part4.LeftSurface = Enum.SurfaceType.Weld
- Part4.RightParamA = 0
- Part4.RightParamB = 0
- Part4.RightSurface = Enum.SurfaceType.Weld
- Part4.brickColor = BrickColor.new("Reddish brown")
- Part4.FormFactor = Enum.FormFactor.Symmetric
- Part4.formFactor = Enum.FormFactor.Symmetric
- Part5.Name = "Left Leg"
- Part5.Parent = Model0
- Part5.CFrame = CFrame.new(-179.456482, 1.00000906, 27.5912609, 3.4228453e-08, -5.1348214e-21, 0.99999696, 3.85277586e-21, 1, 5.1348214e-21, -0.99999696, 3.85276576e-21, 3.4228453e-08)
- Part5.Orientation = Vector3.new(0, 90, 0)
- Part5.Position = Vector3.new(-179.456482, 1.00000906, 27.5912609)
- Part5.Rotation = Vector3.new(0, 89.8600006, 0)
- Part5.Color = Color3.new(0.411765, 0.25098, 0.156863)
- Part5.Velocity = Vector3.new(3.66480722e-20, 0.00686328812, 3.64315933e-20)
- Part5.Size = Vector3.new(1, 2, 1)
- Part5.BottomSurface = Enum.SurfaceType.Smooth
- Part5.BrickColor = BrickColor.new("Reddish brown")
- Part5.CanCollide = false
- Part5.RotVelocity = Vector3.new(4.07127958e-25, 3.33696291e-22, 6.94702468e-25)
- Part5.brickColor = BrickColor.new("Reddish brown")
- Part5.FormFactor = Enum.FormFactor.Symmetric
- Part5.formFactor = Enum.FormFactor.Symmetric
- Part6.Name = "Right Leg"
- Part6.Parent = Model0
- Part6.CFrame = CFrame.new(-179.456482, 1.00000906, 26.5912647, 3.4228453e-08, -5.1348214e-21, 0.99999696, 3.85277586e-21, 1, 5.1348214e-21, -0.99999696, 3.85276576e-21, 3.4228453e-08)
- Part6.Orientation = Vector3.new(0, 90, 0)
- Part6.Position = Vector3.new(-179.456482, 1.00000906, 26.5912647)
- Part6.Rotation = Vector3.new(0, 89.8600006, 0)
- Part6.Color = Color3.new(0.411765, 0.25098, 0.156863)
- Part6.Velocity = Vector3.new(3.6314376e-20, 0.00686328812, 3.64315933e-20)
- Part6.Size = Vector3.new(1, 2, 1)
- Part6.BottomSurface = Enum.SurfaceType.Smooth
- Part6.BrickColor = BrickColor.new("Reddish brown")
- Part6.CanCollide = false
- Part6.RotVelocity = Vector3.new(4.07127958e-25, 3.33696291e-22, 6.94702468e-25)
- Part6.brickColor = BrickColor.new("Reddish brown")
- Part6.FormFactor = Enum.FormFactor.Symmetric
- Part6.formFactor = Enum.FormFactor.Symmetric
- Humanoid7.Parent = Model0
- Humanoid7.LeftLeg = Part5
- Humanoid7.RightLeg = Part6
- Humanoid7.Torso = Part4
- Part8.Name = "zarm"
- Part8.Parent = Model0
- Part8.CFrame = CFrame.new(-179.956482, 3.50000906, 28.591259, -0.99999696, -5.1348214e-21, 3.4228453e-08, -5.1348214e-21, 1, 3.85277586e-21, -3.4228453e-08, 3.85276576e-21, -0.99999696)
- Part8.Orientation = Vector3.new(0, 180, 0)
- Part8.Position = Vector3.new(-179.956482, 3.50000906, 28.591259)
- Part8.Rotation = Vector3.new(-180, 0, 180)
- Part8.Color = Color3.new(0.631373, 0.768627, 0.54902)
- Part8.Velocity = Vector3.new(3.69800334e-20, 0.00686328812, 3.65994592e-20)
- Part8.Size = Vector3.new(2, 1, 1)
- Part8.BottomSurface = Enum.SurfaceType.Smooth
- Part8.BrickColor = BrickColor.new("Medium green")
- Part8.RotVelocity = Vector3.new(4.07127958e-25, 3.33696291e-22, 6.94702468e-25)
- Part8.TopSurface = Enum.SurfaceType.Smooth
- Part8.brickColor = BrickColor.new("Medium green")
- Part8.FormFactor = Enum.FormFactor.Symmetric
- Part8.formFactor = Enum.FormFactor.Symmetric
- Script9.Parent = Part8
- table.insert(cors,sandbox(Script9,function()
- wait(1)
- owner=script.Parent.Parent.Name
- function onTouched(part)
- if part.Parent ~= nil then
- local h = part.Parent:findFirstChild("Humanoid")
- if h~=nil then
- if cantouch~=0 then
- if h.Parent.Name~=owner then
- if h.Parent:findFirstChild("zarm")~=nil then return end
- cantouch=0
- local larm=h.Parent:findFirstChild("Left Arm")
- local rarm=h.Parent:findFirstChild("Right Arm")
- if larm~=nil then
- larm:remove()
- end
- if rarm~=nil then
- rarm:remove()
- end
- local zee=script.Parent.Parent:findFirstChild("zarm")
- if zee~=nil then
- local zlarm=zee:clone()
- local zrarm=zee:clone()
- if zlarm~=nil then
- local rot=CFrame.new(0, 0, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
- zlarm.CFrame=h.Parent.Torso.CFrame * CFrame.new(Vector3.new(-1.5,0.5,-0.5)) * rot
- zrarm.CFrame=h.Parent.Torso.CFrame * CFrame.new(Vector3.new(1.5,0.5,-0.5)) * rot
- zlarm.Parent=h.Parent
- zrarm.Parent=h.Parent
- zlarm:makeJoints()
- zrarm:makeJoints()
- zlarm.Anchored=false
- zrarm.Anchored=false
- wait(0.1)
- h.Parent.Head.Color=zee.Color
- else print("no zee"); return end
- end
- wait(1)
- cantouch=1
- end
- end
- end
- end
- end
- script.Parent.Touched:connect(onTouched)
- end))
- Part10.Name = "zarm"
- Part10.Parent = Model0
- Part10.CFrame = CFrame.new(-179.956482, 3.50000906, 25.5912666, -0.99999696, -5.1348214e-21, 3.4228453e-08, -5.1348214e-21, 1, 3.85277586e-21, -3.4228453e-08, 3.85276576e-21, -0.99999696)
- Part10.Orientation = Vector3.new(0, 180, 0)
- Part10.Position = Vector3.new(-179.956482, 3.50000906, 25.5912666)
- Part10.Rotation = Vector3.new(-180, 0, 180)
- Part10.Color = Color3.new(0.631373, 0.768627, 0.54902)
- Part10.Velocity = Vector3.new(3.59789445e-20, 0.00686328812, 3.65994592e-20)
- Part10.Size = Vector3.new(2, 1, 1)
- Part10.BottomSurface = Enum.SurfaceType.Smooth
- Part10.BrickColor = BrickColor.new("Medium green")
- Part10.RotVelocity = Vector3.new(4.07127958e-25, 3.33696291e-22, 6.94702468e-25)
- Part10.TopSurface = Enum.SurfaceType.Smooth
- Part10.brickColor = BrickColor.new("Medium green")
- Part10.FormFactor = Enum.FormFactor.Symmetric
- Part10.formFactor = Enum.FormFactor.Symmetric
- Script11.Parent = Part10
- table.insert(cors,sandbox(Script11,function()
- wait(1)
- owner=script.Parent.Parent.Name
- function onTouched(part)
- if part.Parent ~= nil then
- local h = part.Parent:findFirstChild("Humanoid")
- if h~=nil then
- if cantouch~=0 then
- if h.Parent.Name~=owner then
- if h.Parent:findFirstChild("zarm")~=nil then return end
- cantouch=0
- local larm=h.Parent:findFirstChild("Left Arm")
- local rarm=h.Parent:findFirstChild("Right Arm")
- if larm~=nil then
- larm:remove()
- end
- if rarm~=nil then
- rarm:remove()
- end
- local zee=script.Parent.Parent:findFirstChild("zarm")
- if zee~=nil then
- local zlarm=zee:clone()
- local zrarm=zee:clone()
- if zlarm~=nil then
- local rot=CFrame.new(0, 0, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
- zlarm.CFrame=h.Parent.Torso.CFrame * CFrame.new(Vector3.new(-1.5,0.5,-0.5)) * rot
- zrarm.CFrame=h.Parent.Torso.CFrame * CFrame.new(Vector3.new(1.5,0.5,-0.5)) * rot
- zlarm.Parent=h.Parent
- zrarm.Parent=h.Parent
- zlarm:makeJoints()
- zrarm:makeJoints()
- zlarm.Anchored=false
- zrarm.Anchored=false
- wait(0.1)
- h.Parent.Head.Color=zee.Color
- else print("no zee"); return end
- end
- wait(1)
- cantouch=1
- end
- end
- end
- end
- end
- script.Parent.Touched:connect(onTouched)
- end))
- ObjectValue12.Name = "IsNZ"
- ObjectValue12.Parent = Model0
- IntValue13.Name = "Mode"
- IntValue13.Parent = Model0
- Script14.Parent = Model0
- table.insert(cors,sandbox(Script14,function()
- local larm = script.Parent:FindFirstChild("Left Arm")
- local rarm = script.Parent:FindFirstChild("Right Arm")
- function findNearestTorso(pos)
- local list = game.Workspace:children()
- local torso = nil
- local dist = 1000
- local temp = nil
- local human = nil
- local temp2 = nil
- for x = 1, #list do
- temp2 = list[x]
- if (temp2.className == "Model") and (temp2 ~= script.Parent) then
- temp = temp2:findFirstChild("Right Arm")
- human = temp2:findFirstChild("Humanoid")
- if (temp ~= nil) and (human ~= nil) and (human.Health > 0) then
- if (temp.Position - pos).magnitude < dist then
- torso = temp
- dist = (temp.Position - pos).magnitude
- end
- end
- end
- end
- return torso
- end
- while true do
- wait(math.random(1,5))
- local target = findNearestTorso(script.Parent.Torso.Position)
- if target ~= nil then
- script.Parent.Humanoid:MoveTo(target.Position, target)
- end
- end
- end))
- Script15.Name = "Health"
- Script15.Parent = Model0
- table.insert(cors,sandbox(Script15,function()
- function waitForChild(parent, childName)
- while true do
- local child = parent:findFirstChild(childName)
- if child then
- return child
- end
- parent.ChildAdded:wait()
- end
- end
- -- declarations
- local Figure = script.Parent
- local Head = waitForChild(Figure, "Head")
- local Humanoid = waitForChild(Figure, "Humanoid")
- Humanoid.Health=500
- -- regeneration
- while true do
- local s = wait(4)
- local health = Humanoid.Health
- if health > 0 and health < Humanoid.MaxHealth then
- health = health + 0.08 * s * Humanoid.MaxHealth
- if health * 1.05 < Humanoid.MaxHealth then
- Humanoid.Health = health
- else
- Humanoid.Health = Humanoid.MaxHealth
- end
- end
- end
- end))
- Script16.Name = "Respawn"
- Script16.Parent = Model0
- table.insert(cors,sandbox(Script16,function()
- name="Humanoid"
- robo=script.Parent:clone()
- while true do
- wait(1)
- if script.Parent.Humanoid.Health<1 then
- robot=robo:clone()
- robot.Parent=script.Parent.Parent
- robot:makeJoints()
- script.Parent:remove()
- end
- end
- end))
- 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
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement