Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for i = 0 , 10 do
- wait(3)
- for i = 0 , 10 do
- 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")
- Vector3Value2 = Instance.new("Vector3Value")
- Motor6D3 = Instance.new("Motor6D")
- Sound4 = Instance.new("Sound")
- Sound5 = Instance.new("Sound")
- Sound6 = Instance.new("Sound")
- Sound7 = Instance.new("Sound")
- Sound8 = Instance.new("Sound")
- SpecialMesh9 = Instance.new("SpecialMesh")
- Part10 = Instance.new("Part")
- Vector3Value11 = Instance.new("Vector3Value")
- BodyColors12 = Instance.new("BodyColors")
- MeshPart13 = Instance.new("MeshPart")
- Vector3Value14 = Instance.new("Vector3Value")
- Motor6D15 = Instance.new("Motor6D")
- Script16 = Instance.new("Script")
- Humanoid17 = Instance.new("Humanoid")
- Script18 = Instance.new("Script")
- MeshPart19 = Instance.new("MeshPart")
- Vector3Value20 = Instance.new("Vector3Value")
- Motor6D21 = Instance.new("Motor6D")
- MeshPart22 = Instance.new("MeshPart")
- Vector3Value23 = Instance.new("Vector3Value")
- Motor6D24 = Instance.new("Motor6D")
- MeshPart25 = Instance.new("MeshPart")
- Vector3Value26 = Instance.new("Vector3Value")
- Motor6D27 = Instance.new("Motor6D")
- MeshPart28 = Instance.new("MeshPart")
- Vector3Value29 = Instance.new("Vector3Value")
- Motor6D30 = Instance.new("Motor6D")
- MeshPart31 = Instance.new("MeshPart")
- Vector3Value32 = Instance.new("Vector3Value")
- Motor6D33 = Instance.new("Motor6D")
- MeshPart34 = Instance.new("MeshPart")
- Vector3Value35 = Instance.new("Vector3Value")
- Motor6D36 = Instance.new("Motor6D")
- MeshPart37 = Instance.new("MeshPart")
- Vector3Value38 = Instance.new("Vector3Value")
- Motor6D39 = Instance.new("Motor6D")
- MeshPart40 = Instance.new("MeshPart")
- Vector3Value41 = Instance.new("Vector3Value")
- Motor6D42 = Instance.new("Motor6D")
- Script43 = Instance.new("Script")
- MeshPart44 = Instance.new("MeshPart")
- Vector3Value45 = Instance.new("Vector3Value")
- Motor6D46 = Instance.new("Motor6D")
- MeshPart47 = Instance.new("MeshPart")
- Vector3Value48 = Instance.new("Vector3Value")
- Motor6D49 = Instance.new("Motor6D")
- MeshPart50 = Instance.new("MeshPart")
- Vector3Value51 = Instance.new("Vector3Value")
- Motor6D52 = Instance.new("Motor6D")
- MeshPart53 = Instance.new("MeshPart")
- Vector3Value54 = Instance.new("Vector3Value")
- Motor6D55 = Instance.new("Motor6D")
- MeshPart56 = Instance.new("MeshPart")
- Vector3Value57 = Instance.new("Vector3Value")
- Motor6D58 = Instance.new("Motor6D")
- Script59 = Instance.new("Script")
- Script60 = Instance.new("Script")
- Script61 = Instance.new("Script")
- StringValue62 = Instance.new("StringValue")
- StringValue63 = Instance.new("StringValue")
- Animation64 = Instance.new("Animation")
- StringValue65 = Instance.new("StringValue")
- Animation66 = Instance.new("Animation")
- StringValue67 = Instance.new("StringValue")
- Animation68 = Instance.new("Animation")
- NumberValue69 = Instance.new("NumberValue")
- Animation70 = Instance.new("Animation")
- NumberValue71 = Instance.new("NumberValue")
- StringValue72 = Instance.new("StringValue")
- Animation73 = Instance.new("Animation")
- StringValue74 = Instance.new("StringValue")
- Animation75 = Instance.new("Animation")
- StringValue76 = Instance.new("StringValue")
- Animation77 = Instance.new("Animation")
- StringValue78 = Instance.new("StringValue")
- Animation79 = Instance.new("Animation")
- StringValue80 = Instance.new("StringValue")
- Animation81 = Instance.new("Animation")
- StringValue82 = Instance.new("StringValue")
- Animation83 = Instance.new("Animation")
- Script84 = Instance.new("Script")
- Model0.Name = "MEGA WAFFLE"
- Model0.Parent = mas
- Part1.Name = "Head"
- Part1.Parent = Model0
- Part1.CFrame = CFrame.new(-16.21838, 4.56509781, -28.9124165, -0.00241400092, 3.49997972e-05, 0.999997497, 0, 1, -3.499991e-05, -0.999997497, -8.44897698e-08, -0.00241400092)
- Part1.Orientation = Vector3.new(0, 90.1399994, 0)
- Part1.Position = Vector3.new(-16.21838, 4.56509781, -28.9124165)
- Part1.Rotation = Vector3.new(179.169998, 89.8700027, -179.169998)
- Part1.Color = Color3.new(0.541176, 0.670588, 0.521569)
- Part1.Size = Vector3.new(1, 1, 1)
- Part1.BottomSurface = Enum.SurfaceType.Smooth
- Part1.BrickColor = BrickColor.new("Artichoke")
- Part1.TopSurface = Enum.SurfaceType.Smooth
- Part1.brickColor = BrickColor.new("Artichoke")
- Part1.FormFactor = Enum.FormFactor.Custom
- Part1.formFactor = Enum.FormFactor.Custom
- Vector3Value2.Name = "OriginalSize"
- Vector3Value2.Parent = Part1
- Vector3Value2.Value = Vector3.new(1, 1, 1)
- Motor6D3.Name = "Neck"
- Motor6D3.Parent = Part1
- Motor6D3.C0 = CFrame.new(0.000338107347, 0.806032121, -0.015560925, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Motor6D3.C1 = CFrame.new(-2.72095203e-05, -0.565615535, 0.00386685133, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Motor6D3.Part0 = MeshPart13
- Motor6D3.Part1 = Part1
- Motor6D3.part1 = Part1
- Sound4.Name = "Moan"
- Sound4.Parent = Part1
- Sound4.SoundId = "rbxassetid://2032343257"
- Sound4.Volume = 1
- Sound5.Name = "Moan2"
- Sound5.Parent = Part1
- Sound5.SoundId = "rbxassetid://2032343257"
- Sound5.Volume = 1
- Sound6.Name = "Moan3"
- Sound6.Parent = Part1
- Sound6.SoundId = "rbxassetid://2032343257"
- Sound6.Volume = 1
- Sound7.Name = "Moan4"
- Sound7.Parent = Part1
- Sound7.SoundId = "rbxassetid://2032343257"
- Sound7.Volume = 1
- Sound8.Name = "Death"
- Sound8.Parent = Part1
- Sound8.SoundId = "rbxassetid://2032343257"
- SpecialMesh9.Parent = Part1
- SpecialMesh9.MeshId = "http://www.roblox.com/asset/?id=20939848"
- SpecialMesh9.Scale = Vector3.new(6, 6, 6)
- SpecialMesh9.TextureId = "http://www.roblox.com/asset/?id=20939838"
- SpecialMesh9.MeshType = Enum.MeshType.FileMesh
- Part10.Name = "HumanoidRootPart"
- Part10.Parent = Model0
- Part10.CFrame = CFrame.new(-16.214592, 2.32588005, -28.9123993, -0.00241400092, 3.49997972e-05, 0.999997497, 0, 1, -3.499991e-05, -0.999997497, -8.44897698e-08, -0.00241400092)
- Part10.Orientation = Vector3.new(0, 90.1399994, 0)
- Part10.Position = Vector3.new(-16.214592, 2.32588005, -28.9123993)
- Part10.Rotation = Vector3.new(179.169998, 89.8700027, -179.169998)
- Part10.Transparency = 1
- Part10.Size = Vector3.new(2, 2, 1)
- Part10.CanCollide = false
- Vector3Value11.Name = "OriginalSize"
- Vector3Value11.Parent = Part10
- Vector3Value11.Value = Vector3.new(2, 2, 1)
- BodyColors12.Parent = Model0
- BodyColors12.HeadColor = BrickColor.new("Artichoke")
- BodyColors12.HeadColor3 = Color3.new(0.541176, 0.670588, 0.521569)
- BodyColors12.LeftArmColor = BrickColor.new("Artichoke")
- BodyColors12.LeftArmColor3 = Color3.new(0.541176, 0.670588, 0.521569)
- BodyColors12.LeftLegColor = BrickColor.new("Burnt Sienna")
- BodyColors12.LeftLegColor3 = Color3.new(0.415686, 0.223529, 0.0352941)
- BodyColors12.RightArmColor = BrickColor.new("Artichoke")
- BodyColors12.RightArmColor3 = Color3.new(0.541176, 0.670588, 0.521569)
- BodyColors12.RightLegColor = BrickColor.new("Burnt Sienna")
- BodyColors12.RightLegColor3 = Color3.new(0.415686, 0.223529, 0.0352941)
- BodyColors12.TorsoColor = BrickColor.new("Burnt Sienna")
- BodyColors12.TorsoColor3 = Color3.new(0.415686, 0.223529, 0.0352941)
- MeshPart13.Name = "UpperTorso"
- MeshPart13.Parent = Model0
- MeshPart13.CFrame = CFrame.new(-16.1989994, 3.1934495, -28.9120979, -0.00241400092, 3.49997972e-05, 0.999997497, 0, 1, -3.499991e-05, -0.999997497, -8.44897698e-08, -0.00241400092)
- MeshPart13.Orientation = Vector3.new(0, 90.1399994, 0)
- MeshPart13.Position = Vector3.new(-16.1989994, 3.1934495, -28.9120979)
- MeshPart13.Rotation = Vector3.new(179.169998, 89.8700027, -179.169998)
- MeshPart13.Color = Color3.new(0.156863, 0.498039, 0.278431)
- MeshPart13.Transparency = 1
- MeshPart13.Size = Vector3.new(2.00029206, 1.60093355, 1.0005368)
- MeshPart13.BrickColor = BrickColor.new("Dark green")
- MeshPart13.brickColor = BrickColor.new("Dark green")
- Vector3Value14.Name = "OriginalSize"
- Vector3Value14.Parent = MeshPart13
- Vector3Value14.Value = Vector3.new(2.00029206, 1.60093355, 1.0005368)
- Motor6D15.Name = "Waist"
- Motor6D15.Parent = MeshPart13
- Motor6D15.C0 = CFrame.new(0.000280171633, 0.537143946, -0.0142721087, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Motor6D15.C1 = CFrame.new(0.000338107347, -0.463463932, -0.015560925, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Motor6D15.Part0 = MeshPart40
- Motor6D15.Part1 = MeshPart13
- Motor6D15.part1 = MeshPart13
- Script16.Name = "Damage Script"
- Script16.Parent = MeshPart13
- table.insert(cors,sandbox(Script16,function()
- function onTouched(hit)
- local human = hit.Parent:findFirstChild("Humanoid")
- if (human ~= nil) then
- human.Health = human.Health - 5 -- Change the amount to change the damage.
- end
- end
- script.Parent.Touched:connect(onTouched)
- end))
- Humanoid17.Name = "Zombie"
- Humanoid17.Parent = Model0
- Humanoid17.DisplayDistanceType = Enum.HumanoidDisplayDistanceType.Subject
- Humanoid17.Health = 125
- Humanoid17.HealthDisplayType = Enum.HumanoidHealthDisplayType.AlwaysOn
- Humanoid17.HipHeight = 1.3500000238419
- Humanoid17.MaxHealth = 125
- Humanoid17.NameOcclusion = Enum.NameOcclusion.NoOcclusion
- Humanoid17.RigType = Enum.HumanoidRigType.R15
- Humanoid17.Torso = Part10
- Humanoid17.maxHealth = 125
- Script18.Parent = Model0
- table.insert(cors,sandbox(Script18,function()
- local larm = script.Parent:FindFirstChild("HumanoidRootPart")
- local rarm = script.Parent:FindFirstChild("HumanoidRootPart")
- function findNearestTorso(pos)
- local list = game.Workspace:children()
- local torso = nil
- local dist = 10000
- 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("HumanoidRootPart")
- 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(1)
- local target = findNearestTorso(script.Parent.HumanoidRootPart.Position)
- if target ~= nil then
- script.Parent.Zombie:MoveTo(target.Position, target)
- end
- end
- end))
- MeshPart19.Name = "RightUpperLeg"
- MeshPart19.Parent = Model0
- MeshPart19.CFrame = CFrame.new(-16.2010174, 1.46466565, -29.4134064, -0.00241400092, 3.49997972e-05, 0.999997497, 0, 1, -3.499991e-05, -0.999997497, -8.44897698e-08, -0.00241400092)
- MeshPart19.Orientation = Vector3.new(0, 90.1399994, 0)
- MeshPart19.Position = Vector3.new(-16.2010174, 1.46466565, -29.4134064)
- MeshPart19.Rotation = Vector3.new(179.169998, 89.8700027, -179.169998)
- MeshPart19.Color = Color3.new(0.0509804, 0.411765, 0.67451)
- MeshPart19.Transparency = 1
- MeshPart19.Size = Vector3.new(1.00027561, 1.5362649, 1.00092912)
- MeshPart19.BrickColor = BrickColor.new("Bright blue")
- MeshPart19.CanCollide = false
- MeshPart19.brickColor = BrickColor.new("Bright blue")
- Vector3Value20.Name = "OriginalSize"
- Vector3Value20.Parent = MeshPart19
- Vector3Value20.Value = Vector3.new(1.00027561, 1.5362649, 1.00092912)
- Motor6D21.Name = "RightHip"
- Motor6D21.Parent = MeshPart19
- Motor6D21.C0 = CFrame.new(0.505080223, -0.243262246, 0.00102789141, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Motor6D21.C1 = CFrame.new(0.00382620096, 0.484913796, 0.000486815348, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Motor6D21.Part0 = MeshPart40
- Motor6D21.Part1 = MeshPart19
- Motor6D21.part1 = MeshPart19
- MeshPart22.Name = "RightUpperArm"
- MeshPart22.Parent = Model0
- MeshPart22.CFrame = CFrame.new(-16.2087326, 3.29312539, -30.4102745, -0.00241400092, 3.49997972e-05, 0.999997497, 0, 1, -3.499991e-05, -0.999997497, -8.44897698e-08, -0.00241400092)
- MeshPart22.Orientation = Vector3.new(0, 90.1399994, 0)
- MeshPart22.Position = Vector3.new(-16.2087326, 3.29312539, -30.4102745)
- MeshPart22.Rotation = Vector3.new(179.169998, 89.8700027, -179.169998)
- MeshPart22.Color = Color3.new(0.992157, 0.917647, 0.552941)
- MeshPart22.Transparency = 1
- MeshPart22.Size = Vector3.new(1.00027633, 1.39554, 1.00025082)
- MeshPart22.BrickColor = BrickColor.new("Cool yellow")
- MeshPart22.CanCollide = false
- MeshPart22.brickColor = BrickColor.new("Cool yellow")
- Vector3Value23.Name = "OriginalSize"
- Vector3Value23.Parent = MeshPart22
- Vector3Value23.Value = Vector3.new(1.00027633, 1.39554, 1.00025082)
- Motor6D24.Name = "RightShoulder"
- Motor6D24.Parent = MeshPart22
- Motor6D24.C0 = CFrame.new(1.25031853, 0.5565539, -0.015560925, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Motor6D24.C1 = CFrame.new(-0.24787569, 0.456878304, -0.00944012403, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Motor6D24.Part0 = MeshPart13
- Motor6D24.Part1 = MeshPart22
- Motor6D24.part1 = MeshPart22
- MeshPart25.Name = "RightLowerLeg"
- MeshPart25.Parent = Model0
- MeshPart25.CFrame = CFrame.new(-16.2007561, 0.910310864, -29.4134064, -0.00241400092, 3.49997972e-05, 0.999997497, 0, 1, -3.499991e-05, -0.999997497, -8.44897698e-08, -0.00241400092)
- MeshPart25.Orientation = Vector3.new(0, 90.1399994, 0)
- MeshPart25.Position = Vector3.new(-16.2007561, 0.910310864, -29.4134064)
- MeshPart25.Rotation = Vector3.new(179.169998, 89.8700027, -179.169998)
- MeshPart25.Color = Color3.new(0.0509804, 0.411765, 0.67451)
- MeshPart25.Transparency = 1
- MeshPart25.Size = Vector3.new(1.00027585, 1.48964536, 1.00032854)
- MeshPart25.BrickColor = BrickColor.new("Bright blue")
- MeshPart25.CanCollide = false
- MeshPart25.brickColor = BrickColor.new("Bright blue")
- Vector3Value26.Name = "OriginalSize"
- Vector3Value26.Parent = MeshPart25
- Vector3Value26.Value = Vector3.new(1.00027585, 1.48964536, 1.00032854)
- Motor6D27.Name = "RightKnee"
- Motor6D27.Parent = MeshPart25
- Motor6D27.C0 = CFrame.new(0.00382620096, -0.265086174, 0.000426991843, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Motor6D27.C1 = CFrame.new(0.00382620096, 0.289268613, 0.000145851634, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Motor6D27.Part0 = MeshPart19
- Motor6D27.Part1 = MeshPart25
- Motor6D27.part1 = MeshPart25
- MeshPart28.Name = "RightLowerArm"
- MeshPart28.Parent = Model0
- MeshPart28.CFrame = CFrame.new(-16.2082901, 2.90703535, -30.4102745, -0.00241400092, 3.49997972e-05, 0.999997497, 0, 1, -3.499991e-05, -0.999997497, -8.44897698e-08, -0.00241400092)
- MeshPart28.Orientation = Vector3.new(0, 90.1399994, 0)
- MeshPart28.Position = Vector3.new(-16.2082901, 2.90703535, -30.4102745)
- MeshPart28.Rotation = Vector3.new(179.169998, 89.8700027, -179.169998)
- MeshPart28.Color = Color3.new(0.992157, 0.917647, 0.552941)
- MeshPart28.Transparency = 1
- MeshPart28.Size = Vector3.new(1.00027657, 1.26567209, 1.00025082)
- MeshPart28.BrickColor = BrickColor.new("Cool yellow")
- MeshPart28.CanCollide = false
- MeshPart28.brickColor = BrickColor.new("Cool yellow")
- Vector3Value29.Name = "OriginalSize"
- Vector3Value29.Parent = MeshPart28
- Vector3Value29.Value = Vector3.new(1.00027657, 1.26567209, 1.00025082)
- Motor6D30.Name = "RightElbow"
- Motor6D30.Parent = MeshPart28
- Motor6D30.C0 = CFrame.new(0.00214397907, -0.263139546, -0.00944012403, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Motor6D30.C1 = CFrame.new(0.00214457512, 0.122950554, -0.00989595056, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Motor6D30.Part0 = MeshPart22
- Motor6D30.Part1 = MeshPart28
- Motor6D30.part1 = MeshPart28
- MeshPart31.Name = "RightHand"
- MeshPart31.Parent = Model0
- MeshPart31.CFrame = CFrame.new(-16.202776, 2.1668787, -30.4115677, -0.00241400092, 3.49997972e-05, 0.999997497, 0, 1, -3.499991e-05, -0.999997497, -8.44897698e-08, -0.00241400092)
- MeshPart31.Orientation = Vector3.new(0, 90.1399994, 0)
- MeshPart31.Position = Vector3.new(-16.202776, 2.1668787, -30.4115677)
- MeshPart31.Rotation = Vector3.new(179.169998, 89.8700027, -179.169998)
- MeshPart31.Color = Color3.new(0.992157, 0.917647, 0.552941)
- MeshPart31.Transparency = 1
- MeshPart31.Size = Vector3.new(0.999299049, 0.335255772, 1.00029743)
- MeshPart31.BrickColor = BrickColor.new("Cool yellow")
- MeshPart31.CanCollide = false
- MeshPart31.brickColor = BrickColor.new("Cool yellow")
- Vector3Value32.Name = "OriginalSize"
- Vector3Value32.Parent = MeshPart31
- Vector3Value32.Value = Vector3.new(0.999299049, 0.335255772, 1.00029743)
- Motor6D33.Name = "RightWrist"
- Motor6D33.Parent = MeshPart31
- Motor6D33.C0 = CFrame.new(0.00214457512, -0.682049513, -0.00989595056, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Motor6D33.C1 = CFrame.new(0.000865101814, 0.058106944, -0.0154390335, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Motor6D33.Part0 = MeshPart28
- Motor6D33.Part1 = MeshPart31
- Motor6D33.part1 = MeshPart31
- MeshPart34.Name = "RightFoot"
- MeshPart34.Parent = Model0
- MeshPart34.CFrame = CFrame.new(-16.2006416, 0.167736173, -29.4082165, -0.00241400092, 3.49997972e-05, 0.999997497, 0, 1, -3.499991e-05, -0.999997497, -8.44897698e-08, -0.00241400092)
- MeshPart34.Orientation = Vector3.new(0, 90.1399994, 0)
- MeshPart34.Position = Vector3.new(-16.2006416, 0.167736173, -29.4082165)
- MeshPart34.Rotation = Vector3.new(179.169998, 89.8700027, -179.169998)
- MeshPart34.Color = Color3.new(0.0509804, 0.411765, 0.67451)
- MeshPart34.Transparency = 1
- MeshPart34.Size = Vector3.new(1.00063133, 0.335407376, 1.00020337)
- MeshPart34.BrickColor = BrickColor.new("Bright blue")
- MeshPart34.CanCollide = false
- MeshPart34.brickColor = BrickColor.new("Bright blue")
- Vector3Value35.Name = "OriginalSize"
- Vector3Value35.Parent = MeshPart34
- Vector3Value35.Value = Vector3.new(1.00063133, 0.335407376, 1.00020337)
- Motor6D36.Name = "RightAnkle"
- Motor6D36.Parent = MeshPart34
- Motor6D36.C0 = CFrame.new(0.00382620096, -0.710731506, 0.000283418223, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Motor6D36.C1 = CFrame.new(0.00901681185, 0.0318431854, 0.000155551359, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Motor6D36.Part0 = MeshPart25
- Motor6D36.Part1 = MeshPart34
- Motor6D36.part1 = MeshPart34
- MeshPart37.Name = "LeftFoot"
- MeshPart37.Parent = Model0
- MeshPart37.CFrame = CFrame.new(-16.1982479, 0.167736173, -28.4166527, -0.00241400092, 3.49997972e-05, 0.999997497, 0, 1, -3.499991e-05, -0.999997497, -8.44897698e-08, -0.00241400092)
- MeshPart37.Orientation = Vector3.new(0, 90.1399994, 0)
- MeshPart37.Position = Vector3.new(-16.1982479, 0.167736173, -28.4166527)
- MeshPart37.Rotation = Vector3.new(179.169998, 89.8700027, -179.169998)
- MeshPart37.Color = Color3.new(0.0509804, 0.411765, 0.67451)
- MeshPart37.Transparency = 1
- MeshPart37.Size = Vector3.new(1.00063133, 0.335407257, 1.00020337)
- MeshPart37.BrickColor = BrickColor.new("Bright blue")
- MeshPart37.CanCollide = false
- MeshPart37.brickColor = BrickColor.new("Bright blue")
- Vector3Value38.Name = "OriginalSize"
- Vector3Value38.Parent = MeshPart37
- Vector3Value38.Value = Vector3.new(1.00063133, 0.335407257, 1.00020337)
- Motor6D39.Name = "LeftAnkle"
- Motor6D39.Parent = MeshPart37
- Motor6D39.C0 = CFrame.new(-0.00382620096, -0.710131407, 0.00030554086, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Motor6D39.C1 = CFrame.new(-0.00901681185, 0.032443285, 0.000177569687, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Motor6D39.Part0 = MeshPart50
- Motor6D39.Part1 = MeshPart37
- Motor6D39.part1 = MeshPart37
- MeshPart40.Name = "LowerTorso"
- MeshPart40.Parent = Model0
- MeshPart40.CFrame = CFrame.new(-16.2003231, 2.19284177, -28.9121532, -0.00241400092, 3.49997972e-05, 0.999997497, 0, 1, -3.499991e-05, -0.999997497, -8.44897698e-08, -0.00241400092)
- MeshPart40.Orientation = Vector3.new(0, 90.1399994, 0)
- MeshPart40.Position = Vector3.new(-16.2003231, 2.19284177, -28.9121532)
- MeshPart40.Rotation = Vector3.new(179.169998, 89.8700027, -179.169998)
- MeshPart40.Color = Color3.new(0.156863, 0.498039, 0.278431)
- MeshPart40.Transparency = 1
- MeshPart40.Size = Vector3.new(2.00017595, 0.400037616, 1.00021255)
- MeshPart40.BrickColor = BrickColor.new("Dark green")
- MeshPart40.brickColor = BrickColor.new("Dark green")
- Vector3Value41.Name = "OriginalSize"
- Vector3Value41.Parent = MeshPart40
- Vector3Value41.Value = Vector3.new(2.00017595, 0.400037616, 1.00021255)
- Motor6D42.Name = "Root"
- Motor6D42.Parent = MeshPart40
- Motor6D42.C1 = CFrame.new(0.000280171633, 0.133037761, -0.0142721087, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Motor6D42.Part0 = Part10
- Motor6D42.Part1 = MeshPart40
- Motor6D42.part1 = MeshPart40
- Script43.Name = "Damage Script"
- Script43.Parent = MeshPart40
- table.insert(cors,sandbox(Script43,function()
- function onTouched(hit)
- local human = hit.Parent:findFirstChild("Humanoid")
- if (human ~= nil) then
- human.Health = human.Health - 5 -- Change the amount to change the damage.
- end
- end
- script.Parent.Touched:connect(onTouched)
- end))
- MeshPart44.Name = "LeftUpperLeg"
- MeshPart44.Parent = Model0
- MeshPart44.CFrame = CFrame.new(-16.1985989, 1.46466565, -28.4114628, -0.00241400092, 3.49997972e-05, 0.999997497, 0, 1, -3.499991e-05, -0.999997497, -8.44897698e-08, -0.00241400092)
- MeshPart44.Orientation = Vector3.new(0, 90.1399994, 0)
- MeshPart44.Position = Vector3.new(-16.1985989, 1.46466565, -28.4114628)
- MeshPart44.Rotation = Vector3.new(179.169998, 89.8700027, -179.169998)
- MeshPart44.Color = Color3.new(0.0509804, 0.411765, 0.67451)
- MeshPart44.Transparency = 1
- MeshPart44.Size = Vector3.new(1.00027561, 1.5362649, 1.00092912)
- MeshPart44.BrickColor = BrickColor.new("Bright blue")
- MeshPart44.CanCollide = false
- MeshPart44.brickColor = BrickColor.new("Bright blue")
- Vector3Value45.Name = "OriginalSize"
- Vector3Value45.Parent = MeshPart44
- Vector3Value45.Value = Vector3.new(1.00027561, 1.5362649, 1.00092912)
- Motor6D46.Name = "LeftHip"
- Motor6D46.Parent = MeshPart44
- Motor6D46.C0 = CFrame.new(-0.50451982, -0.243062243, 0.00122789107, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Motor6D46.C1 = CFrame.new(-0.00382620096, 0.4851138, 0.000686740503, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Motor6D46.Part0 = MeshPart40
- Motor6D46.Part1 = MeshPart44
- Motor6D46.part1 = MeshPart44
- MeshPart47.Name = "LeftUpperArm"
- MeshPart47.Parent = Model0
- MeshPart47.CFrame = CFrame.new(-16.2015018, 3.29312539, -27.4145679, -0.00241400092, 3.49997972e-05, 0.999997497, 0, 1, -3.499991e-05, -0.999997497, -8.44897698e-08, -0.00241400092)
- MeshPart47.Orientation = Vector3.new(0, 90.1399994, 0)
- MeshPart47.Position = Vector3.new(-16.2015018, 3.29312539, -27.4145679)
- MeshPart47.Rotation = Vector3.new(179.169998, 89.8700027, -179.169998)
- MeshPart47.Color = Color3.new(0.992157, 0.917647, 0.552941)
- MeshPart47.Transparency = 1
- MeshPart47.Size = Vector3.new(1.00027633, 1.39554, 1.00025082)
- MeshPart47.BrickColor = BrickColor.new("Cool yellow")
- MeshPart47.CanCollide = false
- MeshPart47.brickColor = BrickColor.new("Cool yellow")
- Vector3Value48.Name = "OriginalSize"
- Vector3Value48.Parent = MeshPart47
- Vector3Value48.Value = Vector3.new(1.00027633, 1.39554, 1.00025082)
- Motor6D49.Name = "LeftShoulder"
- Motor6D49.Parent = MeshPart47
- Motor6D49.C0 = CFrame.new(-1.24955308, 0.556408584, -0.015560925, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Motor6D49.C1 = CFrame.new(0.247964978, 0.456732988, -0.00943991542, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Motor6D49.Part0 = MeshPart13
- Motor6D49.Part1 = MeshPart47
- Motor6D49.part1 = MeshPart47
- MeshPart50.Name = "LeftLowerLeg"
- MeshPart50.Parent = Model0
- MeshPart50.CFrame = CFrame.new(-16.1983376, 0.910310864, -28.4114628, -0.00241400092, 3.49997972e-05, 0.999997497, 0, 1, -3.499991e-05, -0.999997497, -8.44897698e-08, -0.00241400092)
- MeshPart50.Orientation = Vector3.new(0, 90.1399994, 0)
- MeshPart50.Position = Vector3.new(-16.1983376, 0.910310864, -28.4114628)
- MeshPart50.Rotation = Vector3.new(179.169998, 89.8700027, -179.169998)
- MeshPart50.Color = Color3.new(0.0509804, 0.411765, 0.67451)
- MeshPart50.Transparency = 1
- MeshPart50.Size = Vector3.new(1.00027585, 1.48964536, 1.00032866)
- MeshPart50.BrickColor = BrickColor.new("Bright blue")
- MeshPart50.CanCollide = false
- MeshPart50.brickColor = BrickColor.new("Bright blue")
- Vector3Value51.Name = "OriginalSize"
- Vector3Value51.Parent = MeshPart50
- Vector3Value51.Value = Vector3.new(1.00027585, 1.48964536, 1.00032866)
- Motor6D52.Name = "LeftKnee"
- Motor6D52.Parent = MeshPart50
- Motor6D52.C0 = CFrame.new(-0.00382620096, -0.264486194, 0.000586740673, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Motor6D52.C1 = CFrame.new(-0.00382620096, 0.289868593, 0.00030554086, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Motor6D52.Part0 = MeshPart44
- Motor6D52.Part1 = MeshPart50
- Motor6D52.part1 = MeshPart50
- MeshPart53.Name = "LeftLowerArm"
- MeshPart53.Parent = Model0
- MeshPart53.CFrame = CFrame.new(-16.2010593, 2.90703535, -27.4145699, -0.00241400092, 3.49997972e-05, 0.999997497, 0, 1, -3.499991e-05, -0.999997497, -8.44897698e-08, -0.00241400092)
- MeshPart53.Orientation = Vector3.new(0, 90.1399994, 0)
- MeshPart53.Position = Vector3.new(-16.2010593, 2.90703535, -27.4145699)
- MeshPart53.Rotation = Vector3.new(179.169998, 89.8700027, -179.169998)
- MeshPart53.Color = Color3.new(0.992157, 0.917647, 0.552941)
- MeshPart53.Transparency = 1
- MeshPart53.Size = Vector3.new(1.00027657, 1.26567209, 1.00025082)
- MeshPart53.BrickColor = BrickColor.new("Cool yellow")
- MeshPart53.CanCollide = false
- MeshPart53.brickColor = BrickColor.new("Cool yellow")
- Vector3Value54.Name = "OriginalSize"
- Vector3Value54.Parent = MeshPart53
- Vector3Value54.Value = Vector3.new(1.00027657, 1.26567209, 1.00025082)
- Motor6D55.Name = "LeftElbow"
- Motor6D55.Parent = MeshPart53
- Motor6D55.C0 = CFrame.new(-0.00166511536, -0.263139546, -0.00943991542, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Motor6D55.C1 = CFrame.new(-0.0016657114, 0.122950554, -0.00989592075, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Motor6D55.Part0 = MeshPart47
- Motor6D55.Part1 = MeshPart53
- Motor6D55.part1 = MeshPart53
- MeshPart56.Name = "LeftHand"
- MeshPart56.Parent = Model0
- MeshPart56.CFrame = CFrame.new(-16.1955395, 2.1668787, -27.4133034, -0.00241400092, 3.49997972e-05, 0.999997497, 0, 1, -3.499991e-05, -0.999997497, -8.44897698e-08, -0.00241400092)
- MeshPart56.Orientation = Vector3.new(0, 90.1399994, 0)
- MeshPart56.Position = Vector3.new(-16.1955395, 2.1668787, -27.4133034)
- MeshPart56.Rotation = Vector3.new(179.169998, 89.8700027, -179.169998)
- MeshPart56.Color = Color3.new(0.992157, 0.917647, 0.552941)
- MeshPart56.Transparency = 1
- MeshPart56.Size = Vector3.new(0.999299049, 0.335255831, 1.00029743)
- MeshPart56.BrickColor = BrickColor.new("Cool yellow")
- MeshPart56.CanCollide = false
- MeshPart56.brickColor = BrickColor.new("Cool yellow")
- Vector3Value57.Name = "OriginalSize"
- Vector3Value57.Parent = MeshPart56
- Vector3Value57.Value = Vector3.new(0.999299049, 0.335255831, 1.00029743)
- Motor6D58.Name = "LeftWrist"
- Motor6D58.Parent = MeshPart56
- Motor6D58.C0 = CFrame.new(-0.0016657114, -0.682255626, -0.00989592075, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Motor6D58.C1 = CFrame.new(-0.000386238098, 0.0579008311, -0.0154390335, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Motor6D58.Part0 = MeshPart53
- Motor6D58.Part1 = MeshPart56
- Motor6D58.part1 = MeshPart56
- Script59.Name = "Respawn"
- Script59.Parent = Model0
- table.insert(cors,sandbox(Script59,function()
- z = script.Parent
- backup = z:clone()
- while true do
- wait(5)
- if z.Zombie.Health == 0 then
- z:Remove()
- wait(4)
- backup.Parent = game.Workspace
- backup.Head:MakeJoints()
- backup.Torso:MakeJoints()
- end
- if z == nil then
- wait(4)
- backup.Parent = game.Workspace
- backup.Head:MakeJoints()
- backup.Torso:MakeJoints()
- end
- end
- end))
- Script60.Name = "Health"
- Script60.Parent = Model0
- table.insert(cors,sandbox(Script60,function()
- --Responsible for regening a player's humanoid's health
- -- declarations
- local Figure = script.Parent
- local Head = Figure:WaitForChild("Head")
- local Humanoid = Figure:WaitForChild("Humanoid")
- local regening = false
- -- regeneration
- function regenHealth()
- if regening then return end
- regening = true
- while Humanoid.Health < Humanoid.MaxHealth do
- local s = wait(1)
- local health = Humanoid.Health
- if health > 0 and health < Humanoid.MaxHealth then
- local newHealthDelta = 0.01 * s * Humanoid.MaxHealth
- health = health + newHealthDelta
- Humanoid.Health = math.min(health,Humanoid.MaxHealth)
- end
- end
- if Humanoid.Health > Humanoid.MaxHealth then
- Humanoid.Health = Humanoid.MaxHealth
- end
- regening = false
- end
- Humanoid.HealthChanged:connect(regenHealth)
- end))
- Script61.Name = "Animate"
- Script61.Parent = Model0
- table.insert(cors,sandbox(Script61,function()
- function waitForChild(parent, childName)
- local child = parent:findFirstChild(childName)
- if child then return child end
- while true do
- child = parent.ChildAdded:wait()
- if child.Name==childName then return child end
- end
- end
- local Figure = script.Parent
- local Humanoid = waitForChild(Figure, "Zombie")
- local pose = "Standing"
- local currentAnim = ""
- local currentAnimInstance = nil
- local currentAnimTrack = nil
- local currentAnimKeyframeHandler = nil
- local currentAnimSpeed = 1.0
- local animTable = {}
- local animNames = {
- idle = {
- { id = "http://www.roblox.com/asset/?id=507766666", weight = 1 },
- { id = "http://www.roblox.com/asset/?id=507766951", weight = 1 },
- { id = "http://www.roblox.com/asset/?id=507766388", weight = 9 }
- },
- walk = {
- { id = "http://www.roblox.com/asset/?id=507777826", weight = 10 }
- },
- run = {
- { id = "http://www.roblox.com/asset/?id=507767714", weight = 10 }
- },
- swim = {
- { id = "http://www.roblox.com/asset/?id=507784897", weight = 10 }
- },
- swimidle = {
- { id = "http://www.roblox.com/asset/?id=507785072", weight = 10 }
- },
- jump = {
- { id = "http://www.roblox.com/asset/?id=507765000", weight = 10 }
- },
- fall = {
- { id = "http://www.roblox.com/asset/?id=507767968", weight = 10 }
- },
- climb = {
- { id = "http://www.roblox.com/asset/?id=507765644", weight = 10 }
- },
- sit = {
- { id = "http://www.roblox.com/asset/?id=507768133", weight = 10 }
- },
- toolnone = {
- { id = "http://www.roblox.com/asset/?id=507768375", weight = 10 }
- },
- toolslash = {
- { id = "http://www.roblox.com/asset/?id=507768375", weight = 10 }
- -- { id = "slash.xml", weight = 10 }
- },
- toollunge = {
- { id = "http://www.roblox.com/asset/?id=507768375", weight = 10 }
- },
- wave = {
- { id = "http://www.roblox.com/asset/?id=507770239", weight = 10 }
- },
- point = {
- { id = "http://www.roblox.com/asset/?id=507770453", weight = 10 }
- },
- dance = {
- { id = "http://www.roblox.com/asset/?id=507771019", weight = 10 },
- { id = "http://www.roblox.com/asset/?id=507771955", weight = 10 },
- { id = "http://www.roblox.com/asset/?id=507772104", weight = 10 }
- },
- dance2 = {
- { id = "http://www.roblox.com/asset/?id=507776043", weight = 10 },
- { id = "http://www.roblox.com/asset/?id=507776720", weight = 10 },
- { id = "http://www.roblox.com/asset/?id=507776879", weight = 10 }
- },
- dance3 = {
- { id = "http://www.roblox.com/asset/?id=507777268", weight = 10 },
- { id = "http://www.roblox.com/asset/?id=507777451", weight = 10 },
- { id = "http://www.roblox.com/asset/?id=507777623", weight = 10 }
- },
- laugh = {
- { id = "http://www.roblox.com/asset/?id=507770818", weight = 10 }
- },
- cheer = {
- { id = "http://www.roblox.com/asset/?id=507770677", weight = 10 }
- },
- }
- -- Existance in this list signifies that it is an emote, the value indicates if it is a looping emote
- local emoteNames = { wave = false, point = false, dance = true, dance2 = true, dance3 = true, laugh = false, cheer = false}
- math.randomseed(tick())
- function configureAnimationSet(name, fileList)
- if (animTable[name] ~= nil) then
- for _, connection in pairs(animTable[name].connections) do
- connection:disconnect()
- end
- end
- animTable[name] = {}
- animTable[name].count = 0
- animTable[name].totalWeight = 0
- animTable[name].connections = {}
- -- check for config values
- local config = script:FindFirstChild(name)
- if (config ~= nil) then
- -- print("Loading anims " .. name)
- table.insert(animTable[name].connections, config.ChildAdded:connect(function(child) configureAnimationSet(name, fileList) end))
- table.insert(animTable[name].connections, config.ChildRemoved:connect(function(child) configureAnimationSet(name, fileList) end))
- local idx = 1
- for _, childPart in pairs(config:GetChildren()) do
- if (childPart:IsA("Animation")) then
- table.insert(animTable[name].connections, childPart.Changed:connect(function(property) configureAnimationSet(name, fileList) end))
- animTable[name][idx] = {}
- animTable[name][idx].anim = childPart
- local weightObject = childPart:FindFirstChild("Weight")
- if (weightObject == nil) then
- animTable[name][idx].weight = 1
- else
- animTable[name][idx].weight = weightObject.Value
- end
- animTable[name].count = animTable[name].count + 1
- animTable[name].totalWeight = animTable[name].totalWeight + animTable[name][idx].weight
- -- print(name .. " [" .. idx .. "] " .. animTable[name][idx].anim.AnimationId .. " (" .. animTable[name][idx].weight .. ")")
- idx = idx + 1
- end
- end
- end
- -- fallback to defaults
- if (animTable[name].count <= 0) then
- for idx, anim in pairs(fileList) do
- animTable[name][idx] = {}
- animTable[name][idx].anim = Instance.new("Animation")
- animTable[name][idx].anim.Name = name
- animTable[name][idx].anim.AnimationId = anim.id
- animTable[name][idx].weight = anim.weight
- animTable[name].count = animTable[name].count + 1
- animTable[name].totalWeight = animTable[name].totalWeight + anim.weight
- -- print(name .. " [" .. idx .. "] " .. anim.id .. " (" .. anim.weight .. ")")
- end
- end
- end
- -- Setup animation objects
- function scriptChildModified(child)
- local fileList = animNames[child.Name]
- if (fileList ~= nil) then
- configureAnimationSet(child.Name, fileList)
- end
- end
- script.ChildAdded:connect(scriptChildModified)
- script.ChildRemoved:connect(scriptChildModified)
- for name, fileList in pairs(animNames) do
- configureAnimationSet(name, fileList)
- end
- -- ANIMATION
- -- declarations
- local toolAnim = "None"
- local toolAnimTime = 0
- local jumpAnimTime = 0
- local jumpAnimDuration = 0.31
- local toolTransitionTime = 0.1
- local fallTransitionTime = 0.2
- -- functions
- function stopAllAnimations()
- local oldAnim = currentAnim
- -- return to idle if finishing an emote
- if (emoteNames[oldAnim] ~= nil and emoteNames[oldAnim] == false) then
- oldAnim = "idle"
- end
- currentAnim = ""
- currentAnimInstance = nil
- if (currentAnimKeyframeHandler ~= nil) then
- currentAnimKeyframeHandler:disconnect()
- end
- if (currentAnimTrack ~= nil) then
- currentAnimTrack:Stop()
- currentAnimTrack:Destroy()
- currentAnimTrack = nil
- end
- return oldAnim
- end
- function setAnimationSpeed(speed)
- if speed ~= currentAnimSpeed then
- currentAnimSpeed = speed
- currentAnimTrack:AdjustSpeed(currentAnimSpeed)
- end
- end
- function keyFrameReachedFunc(frameName)
- if (frameName == "End") then
- -- print("Keyframe : ".. frameName)
- local repeatAnim = currentAnim
- -- return to idle if finishing an emote
- if (emoteNames[repeatAnim] ~= nil and emoteNames[repeatAnim] == false) then
- repeatAnim = "idle"
- end
- local animSpeed = currentAnimSpeed
- playAnimation(repeatAnim, 0.15, Humanoid)
- setAnimationSpeed(animSpeed)
- end
- end
- -- Preload animations
- function playAnimation(animName, transitionTime, humanoid)
- local roll = math.random(1, animTable[animName].totalWeight)
- local origRoll = roll
- local idx = 1
- while (roll > animTable[animName][idx].weight) do
- roll = roll - animTable[animName][idx].weight
- idx = idx + 1
- end
- -- print(animName .. " " .. idx .. " [" .. origRoll .. "]")
- local anim = animTable[animName][idx].anim
- -- switch animation
- if (anim ~= currentAnimInstance) then
- if (currentAnimTrack ~= nil) then
- currentAnimTrack:Stop(transitionTime)
- currentAnimTrack:Destroy()
- end
- currentAnimSpeed = 1.0
- -- load it to the humanoid; get AnimationTrack
- currentAnimTrack = humanoid:LoadAnimation(anim)
- -- play the animation
- currentAnimTrack:Play(transitionTime)
- currentAnim = animName
- currentAnimInstance = anim
- -- set up keyframe name triggers
- if (currentAnimKeyframeHandler ~= nil) then
- currentAnimKeyframeHandler:disconnect()
- end
- currentAnimKeyframeHandler = currentAnimTrack.KeyframeReached:connect(keyFrameReachedFunc)
- end
- end
- -------------------------------------------------------------------------------------------
- -------------------------------------------------------------------------------------------
- local toolAnimName = ""
- local toolAnimTrack = nil
- local toolAnimInstance = nil
- local currentToolAnimKeyframeHandler = nil
- function toolKeyFrameReachedFunc(frameName)
- if (frameName == "End") then
- -- print("Keyframe : ".. frameName)
- playToolAnimation(toolAnimName, 0.0, Humanoid)
- end
- end
- function playToolAnimation(animName, transitionTime, humanoid)
- local roll = math.random(1, animTable[animName].totalWeight)
- local origRoll = roll
- local idx = 1
- while (roll > animTable[animName][idx].weight) do
- roll = roll - animTable[animName][idx].weight
- idx = idx + 1
- end
- -- print(animName .. " * " .. idx .. " [" .. origRoll .. "]")
- local anim = animTable[animName][idx].anim
- if (toolAnimInstance ~= anim) then
- if (toolAnimTrack ~= nil) then
- toolAnimTrack:Stop()
- toolAnimTrack:Destroy()
- transitionTime = 0
- end
- -- load it to the humanoid; get AnimationTrack
- toolAnimTrack = humanoid:LoadAnimation(anim)
- -- play the animation
- toolAnimTrack:Play(transitionTime)
- toolAnimName = animName
- toolAnimInstance = anim
- currentToolAnimKeyframeHandler = toolAnimTrack.KeyframeReached:connect(toolKeyFrameReachedFunc)
- end
- end
- function stopToolAnimations()
- local oldAnim = toolAnimName
- if (currentToolAnimKeyframeHandler ~= nil) then
- currentToolAnimKeyframeHandler:disconnect()
- end
- toolAnimName = ""
- toolAnimInstance = nil
- if (toolAnimTrack ~= nil) then
- toolAnimTrack:Stop()
- toolAnimTrack:Destroy()
- toolAnimTrack = nil
- end
- return oldAnim
- end
- -------------------------------------------------------------------------------------------
- -------------------------------------------------------------------------------------------
- function onRunning(speed)
- if speed > 0.01 then
- local scale = 15.0
- playAnimation("walk", 0.1, Humanoid)
- setAnimationSpeed(speed / scale)
- pose = "Running"
- else
- playAnimation("idle", 0.1, Humanoid)
- pose = "Standing"
- end
- end
- function onDied()
- pose = "Dead"
- end
- function onJumping()
- playAnimation("jump", 0.1, Humanoid)
- jumpAnimTime = jumpAnimDuration
- pose = "Jumping"
- end
- function onClimbing(speed)
- local scale = 5.0
- playAnimation("climb", 0.1, Humanoid)
- setAnimationSpeed(speed / scale)
- pose = "Climbing"
- end
- function onGettingUp()
- pose = "GettingUp"
- end
- function onFreeFall()
- if (jumpAnimTime <= 0) then
- playAnimation("fall", fallTransitionTime, Humanoid)
- end
- pose = "FreeFall"
- end
- function onFallingDown()
- pose = "FallingDown"
- end
- function onSeated()
- pose = "Seated"
- end
- function onPlatformStanding()
- pose = "PlatformStanding"
- end
- function onSwimming(speed)
- if speed > 1.00 then
- local scale = 10.0
- playAnimation("swim", 0.4, Humanoid)
- setAnimationSpeed(speed / scale)
- pose = "Swimming"
- else
- playAnimation("swimidle", 0.4, Humanoid)
- pose = "Standing"
- end
- end
- function getTool()
- for _, kid in ipairs(Figure:GetChildren()) do
- if kid.className == "Tool" then return kid end
- end
- return nil
- end
- function getToolAnim(tool)
- for _, c in ipairs(tool:GetChildren()) do
- if c.Name == "toolanim" and c.className == "StringValue" then
- return c
- end
- end
- return nil
- end
- function animateTool()
- if (toolAnim == "None") then
- playToolAnimation("toolnone", toolTransitionTime, Humanoid)
- return
- end
- if (toolAnim == "Slash") then
- playToolAnimation("toolslash", 0, Humanoid)
- return
- end
- if (toolAnim == "Lunge") then
- playToolAnimation("toollunge", 0, Humanoid)
- return
- end
- end
- function moveSit()
- RightShoulder.MaxVelocity = 0.15
- LeftShoulder.MaxVelocity = 0.15
- RightShoulder:SetDesiredAngle(3.14 /2)
- LeftShoulder:SetDesiredAngle(-3.14 /2)
- RightHip:SetDesiredAngle(3.14 /2)
- LeftHip:SetDesiredAngle(-3.14 /2)
- end
- local lastTick = 0
- function move(time)
- local amplitude = 1
- local frequency = 1
- local deltaTime = time - lastTick
- lastTick = time
- local climbFudge = 0
- local setAngles = false
- if (jumpAnimTime > 0) then
- jumpAnimTime = jumpAnimTime - deltaTime
- end
- if (pose == "FreeFall" and jumpAnimTime <= 0) then
- playAnimation("fall", fallTransitionTime, Humanoid)
- elseif (pose == "Seated") then
- playAnimation("sit", 0.5, Humanoid)
- return
- elseif (pose == "Running") then
- playAnimation("walk", 0.1, Humanoid)
- elseif (pose == "Dead" or pose == "GettingUp" or pose == "FallingDown" or pose == "Seated" or pose == "PlatformStanding") then
- stopAllAnimations()
- amplitude = 0.1
- frequency = 1
- setAngles = true
- end
- -- Tool Animation handling
- local tool = getTool()
- if tool then
- animStringValueObject = getToolAnim(tool)
- if animStringValueObject then
- toolAnim = animStringValueObject.Value
- -- message recieved, delete StringValue
- animStringValueObject.Parent = nil
- toolAnimTime = time + .3
- end
- if time > toolAnimTime then
- toolAnimTime = 0
- toolAnim = "None"
- end
- animateTool()
- else
- stopToolAnimations()
- toolAnim = "None"
- toolAnimInstance = nil
- toolAnimTime = 0
- end
- end
- -- connect events
- Humanoid.Died:connect(onDied)
- Humanoid.Running:connect(onRunning)
- Humanoid.Jumping:connect(onJumping)
- Humanoid.Climbing:connect(onClimbing)
- Humanoid.GettingUp:connect(onGettingUp)
- Humanoid.FreeFalling:connect(onFreeFall)
- Humanoid.FallingDown:connect(onFallingDown)
- Humanoid.Seated:connect(onSeated)
- Humanoid.PlatformStanding:connect(onPlatformStanding)
- Humanoid.Swimming:connect(onSwimming)
- -- setup emote chat hook
- script.msg.Changed:connect(function(msg)
- script.msg.Value = ""
- local emote = ""
- if (string.sub(msg, 1, 3) == "/e ") then
- emote = string.sub(msg, 4)
- elseif (string.sub(msg, 1, 7) == "/emote ") then
- emote = string.sub(msg, 8)
- end
- if (pose == "Standing" and emoteNames[emote] ~= nil) then
- playAnimation(emote, 0.1, Humanoid)
- end
- -- print("===> " .. string.sub(msg, 1, 3) .. "(" .. emote .. ")")
- end)
- -- main program
- local runService = game:service("RunService");
- -- print("bottom")
- -- initialize to idle
- playAnimation("idle", 0.1, Humanoid)
- pose = "Standing"
- while Figure.Parent~=nil do
- local _, time = wait(0.1)
- move(time)
- end
- end))
- StringValue62.Name = "msg"
- StringValue62.Parent = Script61
- StringValue63.Name = "climb"
- StringValue63.Parent = Script61
- Animation64.Name = "ClimbAnim"
- Animation64.Parent = StringValue63
- Animation64.AnimationId = "http://www.roblox.com/asset/?id=616156119"
- StringValue65.Name = "fall"
- StringValue65.Parent = Script61
- Animation66.Name = "FallAnim"
- Animation66.Parent = StringValue65
- Animation66.AnimationId = "http://www.roblox.com/asset/?id=616157476"
- StringValue67.Name = "idle"
- StringValue67.Parent = Script61
- Animation68.Name = "Animation1"
- Animation68.Parent = StringValue67
- Animation68.AnimationId = "http://www.roblox.com/asset/?id=616158929"
- NumberValue69.Name = "Weight"
- NumberValue69.Parent = Animation68
- NumberValue69.Value = 9
- Animation70.Name = "Animation2"
- Animation70.Parent = StringValue67
- Animation70.AnimationId = "http://www.roblox.com/asset/?id=616160636"
- NumberValue71.Name = "Weight"
- NumberValue71.Parent = Animation70
- NumberValue71.Value = 1
- StringValue72.Name = "jump"
- StringValue72.Parent = Script61
- Animation73.Name = "JumpAnim"
- Animation73.Parent = StringValue72
- Animation73.AnimationId = "http://www.roblox.com/asset/?id=616161997"
- StringValue74.Name = "sit"
- StringValue74.Parent = Script61
- Animation75.Name = "SitAnim"
- Animation75.Parent = StringValue74
- Animation75.AnimationId = "http://www.roblox.com/asset/?id=507768133"
- StringValue76.Name = "swim"
- StringValue76.Parent = Script61
- Animation77.Name = "Swim"
- Animation77.Parent = StringValue76
- Animation77.AnimationId = "http://www.roblox.com/asset/?id=616165109"
- StringValue78.Name = "swimidle"
- StringValue78.Parent = Script61
- Animation79.Name = "SwimIdle"
- Animation79.Parent = StringValue78
- Animation79.AnimationId = "http://www.roblox.com/asset/?id=616166655"
- StringValue80.Name = "toolnone"
- StringValue80.Parent = Script61
- Animation81.Name = "ToolNoneAnim"
- Animation81.Parent = StringValue80
- Animation81.AnimationId = "http://www.roblox.com/asset/?id=507768375"
- StringValue82.Name = "walk"
- StringValue82.Parent = Script61
- Animation83.Name = "RunAnim"
- Animation83.Parent = StringValue82
- Animation83.AnimationId = "http://www.roblox.com/asset/?id=616168032"
- Script84.Name = "SoundScript"
- Script84.Parent = Model0
- table.insert(cors,sandbox(Script84,function()
- local moan = script.Parent.Head.Moan
- local moan2 = script.parent.Head.Moan2
- local moan3 = script.parent.Head.Moan3
- local moan4 = script.Parent.Head.Moan4
- while true do
- moan:Play()
- wait(8)
- moan2:Play()
- wait(5)
- moan3:Play()
- wait(7)
- moan4:Play()
- wait(6)
- end
- local death = script.Parent.Head.Death
- 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
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement