Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local runDummyScript = function(f,scri)
- local oldenv = getfenv(f)
- local newenv = setmetatable({}, {
- __index = function(_, k)
- if k:lower() == 'script' then
- return scri
- else
- return oldenv[k]
- end
- end
- })
- setfenv(f, newenv)
- ypcall(function() f() end)
- end
- cors = {}
- mas = Instance.new("Model",game:GetService("Lighting"))
- mas.Name = "CompiledModel"
- o1 = Instance.new("Model")
- o2 = Instance.new("Part")
- o3 = Instance.new("SpecialMesh")
- o4 = Instance.new("Decal")
- o5 = Instance.new("BodyColors")
- o6 = Instance.new("Part")
- o7 = Instance.new("Part")
- o8 = Instance.new("Part")
- o9 = Instance.new("Weld")
- o10 = Instance.new("Weld")
- o11 = Instance.new("Weld")
- o12 = Instance.new("Weld")
- o13 = Instance.new("Weld")
- o14 = Instance.new("Weld")
- o15 = Instance.new("Weld")
- o16 = Instance.new("Weld")
- o17 = Instance.new("Weld")
- o18 = Instance.new("Weld")
- o19 = Instance.new("Weld")
- o20 = Instance.new("Weld")
- o21 = Instance.new("Weld")
- o22 = Instance.new("Weld")
- o23 = Instance.new("Weld")
- o24 = Instance.new("Weld")
- o25 = Instance.new("Weld")
- o26 = Instance.new("Weld")
- o27 = Instance.new("Weld")
- o28 = Instance.new("Weld")
- o29 = Instance.new("Weld")
- o30 = Instance.new("Weld")
- o31 = Instance.new("Weld")
- o32 = Instance.new("Weld")
- o33 = Instance.new("Weld")
- o34 = Instance.new("Weld")
- o35 = Instance.new("Weld")
- o36 = Instance.new("Weld")
- o37 = Instance.new("Weld")
- o38 = Instance.new("Weld")
- o39 = Instance.new("Weld")
- o40 = Instance.new("Weld")
- o41 = Instance.new("Weld")
- o42 = Instance.new("Weld")
- o43 = Instance.new("Weld")
- o44 = Instance.new("Weld")
- o45 = Instance.new("Part")
- o46 = Instance.new("Part")
- o47 = Instance.new("Snap")
- o48 = Instance.new("Motor")
- o49 = Instance.new("Motor")
- o50 = Instance.new("Motor")
- o51 = Instance.new("Motor")
- o52 = Instance.new("Script")
- o53 = Instance.new("Script")
- o54 = Instance.new("ScreenGui")
- o55 = Instance.new("ImageLabel")
- o56 = Instance.new("Frame")
- o57 = Instance.new("LocalScript")
- o58 = Instance.new("Sound")
- o59 = Instance.new("Sound")
- o60 = Instance.new("Humanoid")
- o61 = Instance.new("Configuration")
- o62 = Instance.new("NumberValue")
- o63 = Instance.new("StringValue")
- o64 = Instance.new("Sound")
- o1.Name = ""
- o1.Parent = mas
- o2.Name = "Head"
- o2.Parent = o1
- o2.Material = Enum.Material.SmoothPlastic
- o2.BrickColor = BrickColor.new("Really black")
- o2.Position = Vector3.new(-37.9800339, 6.50000906, 88.9100571)
- o2.Rotation = Vector3.new(0, 45, 0)
- o2.FormFactor = Enum.FormFactor.Symmetric
- o2.Friction = 0
- o2.Size = Vector3.new(2, 1, 1)
- o2.CFrame = CFrame.new(-37.9800339, 6.50000906, 88.9100571, 0.707110345, 1.06415979e-23, 0.707110345, -1.45688978e-23, 1, -4.80657486e-25, -0.707110345, -9.9620053e-24, 0.707110345)
- o2.TopSurface = Enum.SurfaceType.Smooth
- o2.Color = Color3.new(0.0666667, 0.0666667, 0.0666667)
- o2.Position = Vector3.new(-37.9800339, 6.50000906, 88.9100571)
- o3.Parent = o2
- o3.Scale = Vector3.new(1.25, 1.25, 1.25)
- o4.Parent = o2
- o4.Texture = "http://www.roblox.com/asset/?id=121958034"
- o5.Parent = o1
- o5.HeadColor = BrickColor.new("Olive")
- o5.LeftArmColor = BrickColor.new("Olive")
- o5.LeftLegColor = BrickColor.new("Olive")
- o5.RightArmColor = BrickColor.new("Olive")
- o5.RightLegColor = BrickColor.new("Olive")
- o5.TorsoColor = BrickColor.new("Olive")
- o6.Name = "Left Arm"
- o6.Parent = o1
- o6.Material = Enum.Material.SmoothPlastic
- o6.BrickColor = BrickColor.new("Really black")
- o6.Position = Vector3.new(-39.0406952, 5.00000906, 89.9707184)
- o6.Rotation = Vector3.new(0, 45, 0)
- o6.CanCollide = false
- o6.FormFactor = Enum.FormFactor.Symmetric
- o6.Size = Vector3.new(1, 2, 1)
- o6.CFrame = CFrame.new(-39.0406952, 5.00000906, 89.9707184, 0.707107902, 1.09863925e-23, 0.707107902, -1.469474e-23, 1, -8.4238354e-25, -0.707107902, -9.79513361e-24, 0.707107902)
- o6.Color = Color3.new(0.0666667, 0.0666667, 0.0666667)
- o6.Position = Vector3.new(-39.0406952, 5.00000906, 89.9707184)
- o7.Name = "Left Leg"
- o7.Parent = o1
- o7.Material = Enum.Material.SmoothPlastic
- o7.BrickColor = BrickColor.new("Really black")
- o7.Position = Vector3.new(-38.3335876, 3.00000906, 89.2636108)
- o7.Rotation = Vector3.new(0, 45, 0)
- o7.CanCollide = false
- o7.FormFactor = Enum.FormFactor.Symmetric
- o7.Size = Vector3.new(1, 2, 1)
- o7.CFrame = CFrame.new(-38.3335876, 3.00000906, 89.2636108, 0.707107902, 1.09863925e-23, 0.707107902, -1.469474e-23, 1, -8.4238354e-25, -0.707107902, -9.79513361e-24, 0.707107902)
- o7.BottomSurface = Enum.SurfaceType.Smooth
- o7.Color = Color3.new(0.0666667, 0.0666667, 0.0666667)
- o7.Position = Vector3.new(-38.3335876, 3.00000906, 89.2636108)
- o8.Name = "Right Arm"
- o8.Parent = o1
- o8.Material = Enum.Material.SmoothPlastic
- o8.BrickColor = BrickColor.new("Really black")
- o8.Position = Vector3.new(-36.9193726, 5.00000906, 87.8493958)
- o8.Rotation = Vector3.new(0, 45, 0)
- o8.CanCollide = false
- o8.FormFactor = Enum.FormFactor.Symmetric
- o8.Size = Vector3.new(1, 2, 1)
- o8.CFrame = CFrame.new(-36.9193726, 5.00000906, 87.8493958, 0.707107902, 1.09863925e-23, 0.707107902, -1.469474e-23, 1, -8.4238354e-25, -0.707107902, -9.79513361e-24, 0.707107902)
- o8.Color = Color3.new(0.0666667, 0.0666667, 0.0666667)
- o8.Position = Vector3.new(-36.9193726, 5.00000906, 87.8493958)
- o9.Name = "RightGrip"
- o9.Parent = o8
- o9.C0 = CFrame.new(0, -1, 0, 1, 0, -0, 0, 0, 1, 0, -1, 0)
- o9.C1 = CFrame.new(0, 0, -1.5, 0, 0, 1, 1, 0, 0, 0, 1, 0)
- o10.Name = "RightGrip"
- o10.Parent = o8
- o10.C0 = CFrame.new(0, -1, 0, 1, 0, -0, 0, 0, 1, 0, -1, 0)
- o10.C1 = CFrame.new(0, 0, -1.5, 0, 0, 1, 1, 0, 0, 0, 1, 0)
- o11.Name = "RightGrip"
- o11.Parent = o8
- o11.C0 = CFrame.new(0, -1, 0, 1, 0, -0, 0, 0, 1, 0, -1, 0)
- o11.C1 = CFrame.new(0, 0, -1.5, 0, 0, 1, 1, 0, 0, 0, 1, 0)
- o12.Name = "RightGrip"
- o12.Parent = o8
- o12.C0 = CFrame.new(0, -1, 0, 1, 0, -0, 0, 0, 1, 0, -1, 0)
- o12.C1 = CFrame.new(0, 0, -1.5, 0, 0, 1, 1, 0, 0, 0, 1, 0)
- o13.Name = "RightGrip"
- o13.Parent = o8
- o13.C0 = CFrame.new(0, -1, 0, 1, 0, -0, 0, 0, 1, 0, -1, 0)
- o13.C1 = CFrame.new(0, 0, -1.5, 0, 0, 1, 1, 0, 0, 0, 1, 0)
- o14.Name = "RightGrip"
- o14.Parent = o8
- o14.C0 = CFrame.new(0, -1, 0, 1, 0, -0, 0, 0, 1, 0, -1, 0)
- o14.C1 = CFrame.new(0, 0, -1.5, 0, 0, 1, 1, 0, 0, 0, 1, 0)
- o15.Name = "RightGrip"
- o15.Parent = o8
- o15.C0 = CFrame.new(0, -1, 0, 1, 0, -0, 0, 0, 1, 0, -1, 0)
- o15.C1 = CFrame.new(0, 0, -1.5, 0, 0, 1, 1, 0, 0, 0, 1, 0)
- o16.Name = "RightGrip"
- o16.Parent = o8
- o16.C0 = CFrame.new(0, -1, 0, 1, 0, -0, 0, 0, 1, 0, -1, 0)
- o16.C1 = CFrame.new(0, 0, -1.5, 0, 0, 1, 1, 0, 0, 0, 1, 0)
- o17.Name = "RightGrip"
- o17.Parent = o8
- o17.C0 = CFrame.new(0, -1, 0, 1, 0, -0, 0, 0, 1, 0, -1, 0)
- o17.C1 = CFrame.new(0, 0, -1.5, 0, 0, 1, 1, 0, 0, 0, 1, 0)
- o18.Name = "RightGrip"
- o18.Parent = o8
- o18.C0 = CFrame.new(0, -1, 0, 1, 0, -0, 0, 0, 1, 0, -1, 0)
- o18.C1 = CFrame.new(0, 0, -1.5, 0, 0, 1, 1, 0, 0, 0, 1, 0)
- o19.Name = "RightGrip"
- o19.Parent = o8
- o19.C0 = CFrame.new(0, -1, 0, 1, 0, -0, 0, 0, 1, 0, -1, 0)
- o19.C1 = CFrame.new(0, 0, -1.5, 0, 0, 1, 1, 0, 0, 0, 1, 0)
- o20.Name = "RightGrip"
- o20.Parent = o8
- o20.C0 = CFrame.new(0, -1, 0, 1, 0, -0, 0, 0, 1, 0, -1, 0)
- o20.C1 = CFrame.new(0, 0, -1.5, 0, 0, 1, 1, 0, 0, 0, 1, 0)
- o21.Name = "RightGrip"
- o21.Parent = o8
- o21.C0 = CFrame.new(0, -1, 0, 1, 0, -0, 0, 0, 1, 0, -1, 0)
- o21.C1 = CFrame.new(0, 0, -1.5, 0, 0, 1, 1, 0, 0, 0, 1, 0)
- o22.Name = "RightGrip"
- o22.Parent = o8
- o22.C0 = CFrame.new(0, -1, 0, 1, 0, -0, 0, 0, 1, 0, -1, 0)
- o22.C1 = CFrame.new(0, 0, -1.5, 0, 0, 1, 1, 0, 0, 0, 1, 0)
- o23.Name = "RightGrip"
- o23.Parent = o8
- o23.C0 = CFrame.new(0, -1, 0, 1, 0, -0, 0, 0, 1, 0, -1, 0)
- o23.C1 = CFrame.new(0, 0, -1.5, 0, 0, 1, 1, 0, 0, 0, 1, 0)
- o24.Name = "RightGrip"
- o24.Parent = o8
- o24.C0 = CFrame.new(0, -1, 0, 1, 0, -0, 0, 0, 1, 0, -1, 0)
- o24.C1 = CFrame.new(0, 0, -1.5, 0, 0, 1, 1, 0, 0, 0, 1, 0)
- o25.Name = "RightGrip"
- o25.Parent = o8
- o25.C0 = CFrame.new(0, -1, 0, 1, 0, -0, 0, 0, 1, 0, -1, 0)
- o25.C1 = CFrame.new(0, 0, -1.5, 0, 0, 1, 1, 0, 0, 0, 1, 0)
- o26.Name = "RightGrip"
- o26.Parent = o8
- o26.C0 = CFrame.new(0, -1, 0, 1, 0, -0, 0, 0, 1, 0, -1, 0)
- o26.C1 = CFrame.new(0, 0, -1.5, 0, 0, 1, 1, 0, 0, 0, 1, 0)
- o27.Name = "RightGrip"
- o27.Parent = o8
- o27.C0 = CFrame.new(0, -1, 0, 1, 0, -0, 0, 0, 1, 0, -1, 0)
- o27.C1 = CFrame.new(0, 0, -1.5, 0, 0, 1, 1, 0, 0, 0, 1, 0)
- o28.Name = "RightGrip"
- o28.Parent = o8
- o28.C0 = CFrame.new(0, -1, 0, 1, 0, -0, 0, 0, 1, 0, -1, 0)
- o28.C1 = CFrame.new(0, 0, -1.5, 0, 0, 1, 1, 0, 0, 0, 1, 0)
- o29.Name = "RightGrip"
- o29.Parent = o8
- o29.C0 = CFrame.new(0, -1, 0, 1, 0, -0, 0, 0, 1, 0, -1, 0)
- o29.C1 = CFrame.new(0, 0, -1.5, 0, 0, 1, 1, 0, 0, 0, 1, 0)
- o30.Name = "RightGrip"
- o30.Parent = o8
- o30.C0 = CFrame.new(0, -1, 0, 1, 0, -0, 0, 0, 1, 0, -1, 0)
- o30.C1 = CFrame.new(0, 0, -1.5, 0, 0, 1, 1, 0, 0, 0, 1, 0)
- o31.Name = "RightGrip"
- o31.Parent = o8
- o31.C0 = CFrame.new(0, -1, 0, 1, 0, -0, 0, 0, 1, 0, -1, 0)
- o31.C1 = CFrame.new(0, 0, -1.5, 0, 0, 1, 1, 0, 0, 0, 1, 0)
- o32.Name = "RightGrip"
- o32.Parent = o8
- o32.C0 = CFrame.new(0, -1, 0, 1, 0, -0, 0, 0, 1, 0, -1, 0)
- o32.C1 = CFrame.new(0, 0, -1.5, 0, 0, 1, 1, 0, 0, 0, 1, 0)
- o33.Name = "RightGrip"
- o33.Parent = o8
- o33.C0 = CFrame.new(0, -1, 0, 1, 0, -0, 0, 0, 1, 0, -1, 0)
- o33.C1 = CFrame.new(0, 0, -1.5, 0, 0, 1, 1, 0, 0, 0, 1, 0)
- o34.Name = "RightGrip"
- o34.Parent = o8
- o34.C0 = CFrame.new(0, -1, 0, 1, 0, -0, 0, 0, 1, 0, -1, 0)
- o34.C1 = CFrame.new(0, 0, -1.5, 0, 0, 1, 1, 0, 0, 0, 1, 0)
- o35.Name = "RightGrip"
- o35.Parent = o8
- o35.C0 = CFrame.new(0, -1, 0, 1, 0, -0, 0, 0, 1, 0, -1, 0)
- o35.C1 = CFrame.new(0, 0, -1.5, 0, 0, 1, 1, 0, 0, 0, 1, 0)
- o36.Name = "RightGrip"
- o36.Parent = o8
- o36.C0 = CFrame.new(0, -1, 0, 1, 0, -0, 0, 0, 1, 0, -1, 0)
- o36.C1 = CFrame.new(0, 0, -1.5, 0, 0, 1, 1, 0, 0, 0, 1, 0)
- o37.Name = "RightGrip"
- o37.Parent = o8
- o37.C0 = CFrame.new(0, -1, 0, 1, 0, -0, 0, 0, 1, 0, -1, 0)
- o37.C1 = CFrame.new(0, 0, -1.5, 0, 0, 1, 1, 0, 0, 0, 1, 0)
- o38.Name = "RightGrip"
- o38.Parent = o8
- o38.C0 = CFrame.new(0, -1, 0, 1, 0, -0, 0, 0, 1, 0, -1, 0)
- o38.C1 = CFrame.new(0, 0, -1.5, 0, 0, 1, 1, 0, 0, 0, 1, 0)
- o39.Name = "RightGrip"
- o39.Parent = o8
- o39.C0 = CFrame.new(0, -1, 0, 1, 0, -0, 0, 0, 1, 0, -1, 0)
- o39.C1 = CFrame.new(0, 0, -1.5, 0, 0, 1, 1, 0, 0, 0, 1, 0)
- o40.Name = "RightGrip"
- o40.Parent = o8
- o40.C0 = CFrame.new(0, -1, 0, 1, 0, -0, 0, 0, 1, 0, -1, 0)
- o40.C1 = CFrame.new(0, 0, -1.5, 0, 0, 1, 1, 0, 0, 0, 1, 0)
- o41.Name = "RightGrip"
- o41.Parent = o8
- o41.C0 = CFrame.new(0, -1, 0, 1, 0, -0, 0, 0, 1, 0, -1, 0)
- o41.C1 = CFrame.new(0, 0, -1.5, 0, 0, 1, 1, 0, 0, 0, 1, 0)
- o42.Name = "RightGrip"
- o42.Parent = o8
- o42.C0 = CFrame.new(0, -1, 0, 1, 0, -0, 0, 0, 1, 0, -1, 0)
- o42.C1 = CFrame.new(0, 0, 1.5, 0.996552646, 0, -0.0829627588, 0.0829627588, 0, 0.996552646, 0, -1, 0)
- o43.Name = "RightGrip"
- o43.Parent = o8
- o43.C0 = CFrame.new(0, -1, 0, 1, 0, -0, 0, 0, 1, 0, -1, 0)
- o43.C1 = CFrame.new(0, 0, 1.5, 0.996552646, 0, -0.0829627588, 0.0829627588, 0, 0.996552646, 0, -1, 0)
- o44.Name = "RightGrip"
- o44.Parent = o8
- o44.C0 = CFrame.new(0, -1, 0, 1, 0, -0, 0, 0, 1, 0, -1, 0)
- o44.C1 = CFrame.new(0, 0, 1.5, 0.996552646, 0, -0.0829627588, 0.0829627588, 0, 0.996552646, 0, -1, 0)
- o45.Name = "Right Leg"
- o45.Parent = o1
- o45.Material = Enum.Material.SmoothPlastic
- o45.BrickColor = BrickColor.new("Really black")
- o45.Position = Vector3.new(-37.6264801, 3.00000906, 88.5565033)
- o45.Rotation = Vector3.new(0, 45, 0)
- o45.CanCollide = false
- o45.FormFactor = Enum.FormFactor.Symmetric
- o45.Size = Vector3.new(1, 2, 1)
- o45.CFrame = CFrame.new(-37.6264801, 3.00000906, 88.5565033, 0.707107902, 1.09863925e-23, 0.707107902, -1.469474e-23, 1, -8.4238354e-25, -0.707107902, -9.79513361e-24, 0.707107902)
- o45.BottomSurface = Enum.SurfaceType.Smooth
- o45.Color = Color3.new(0.0666667, 0.0666667, 0.0666667)
- o45.Position = Vector3.new(-37.6264801, 3.00000906, 88.5565033)
- o46.Name = "Torso"
- o46.Parent = o1
- o46.Material = Enum.Material.SmoothPlastic
- o46.BrickColor = BrickColor.new("Really black")
- o46.Position = Vector3.new(-37.9800339, 5.00000906, 88.9100571)
- o46.Rotation = Vector3.new(0, 45, 0)
- o46.FormFactor = Enum.FormFactor.Symmetric
- o46.Friction = 0
- o46.Size = Vector3.new(2, 2, 1)
- o46.CFrame = CFrame.new(-37.9800339, 5.00000906, 88.9100571, 0.707107902, 1.09863925e-23, 0.707107902, -1.469474e-23, 1, -8.4238354e-25, -0.707107902, -9.79513361e-24, 0.707107902)
- o46.Color = Color3.new(0.0666667, 0.0666667, 0.0666667)
- o46.Position = Vector3.new(-37.9800339, 5.00000906, 88.9100571)
- o47.Name = "Neck"
- o47.Parent = o46
- o47.C0 = CFrame.new(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
- o47.C1 = CFrame.new(0, -0.5, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
- o48.Name = "Left Shoulder"
- o48.Parent = o46
- o48.C0 = CFrame.new(2, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
- o48.C1 = CFrame.new(0.5, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
- o48.Part0 = o6
- o48.Part1 = o46
- o48.DesiredAngle = 0.068711988627911
- o48.MaxVelocity = 0.15000000596046
- o49.Name = "Right Shoulder"
- o49.Parent = o46
- o49.C0 = CFrame.new(-2, 0.5, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
- o49.C1 = CFrame.new(-0.5, 0.5, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
- o49.Part0 = o8
- o49.Part1 = o46
- o49.DesiredAngle = 1.5700000524521
- o49.MaxVelocity = 0.15000000596046
- o50.Name = "Right Hip"
- o50.Parent = o46
- o50.C0 = CFrame.new(1, -1, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
- o50.C1 = CFrame.new(0.5, 1, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
- o50.Part0 = o46
- o50.Part1 = o45
- o50.DesiredAngle = -0.068711988627911
- o50.MaxVelocity = 0.5
- o51.Name = "Left Hip"
- o51.Parent = o46
- o51.C0 = CFrame.new(-1, -1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
- o51.C1 = CFrame.new(-0.5, 1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
- o51.Part0 = o46
- o51.Part1 = o7
- o51.DesiredAngle = -0.068711988627911
- o51.MaxVelocity = 0.5
- o52.Name = "Animate"
- o52.Parent = o1
- table.insert(cors,coroutine.create(function()
- wait()
- runDummyScript(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
- -- ANIMATION
- -- declarations
- local Figure = script.Parent
- local Torso = waitForChild(Figure, "Torso")
- local RightShoulder = waitForChild(Torso, "Right Shoulder")
- local LeftShoulder = waitForChild(Torso, "Left Shoulder")
- local RightHip = waitForChild(Torso, "Right Hip")
- local LeftHip = waitForChild(Torso, "Left Hip")
- local Neck = waitForChild(Torso, "Neck")
- local Humanoid = waitForChild(Figure, "Zombie")
- local pose = "Standing"
- local toolAnim = "None"
- local toolAnimTime = 0
- -- functions
- function onRunning(speed)
- if speed>0 then
- pose = "Running"
- else
- pose = "Standing"
- end
- end
- function onDied()
- pose = "Dead"
- end
- function onJumping()
- pose = "Jumping"
- end
- function onClimbing()
- pose = "Climbing"
- end
- function onGettingUp()
- pose = "GettingUp"
- end
- function onFreeFall()
- pose = "FreeFall"
- end
- function onFallingDown()
- pose = "FallingDown"
- end
- function onSeated()
- pose = "Seated"
- end
- function onPlatformStanding()
- pose = "PlatformStanding"
- end
- function moveJump()
- RightShoulder.MaxVelocity = 0.5
- LeftShoulder.MaxVelocity = 0.5
- RightShoulder.DesiredAngle = 3.14
- LeftShoulder.DesiredAngle = -3.14
- RightHip.DesiredAngle = 0
- LeftHip.DesiredAngle = 0
- end
- -- same as jump for now
- function moveFreeFall()
- RightShoulder.MaxVelocity = 0.5
- LeftShoulder.MaxVelocity = 0.5
- RightShoulder.DesiredAngle = 3.14
- LeftShoulder.DesiredAngle = -3.14
- RightHip.DesiredAngle = 0
- LeftHip.DesiredAngle = 0
- end
- function moveSit()
- RightShoulder.MaxVelocity = 0.15
- LeftShoulder.MaxVelocity = 0.15
- RightShoulder.DesiredAngle = 3.14/2
- LeftShoulder.DesiredAngle = -3.14/2
- RightHip.DesiredAngle = 3.14/2
- LeftHip.DesiredAngle = -3.14/2
- 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
- RightShoulderdDesiredAngle = 1.57
- return
- end
- if (toolAnim == "Slash") then
- RightShoulder.MaxVelocity = 0.5
- RightShoulder.DesiredAngle = 0
- return
- end
- if (toolAnim == "Lunge") then
- RightShoulder.MaxVelocity = 0.5
- LeftShoulder.MaxVelocity = 0.5
- RightHip.MaxVelocity = 0.5
- LeftHip.MaxVelocity = 0.5
- RightShoulder.DesiredAngle = 1.57
- LeftShoulder.DesiredAngle = 0
- RightHip.DesiredAngle = 1.57
- LeftHip.DesiredAngle = 1.0
- return
- end
- end
- function move(time)
- local amplitude
- local frequency
- if (pose == "Jumping") then
- moveJump()
- return
- end
- if (pose == "FreeFall") then
- moveFreeFall()
- return
- end
- if (pose == "Seated") then
- moveSit()
- return
- end
- local climbFudge = 0
- if (pose == "Running") then
- RightShoulder.MaxVelocity = 0.15
- LeftShoulder.MaxVelocity = 0.15
- amplitude = 1
- frequency = 9
- elseif (pose == "Climbing") then
- RightShoulder.MaxVelocity = 0.5
- LeftShoulder.MaxVelocity = 0.5
- amplitude = 1
- frequency = 9
- climbFudge = 3.14
- else
- amplitude = 0.1
- frequency = 1
- end
- desiredAngle = amplitude * math.sin(time*frequency)
- RightShoulder.DesiredAngle = desiredAngle + climbFudge
- LeftShoulder.DesiredAngle = desiredAngle - climbFudge
- RightHip.DesiredAngle = -desiredAngle
- LeftHip.DesiredAngle = -desiredAngle
- 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
- toolAnim = "None"
- 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)
- -- main program
- local runService = game:service("RunService");
- while Figure.Parent~=nil do
- local _, time = wait(0.1)
- move(time)
- end
- end,o52)
- end))
- o53.Name = "Animatronic_AI"
- o53.Parent = o1
- table.insert(cors,coroutine.create(function()
- wait()
- runDummyScript(function()
- local zomb = script.Parent:WaitForChild("Zombie")
- local info = script.Parent:WaitForChild("Info")
- local jumpscare = script:WaitForChild("ONO")
- local shades = nil
- local distance = 100
- local detectdistance = 80
- local detectspeed = 5
- Spawn(function()
- if script.Parent:FindFirstChild("Hair") then
- local W = Instance.new("Weld")
- W.Part0 = script.Parent.Head
- W.Part1 = script.Parent.Hair
- W.C0 = script.Parent.Head.CFrame:inverse()*CFrame.new(script.Parent.Head.Position)
- W.C1 = script.Parent.Hair.CFrame:inverse()*CFrame.new(script.Parent.Head.Position)
- W.Parent = script.Parent.Torso
- script.Parent:FindFirstChild("Hair").Anchored = false
- end
- if script.Parent:FindFirstChild("Eye1") then
- local W = Instance.new("Weld")
- W.Part0 = script.Parent.Head
- W.Part1 = script.Parent.Eye1
- W.C0 = script.Parent.Head.CFrame:inverse()*CFrame.new(script.Parent.Head.Position)
- W.C1 = script.Parent.Eye1.CFrame:inverse()*CFrame.new(script.Parent.Head.Position)
- W.Parent = script.Parent.Torso
- script.Parent:FindFirstChild("Eye1").Anchored = false
- end
- if script.Parent:FindFirstChild("Eye2") then
- local W = Instance.new("Weld")
- W.Part0 = script.Parent.Head
- W.Part1 = script.Parent.Eye2
- W.C0 = script.Parent.Head.CFrame:inverse()*CFrame.new(script.Parent.Head.Position)
- W.C1 = script.Parent.Eye2.CFrame:inverse()*CFrame.new(script.Parent.Head.Position)
- W.Parent = script.Parent.Torso
- script.Parent:FindFirstChild("Eye2").Anchored = false
- end
- if script.Parent:FindFirstChild("Top") then
- local W = Instance.new("Weld")
- W.Part0 = script.Parent.Head
- W.Part1 = script.Parent.Top
- W.C0 = script.Parent.Head.CFrame:inverse()*CFrame.new(script.Parent.Head.Position)
- W.C1 = script.Parent.Top.CFrame:inverse()*CFrame.new(script.Parent.Head.Position)
- W.Parent = script.Parent.Torso
- script.Parent:FindFirstChild("Top").Anchored = false
- end
- if script.Parent:FindFirstChild("Jaw") then
- local W = Instance.new("Weld")
- W.Part0 = script.Parent.Head
- W.Part1 = script.Parent.Jaw
- W.C0 = script.Parent.Head.CFrame:inverse()*CFrame.new(script.Parent.Head.Position)
- W.C1 = script.Parent.Jaw.CFrame:inverse()*CFrame.new(script.Parent.Head.Position)
- W.Parent = script.Parent.Torso
- script.Parent:FindFirstChild("Jaw").Anchored = false
- end
- if script.Parent:FindFirstChild("Shades") then
- shades = script.Parent:FindFirstChild("Shades")
- local W = Instance.new("Weld")
- W.Part0 = script.Parent.Head
- W.Part1 = script.Parent.Shades
- W.C0 = script.Parent.Head.CFrame:inverse()*CFrame.new(script.Parent.Head.Position)
- W.C1 = script.Parent.Shades.CFrame:inverse()*CFrame.new(script.Parent.Head.Position)
- W.Parent = script.Parent.Torso
- shades.Anchored = false
- shades.Transparency = 0
- end
- end)
- function findNearestTorso(pos)
- local list = game.Workspace:children()
- local torso = nil
- local dist = distance
- 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("Torso")
- 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
- damage = true
- function Hit(hit)
- local plr = game.Players:GetPlayerFromCharacter(hit.Parent)
- if plr and damage == true and info.Mode.Value == "Angry" then
- damage = false
- jumpscare:Clone().Parent = plr.PlayerGui
- info.Mode.Value = "Walk"
- wait(2)
- damage = true
- end
- end
- script.Parent["Left Arm"].Touched:connect(Hit)
- script.Parent["Right Arm"].Touched:connect(Hit)
- script.Parent["Left Leg"].Touched:connect(Hit)
- script.Parent["Right Leg"].Touched:connect(Hit)
- script.Parent["Torso"].Touched:connect(Hit)
- script.Parent["Head"].Touched:connect(Hit)
- walked = true
- low = true
- info.Mode.Changed:connect(function()
- while info.Mode.Value == "Walk" do
- wait(0.1)
- Spawn(function()
- if walked == true then
- walked = false
- a = 1024
- zomb:MoveTo(Vector3.new(math.random(-a, a), 0, math.random(-a, a)), game.Workspace.Terrain)
- wait(12)
- walked = true
- end
- end)
- Spawn(function()
- if info.DetectPercent.Value > 0 and low == true then
- low = false
- wait(5)
- info.DetectPercent.Value = info.DetectPercent.Value - 5
- low = true
- end
- end)
- if shades then shades.Transparency = 0 end
- zomb.WalkSpeed = 6
- local target = findNearestTorso(script.Parent.Head.Position)
- if target ~= nil then
- info.DetectPercent.Value = info.DetectPercent.Value + detectspeed
- if info.DetectPercent.Value >= 100 then
- info.DetectPercent.Value = 100
- info.Mode.Value = "Angry"
- game:GetService("Chat"):Chat(script.Parent.Head,lines[math.random(1, #lines)],"Red")
- end
- if info.DetectPercent.Value < 0 then
- info.DetectPercent.Value = 0
- end
- end
- target = nil
- end
- while info.Mode.Value == "Angry" do
- wait(0.1)
- if shades then shades.Transparency = 1 end
- zomb.WalkSpeed = 30
- local target = findNearestTorso(script.Parent.Head.Position)
- if target ~= nil then
- zomb:MoveTo(target.Position+(Vector3.new(1,1,1)*(2*((math.random()*2)-1))),target)
- else
- info.Mode.Value = "Walk"
- info.DetectPercent.Value = 0
- end
- target = nil
- end
- end)
- info.Mode.Value = "Walk"
- end,o53)
- end))
- o54.Name = "ONO"
- o54.Parent = o53
- o55.Parent = o54
- o55.Position = UDim2.new(0.5,-575,0.5,-380)
- o55.Size = UDim2.new(0,1150,0,790)
- o55.Position = UDim2.new(0.5,-575,0.5,-380)
- o55.BackgroundColor3 = Color3.new(1, 1, 1)
- o55.BackgroundTransparency = 1
- o55.ZIndex = 8
- o55.Image = "rbxassetid://121958034"
- o56.Parent = o54
- o56.Position = UDim2.new(0,-100,0,-100)
- o56.Size = UDim2.new(0,9999,0,9999)
- o56.Position = UDim2.new(0,-100,0,-100)
- o56.BackgroundColor3 = Color3.new(0, 0, 0)
- o56.BorderSizePixel = 0
- o56.ZIndex = 7
- o57.Parent = o54
- table.insert(cors,coroutine.create(function()
- wait()
- runDummyScript(function()
- local Loleris = script.Parent:WaitForChild("ImageLabel")
- oldpos = Loleris.Position
- local Frame = script.Parent:WaitForChild("Frame")
- local scream = script.Parent:WaitForChild("XSCREAM")
- local boom = script.Parent:WaitForChild("Boom")
- if game.Players.LocalPlayer.Character and game.Players.LocalPlayer.Character:FindFirstChild("Humanoid") then
- scream:Play()
- Spawn(function()
- wait(.7) boom:Play()
- wait(.1) scream:Stop()
- Frame.ZIndex = 9
- game.Players.LocalPlayer.Character.Humanoid.Health = 0
- end)
- game:GetService("RunService").RenderStepped:connect(function()
- Loleris.Position = oldpos + UDim2.new(0,math.random(-10,10),0,math.random(-10,10))
- end)
- end
- end,o57)
- end))
- o58.Name = "Boom"
- o58.Parent = o54
- o58.SoundId = "rbxassetid://130976109"
- o58.Volume = 1
- o59.Name = "XSCREAM"
- o59.Parent = o54
- o59.SoundId = "rbxassetid://515093461"
- o59.Volume = 1
- o60.Name = "Zombie"
- o60.Parent = o1
- o60.NameOcclusion = Enum.NameOcclusion.NoOcclusion
- o60.RightLeg = o45
- o60.LeftLeg = o7
- o60.Torso = o46
- o60.WalkSpeed = 6
- o61.Name = "Info"
- o61.Parent = o1
- o62.Name = "DetectPercent"
- o62.Parent = o61
- o63.Name = "Mode"
- o63.Parent = o61
- o64.Parent = o1
- o64.SoundId = "rbxassetid://163417981"
- o64.Looped = true
- mas.Parent = workspace
- mas:MakeJoints()
- local mas1 = mas:GetChildren()
- for i=1,#mas1 do
- mas1[i].Parent = workspace
- ypcall(function() mas1[i]:MakeJoints() end)
- end
- mas:Destroy()
- for i=1,#cors do
- coroutine.resume(cors[i])
- end
- game:GetService("Lighting").Ambient = Color3.new(0.498039, 0.498039, 0.498039)
- game:GetService("Lighting").Brightness = 5
- game:GetService("Lighting").ColorShift_Bottom = Color3.new(1, 1, 1)
- game:GetService("Lighting").ColorShift_Top = Color3.new(1, 1, 1)
- game:GetService("Lighting").GlobalShadows = true
- game:GetService("Lighting").OutdoorAmbient = Color3.new(0.631373, 0.631373, 0.631373)
- game:GetService("Lighting").Outlines = false
- game:GetService("Lighting").GeographicLatitude = 41.733299255371
- game:GetService("Lighting").TimeOfDay = "16:00:00"
- game:GetService("Lighting").FogColor = Color3.new(0, -7.50588, 0)
- game:GetService("Lighting").FogEnd = 1.0000000037683e+14
- game:GetService("Lighting").FogStart = 0
Advertisement
Add Comment
Please, Sign In to add comment