Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Created by Adelpvp123#8551
- 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("Sound")
- o5 = Instance.new("Sound")
- o6 = Instance.new("Sound")
- o7 = Instance.new("Decal")
- o8 = Instance.new("Weld")
- o9 = Instance.new("Part")
- o10 = Instance.new("Decal")
- o11 = Instance.new("Motor6D")
- o12 = Instance.new("Motor6D")
- o13 = Instance.new("Motor6D")
- o14 = Instance.new("Motor6D")
- o15 = Instance.new("Motor6D")
- o16 = Instance.new("Part")
- o17 = Instance.new("Part")
- o18 = Instance.new("Weld")
- o19 = Instance.new("Part")
- o20 = Instance.new("Part")
- o21 = Instance.new("Humanoid")
- o22 = Instance.new("Model")
- o23 = Instance.new("Model")
- o25 = Instance.new("Part")
- o26 = Instance.new("Motor6D")
- o27 = Instance.new("Script")
- o28 = Instance.new("Animation")
- o29 = Instance.new("Sound")
- o30 = Instance.new("Script")
- o31 = Instance.new("StringValue")
- o32 = Instance.new("Animation")
- o33 = Instance.new("StringValue")
- o34 = Instance.new("Animation")
- o35 = Instance.new("StringValue")
- o36 = Instance.new("Animation")
- o37 = Instance.new("StringValue")
- o38 = Instance.new("Animation")
- o39 = Instance.new("StringValue")
- o40 = Instance.new("Animation")
- o41 = Instance.new("StringValue")
- o42 = Instance.new("Animation")
- o43 = Instance.new("NumberValue")
- o44 = Instance.new("Animation")
- o45 = Instance.new("NumberValue")
- o46 = Instance.new("StringValue")
- o47 = Instance.new("Animation")
- o48 = Instance.new("StringValue")
- o49 = Instance.new("Animation")
- o50 = Instance.new("BodyColors")
- o51 = Instance.new("Script")
- o52 = Instance.new("Sound")
- o53 = Instance.new("Part")
- o54 = Instance.new("Sound")
- o55 = Instance.new("Sound")
- o56 = Instance.new("Sound")
- o57 = Instance.new("Sound")
- o58 = Instance.new("SpecialMesh")
- o59 = Instance.new("Decal")
- o60 = Instance.new("Decal")
- o61 = Instance.new("Decal")
- o62 = Instance.new("Decal")
- o63 = Instance.new("Script")
- o64 = Instance.new("Pants")
- o65 = Instance.new("Shirt")
- o67 = Instance.new("Part")
- o68 = Instance.new("SpecialMesh")
- o70 = Instance.new("Vector3Value")
- o72 = Instance.new("CharacterMesh")
- o73 = Instance.new("CharacterMesh")
- o74 = Instance.new("CharacterMesh")
- o75 = Instance.new("CharacterMesh")
- o76 = Instance.new("CharacterMesh")
- o1.Name = "MedicRoberto"
- o1.Parent = mas
- o1.PrimaryPart = o2
- o2.Name = "Head"
- o2.Parent = o1
- o2.Material = Enum.Material.SmoothPlastic
- o2.BrickColor = BrickColor.new("Pastel brown")
- o2.Position = Vector3.new(73.9394302, 4.50004911, 19.1352882)
- o2.Rotation = Vector3.new(0, 90, 0)
- o2.Elasticity = 0
- o2.FormFactor = Enum.FormFactor.Symmetric
- o2.Friction = 0
- o2.Size = Vector3.new(2, 1, 1)
- o2.CFrame = CFrame.new(73.9394302, 4.50004911, 19.1352882, 0.000285999995, -7.99999907e-05, 1, 0, 1, 7.9999998e-05, -1, -2.28799983e-08, 0.000285999995)
- o2.BackSurface = Enum.SurfaceType.SmoothNoOutlines
- o2.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
- o2.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
- o2.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
- o2.RightSurface = Enum.SurfaceType.SmoothNoOutlines
- o2.TopSurface = Enum.SurfaceType.SmoothNoOutlines
- o2.Color = Color3.new(1, 0.8, 0.6)
- o2.Position = Vector3.new(73.9394302, 4.50004911, 19.1352882)
- o3.Parent = o2
- o3.Scale = Vector3.new(1.25, 1.25, 1.25)
- o4.Name = "Jeff_Step"
- o4.Parent = o2
- o4.SoundId = "rbxassetid://379611235"
- o4.Volume = 1
- o5.Name = "Jeff_Laugh"
- o5.Parent = o2
- o5.Pitch = 0.97000002861023
- o5.SoundId = "rbxassetid://137473066"
- o5.Volume = 1
- o5.Looped = true
- o6.Name = "Jeff_Susto2"
- o6.Parent = o2
- o6.SoundId = "rbxassetid://148179980"
- o6.Volume = 1
- o7.Parent = o2
- o7.Texture = "http://www.roblox.com/asset/?id=882701559"
- o8.Name = "HeadWeld"
- o8.Parent = o2
- o8.C0 = CFrame.new(0, 0.5, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- o8.C1 = CFrame.new(0, -0.200000003, -0.349999994, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- o8.Part0 = o2
- o8.Part1 = o67
- o9.Name = "Torso"
- o9.Parent = o1
- o9.Material = Enum.Material.SmoothPlastic
- o9.BrickColor = BrickColor.new("Pastel brown")
- o9.Position = Vector3.new(73.9395523, 3.00004911, 19.1352882)
- o9.Rotation = Vector3.new(0, 90, 0)
- o9.Elasticity = 0
- o9.FormFactor = Enum.FormFactor.Symmetric
- o9.Friction = 2
- o9.Size = Vector3.new(2, 2, 1)
- o9.CFrame = CFrame.new(73.9395523, 3.00004911, 19.1352882, 0.000285999995, -7.99999907e-05, 1, 0, 1, 7.9999998e-05, -1, -2.28799983e-08, 0.000285999995)
- o9.BackSurface = Enum.SurfaceType.SmoothNoOutlines
- o9.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
- o9.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
- o9.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
- o9.RightSurface = Enum.SurfaceType.SmoothNoOutlines
- o9.TopSurface = Enum.SurfaceType.SmoothNoOutlines
- o9.Color = Color3.new(1, 0.8, 0.6)
- o9.Position = Vector3.new(73.9395523, 3.00004911, 19.1352882)
- o10.Name = "roblox"
- o10.Parent = o9
- o11.Name = "Right Shoulder"
- o11.Parent = o9
- o11.C0 = CFrame.new(1, 0.5, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
- o11.C1 = CFrame.new(-0.5, 0.5, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
- o11.Part0 = o9
- o11.Part1 = o17
- o11.MaxVelocity = 0.10000000149012
- o12.Name = "Left Shoulder"
- o12.Parent = o9
- o12.C0 = CFrame.new(-1, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
- o12.C1 = CFrame.new(0.5, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
- o12.Part0 = o9
- o12.Part1 = o16
- o12.MaxVelocity = 0.10000000149012
- o13.Name = "Right Hip"
- o13.Parent = o9
- o13.C0 = CFrame.new(1, -1, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
- o13.C1 = CFrame.new(0.5, 1, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
- o13.Part0 = o9
- o13.Part1 = o20
- o13.MaxVelocity = 0.10000000149012
- o14.Name = "Left Hip"
- o14.Parent = o9
- o14.C0 = CFrame.new(-1, -1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
- o14.C1 = CFrame.new(-0.5, 1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
- o14.Part0 = o9
- o14.Part1 = o19
- o14.MaxVelocity = 0.10000000149012
- o15.Name = "Neck"
- o15.Parent = o9
- o15.C0 = CFrame.new(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
- o15.C1 = CFrame.new(0, -0.5, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
- o15.Part0 = o9
- o15.Part1 = o2
- o15.MaxVelocity = 0.10000000149012
- o16.Name = "Left Arm"
- o16.Parent = o1
- o16.Material = Enum.Material.SmoothPlastic
- o16.BrickColor = BrickColor.new("Pastel brown")
- o16.Position = Vector3.new(73.9391251, 3.00004911, 20.6352882)
- o16.Rotation = Vector3.new(0, 90, 0)
- o16.Elasticity = 0
- o16.FormFactor = Enum.FormFactor.Symmetric
- o16.Friction = 2
- o16.Size = Vector3.new(1, 2, 1)
- o16.CFrame = CFrame.new(73.9391251, 3.00004911, 20.6352882, 0.000285999995, -7.99999907e-05, 1, 0, 1, 7.9999998e-05, -1, -2.28799983e-08, 0.000285999995)
- o16.BackSurface = Enum.SurfaceType.SmoothNoOutlines
- o16.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
- o16.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
- o16.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
- o16.RightSurface = Enum.SurfaceType.SmoothNoOutlines
- o16.TopSurface = Enum.SurfaceType.SmoothNoOutlines
- o16.Color = Color3.new(1, 0.8, 0.6)
- o16.Position = Vector3.new(73.9391251, 3.00004911, 20.6352882)
- o17.Name = "Right Arm"
- o17.Parent = o1
- o17.Material = Enum.Material.SmoothPlastic
- o17.BrickColor = BrickColor.new("Pastel brown")
- o17.Position = Vector3.new(73.9399796, 3.00004911, 17.6352882)
- o17.Rotation = Vector3.new(0, 90, 0)
- o17.Elasticity = 0
- o17.FormFactor = Enum.FormFactor.Symmetric
- o17.Friction = 2
- o17.Size = Vector3.new(1, 2, 1)
- o17.CFrame = CFrame.new(73.9399796, 3.00004911, 17.6352882, 0.000285999995, -7.99999907e-05, 1, 0, 1, 7.9999998e-05, -1, -2.28799983e-08, 0.000285999995)
- o17.BackSurface = Enum.SurfaceType.SmoothNoOutlines
- o17.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
- o17.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
- o17.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
- o17.RightSurface = Enum.SurfaceType.SmoothNoOutlines
- o17.TopSurface = Enum.SurfaceType.SmoothNoOutlines
- o17.Color = Color3.new(1, 0.8, 0.6)
- o17.Position = Vector3.new(73.9399796, 3.00004911, 17.6352882)
- o18.Name = "RightGripWeld"
- o18.Parent = o17
- o18.C0 = CFrame.new(-1.29999995, 1.16840947, 0.750634551, 1, 3.41111408e-05, -2.64397204e-05, -2.64397204e-05, 0.96840477, 0.249382511, 3.41111408e-05, -0.249382511, 0.96840477)
- o18.C1 = CFrame.new(-1.5, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- o18.Part0 = o53
- o18.Part1 = o17
- o19.Name = "Left Leg"
- o19.Parent = o1
- o19.Material = Enum.Material.SmoothPlastic
- o19.BrickColor = BrickColor.new("Pastel brown")
- o19.Position = Vector3.new(73.9395676, 1.00004911, 19.6352882)
- o19.Rotation = Vector3.new(0, 90, 0)
- o19.Elasticity = 0
- o19.FormFactor = Enum.FormFactor.Symmetric
- o19.Friction = 2
- o19.Size = Vector3.new(1, 2, 1)
- o19.CFrame = CFrame.new(73.9395676, 1.00004911, 19.6352882, 0.000285999995, -7.99999907e-05, 1, 0, 1, 7.9999998e-05, -1, -2.28799983e-08, 0.000285999995)
- o19.BackSurface = Enum.SurfaceType.SmoothNoOutlines
- o19.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
- o19.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
- o19.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
- o19.RightSurface = Enum.SurfaceType.SmoothNoOutlines
- o19.TopSurface = Enum.SurfaceType.SmoothNoOutlines
- o19.Color = Color3.new(1, 0.8, 0.6)
- o19.Position = Vector3.new(73.9395676, 1.00004911, 19.6352882)
- o20.Name = "Right Leg"
- o20.Parent = o1
- o20.Material = Enum.Material.SmoothPlastic
- o20.BrickColor = BrickColor.new("Pastel brown")
- o20.Position = Vector3.new(73.9398575, 1.00004911, 18.6352882)
- o20.Rotation = Vector3.new(0, 90, 0)
- o20.Elasticity = 0
- o20.FormFactor = Enum.FormFactor.Symmetric
- o20.Friction = 2
- o20.Size = Vector3.new(1, 2, 1)
- o20.CFrame = CFrame.new(73.9398575, 1.00004911, 18.6352882, 0.000285999995, -7.99999907e-05, 1, 0, 1, 7.9999998e-05, -1, -2.28799983e-08, 0.000285999995)
- o20.BackSurface = Enum.SurfaceType.SmoothNoOutlines
- o20.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
- o20.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
- o20.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
- o20.RightSurface = Enum.SurfaceType.SmoothNoOutlines
- o20.TopSurface = Enum.SurfaceType.SmoothNoOutlines
- o20.Color = Color3.new(1, 0.8, 0.6)
- o20.Position = Vector3.new(73.9398575, 1.00004911, 18.6352882)
- o21.Name = "ColdBloodedKiller"
- o21.Parent = o1
- o21.DisplayDistanceType = Enum.HumanoidDisplayDistanceType.None
- o21.HealthDisplayDistance = 0
- o21.NameDisplayDistance = 0
- o21.NameOcclusion = Enum.NameOcclusion.EnemyOcclusion
- o21.RightLeg = o20
- o21.LeftLeg = o19
- o21.Torso = o25
- o21.Health = 500
- o21.MaxHealth = 500
- o21.WalkSpeed = 1
- o22.Name = "Status"
- o22.Parent = o21
- o23.Name = "AvalibleSpawns"
- o23.Parent = o22
- o25.Name = "HumanoidRootPart"
- o25.Parent = o1
- o25.Material = Enum.Material.SmoothPlastic
- o25.BrickColor = BrickColor.new("Pearl")
- o25.Transparency = 1
- o25.Position = Vector3.new(73.9395523, 3.00004911, 19.1352882)
- o25.Rotation = Vector3.new(0, 90, 0)
- o25.CanCollide = false
- o25.Elasticity = 0
- o25.FormFactor = Enum.FormFactor.Symmetric
- o25.Friction = 0
- o25.Size = Vector3.new(2, 2, 1)
- o25.CFrame = CFrame.new(73.9395523, 3.00004911, 19.1352882, 0.000285999995, -7.99999907e-05, 1, 0, 1, 7.9999998e-05, -1, -2.28799983e-08, 0.000285999995)
- o25.BackSurface = Enum.SurfaceType.SmoothNoOutlines
- o25.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
- o25.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
- o25.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
- o25.RightSurface = Enum.SurfaceType.SmoothNoOutlines
- o25.TopSurface = Enum.SurfaceType.SmoothNoOutlines
- o25.Color = Color3.new(0.905882, 0.905882, 0.92549)
- o25.Position = Vector3.new(73.9395523, 3.00004911, 19.1352882)
- o26.Name = "RootJoint"
- o26.Parent = o25
- o26.C0 = CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
- o26.C1 = CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
- o26.Part0 = o25
- o26.Part1 = o9
- o26.MaxVelocity = 0.10000000149012
- o27.Name = "Health"
- o27.Parent = o1
- table.insert(cors,coroutine.create(function()
- wait()
- runDummyScript(function()
- --Responsible for regening a player's humanoid's health
- -- declarations
- local Figure = script.Parent
- local Head = Figure:WaitForChild("Head")
- local Humanoid;
- for _,Child in pairs(Figure:GetChildren())do
- if Child and Child.ClassName=="Humanoid"then
- Humanoid=Child;
- end;
- end;
- 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,o27)
- end))
- o28.Name = "Swing"
- o28.Parent = o1
- o28.AnimationId = "rbxassetid://54584713"
- o29.Name = "Jeff_Scene_Sound1"
- o29.Parent = o1
- o29.SoundId = "rbxassetid://295186616"
- o29.Looped = true
- o30.Name = "AnimateSauce"
- o30.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
- 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;
- for _,Child in pairs(Figure:GetChildren())do
- if Child and Child.ClassName=="Humanoid"then
- Humanoid=Child;
- end;
- end;
- 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=180435571", weight = 9 },
- { id = "http://www.roblox.com/asset/?id=180435792", weight = 1 }
- },
- walk = {
- { id = "http://www.roblox.com/asset/?id=180426354", weight = 10 }
- },
- run = {
- { id = "http://www.roblox.com/asset/?id=252557606", weight = 20 }
- },
- jump = {
- { id = "http://www.roblox.com/asset/?id=125750702", weight = 10 }
- },
- fall = {
- { id = "http://www.roblox.com/asset/?id=180436148", weight = 10 }
- },
- climb = {
- { id = "http://www.roblox.com/asset/?id=180436334", weight = 10 }
- },
- sit = {
- { id = "http://www.roblox.com/asset/?id=178130996", weight = 10 }
- },
- toolnone = {
- { id = "http://www.roblox.com/asset/?id=182393478", weight = 10 }
- },
- toolslash = {
- { id = "http://www.roblox.com/asset/?id=129967390", weight = 10 }
- --{ id = "slash.xml", weight = 10 }
- },
- toollunge = {
- { id = "http://www.roblox.com/asset/?id=129967478", weight = 10 }
- },
- wave = {
- { id = "http://www.roblox.com/asset/?id=128777973", weight = 10 }
- },
- point = {
- { id = "http://www.roblox.com/asset/?id=128853357", weight = 10 }
- },
- dance1 = {
- { id = "http://www.roblox.com/asset/?id=182435998", weight = 10 },
- { id = "http://www.roblox.com/asset/?id=182491037", weight = 10 },
- { id = "http://www.roblox.com/asset/?id=182491065", weight = 10 }
- },
- dance2 = {
- { id = "http://www.roblox.com/asset/?id=182436842", weight = 10 },
- { id = "http://www.roblox.com/asset/?id=182491248", weight = 10 },
- { id = "http://www.roblox.com/asset/?id=182491277", weight = 10 }
- },
- dance3 = {
- { id = "http://www.roblox.com/asset/?id=182436935", weight = 10 },
- { id = "http://www.roblox.com/asset/?id=182491368", weight = 10 },
- { id = "http://www.roblox.com/asset/?id=182491423", weight = 10 }
- },
- laugh = {
- { id = "http://www.roblox.com/asset/?id=129423131", weight = 10 }
- },
- cheer = {
- { id = "http://www.roblox.com/asset/?id=129423030", weight = 10 }
- },
- }
- local dances = {"dance1", "dance2", "dance3"}
- -- 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, dance1 = true, dance2 = true, dance3 = true, laugh = false, cheer = false}
- 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.3
- local toolTransitionTime = 0.1
- local fallTransitionTime = 0.3
- local jumpMaxLimbVelocity = 0.75
- -- 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
- 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.0, 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
- if Figure and Humanoid and Humanoid.WalkSpeed<17 then
- playAnimation("walk", 0.1, Humanoid);
- elseif Figure and Humanoid and Humanoid.WalkSpeed>17 then
- playAnimation("run", 0.1, Humanoid);
- end;
- if currentAnimInstance and currentAnimInstance.AnimationId == "http://www.roblox.com/asset/?id=180426354" then
- setAnimationSpeed(speed / 14.5)
- end
- 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)
- playAnimation("climb", 0.1, Humanoid)
- setAnimationSpeed(speed / 12.0)
- 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>0 then
- pose = "Running"
- else
- 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
- if Figure and Humanoid and Humanoid.WalkSpeed<17 then
- playAnimation("walk", 0.1, Humanoid);
- elseif Figure and Humanoid and Humanoid.WalkSpeed>17 then
- playAnimation("run", 0.1, Humanoid);
- end;
- 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
- if (setAngles) then
- local desiredAngle = amplitude * math.sin(time * frequency)
- RightShoulder:SetDesiredAngle(desiredAngle + climbFudge)
- LeftShoulder:SetDesiredAngle(desiredAngle - climbFudge)
- RightHip:SetDesiredAngle(-desiredAngle)
- LeftHip:SetDesiredAngle(-desiredAngle)
- end
- -- Tool Animation handling
- local tool = getTool()
- if tool and tool:FindFirstChild("Handle") then
- local 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)
- local runService = game:GetService("RunService");
- playAnimation("idle", 0.1, Humanoid)
- pose = "Standing"
- while Wait(0)do
- local _,time=wait(0)
- move(time)
- end
- end,o30)
- end))
- o31.Name = "walk"
- o31.Parent = o30
- o32.Name = "WalkAnim"
- o32.Parent = o31
- o32.AnimationId = "http://www.roblox.com/asset/?id=180426354"
- o33.Name = "toolnone"
- o33.Parent = o30
- o34.Name = "ToolNoneAnim"
- o34.Parent = o33
- o34.AnimationId = "http://www.roblox.com/asset/?id=182393478"
- o35.Name = "sit"
- o35.Parent = o30
- o36.Name = "SitAnim"
- o36.Parent = o35
- o36.AnimationId = "http://www.roblox.com/asset/?id=178130996"
- o37.Name = "run"
- o37.Parent = o30
- o38.Name = "RunAnim"
- o38.Parent = o37
- o38.AnimationId = "http://www.roblox.com/asset/?id=252557606"
- o39.Name = "jump"
- o39.Parent = o30
- o40.Name = "JumpAnim"
- o40.Parent = o39
- o40.AnimationId = "http://www.roblox.com/asset/?id=125750702"
- o41.Name = "idle"
- o41.Parent = o30
- o42.Name = "Animation2"
- o42.Parent = o41
- o42.AnimationId = "http://www.roblox.com/asset/?id=180435792"
- o43.Name = "Weight"
- o43.Parent = o42
- o43.Value = 1
- o44.Name = "Animation1"
- o44.Parent = o41
- o44.AnimationId = "http://www.roblox.com/asset/?id=180435571"
- o45.Name = "Weight"
- o45.Parent = o44
- o45.Value = 9
- o46.Name = "fall"
- o46.Parent = o30
- o47.Name = "FallAnim"
- o47.Parent = o46
- o47.AnimationId = "http://www.roblox.com/asset/?id=180436148"
- o48.Name = "climb"
- o48.Parent = o30
- o49.Name = "ClimbAnim"
- o49.Parent = o48
- o49.AnimationId = "http://www.roblox.com/asset/?id=180436334"
- o50.Parent = o1
- o50.HeadColor = BrickColor.new("Pastel brown")
- o50.LeftArmColor = BrickColor.new("Pastel brown")
- o50.LeftLegColor = BrickColor.new("Pastel brown")
- o50.RightArmColor = BrickColor.new("Pastel brown")
- o50.RightLegColor = BrickColor.new("Pastel brown")
- o50.TorsoColor = BrickColor.new("Pastel brown")
- o51.Name = "Respawn"
- o51.Parent = o1
- table.insert(cors,coroutine.create(function()
- wait()
- runDummyScript(function()
- --[[ By: Brutez, 2/28/2015, 1:34 AM, (UTC-08:00) Pacific Time (US & Canada) ]]--
- local PlayerSpawning=false; --[[ Change this to true if you want the NPC to spawn like a player, and change this to false if you want the NPC to spawn at it's current position. ]]--
- local AdvancedRespawnScript=script;
- repeat Wait(0)until script and script.Parent and script.Parent.ClassName=="Model";
- local JeffTheKiller=AdvancedRespawnScript.Parent;
- if AdvancedRespawnScript and JeffTheKiller and JeffTheKiller:FindFirstChild("Thumbnail")then
- JeffTheKiller:FindFirstChild("Thumbnail"):Destroy();
- end;
- local GameDerbis=Game:GetService("Debris");
- local JeffTheKillerHumanoid;
- for _,Child in pairs(JeffTheKiller:GetChildren())do
- if Child and Child.ClassName=="Humanoid"and Child.Health~=0 then
- JeffTheKillerHumanoid=Child;
- end;
- end;
- local Respawndant=JeffTheKiller:Clone();
- if PlayerSpawning then --[[ LOOK AT LINE: 2. ]]--
- coroutine.resume(coroutine.create(function()
- if JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid:FindFirstChild("Status")and not JeffTheKillerHumanoid:FindFirstChild("Status"):FindFirstChild("AvalibleSpawns")then
- SpawnModel=Instance.new("Model");
- SpawnModel.Parent=JeffTheKillerHumanoid.Status;
- SpawnModel.Name="AvalibleSpawns";
- else
- SpawnModel=JeffTheKillerHumanoid:FindFirstChild("Status"):FindFirstChild("AvalibleSpawns");
- end;
- function FindSpawn(SearchValue)
- local PartsArchivable=SearchValue:GetChildren();
- for AreaSearch=1,#PartsArchivable do
- if PartsArchivable[AreaSearch].className=="SpawnLocation"then
- local PositionValue=Instance.new("Vector3Value",SpawnModel);
- PositionValue.Value=PartsArchivable[AreaSearch].Position;
- PositionValue.Name=PartsArchivable[AreaSearch].Duration;
- end;
- FindSpawn(PartsArchivable[AreaSearch]);
- end;
- end;
- FindSpawn(Game:GetService("Workspace"));
- local SpawnChilden=SpawnModel:GetChildren();
- if#SpawnChilden>0 then
- local SpawnItself=SpawnChilden[math.random(1,#SpawnChilden)];
- local RespawningForceField=Instance.new("ForceField");
- RespawningForceField.Parent=JeffTheKiller;
- RespawningForceField.Name="SpawnForceField";
- GameDerbis:AddItem(RespawningForceField,SpawnItself.Name);
- JeffTheKiller:MoveTo(SpawnItself.Value+Vector3.new(0,3.5,0));
- else
- if JeffTheKiller:FindFirstChild("SpawnForceField")then
- JeffTheKiller:FindFirstChild("SpawnForceField"):Destroy();
- end;
- JeffTheKiller:MoveTo(Vector3.new(0,115,0));
- end;
- end));
- end;
- function Respawn()
- Wait(5);
- Respawndant.Parent=JeffTheKiller.Parent;
- Respawndant:makeJoints();
- Respawndant:FindFirstChild("Head"):MakeJoints();
- Respawndant:FindFirstChild("Torso"):MakeJoints();
- JeffTheKiller:remove();
- end;
- if AdvancedRespawnScript and JeffTheKiller and JeffTheKillerHumanoid then
- JeffTheKillerHumanoid.Died:connect(Respawn);
- end;
- --[[ By: Brutez, 2/28/2015, 1:34 AM, (UTC-08:00) Pacific Time (US & Canada) ]]--
- end,o51)
- end))
- o52.Name = "Jeff_Scene_Sound2"
- o52.Parent = o1
- o52.SoundId = "rbxassetid://295186616"
- o52.Looped = true
- o53.Name = "Knife"
- o53.Parent = o1
- o53.Material = Enum.Material.Metal
- o53.BrickColor = BrickColor.new("Pearl")
- o53.Position = Vector3.new(72.9216614, 2.05571365, 17.8349915)
- o53.Rotation = Vector3.new(89.9399948, 75.5599976, -89.9399948)
- o53.CanCollide = false
- o53.Elasticity = 0
- o53.FormFactor = Enum.FormFactor.Custom
- o53.Friction = 2
- o53.Size = Vector3.new(0.200000003, 0.200000003, 0.200000003)
- o53.CFrame = CFrame.new(72.9216614, 2.05571365, 17.8349915, 0.000259557535, 0.249305025, 0.968424737, 3.41090272e-05, 0.968424737, -0.24930504, -1, 9.77409582e-05, 0.00024285831)
- o53.BackSurface = Enum.SurfaceType.SmoothNoOutlines
- o53.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
- o53.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
- o53.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
- o53.RightSurface = Enum.SurfaceType.SmoothNoOutlines
- o53.TopSurface = Enum.SurfaceType.SmoothNoOutlines
- o53.Color = Color3.new(0.905882, 0.905882, 0.92549)
- o53.Position = Vector3.new(72.9216614, 2.05571365, 17.8349915)
- o54.Name = "Hit1"
- o54.Parent = o53
- o54.SoundId = "rbxassetid://566593606"
- o54.Volume = 2
- o55.Name = "Swing"
- o55.Parent = o53
- o55.SoundId = "rbxassetid://280667448"
- o55.Volume = 5.5
- o56.Name = "Hit3"
- o56.Parent = o53
- o56.SoundId = "rbxassetid://566593606"
- o56.Volume = 2
- o57.Name = "Hit2"
- o57.Parent = o53
- o57.SoundId = "rbxassetid://566593606"
- o57.Volume = 2
- o58.Parent = o53
- o58.MeshId = "http://www.roblox.com/asset/?id=165710339"
- o58.Scale = Vector3.new(0.5, 0.5, 0.5)
- o58.TextureId = "http://www.roblox.com/asset/?id=165710383"
- o58.MeshType = Enum.MeshType.FileMesh
- o59.Parent = o53
- o59.Texture = "http://www.roblox.com/asset/?id=148712227"
- o59.Face = Enum.NormalId.Right
- o60.Parent = o53
- o60.Texture = "http://www.roblox.com/asset/?id=449475289"
- o61.Parent = o53
- o61.Texture = "http://www.roblox.com/asset/?id=88660759"
- o61.Face = Enum.NormalId.Left
- o62.Parent = o53
- o62.Texture = "http://www.roblox.com/asset/?id=87245265"
- o62.Face = Enum.NormalId.Left
- o63.Name = "JeffTheKillerMain"
- o63.Parent = o1
- table.insert(cors,coroutine.create(function()
- wait()
- runDummyScript(function()
- --[[ By: Brutez. ]]--
- local JeffTheKillerScript=script;
- repeat Wait(0)until JeffTheKillerScript and JeffTheKillerScript.Parent and JeffTheKillerScript.Parent.ClassName=="Model"and JeffTheKillerScript.Parent:FindFirstChild("Head")and JeffTheKillerScript.Parent:FindFirstChild("Torso");
- local JeffTheKiller=JeffTheKillerScript.Parent;
- function raycast(Spos,vec,currentdist)
- local hit2,pos2=game.Workspace:FindPartOnRay(Ray.new(Spos+(vec*.05),vec*currentdist),JeffTheKiller);
- if hit2~=nil and pos2 then
- if hit2.Name=="Handle" and not hit2.CanCollide or string.sub(hit2.Name,1,6)=="Effect"and not hit2.CanCollide then
- local currentdist=currentdist-(pos2-Spos).magnitude;
- return raycast(pos2,vec,currentdist);
- end;
- end;
- return hit2,pos2;
- end;
- function RayCast(Position,Direction,MaxDistance,IgnoreList)
- return Game:GetService("Workspace"):FindPartOnRayWithIgnoreList(Ray.new(Position,Direction.unit*(MaxDistance or 999.999)),IgnoreList);
- end;
- --[[if JeffTheKillerScript and JeffTheKiller and JeffTheKiller:FindFirstChild("Thumbnail")then]]--
- --[[JeffTheKiller:FindFirstChild("Thumbnail"):Destroy();]]--
- --[[end;]]--
- local JeffTheKillerHumanoid;
- for _,Child in pairs(JeffTheKiller:GetChildren())do
- if Child and Child.ClassName=="Humanoid"and Child.Health~=0 then
- JeffTheKillerHumanoid=Child;
- end;
- end;
- local AttackDebounce=false;
- local JeffTheKillerKnife=JeffTheKiller:FindFirstChild("Knife");
- local JeffTheKillerHead=JeffTheKiller:FindFirstChild("Head");
- local JeffTheKillerHumanoidRootPart=JeffTheKiller:FindFirstChild("HumanoidRootPart");
- local WalkDebounce=false;
- local Notice=false;
- local JeffLaughDebounce=false;
- local MusicDebounce=false;
- local NoticeDebounce=false;
- local ChosenMusic;
- function FindNearestBae()
- local NoticeDistance=100;
- local TargetMain;
- for _,TargetModel in pairs(Game:GetService("Workspace"):GetChildren())do
- if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Health~=0 and TargetModel.className=="Model"and TargetModel~=JeffTheKiller and TargetModel.Name~=JeffTheKiller.Name and TargetModel:FindFirstChild("Torso")and TargetModel:FindFirstChild("Head")then
- local TargetPart=TargetModel:FindFirstChild("Torso");
- local FoundHumanoid;
- for _,Child in pairs(TargetModel:GetChildren())do
- if Child and Child.ClassName=="Humanoid"and Child.Health~=0 then
- FoundHumanoid=Child;
- end;
- end;
- if TargetModel and TargetPart and FoundHumanoid and FoundHumanoid.Health~=0 and(TargetPart.Position-JeffTheKillerHumanoidRootPart.Position).magnitude<NoticeDistance then
- TargetMain=TargetPart;
- NoticeDistance=(TargetPart.Position-JeffTheKillerHumanoidRootPart.Position).magnitude;
- local hit,pos=raycast(JeffTheKillerHumanoidRootPart.Position,(TargetPart.Position-JeffTheKillerHumanoidRootPart.Position).unit,500)
- if hit and hit.Parent and hit.Parent.ClassName=="Model"and hit.Parent:FindFirstChild("Torso")and hit.Parent:FindFirstChild("Head")then
- if TargetModel and TargetPart and FoundHumanoid and FoundHumanoid.Health~=0 and(TargetPart.Position-JeffTheKillerHumanoidRootPart.Position).magnitude<9 and not AttackDebounce then
- Spawn(function()
- AttackDebounce=true;
- local SwingAnimation=JeffTheKillerHumanoid:LoadAnimation(JeffTheKiller:FindFirstChild("Swing"));
- local SwingChoice=math.random(1,2);
- local HitChoice=math.random(1,3);
- SwingAnimation:Play();
- SwingAnimation:AdjustSpeed(1.5+(math.random()*0.1));
- if JeffTheKillerScript and JeffTheKiller and JeffTheKillerKnife and JeffTheKillerKnife:FindFirstChild("Swing")then
- local SwingSound=JeffTheKillerKnife:FindFirstChild("Swing");
- SwingSound.Pitch=1+(math.random()*0.04);
- SwingSound:Play();
- end;
- Wait(0);
- if TargetModel and TargetPart and FoundHumanoid and FoundHumanoid.Health~=0 and(TargetPart.Position-JeffTheKillerHumanoidRootPart.Position).magnitude<8 then
- FoundHumanoid:TakeDamage(999999999999999999999999999999999999999);
- if HitChoice==1 and JeffTheKillerScript and JeffTheKiller and JeffTheKillerKnife and JeffTheKillerKnife:FindFirstChild("Hit1")then
- local HitSound=JeffTheKillerKnife:FindFirstChild("Hit1");
- HitSound.Pitch=1+(math.random()*0.04);
- HitSound:Play();
- elseif HitChoice==2 and JeffTheKillerScript and JeffTheKiller and JeffTheKillerKnife and JeffTheKillerKnife:FindFirstChild("Hit2")then
- local HitSound=JeffTheKillerKnife:FindFirstChild("Hit2");
- HitSound.Pitch=1+(math.random()*0.04);
- HitSound:Play();
- elseif HitChoice==3 and JeffTheKillerScript and JeffTheKiller and JeffTheKillerKnife and JeffTheKillerKnife:FindFirstChild("Hit3")then
- local HitSound=JeffTheKillerKnife:FindFirstChild("Hit3");
- HitSound.Pitch=1+(math.random()*0.04);
- HitSound:Play();
- end;
- end;
- Wait(0.1);
- AttackDebounce=false;
- end);
- end;
- end;
- end;
- end;
- end;
- return TargetMain;
- end;
- while Wait(0)do
- local TargetPoint=JeffTheKillerHumanoid.TargetPoint;
- local Blockage,BlockagePos=RayCast((JeffTheKillerHumanoidRootPart.CFrame+CFrame.new(JeffTheKillerHumanoidRootPart.Position,Vector3.new(TargetPoint.X,JeffTheKillerHumanoidRootPart.Position.Y,TargetPoint.Z)).lookVector*(JeffTheKillerHumanoidRootPart.Size.Z/2)).p,JeffTheKillerHumanoidRootPart.CFrame.lookVector,(JeffTheKillerHumanoidRootPart.Size.Z*2.5),{JeffTheKiller,JeffTheKiller})
- local Jumpable=false;
- if Blockage then
- Jumpable=true;
- if Blockage and Blockage.Parent and Blockage.Parent.ClassName~="Workspace"then
- local BlockageHumanoid;
- for _,Child in pairs(Blockage.Parent:GetChildren())do
- if Child and Child.ClassName=="Humanoid"and Child.Health~=0 then
- BlockageHumanoid=Child;
- end;
- end;
- if Blockage and Blockage:IsA("Terrain")then
- local CellPos=Blockage:WorldToCellPreferSolid((BlockagePos-Vector3.new(0,2,0)));
- local CellMaterial,CellShape,CellOrientation=Blockage:GetCell(CellPos.X,CellPos.Y,CellPos.Z);
- if CellMaterial==Enum.CellMaterial.Water then
- Jumpable=false;
- end;
- elseif BlockageHumanoid or Blockage.ClassName=="TrussPart"or Blockage.ClassName=="WedgePart"or Blockage.Name=="Handle"and Blockage.Parent.ClassName=="Hat"or Blockage.Name=="Handle"and Blockage.Parent.ClassName=="Tool"then
- Jumpable=false;
- end;
- end;
- if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Health~=0 and not JeffTheKillerHumanoid.Sit and Jumpable then
- JeffTheKillerHumanoid.Jump=true;
- end;
- end;
- if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHead and JeffTheKillerHumanoidRootPart and JeffTheKillerHead:FindFirstChild("Jeff_Step")and (JeffTheKillerHumanoidRootPart.Velocity-Vector3.new(0,JeffTheKillerHumanoidRootPart.Velocity.y,0)).magnitude>=5 and not WalkDebounce and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Health~=0 then
- Spawn(function()
- WalkDebounce=true;
- local FiredRay=Ray.new(JeffTheKillerHumanoidRootPart.Position,Vector3.new(0,-4,0));
- local RayTarget,endPoint=Game:GetService("Workspace"):FindPartOnRay(FiredRay,JeffTheKiller);
- if RayTarget then
- local JeffTheKillerHeadFootStepClone=JeffTheKillerHead:FindFirstChild("Jeff_Step"):Clone();
- JeffTheKillerHeadFootStepClone.Parent=JeffTheKillerHead;
- JeffTheKillerHeadFootStepClone:Play();
- JeffTheKillerHeadFootStepClone:Destroy();
- if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Health~=0 and JeffTheKillerHumanoid.WalkSpeed<17 then
- Wait(0);
- elseif JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Health~=0 and JeffTheKillerHumanoid.WalkSpeed>17 then
- Wait(0);
- end
- end;
- WalkDebounce=false;
- end);
- end;
- local MainTarget=FindNearestBae();
- local FoundHumanoid;
- if MainTarget then
- for _,Child in pairs(MainTarget.Parent:GetChildren())do
- if Child and Child.ClassName=="Humanoid"and Child.Health~=0 then
- FoundHumanoid=Child;
- end;
- end;
- end;
- if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Health~=0 and MainTarget and MainTarget.Parent and FoundHumanoid and FoundHumanoid.Jump then
- JeffTheKillerHumanoid.Jump=true;
- end;
- if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Health~=0 and MainTarget and FoundHumanoid and FoundHumanoid.Health~=0 and(MainTarget.Position-JeffTheKillerHumanoidRootPart.Position).magnitude<25 then
- if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHead and JeffTheKillerHead:FindFirstChild("Jeff_Laugh")and not JeffTheKillerHead:FindFirstChild("Jeff_Laugh").IsPlaying then
- JeffTheKillerHead:FindFirstChild("Jeff_Laugh").Volume=1;
- JeffTheKillerHead:FindFirstChild("Jeff_Laugh"):Play();
- end;
- elseif JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Health~=0 and MainTarget and FoundHumanoid and FoundHumanoid.Health~=0 and(MainTarget.Position-JeffTheKillerHumanoidRootPart.Position).magnitude>25 then
- if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHead and JeffTheKillerHead:FindFirstChild("Jeff_Laugh")and JeffTheKillerHead:FindFirstChild("Jeff_Laugh").IsPlaying then
- if not JeffLaughDebounce then
- Spawn(function()
- JeffLaughDebounce=true;
- repeat Wait(0);if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHead and JeffTheKillerHead:FindFirstChild("Jeff_Laugh")then JeffTheKillerHead:FindFirstChild("Jeff_Laugh").Volume=JeffTheKillerHead:FindFirstChild("Jeff_Laugh").Volume-0.1;else break;end;until JeffTheKillerHead:FindFirstChild("Jeff_Laugh").Volume==0 or JeffTheKillerHead:FindFirstChild("Jeff_Laugh").Volume<0;
- JeffTheKillerHead:FindFirstChild("Jeff_Laugh").Volume=0;
- JeffTheKillerHead:FindFirstChild("Jeff_Laugh"):Stop();
- JeffLaughDebounce=false;
- end);
- end;
- end;
- end;
- if not ChosenMusic and JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Health~=0 and MainTarget and FoundHumanoid and FoundHumanoid.Health~=0 and(MainTarget.Position-JeffTheKillerHumanoidRootPart.Position).magnitude<50 then
- local MusicChoice=math.random(1,2);
- if MusicChoice==1 and JeffTheKillerScript and JeffTheKiller and JeffTheKiller:FindFirstChild("Jeff_Scene_Sound1")then
- ChosenMusic=JeffTheKiller:FindFirstChild("Jeff_Scene_Sound1");
- elseif MusicChoice==2 and JeffTheKillerScript and JeffTheKiller and JeffTheKiller:FindFirstChild("Jeff_Scene_Sound2")then
- ChosenMusic=JeffTheKiller:FindFirstChild("Jeff_Scene_Sound2");
- end;
- if JeffTheKillerScript and JeffTheKiller and ChosenMusic and not ChosenMusic.IsPlaying then
- ChosenMusic.Volume=0.5;
- ChosenMusic:Play();
- end;
- elseif JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Health~=0 and MainTarget and FoundHumanoid and FoundHumanoid.Health~=0 and(MainTarget.Position-JeffTheKillerHumanoidRootPart.Position).magnitude>50 then
- if JeffTheKillerScript and JeffTheKiller and ChosenMusic and ChosenMusic.IsPlaying then
- if not MusicDebounce then
- Spawn(function()
- MusicDebounce=true;
- repeat Wait(0);if JeffTheKillerScript and JeffTheKiller and ChosenMusic then ChosenMusic.Volume=ChosenMusic.Volume-0.01;else break;end;until ChosenMusic.Volume==0 or ChosenMusic.Volume<0;
- if ChosenMusic then
- ChosenMusic.Volume=0;
- ChosenMusic:Stop();
- end;
- ChosenMusic=nil;
- MusicDebounce=false;
- end);
- end;
- end;
- end;
- if not MainTarget and not JeffLaughDebounce then
- Spawn(function()
- JeffLaughDebounce=true;
- repeat Wait(0);if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHead and JeffTheKillerHead:FindFirstChild("Jeff_Laugh")then JeffTheKillerHead:FindFirstChild("Jeff_Laugh").Volume=JeffTheKillerHead:FindFirstChild("Jeff_Laugh").Volume-0.1;else break;end;until JeffTheKillerHead:FindFirstChild("Jeff_Laugh").Volume==0 or JeffTheKillerHead:FindFirstChild("Jeff_Laugh").Volume<0;
- JeffTheKillerHead:FindFirstChild("Jeff_Laugh").Volume=0;
- JeffTheKillerHead:FindFirstChild("Jeff_Laugh"):Stop();
- JeffLaughDebounce=false;
- end);
- end;
- if not MainTarget and not MusicDebounce then
- Spawn(function()
- MusicDebounce=true;
- repeat Wait(0);if JeffTheKillerScript and JeffTheKiller and ChosenMusic then ChosenMusic.Volume=ChosenMusic.Volume-0.01;else break;end;until ChosenMusic.Volume==0 or ChosenMusic.Volume<0;
- if ChosenMusic then
- ChosenMusic.Volume=0;
- ChosenMusic:Stop();
- end;
- ChosenMusic=nil;
- MusicDebounce=false;
- end);
- end;
- if MainTarget then
- Notice=true;
- if Notice and not NoticeDebounce and JeffTheKillerScript and JeffTheKiller and JeffTheKillerHead and JeffTheKillerHead:FindFirstChild("Jeff_Susto2")then
- JeffTheKillerHead:FindFirstChild("Jeff_Susto2"):Play();
- NoticeDebounce=true;
- end
- if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Health~=0 then
- if MainTarget and FoundHumanoid and FoundHumanoid.Health~=0 and(MainTarget.Position-JeffTheKillerHumanoidRootPart.Position).magnitude>5 then
- JeffTheKillerHumanoid.WalkSpeed=30;
- elseif MainTarget and FoundHumanoid and FoundHumanoid.Health~=0 and(MainTarget.Position-JeffTheKillerHumanoidRootPart.Position).magnitude<5 then
- JeffTheKillerHumanoid.WalkSpeed=0.004;
- end;
- JeffTheKillerHumanoid:MoveTo(MainTarget.Position+(MainTarget.Position-JeffTheKillerHumanoidRootPart.Position).unit*2,Game:GetService("Workspace"):FindFirstChild("Terrain"));
- end;
- else
- Notice=false;
- NoticeDebounce=false;
- local RandomWalk=math.random(1,150);
- if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Health~=0 then
- JeffTheKillerHumanoid.WalkSpeed=12;
- if RandomWalk==1 then
- JeffTheKillerHumanoid:MoveTo(Game:GetService("Workspace"):FindFirstChild("Terrain").Position+Vector3.new(math.random(-2048,2048),0,math.random(-2048,2048)),Game:GetService("Workspace"):FindFirstChild("Terrain"));
- end;
- end;
- end;
- if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid then
- JeffTheKillerHumanoid.DisplayDistanceType="None";
- JeffTheKillerHumanoid.HealthDisplayDistance=0;
- JeffTheKillerHumanoid.Name="ColdBloodedKiller";
- JeffTheKillerHumanoid.NameDisplayDistance=0;
- JeffTheKillerHumanoid.NameOcclusion="EnemyOcclusion";
- JeffTheKillerHumanoid.AutoJumpEnabled=true;
- JeffTheKillerHumanoid.AutoRotate=true;
- JeffTheKillerHumanoid.MaxHealth=500;
- JeffTheKillerHumanoid.JumpPower=60;
- JeffTheKillerHumanoid.MaxSlopeAngle=89.9;
- end;
- if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and not JeffTheKillerHumanoid.AutoJumpEnabled then
- JeffTheKillerHumanoid.AutoJumpEnabled=true;
- end;
- if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and not JeffTheKillerHumanoid.AutoRotate then
- JeffTheKillerHumanoid.AutoRotate=true;
- end;
- if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.PlatformStand then
- JeffTheKillerHumanoid.PlatformStand=false;
- end;
- if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Sit then
- JeffTheKillerHumanoid.Sit=false;
- end;
- end;
- --[[ By: Brutez. ]]--
- end,o63)
- end))
- o64.Name = "Pants"
- o64.Parent = o1
- o64.PantsTemplate = "http://www.roblox.com/asset/?id=18946135"
- o65.Name = "Shirt"
- o65.Parent = o1
- o65.ShirtTemplate = "http://www.roblox.com/asset/?id=14980072"
- o67.Name = "Handle"
- o67.Parent = mas
- o67.Position = Vector3.new(74.2893753, 5.20007706, 19.1353874)
- o67.Rotation = Vector3.new(0, 90, 0)
- o67.CanCollide = false
- o67.Locked = true
- o67.FormFactor = Enum.FormFactor.Custom
- o67.Size = Vector3.new(1.39999962, 1.80000043, 2.00000024)
- o67.CFrame = CFrame.new(74.2893753, 5.20007706, 19.1353874, 0.000285999995, -7.99999907e-05, 1, 0, 1, 7.9999998e-05, -1, -2.28799983e-08, 0.000285999995)
- o67.BottomSurface = Enum.SurfaceType.Smooth
- o67.TopSurface = Enum.SurfaceType.Smooth
- o67.Position = Vector3.new(74.2893753, 5.20007706, 19.1353874)
- o68.Parent = o67
- o68.MeshId = "http://www.roblox.com/asset/?id=69430030"
- o68.Scale = Vector3.new(0.850000024, 0.850000024, 0.850000024)
- o68.TextureId = "rbxassetid://"
- o68.MeshType = Enum.MeshType.FileMesh
- o70.Name = "OriginalSize"
- o70.Parent = o67
- o70.Value = Vector3.new(1.39999962, 1.80000043, 2.00000024)
- o72.Name = "Roblox 2.0 Left Arm"
- o72.Parent = o1
- o72.MeshId = 27111419
- o72.BodyPart = Enum.BodyPart.LeftArm
- o73.Name = "Roblox 2.0 Left Leg"
- o73.Parent = o1
- o73.MeshId = 27111857
- o73.BodyPart = Enum.BodyPart.LeftLeg
- o74.Name = "Roblox 2.0 Right Arm"
- o74.Parent = o1
- o74.MeshId = 27111864
- o74.BodyPart = Enum.BodyPart.RightArm
- o75.Name = "Roblox 2.0 Right Leg"
- o75.Parent = o1
- o75.MeshId = 27111882
- o75.BodyPart = Enum.BodyPart.RightLeg
- o76.Name = "Roblox 2.0 torso"
- o76.Parent = o1
- o76.MeshId = 27111894
- o76.BodyPart = Enum.BodyPart.Torso
- 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, 0, 0)
- game:GetService("Lighting").Brightness = 1
- game:GetService("Lighting").ColorShift_Bottom = Color3.new(0, 0, 0)
- game:GetService("Lighting").ColorShift_Top = Color3.new(0, 0, 0)
- game:GetService("Lighting").GlobalShadows = true
- game:GetService("Lighting").OutdoorAmbient = Color3.new(0.5, 0.5, 0.5)
- game:GetService("Lighting").Outlines = false
- game:GetService("Lighting").GeographicLatitude = 41.733299255371
- game:GetService("Lighting").TimeOfDay = "14:00:00"
- game:GetService("Lighting").FogColor = Color3.new(0.75, 0.75, 0.75)
- game:GetService("Lighting").FogEnd = 100000
- game:GetService("Lighting").FogStart = 0
Advertisement
Add Comment
Please, Sign In to add comment