Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Converted with ttyyuu12345's model to script plugin v4
- function sandbox(var,func)
- local env = getfenv(func)
- local newenv = setmetatable({},{
- __index = function(self,k)
- if k=="script" then
- return var
- else
- return env[k]
- end
- end,
- })
- setfenv(func,newenv)
- return func
- end
- cors = {}
- mas = Instance.new("Model",game:GetService("Lighting"))
- Model0 = Instance.new("Model")
- Model1 = Instance.new("Model")
- Part2 = Instance.new("Part")
- SpecialMesh3 = Instance.new("SpecialMesh")
- Sound4 = Instance.new("Sound")
- Sound5 = Instance.new("Sound")
- Sound6 = Instance.new("Sound")
- Decal7 = Instance.new("Decal")
- Weld8 = Instance.new("Weld")
- Weld9 = Instance.new("Weld")
- Part10 = Instance.new("Part")
- Decal11 = Instance.new("Decal")
- Motor6D12 = Instance.new("Motor6D")
- Motor6D13 = Instance.new("Motor6D")
- Motor6D14 = Instance.new("Motor6D")
- Motor6D15 = Instance.new("Motor6D")
- Motor6D16 = Instance.new("Motor6D")
- Part17 = Instance.new("Part")
- Part18 = Instance.new("Part")
- Weld19 = Instance.new("Weld")
- Part20 = Instance.new("Part")
- Part21 = Instance.new("Part")
- Humanoid22 = Instance.new("Humanoid")
- Model23 = Instance.new("Model")
- Model24 = Instance.new("Model")
- Part25 = Instance.new("Part")
- Motor6D26 = Instance.new("Motor6D")
- Script27 = Instance.new("Script")
- Script28 = Instance.new("Script")
- StringValue29 = Instance.new("StringValue")
- Animation30 = Instance.new("Animation")
- StringValue31 = Instance.new("StringValue")
- Animation32 = Instance.new("Animation")
- StringValue33 = Instance.new("StringValue")
- Animation34 = Instance.new("Animation")
- NumberValue35 = Instance.new("NumberValue")
- Animation36 = Instance.new("Animation")
- NumberValue37 = Instance.new("NumberValue")
- StringValue38 = Instance.new("StringValue")
- Animation39 = Instance.new("Animation")
- StringValue40 = Instance.new("StringValue")
- Animation41 = Instance.new("Animation")
- StringValue42 = Instance.new("StringValue")
- Animation43 = Instance.new("Animation")
- StringValue44 = Instance.new("StringValue")
- Animation45 = Instance.new("Animation")
- StringValue46 = Instance.new("StringValue")
- Animation47 = Instance.new("Animation")
- Animation48 = Instance.new("Animation")
- Script49 = Instance.new("Script")
- BodyColors50 = Instance.new("BodyColors")
- Part51 = Instance.new("Part")
- Sound52 = Instance.new("Sound")
- Sound53 = Instance.new("Sound")
- Sound54 = Instance.new("Sound")
- Sound55 = Instance.new("Sound")
- SpecialMesh56 = Instance.new("SpecialMesh")
- Script57 = Instance.new("Script")
- Sound58 = Instance.new("Sound")
- Script59 = Instance.new("Script")
- Accessory60 = Instance.new("Accessory")
- Part61 = Instance.new("Part")
- SpecialMesh62 = Instance.new("SpecialMesh")
- Attachment63 = Instance.new("Attachment")
- Pants64 = Instance.new("Pants")
- Shirt65 = Instance.new("Shirt")
- Accessory66 = Instance.new("Accessory")
- Part67 = Instance.new("Part")
- SpecialMesh68 = Instance.new("SpecialMesh")
- Attachment69 = Instance.new("Attachment")
- Model0.Name = "Killer Clown"
- Model0.Parent = mas
- Model1.Name = "Clown"
- Model1.Parent = Model0
- Model1.PrimaryPart = Part2
- Part2.Name = "Head"
- Part2.Parent = Model1
- Part2.Material = Enum.Material.SmoothPlastic
- Part2.BrickColor = BrickColor.new("Institutional white")
- Part2.CanCollide = false
- Part2.Elasticity = 0
- Part2.FormFactor = Enum.FormFactor.Symmetric
- Part2.Friction = 0
- Part2.Size = Vector3.new(2, 1, 1)
- Part2.CFrame = CFrame.new(-12.4995098, 4.50002193, 14.47995, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part2.BackSurface = Enum.SurfaceType.SmoothNoOutlines
- Part2.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
- Part2.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
- Part2.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
- Part2.RightSurface = Enum.SurfaceType.SmoothNoOutlines
- Part2.TopSurface = Enum.SurfaceType.SmoothNoOutlines
- Part2.Color = Color3.new(0.972549, 0.972549, 0.972549)
- Part2.Position = Vector3.new(-12.4995098, 4.50002193, 14.47995)
- Part2.Color = Color3.new(0.972549, 0.972549, 0.972549)
- SpecialMesh3.Parent = Part2
- SpecialMesh3.Scale = Vector3.new(1.25, 1.25, 1.25)
- SpecialMesh3.Scale = Vector3.new(1.25, 1.25, 1.25)
- Sound4.Name = "Jeff_Step"
- Sound4.Parent = Part2
- Sound4.SoundId = "rbxassetid://379611235"
- Sound4.Volume = 1
- Sound5.Name = "Jeff_Laugh"
- Sound5.Parent = Part2
- Sound5.SoundId = "rbxassetid://139455448"
- Sound5.Volume = 1
- Sound5.Looped = true
- Sound6.Name = "Jeff_Susto2"
- Sound6.Parent = Part2
- Sound6.SoundId = "rbxassetid://275467912"
- Sound6.Volume = 1
- Sound6.Looped = true
- Decal7.Parent = Part2
- Decal7.Texture = "http://www.roblox.com/asset/?id=144873321"
- Weld8.Name = "HeadWeld"
- Weld8.Parent = Part2
- Weld8.C0 = CFrame.new(0, 0.5, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Weld8.C1 = CFrame.new(0, 0.5, 0.600000024, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Weld8.Part0 = Part2
- Weld8.Part1 = Part61
- Weld9.Name = "HeadWeld"
- Weld9.Parent = Part2
- Weld9.C0 = CFrame.new(0, 0.5, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Weld9.C1 = CFrame.new(0, 0.649999976, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Weld9.Part0 = Part2
- Weld9.Part1 = Part67
- Part10.Name = "Torso"
- Part10.Parent = Model1
- Part10.Material = Enum.Material.SmoothPlastic
- Part10.BrickColor = BrickColor.new("Institutional white")
- Part10.CanCollide = false
- Part10.Elasticity = 0
- Part10.FormFactor = Enum.FormFactor.Symmetric
- Part10.Friction = 2
- Part10.Size = Vector3.new(2, 2, 1)
- Part10.CFrame = CFrame.new(-12.4995098, 3.00002193, 14.47995, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part10.BackSurface = Enum.SurfaceType.SmoothNoOutlines
- Part10.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
- Part10.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
- Part10.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
- Part10.RightSurface = Enum.SurfaceType.SmoothNoOutlines
- Part10.TopSurface = Enum.SurfaceType.SmoothNoOutlines
- Part10.Color = Color3.new(0.972549, 0.972549, 0.972549)
- Part10.Position = Vector3.new(-12.4995098, 3.00002193, 14.47995)
- Part10.Color = Color3.new(0.972549, 0.972549, 0.972549)
- Decal11.Name = "roblox"
- Decal11.Parent = Part10
- Motor6D12.Name = "Right Shoulder"
- Motor6D12.Parent = Part10
- Motor6D12.C0 = CFrame.new(1, 0.5, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
- Motor6D12.C1 = CFrame.new(-0.5, 0.5, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
- Motor6D12.Part0 = Part10
- Motor6D12.Part1 = Part18
- Motor6D12.MaxVelocity = 0.10000000149012
- Motor6D13.Name = "Left Shoulder"
- Motor6D13.Parent = Part10
- Motor6D13.C0 = CFrame.new(-1, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
- Motor6D13.C1 = CFrame.new(0.5, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
- Motor6D13.Part0 = Part10
- Motor6D13.Part1 = Part17
- Motor6D13.MaxVelocity = 0.10000000149012
- Motor6D14.Name = "Right Hip"
- Motor6D14.Parent = Part10
- Motor6D14.C0 = CFrame.new(1, -1, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
- Motor6D14.C1 = CFrame.new(0.5, 1, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
- Motor6D14.Part0 = Part10
- Motor6D14.Part1 = Part21
- Motor6D14.MaxVelocity = 0.10000000149012
- Motor6D15.Name = "Left Hip"
- Motor6D15.Parent = Part10
- Motor6D15.C0 = CFrame.new(-1, -1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
- Motor6D15.C1 = CFrame.new(-0.5, 1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
- Motor6D15.Part0 = Part10
- Motor6D15.Part1 = Part20
- Motor6D15.MaxVelocity = 0.10000000149012
- Motor6D16.Name = "Neck"
- Motor6D16.Parent = Part10
- Motor6D16.C0 = CFrame.new(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
- Motor6D16.C1 = CFrame.new(0, -0.5, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
- Motor6D16.Part0 = Part10
- Motor6D16.Part1 = Part2
- Motor6D16.MaxVelocity = 0.10000000149012
- Part17.Name = "Left Arm"
- Part17.Parent = Model1
- Part17.Material = Enum.Material.SmoothPlastic
- Part17.BrickColor = BrickColor.new("Institutional white")
- Part17.CanCollide = false
- Part17.Elasticity = 0
- Part17.FormFactor = Enum.FormFactor.Symmetric
- Part17.Friction = 2
- Part17.Size = Vector3.new(1, 2, 1)
- Part17.CFrame = CFrame.new(-13.9995098, 3.00002193, 14.47995, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part17.BackSurface = Enum.SurfaceType.SmoothNoOutlines
- Part17.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
- Part17.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
- Part17.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
- Part17.RightSurface = Enum.SurfaceType.SmoothNoOutlines
- Part17.TopSurface = Enum.SurfaceType.SmoothNoOutlines
- Part17.Color = Color3.new(0.972549, 0.972549, 0.972549)
- Part17.Position = Vector3.new(-13.9995098, 3.00002193, 14.47995)
- Part17.Color = Color3.new(0.972549, 0.972549, 0.972549)
- Part18.Name = "Right Arm"
- Part18.Parent = Model1
- Part18.Material = Enum.Material.SmoothPlastic
- Part18.BrickColor = BrickColor.new("Institutional white")
- Part18.CanCollide = false
- Part18.Elasticity = 0
- Part18.FormFactor = Enum.FormFactor.Symmetric
- Part18.Friction = 2
- Part18.Size = Vector3.new(1, 2, 1)
- Part18.CFrame = CFrame.new(-10.9995098, 3.00002193, 14.47995, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part18.BackSurface = Enum.SurfaceType.SmoothNoOutlines
- Part18.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
- Part18.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
- Part18.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
- Part18.RightSurface = Enum.SurfaceType.SmoothNoOutlines
- Part18.TopSurface = Enum.SurfaceType.SmoothNoOutlines
- Part18.Color = Color3.new(0.972549, 0.972549, 0.972549)
- Part18.Position = Vector3.new(-10.9995098, 3.00002193, 14.47995)
- Part18.Color = Color3.new(0.972549, 0.972549, 0.972549)
- Weld19.Name = "RightGripWeld"
- Weld19.Parent = Part18
- Weld19.C0 = CFrame.new(-1.29999995, 1.16840947, 0.750634551, 1, 0, 0, 0, 0.968409479, 0.249365434, 0, -0.249365434, 0.968409479)
- Weld19.C1 = CFrame.new(-1.5, -0, -0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Weld19.Part0 = Part51
- Weld19.Part1 = Part18
- Part20.Name = "Left Leg"
- Part20.Parent = Model1
- Part20.Material = Enum.Material.SmoothPlastic
- Part20.BrickColor = BrickColor.new("Really black")
- Part20.CanCollide = false
- Part20.Elasticity = 0
- Part20.FormFactor = Enum.FormFactor.Symmetric
- Part20.Friction = 2
- Part20.Size = Vector3.new(1, 2, 1)
- Part20.CFrame = CFrame.new(-12.9995098, 1.00002193, 14.47995, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part20.BackSurface = Enum.SurfaceType.SmoothNoOutlines
- Part20.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
- Part20.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
- Part20.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
- Part20.RightSurface = Enum.SurfaceType.SmoothNoOutlines
- Part20.TopSurface = Enum.SurfaceType.SmoothNoOutlines
- Part20.Color = Color3.new(0.0666667, 0.0666667, 0.0666667)
- Part20.Position = Vector3.new(-12.9995098, 1.00002193, 14.47995)
- Part20.Color = Color3.new(0.0666667, 0.0666667, 0.0666667)
- Part21.Name = "Right Leg"
- Part21.Parent = Model1
- Part21.Material = Enum.Material.SmoothPlastic
- Part21.BrickColor = BrickColor.new("Really black")
- Part21.CanCollide = false
- Part21.Elasticity = 0
- Part21.FormFactor = Enum.FormFactor.Symmetric
- Part21.Friction = 2
- Part21.Size = Vector3.new(1, 2, 1)
- Part21.CFrame = CFrame.new(-11.9995098, 1.00002193, 14.47995, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part21.BackSurface = Enum.SurfaceType.SmoothNoOutlines
- Part21.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
- Part21.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
- Part21.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
- Part21.RightSurface = Enum.SurfaceType.SmoothNoOutlines
- Part21.TopSurface = Enum.SurfaceType.SmoothNoOutlines
- Part21.Color = Color3.new(0.0666667, 0.0666667, 0.0666667)
- Part21.Position = Vector3.new(-11.9995098, 1.00002193, 14.47995)
- Part21.Color = Color3.new(0.0666667, 0.0666667, 0.0666667)
- Humanoid22.Name = "ColdBloodedKiller"
- Humanoid22.Parent = Model1
- Humanoid22.DisplayDistanceType = Enum.HumanoidDisplayDistanceType.None
- Humanoid22.HealthDisplayDistance = 0
- Humanoid22.NameDisplayDistance = 0
- Humanoid22.NameOcclusion = Enum.NameOcclusion.EnemyOcclusion
- Humanoid22.RightLeg = Part21
- Humanoid22.LeftLeg = Part20
- Humanoid22.Torso = Part25
- Humanoid22.Health = 500
- Humanoid22.MaxHealth = 500
- Model23.Name = "Status"
- Model23.Parent = Humanoid22
- Model24.Name = "AvalibleSpawns"
- Model24.Parent = Model23
- Part25.Name = "HumanoidRootPart"
- Part25.Parent = Model1
- Part25.Material = Enum.Material.SmoothPlastic
- Part25.BrickColor = BrickColor.new("Bright blue")
- Part25.Transparency = 1
- Part25.CanCollide = false
- Part25.Elasticity = 0
- Part25.FormFactor = Enum.FormFactor.Symmetric
- Part25.Friction = 0
- Part25.Size = Vector3.new(2, 2, 1)
- Part25.CFrame = CFrame.new(-12.4995098, 3.00002193, 14.47995, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part25.BackSurface = Enum.SurfaceType.SmoothNoOutlines
- Part25.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
- Part25.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
- Part25.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
- Part25.RightSurface = Enum.SurfaceType.SmoothNoOutlines
- Part25.TopSurface = Enum.SurfaceType.SmoothNoOutlines
- Part25.Color = Color3.new(0.0509804, 0.411765, 0.67451)
- Part25.Position = Vector3.new(-12.4995098, 3.00002193, 14.47995)
- Part25.Color = Color3.new(0.0509804, 0.411765, 0.67451)
- Motor6D26.Name = "RootJoint"
- Motor6D26.Parent = Part25
- Motor6D26.C0 = CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
- Motor6D26.C1 = CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
- Motor6D26.Part0 = Part25
- Motor6D26.Part1 = Part10
- Motor6D26.MaxVelocity = 0.10000000149012
- Script27.Name = "Health"
- Script27.Parent = Model1
- table.insert(cors,sandbox(Script27,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))
- Script28.Name = "AnimateSauce"
- Script28.Parent = Model1
- table.insert(cors,sandbox(Script28,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=579934862", weight = 10 }
- },
- run = {
- { id = "http://www.roblox.com/asset/?id=579934862", weight = 20 }
- },
- jump = {
- { id = "http://www.roblox.com/asset/?id=423921247", 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))
- StringValue29.Name = "climb"
- StringValue29.Parent = Script28
- Animation30.Name = "ClimbAnim"
- Animation30.Parent = StringValue29
- Animation30.AnimationId = "http://www.roblox.com/asset/?id=180436334"
- StringValue31.Name = "fall"
- StringValue31.Parent = Script28
- Animation32.Name = "FallAnim"
- Animation32.Parent = StringValue31
- Animation32.AnimationId = "http://www.roblox.com/asset/?id=180436148"
- StringValue33.Name = "idle"
- StringValue33.Parent = Script28
- Animation34.Name = "Animation1"
- Animation34.Parent = StringValue33
- Animation34.AnimationId = "http://www.roblox.com/asset/?id=180435571"
- NumberValue35.Name = "Weight"
- NumberValue35.Parent = Animation34
- NumberValue35.Value = 9
- Animation36.Name = "Animation2"
- Animation36.Parent = StringValue33
- Animation36.AnimationId = "http://www.roblox.com/asset/?id=180435792"
- NumberValue37.Name = "Weight"
- NumberValue37.Parent = Animation36
- NumberValue37.Value = 1
- StringValue38.Name = "jump"
- StringValue38.Parent = Script28
- Animation39.Name = "JumpAnim"
- Animation39.Parent = StringValue38
- Animation39.AnimationId = "http://www.roblox.com/asset/?id=423921247"
- StringValue40.Name = "run"
- StringValue40.Parent = Script28
- Animation41.Name = "RunAnim"
- Animation41.Parent = StringValue40
- Animation41.AnimationId = "http://www.roblox.com/asset/?id=579934862"
- StringValue42.Name = "sit"
- StringValue42.Parent = Script28
- Animation43.Name = "SitAnim"
- Animation43.Parent = StringValue42
- Animation43.AnimationId = "http://www.roblox.com/asset/?id=178130996"
- StringValue44.Name = "toolnone"
- StringValue44.Parent = Script28
- Animation45.Name = "ToolNoneAnim"
- Animation45.Parent = StringValue44
- Animation45.AnimationId = "http://www.roblox.com/asset/?id=182393478"
- StringValue46.Name = "walk"
- StringValue46.Parent = Script28
- Animation47.Name = "WalkAnim"
- Animation47.Parent = StringValue46
- Animation47.AnimationId = "http://www.roblox.com/asset/?id=579934862"
- Animation48.Name = "Swing"
- Animation48.Parent = Model1
- Animation48.AnimationId = "rbxassetid://579931435"
- Script49.Name = "JeffTheKillerMain"
- Script49.Parent = Model1
- table.insert(cors,sandbox(Script49,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;
- JeffTheKiller:FindFirstChild("Torso"):FindFirstChild("Neck").C0=CFrame.new(0,1,0,-1,0,0,0,0,1,0,1,-0);
- local OriginalC0=JeffTheKiller:FindFirstChild("Torso"):FindFirstChild("Neck").C0;
- function FindNearestBae()
- local NoticeDistance=158;
- 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.3);
- if TargetModel and TargetPart and FoundHumanoid and FoundHumanoid.Health~=0 and(TargetPart.Position-JeffTheKillerHumanoidRootPart.Position).magnitude<8 then
- FoundHumanoid:TakeDamage(37);
- 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.4);
- elseif JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Health~=0 and JeffTheKillerHumanoid.WalkSpeed>17 then
- Wait(0.15);
- 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<99999999999999999999 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>9999999999999999999 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"));
- local NeckRotation=(JeffTheKiller:FindFirstChild("Torso").Position.Y-MainTarget.Parent:FindFirstChild("Head").Position.Y)/10;
- if NeckRotation>-1.5 and NeckRotation<1.5 then
- JeffTheKiller:FindFirstChild("Torso"):FindFirstChild("Neck").C0=OriginalC0*CFrame.fromEulerAnglesXYZ(NeckRotation,0,0);
- end;
- if NeckRotation<-1.5 then
- JeffTheKiller:FindFirstChild("Torso"):FindFirstChild("Neck").C0=CFrame.new(0,1,0,-1,0,0,0,-0.993636549,0.112633869,0,0.112633869,0.993636549);
- elseif NeckRotation>1.5 then
- JeffTheKiller:FindFirstChild("Torso"):FindFirstChild("Neck").C0=CFrame.new(0,1,0,-1,0,0,0,0.996671617,0.081521146,0,0.081521146,-0.996671617);
- end;
- else
- end;
- else
- Notice=false;
- NoticeDebounce=false;
- JeffTheKiller:FindFirstChild("Torso"):FindFirstChild("Neck").C0=CFrame.new(0,1,0,-1,0,0,0,0,1,0,1,-0);
- 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))
- BodyColors50.Parent = Model1
- BodyColors50.HeadColor = BrickColor.new("Institutional white")
- BodyColors50.LeftArmColor = BrickColor.new("Institutional white")
- BodyColors50.LeftLegColor = BrickColor.new("Really black")
- BodyColors50.RightArmColor = BrickColor.new("Institutional white")
- BodyColors50.RightLegColor = BrickColor.new("Really black")
- BodyColors50.TorsoColor = BrickColor.new("Institutional white")
- Part51.Name = "Knife"
- Part51.Parent = Model1
- Part51.Material = Enum.Material.Metal
- Part51.BrickColor = BrickColor.new("Mid gray")
- Part51.Rotation = Vector3.new(14.4399996, 0, 0)
- Part51.CanCollide = false
- Part51.Elasticity = 0
- Part51.FormFactor = Enum.FormFactor.Custom
- Part51.Friction = 2
- Part51.Size = Vector3.new(0.200000003, 0.200000003, 0.200000003)
- Part51.CFrame = CFrame.new(-11.1995096, 2.05570555, 13.4616671, 1, 0, 0, 0, 0.968409479, -0.249365434, 0, 0.249365434, 0.968409479)
- Part51.BackSurface = Enum.SurfaceType.SmoothNoOutlines
- Part51.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
- Part51.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
- Part51.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
- Part51.RightSurface = Enum.SurfaceType.SmoothNoOutlines
- Part51.TopSurface = Enum.SurfaceType.SmoothNoOutlines
- Part51.Color = Color3.new(0.803922, 0.803922, 0.803922)
- Part51.Position = Vector3.new(-11.1995096, 2.05570555, 13.4616671)
- Part51.Orientation = Vector3.new(14.4399996, 0, 0)
- Part51.Color = Color3.new(0.803922, 0.803922, 0.803922)
- Sound52.Name = "Hit1"
- Sound52.Parent = Part51
- Sound52.Pitch = 1.0225422382355
- Sound52.SoundId = "rbxassetid://282343826"
- Sound52.Volume = 1
- Sound53.Name = "Hit2"
- Sound53.Parent = Part51
- Sound53.Pitch = 1.0092434883118
- Sound53.SoundId = "rbxassetid://258741257"
- Sound53.Volume = 1
- Sound54.Name = "Hit3"
- Sound54.Parent = Part51
- Sound54.Pitch = 1.0101846456528
- Sound54.SoundId = "rbxassetid://223016494"
- Sound54.Volume = 1
- Sound55.Name = "Swing"
- Sound55.Parent = Part51
- Sound55.SoundId = "rbxassetid://248088589"
- Sound55.Volume = 1
- SpecialMesh56.Name = "KnifeMesh"
- SpecialMesh56.Parent = Part51
- SpecialMesh56.MeshId = "rbxassetid://536945307"
- SpecialMesh56.Offset = Vector3.new(0, -0.200000003, 0)
- SpecialMesh56.Scale = Vector3.new(0.111000001, 0.111000001, 0.111000001)
- SpecialMesh56.TextureId = "rbxassetid://536945378"
- SpecialMesh56.MeshType = Enum.MeshType.FileMesh
- SpecialMesh56.Scale = Vector3.new(0.111000001, 0.111000001, 0.111000001)
- Script57.Name = "Respawn"
- Script57.Parent = Model1
- table.insert(cors,sandbox(Script57,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))
- Sound58.Parent = Model1
- Sound58.SoundId = "rbxassetid://304235605"
- Sound58.Volume = 1
- Sound58.Looped = true
- Script59.Parent = Sound58
- table.insert(cors,sandbox(Script59,function()
- script.Parent:Play()
- end))
- Accessory60.Name = "HappyMask"
- Accessory60.Parent = Model1
- Accessory60.AttachmentPos = Vector3.new(0, 0.5, 0.600000024)
- Part61.Name = "Handle"
- Part61.Parent = Accessory60
- Part61.CanCollide = false
- Part61.FormFactor = Enum.FormFactor.Symmetric
- Part61.Size = Vector3.new(1, 1, 1)
- Part61.CFrame = CFrame.new(-12.4995098, 4.50002193, 13.8799496, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part61.BottomSurface = Enum.SurfaceType.Smooth
- Part61.TopSurface = Enum.SurfaceType.Smooth
- Part61.Position = Vector3.new(-12.4995098, 4.50002193, 13.8799496)
- SpecialMesh62.Parent = Part61
- SpecialMesh62.MeshId = "http://www.roblox.com/asset/?id=13520257"
- SpecialMesh62.Scale = Vector3.new(1.10000002, 1, 1)
- SpecialMesh62.TextureId = "http://www.roblox.com/asset/?id=13520260"
- SpecialMesh62.MeshType = Enum.MeshType.FileMesh
- SpecialMesh62.Scale = Vector3.new(1.10000002, 1, 1)
- Attachment63.Name = "FaceFrontAttachment"
- Attachment63.Parent = Part61
- Attachment63.Rotation = Vector3.new(2.37457894e-14, -1.86912034e-22, -4.50996595e-07)
- Attachment63.CFrame = CFrame.new(3.93538357e-09, 0, -0.000272274017, 1, 7.87137555e-09, -3.26223034e-24, -7.87137555e-09, 1, -4.1444221e-16, 0, 4.1444221e-16, 1)
- Attachment63.Position = Vector3.new(3.93538357e-09, 0, -0.000272274017)
- Attachment63.Axis = Vector3.new(1, -7.87137555e-09, 0)
- Attachment63.Orientation = Vector3.new(2.37457894e-14, -1.86912034e-22, -4.50996595e-07)
- Pants64.Name = "Pants"
- Pants64.Parent = Model1
- Pants64.PantsTemplate = "http://www.roblox.com/asset/?id=518831386"
- Shirt65.Name = "Shirt"
- Shirt65.Parent = Model1
- Shirt65.ShirtTemplate = "http://www.roblox.com/asset/?id=546606894"
- Accessory66.Name = "Clown"
- Accessory66.Parent = Model1
- Accessory66.AttachmentPos = Vector3.new(0, 0.649999976, 0)
- Part67.Name = "Handle"
- Part67.Parent = Accessory66
- Part67.CanCollide = false
- Part67.FormFactor = Enum.FormFactor.Symmetric
- Part67.Size = Vector3.new(2, 2, 2)
- Part67.CFrame = CFrame.new(-12.4995098, 4.35002184, 14.47995, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part67.BottomSurface = Enum.SurfaceType.Smooth
- Part67.TopSurface = Enum.SurfaceType.Smooth
- Part67.Position = Vector3.new(-12.4995098, 4.35002184, 14.47995)
- SpecialMesh68.Parent = Part67
- SpecialMesh68.MeshId = "http://www.roblox.com/asset/?id=15393031"
- SpecialMesh68.TextureId = "http://www.roblox.com/asset/?id=15393013"
- SpecialMesh68.MeshType = Enum.MeshType.FileMesh
- Attachment69.Name = "HairAttachment"
- Attachment69.Parent = Part67
- Attachment69.Rotation = Vector3.new(2.37457894e-14, -1.86912034e-22, -4.50996595e-07)
- Attachment69.CFrame = CFrame.new(8.65838956e-09, 0.75, -0.000272244215, 1, 7.87137555e-09, -3.26223034e-24, -7.87137555e-09, 1, -4.1444221e-16, 0, 4.1444221e-16, 1)
- Attachment69.Position = Vector3.new(8.65838956e-09, 0.75, -0.000272244215)
- Attachment69.Axis = Vector3.new(1, -7.87137555e-09, 0)
- Attachment69.Orientation = Vector3.new(2.37457894e-14, -1.86912034e-22, -4.50996595e-07)
- for i,v in pairs(mas:GetChildren()) do
- v.Parent = script
- pcall(function() v:MakeJoints() end)
- end
- mas:Destroy()
- for i,v in pairs(cors) do
- spawn(function()
- pcall(v)
- end)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement