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
- Part1.Name = "Head"
- Part1.Parent = Model0
- Part1.BrickColor = BrickColor.new("Medium green")
- Part1.Rotation = Vector3.new(180, -54.9300003, 180)
- Part1.RotVelocity = Vector3.new(5.65646729e-09, -0.025133444, -7.64907426e-09)
- Part1.Velocity = Vector3.new(0.00206289534, 0.0126342718, -0.0115660513)
- Part1.FormFactor = Enum.FormFactor.Symmetric
- Part1.Size = Vector3.new(2, 1, 1)
- Part1.CFrame = CFrame.new(-48.3656349, 98.0984192, 63.5160103, -0.574513257, -5.27244637e-10, -0.818496227, -4.39582731e-10, 1, -3.35614286e-10, 0.818496227, 1.66981984e-10, -0.574513257)
- Part1.TopSurface = Enum.SurfaceType.Smooth
- Part1.Color = Color3.new(0.631373, 0.768628, 0.54902)
- Part1.Position = Vector3.new(-48.3656349, 98.0984192, 63.5160103)
- Part1.Orientation = Vector3.new(0, -125.07, 0)
- Part1.Color = Color3.new(0.631373, 0.768628, 0.54902)
- SpecialMesh2.Parent = Part1
- SpecialMesh2.Scale = Vector3.new(1.25, 1.25, 1.25)
- SpecialMesh2.Scale = Vector3.new(1.25, 1.25, 1.25)
- Decal3.Name = "face"
- Decal3.Parent = Part1
- Part4.Name = "Torso"
- Part4.Parent = Model0
- Part4.BrickColor = BrickColor.new("Reddish brown")
- Part4.Rotation = Vector3.new(180, -54.9300003, 180)
- Part4.RotVelocity = Vector3.new(5.65646729e-09, -0.025133444, -7.64907426e-09)
- Part4.Velocity = Vector3.new(0.00206288393, 0.0126342718, -0.0115660597)
- Part4.FormFactor = Enum.FormFactor.Symmetric
- Part4.Size = Vector3.new(2, 2, 1)
- Part4.CFrame = CFrame.new(-48.3656349, 96.5984192, 63.5160103, -0.574512959, -5.27244526e-10, -0.81849581, -4.39582648e-10, 1, -3.35614148e-10, 0.81849581, 1.66981887e-10, -0.574512959)
- Part4.LeftSurface = Enum.SurfaceType.Weld
- Part4.RightSurface = Enum.SurfaceType.Weld
- Part4.Color = Color3.new(0.411765, 0.25098, 0.156863)
- Part4.Position = Vector3.new(-48.3656349, 96.5984192, 63.5160103)
- Part4.Orientation = Vector3.new(0, -125.07, 0)
- Part4.Color = Color3.new(0.411765, 0.25098, 0.156863)
- Part5.Name = "Left Leg"
- Part5.Parent = Model0
- Part5.BrickColor = BrickColor.new("Reddish brown")
- Part5.Rotation = Vector3.new(180, -54.9300003, 180)
- Part5.RotVelocity = Vector3.new(5.65646729e-09, -0.025133444, -7.64907426e-09)
- Part5.Velocity = Vector3.new(0.0123486901, 0.0126342718, -0.00434628408)
- Part5.CanCollide = false
- Part5.FormFactor = Enum.FormFactor.Symmetric
- Part5.Size = Vector3.new(1, 2, 1)
- Part5.CFrame = CFrame.new(-48.0783768, 94.5984192, 63.1067619, -0.574513257, -5.27244637e-10, -0.818496227, -4.39582731e-10, 1, -3.35614286e-10, 0.818496227, 1.66981984e-10, -0.574513257)
- Part5.BottomSurface = Enum.SurfaceType.Smooth
- Part5.Color = Color3.new(0.411765, 0.25098, 0.156863)
- Part5.Position = Vector3.new(-48.0783768, 94.5984192, 63.1067619)
- Part5.Orientation = Vector3.new(0, -125.07, 0)
- Part5.Color = Color3.new(0.411765, 0.25098, 0.156863)
- Part6.Name = "Right Leg"
- Part6.Parent = Model0
- Part6.BrickColor = BrickColor.new("Reddish brown")
- Part6.Rotation = Vector3.new(180, -54.9300003, 180)
- Part6.RotVelocity = Vector3.new(5.65646729e-09, -0.025133444, -7.64907426e-09)
- Part6.Velocity = Vector3.new(-0.00822314341, 0.0126342718, -0.0187859535)
- Part6.CanCollide = false
- Part6.FormFactor = Enum.FormFactor.Symmetric
- Part6.Size = Vector3.new(1, 2, 1)
- Part6.CFrame = CFrame.new(-48.6528969, 94.5984192, 63.9252663, -0.574513257, -5.27244637e-10, -0.818496227, -4.39582731e-10, 1, -3.35614286e-10, 0.818496227, 1.66981984e-10, -0.574513257)
- Part6.BottomSurface = Enum.SurfaceType.Smooth
- Part6.Color = Color3.new(0.411765, 0.25098, 0.156863)
- Part6.Position = Vector3.new(-48.6528969, 94.5984192, 63.9252663)
- Part6.Orientation = Vector3.new(0, -125.07, 0)
- Part6.Color = Color3.new(0.411765, 0.25098, 0.156863)
- Humanoid7.Parent = Model0
- Humanoid7.NameOcclusion = Enum.NameOcclusion.NoOcclusion
- Humanoid7.RightLeg = Part6
- Humanoid7.LeftLeg = Part5
- Humanoid7.Torso = Part4
- Part8.Name = "zarm"
- Part8.Parent = Model0
- Part8.BrickColor = BrickColor.new("Medium green")
- Part8.Rotation = Vector3.new(0, -35.0699997, 0)
- Part8.RotVelocity = Vector3.new(5.65646729e-09, -0.025133444, -7.64907426e-09)
- Part8.Velocity = Vector3.new(0.0257006586, 0.0126342671, 0.0203792211)
- Part8.FormFactor = Enum.FormFactor.Symmetric
- Part8.Size = Vector3.new(2, 1, 1)
- Part8.CFrame = CFrame.new(-47.0946083, 97.0984192, 62.5755196, 0.818496227, -5.27244637e-10, -0.574513257, 3.35614286e-10, 1, -4.39582731e-10, 0.574513257, 1.66981984e-10, 0.818496227)
- Part8.BottomSurface = Enum.SurfaceType.Smooth
- Part8.TopSurface = Enum.SurfaceType.Smooth
- Part8.Color = Color3.new(0.631373, 0.768628, 0.54902)
- Part8.Position = Vector3.new(-47.0946083, 97.0984192, 62.5755196)
- Part8.Orientation = Vector3.new(0, -35.0699997, 0)
- Part8.Color = Color3.new(0.631373, 0.768628, 0.54902)
- 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.BrickColor = BrickColor.new("Medium green")
- Part10.Rotation = Vector3.new(0, -35.0699997, 0)
- Part10.RotVelocity = Vector3.new(5.65646729e-09, -0.025133444, -7.64907426e-09)
- Part10.Velocity = Vector3.new(-0.0360143594, 0.0126342671, -0.0229395963)
- Part10.FormFactor = Enum.FormFactor.Symmetric
- Part10.Size = Vector3.new(2, 1, 1)
- Part10.CFrame = CFrame.new(-48.818161, 97.0984192, 65.0310135, 0.818496227, -5.27244637e-10, -0.574513257, 3.35614286e-10, 1, -4.39582731e-10, 0.574513257, 1.66981984e-10, 0.818496227)
- Part10.BottomSurface = Enum.SurfaceType.Smooth
- Part10.TopSurface = Enum.SurfaceType.Smooth
- Part10.Color = Color3.new(0.631373, 0.768628, 0.54902)
- Part10.Position = Vector3.new(-48.818161, 97.0984192, 65.0310135)
- Part10.Orientation = Vector3.new(0, -35.0699997, 0)
- Part10.Color = Color3.new(0.631373, 0.768628, 0.54902)
- 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