Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function sandbox(var,func)
- local env = getfenv(func)
- local newenv = setmetatable({},{
- __index = function(self,k)
- if k=="script" then
- return var
- else
- return env[k]
- end
- end,
- })
- setfenv(func,newenv)
- return func
- end
- cors = {}
- mas = Instance.new("Model",game:GetService("Lighting"))
- Model0 = Instance.new("Model")
- Part1 = Instance.new("Part")
- SpecialMesh2 = Instance.new("SpecialMesh")
- Vector3Value3 = Instance.new("Vector3Value")
- Motor6D4 = Instance.new("Motor6D")
- Decal5 = Instance.new("Decal")
- Sound6 = Instance.new("Sound")
- Sound7 = Instance.new("Sound")
- Sound8 = Instance.new("Sound")
- Sound9 = Instance.new("Sound")
- Sound10 = Instance.new("Sound")
- Weld11 = Instance.new("Weld")
- Sound12 = Instance.new("Sound")
- Part13 = Instance.new("Part")
- Vector3Value14 = Instance.new("Vector3Value")
- Pants15 = Instance.new("Pants")
- MeshPart16 = Instance.new("MeshPart")
- Vector3Value17 = Instance.new("Vector3Value")
- Motor6D18 = Instance.new("Motor6D")
- Script19 = Instance.new("Script")
- Humanoid20 = Instance.new("Humanoid")
- Script21 = Instance.new("Script")
- StringValue22 = Instance.new("StringValue")
- StringValue23 = Instance.new("StringValue")
- Animation24 = Instance.new("Animation")
- StringValue25 = Instance.new("StringValue")
- Animation26 = Instance.new("Animation")
- StringValue27 = Instance.new("StringValue")
- Animation28 = Instance.new("Animation")
- NumberValue29 = Instance.new("NumberValue")
- Animation30 = Instance.new("Animation")
- NumberValue31 = Instance.new("NumberValue")
- StringValue32 = Instance.new("StringValue")
- Animation33 = Instance.new("Animation")
- StringValue34 = Instance.new("StringValue")
- Animation35 = Instance.new("Animation")
- StringValue36 = Instance.new("StringValue")
- Animation37 = Instance.new("Animation")
- StringValue38 = Instance.new("StringValue")
- Animation39 = Instance.new("Animation")
- StringValue40 = Instance.new("StringValue")
- Animation41 = Instance.new("Animation")
- StringValue42 = Instance.new("StringValue")
- Animation43 = Instance.new("Animation")
- MeshPart44 = Instance.new("MeshPart")
- Vector3Value45 = Instance.new("Vector3Value")
- Motor6D46 = Instance.new("Motor6D")
- MeshPart47 = Instance.new("MeshPart")
- Vector3Value48 = Instance.new("Vector3Value")
- Motor6D49 = Instance.new("Motor6D")
- MeshPart50 = Instance.new("MeshPart")
- Vector3Value51 = Instance.new("Vector3Value")
- Motor6D52 = Instance.new("Motor6D")
- MeshPart53 = Instance.new("MeshPart")
- Vector3Value54 = Instance.new("Vector3Value")
- Motor6D55 = Instance.new("Motor6D")
- MeshPart56 = Instance.new("MeshPart")
- Vector3Value57 = Instance.new("Vector3Value")
- Motor6D58 = Instance.new("Motor6D")
- MeshPart59 = Instance.new("MeshPart")
- Vector3Value60 = Instance.new("Vector3Value")
- Motor6D61 = Instance.new("Motor6D")
- MeshPart62 = Instance.new("MeshPart")
- Vector3Value63 = Instance.new("Vector3Value")
- Motor6D64 = Instance.new("Motor6D")
- MeshPart65 = Instance.new("MeshPart")
- Vector3Value66 = Instance.new("Vector3Value")
- Motor6D67 = Instance.new("Motor6D")
- Script68 = Instance.new("Script")
- MeshPart69 = Instance.new("MeshPart")
- Vector3Value70 = Instance.new("Vector3Value")
- Motor6D71 = Instance.new("Motor6D")
- MeshPart72 = Instance.new("MeshPart")
- Vector3Value73 = Instance.new("Vector3Value")
- Motor6D74 = Instance.new("Motor6D")
- MeshPart75 = Instance.new("MeshPart")
- Vector3Value76 = Instance.new("Vector3Value")
- Motor6D77 = Instance.new("Motor6D")
- MeshPart78 = Instance.new("MeshPart")
- Vector3Value79 = Instance.new("Vector3Value")
- Motor6D80 = Instance.new("Motor6D")
- MeshPart81 = Instance.new("MeshPart")
- Vector3Value82 = Instance.new("Vector3Value")
- Motor6D83 = Instance.new("Motor6D")
- Script84 = Instance.new("Script")
- Script85 = Instance.new("Script")
- BodyColors86 = Instance.new("BodyColors")
- Shirt87 = Instance.new("Shirt")
- Hat88 = Instance.new("Hat")
- Part89 = Instance.new("Part")
- SpecialMesh90 = Instance.new("SpecialMesh")
- Camera91 = Instance.new("Camera")
- Sound92 = Instance.new("Sound")
- Script93 = Instance.new("Script")
- Script94 = Instance.new("Script")
- Script95 = Instance.new("Script")
- Script96 = Instance.new("Script")
- Script97 = Instance.new("Script")
- LocalScript98 = Instance.new("LocalScript")
- Script99 = Instance.new("Script")
- Sound100 = Instance.new("Sound")
- Script101 = Instance.new("Script")
- Model0.Name = "Shrek is dreck"
- Model0.Parent = mas
- Part1.Name = "Head"
- Part1.Parent = Model0
- Part1.CFrame = CFrame.new(-14.3524885, 4.56509781, -21.9115772, -0.00241400092, 3.49997972e-05, 0.999997497, 0, 1, -3.499991e-05, -0.999997497, -8.44897698e-08, -0.00241400092)
- Part1.Orientation = Vector3.new(0, 90.1399994, 0)
- Part1.Position = Vector3.new(-14.3524885, 4.56509781, -21.9115772)
- Part1.Rotation = Vector3.new(179.169998, 89.8700027, -179.169998)
- Part1.Color = Color3.new(0.643137, 0.741176, 0.278431)
- Part1.Size = Vector3.new(1, 1, 1)
- Part1.BottomSurface = Enum.SurfaceType.Smooth
- Part1.BrickColor = BrickColor.new("Br. yellowish green")
- Part1.TopSurface = Enum.SurfaceType.Smooth
- Part1.brickColor = BrickColor.new("Br. yellowish green")
- Part1.FormFactor = Enum.FormFactor.Custom
- Part1.formFactor = Enum.FormFactor.Custom
- SpecialMesh2.Parent = Part1
- SpecialMesh2.MeshId = "http://www.roblox.com/asset?id=419776358"
- SpecialMesh2.MeshType = Enum.MeshType.FileMesh
- Vector3Value3.Name = "OriginalSize"
- Vector3Value3.Parent = Part1
- Vector3Value3.Value = Vector3.new(1, 1, 1)
- Motor6D4.Name = "Neck"
- Motor6D4.Parent = Part1
- Motor6D4.C0 = CFrame.new(0.000338107347, 0.806032121, -0.015560925, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Motor6D4.C1 = CFrame.new(-2.72095203e-05, -0.565615535, 0.00386685133, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Motor6D4.Part0 = MeshPart16
- Motor6D4.Part1 = Part1
- Motor6D4.part1 = Part1
- Decal5.Parent = Part1
- Decal5.Texture = "http://www.roblox.com/asset/?id=174393211"
- Sound6.Name = "Moan"
- Sound6.Parent = Part1
- Sound6.SoundId = "rbxassetid://131060249"
- Sound6.Volume = 1
- Sound7.Name = "Moan2"
- Sound7.Parent = Part1
- Sound7.SoundId = "rbxassetid://131060145"
- Sound7.Volume = 1
- Sound8.Name = "Moan3"
- Sound8.Parent = Part1
- Sound8.SoundId = "rbxassetid://131060210"
- Sound8.Volume = 1
- Sound9.Name = "Moan4"
- Sound9.Parent = Part1
- Sound9.SoundId = "rbxassetid://131138835"
- Sound9.Volume = 1
- Sound10.Name = "Death"
- Sound10.Parent = Part1
- Weld11.Name = "HeadWeld"
- Weld11.Parent = Part1
- Weld11.C0 = CFrame.new(0, 0.5, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Weld11.C1 = CFrame.new(0, 0.300000012, 0.200000003, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Weld11.Part0 = Part1
- Weld11.Part1 = Part89
- Weld11.part1 = Part89
- Sound12.Name = "Scream"
- Sound12.Parent = Part1
- Sound12.SoundId = "rbxassetid://449830565"
- Sound12.Volume = 1
- Part13.Name = "HumanoidRootPart"
- Part13.Parent = Model0
- Part13.CFrame = CFrame.new(-14.3486996, 2.32588005, -21.9115601, -0.00241400092, 3.49997972e-05, 0.999997497, 0, 1, -3.499991e-05, -0.999997497, -8.44897698e-08, -0.00241400092)
- Part13.Orientation = Vector3.new(0, 90.1399994, 0)
- Part13.Position = Vector3.new(-14.3486996, 2.32588005, -21.9115601)
- Part13.Rotation = Vector3.new(179.169998, 89.8700027, -179.169998)
- Part13.Transparency = 1
- Part13.Size = Vector3.new(2, 2, 1)
- Part13.CanCollide = false
- Vector3Value14.Name = "OriginalSize"
- Vector3Value14.Parent = Part13
- Vector3Value14.Value = Vector3.new(2, 2, 1)
- Pants15.Parent = Model0
- Pants15.PantsTemplate = "rbxassetid://133078204"
- MeshPart16.Name = "UpperTorso"
- MeshPart16.Parent = Model0
- MeshPart16.CFrame = CFrame.new(-14.3331079, 3.1934495, -21.9112587, -0.00241400092, 3.49997972e-05, 0.999997497, 0, 1, -3.499991e-05, -0.999997497, -8.44897698e-08, -0.00241400092)
- MeshPart16.Orientation = Vector3.new(0, 90.1399994, 0)
- MeshPart16.Position = Vector3.new(-14.3331079, 3.1934495, -21.9112587)
- MeshPart16.Rotation = Vector3.new(179.169998, 89.8700027, -179.169998)
- MeshPart16.Color = Color3.new(0.643137, 0.741176, 0.278431)
- MeshPart16.Size = Vector3.new(2.00029206, 1.60093355, 1.0005368)
- MeshPart16.BrickColor = BrickColor.new("Br. yellowish green")
- MeshPart16.brickColor = BrickColor.new("Br. yellowish green")
- Vector3Value17.Name = "OriginalSize"
- Vector3Value17.Parent = MeshPart16
- Vector3Value17.Value = Vector3.new(2.00029206, 1.60093355, 1.0005368)
- Motor6D18.Name = "Waist"
- Motor6D18.Parent = MeshPart16
- Motor6D18.C0 = CFrame.new(0.000280171633, 0.537143946, -0.0142721087, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Motor6D18.C1 = CFrame.new(0.000338107347, -0.463463932, -0.015560925, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Motor6D18.Part0 = MeshPart65
- Motor6D18.Part1 = MeshPart16
- Motor6D18.part1 = MeshPart16
- Script19.Name = "Damage Script"
- Script19.Parent = MeshPart16
- table.insert(cors,sandbox(Script19,function()
- function onTouched(hit)
- local human = hit.Parent:findFirstChild("Humanoid")
- if (human ~= nil) then
- human.Health = human.Health - 5 -- Change the amount to change the damage.
- end
- end
- script.Parent.Touched:connect(onTouched)
- end))
- Humanoid20.Name = "Zombie"
- Humanoid20.Parent = Model0
- Humanoid20.DisplayDistanceType = Enum.HumanoidDisplayDistanceType.Subject
- Humanoid20.Health = 125
- Humanoid20.HealthDisplayType = Enum.HumanoidHealthDisplayType.AlwaysOn
- Humanoid20.HipHeight = 1.3500000238419
- Humanoid20.MaxHealth = 125
- Humanoid20.NameOcclusion = Enum.NameOcclusion.NoOcclusion
- Humanoid20.RigType = Enum.HumanoidRigType.R15
- Humanoid20.Torso = Part13
- Humanoid20.maxHealth = 125
- Script21.Name = "Animate"
- Script21.Parent = Model0
- table.insert(cors,sandbox(Script21,function()
- function waitForChild(parent, childName)
- local child = parent:findFirstChild(childName)
- if child then return child end
- while true do
- child = parent.ChildAdded:wait()
- if child.Name==childName then return child end
- end
- end
- local Figure = script.Parent
- local Humanoid = waitForChild(Figure, "Zombie")
- local pose = "Standing"
- local currentAnim = ""
- local currentAnimInstance = nil
- local currentAnimTrack = nil
- local currentAnimKeyframeHandler = nil
- local currentAnimSpeed = 1.0
- local animTable = {}
- local animNames = {
- idle = {
- { id = "http://www.roblox.com/asset/?id=507766666", weight = 1 },
- { id = "http://www.roblox.com/asset/?id=507766951", weight = 1 },
- { id = "http://www.roblox.com/asset/?id=507766388", weight = 9 }
- },
- walk = {
- { id = "http://www.roblox.com/asset/?id=507777826", weight = 10 }
- },
- run = {
- { id = "http://www.roblox.com/asset/?id=507767714", weight = 10 }
- },
- swim = {
- { id = "http://www.roblox.com/asset/?id=507784897", weight = 10 }
- },
- swimidle = {
- { id = "http://www.roblox.com/asset/?id=507785072", weight = 10 }
- },
- jump = {
- { id = "http://www.roblox.com/asset/?id=507765000", weight = 10 }
- },
- fall = {
- { id = "http://www.roblox.com/asset/?id=507767968", weight = 10 }
- },
- climb = {
- { id = "http://www.roblox.com/asset/?id=507765644", weight = 10 }
- },
- sit = {
- { id = "http://www.roblox.com/asset/?id=507768133", weight = 10 }
- },
- toolnone = {
- { id = "http://www.roblox.com/asset/?id=507768375", weight = 10 }
- },
- toolslash = {
- { id = "http://www.roblox.com/asset/?id=507768375", weight = 10 }
- -- { id = "slash.xml", weight = 10 }
- },
- toollunge = {
- { id = "http://www.roblox.com/asset/?id=507768375", weight = 10 }
- },
- wave = {
- { id = "http://www.roblox.com/asset/?id=507770239", weight = 10 }
- },
- point = {
- { id = "http://www.roblox.com/asset/?id=507770453", weight = 10 }
- },
- dance = {
- { id = "http://www.roblox.com/asset/?id=507771019", weight = 10 },
- { id = "http://www.roblox.com/asset/?id=507771955", weight = 10 },
- { id = "http://www.roblox.com/asset/?id=507772104", weight = 10 }
- },
- dance2 = {
- { id = "http://www.roblox.com/asset/?id=507776043", weight = 10 },
- { id = "http://www.roblox.com/asset/?id=507776720", weight = 10 },
- { id = "http://www.roblox.com/asset/?id=507776879", weight = 10 }
- },
- dance3 = {
- { id = "http://www.roblox.com/asset/?id=507777268", weight = 10 },
- { id = "http://www.roblox.com/asset/?id=507777451", weight = 10 },
- { id = "http://www.roblox.com/asset/?id=507777623", weight = 10 }
- },
- laugh = {
- { id = "http://www.roblox.com/asset/?id=507770818", weight = 10 }
- },
- cheer = {
- { id = "http://www.roblox.com/asset/?id=507770677", weight = 10 }
- },
- }
- -- Existance in this list signifies that it is an emote, the value indicates if it is a looping emote
- local emoteNames = { wave = false, point = false, dance = true, dance2 = true, dance3 = true, laugh = false, cheer = false}
- math.randomseed(tick())
- function configureAnimationSet(name, fileList)
- if (animTable[name] ~= nil) then
- for _, connection in pairs(animTable[name].connections) do
- connection:disconnect()
- end
- end
- animTable[name] = {}
- animTable[name].count = 0
- animTable[name].totalWeight = 0
- animTable[name].connections = {}
- -- check for config values
- local config = script:FindFirstChild(name)
- if (config ~= nil) then
- -- print("Loading anims " .. name)
- table.insert(animTable[name].connections, config.ChildAdded:connect(function(child) configureAnimationSet(name, fileList) end))
- table.insert(animTable[name].connections, config.ChildRemoved:connect(function(child) configureAnimationSet(name, fileList) end))
- local idx = 1
- for _, childPart in pairs(config:GetChildren()) do
- if (childPart:IsA("Animation")) then
- table.insert(animTable[name].connections, childPart.Changed:connect(function(property) configureAnimationSet(name, fileList) end))
- animTable[name][idx] = {}
- animTable[name][idx].anim = childPart
- local weightObject = childPart:FindFirstChild("Weight")
- if (weightObject == nil) then
- animTable[name][idx].weight = 1
- else
- animTable[name][idx].weight = weightObject.Value
- end
- animTable[name].count = animTable[name].count + 1
- animTable[name].totalWeight = animTable[name].totalWeight + animTable[name][idx].weight
- -- print(name .. " [" .. idx .. "] " .. animTable[name][idx].anim.AnimationId .. " (" .. animTable[name][idx].weight .. ")")
- idx = idx + 1
- end
- end
- end
- -- fallback to defaults
- if (animTable[name].count <= 0) then
- for idx, anim in pairs(fileList) do
- animTable[name][idx] = {}
- animTable[name][idx].anim = Instance.new("Animation")
- animTable[name][idx].anim.Name = name
- animTable[name][idx].anim.AnimationId = anim.id
- animTable[name][idx].weight = anim.weight
- animTable[name].count = animTable[name].count + 1
- animTable[name].totalWeight = animTable[name].totalWeight + anim.weight
- -- print(name .. " [" .. idx .. "] " .. anim.id .. " (" .. anim.weight .. ")")
- end
- end
- end
- -- Setup animation objects
- function scriptChildModified(child)
- local fileList = animNames[child.Name]
- if (fileList ~= nil) then
- configureAnimationSet(child.Name, fileList)
- end
- end
- script.ChildAdded:connect(scriptChildModified)
- script.ChildRemoved:connect(scriptChildModified)
- for name, fileList in pairs(animNames) do
- configureAnimationSet(name, fileList)
- end
- -- ANIMATION
- -- declarations
- local toolAnim = "None"
- local toolAnimTime = 0
- local jumpAnimTime = 0
- local jumpAnimDuration = 0.31
- local toolTransitionTime = 0.1
- local fallTransitionTime = 0.2
- -- functions
- function stopAllAnimations()
- local oldAnim = currentAnim
- -- return to idle if finishing an emote
- if (emoteNames[oldAnim] ~= nil and emoteNames[oldAnim] == false) then
- oldAnim = "idle"
- end
- currentAnim = ""
- currentAnimInstance = nil
- if (currentAnimKeyframeHandler ~= nil) then
- currentAnimKeyframeHandler:disconnect()
- end
- if (currentAnimTrack ~= nil) then
- currentAnimTrack:Stop()
- currentAnimTrack:Destroy()
- currentAnimTrack = nil
- end
- return oldAnim
- end
- function setAnimationSpeed(speed)
- if speed ~= currentAnimSpeed then
- currentAnimSpeed = speed
- currentAnimTrack:AdjustSpeed(currentAnimSpeed)
- end
- end
- function keyFrameReachedFunc(frameName)
- if (frameName == "End") then
- -- print("Keyframe : ".. frameName)
- local repeatAnim = currentAnim
- -- return to idle if finishing an emote
- if (emoteNames[repeatAnim] ~= nil and emoteNames[repeatAnim] == false) then
- repeatAnim = "idle"
- end
- local animSpeed = currentAnimSpeed
- playAnimation(repeatAnim, 0.15, Humanoid)
- setAnimationSpeed(animSpeed)
- end
- end
- -- Preload animations
- function playAnimation(animName, transitionTime, humanoid)
- local roll = math.random(1, animTable[animName].totalWeight)
- local origRoll = roll
- local idx = 1
- while (roll > animTable[animName][idx].weight) do
- roll = roll - animTable[animName][idx].weight
- idx = idx + 1
- end
- -- print(animName .. " " .. idx .. " [" .. origRoll .. "]")
- local anim = animTable[animName][idx].anim
- -- switch animation
- if (anim ~= currentAnimInstance) then
- if (currentAnimTrack ~= nil) then
- currentAnimTrack:Stop(transitionTime)
- currentAnimTrack:Destroy()
- end
- currentAnimSpeed = 1.0
- -- load it to the humanoid; get AnimationTrack
- currentAnimTrack = humanoid:LoadAnimation(anim)
- -- play the animation
- currentAnimTrack:Play(transitionTime)
- currentAnim = animName
- currentAnimInstance = anim
- -- set up keyframe name triggers
- if (currentAnimKeyframeHandler ~= nil) then
- currentAnimKeyframeHandler:disconnect()
- end
- currentAnimKeyframeHandler = currentAnimTrack.KeyframeReached:connect(keyFrameReachedFunc)
- end
- end
- -------------------------------------------------------------------------------------------
- -------------------------------------------------------------------------------------------
- local toolAnimName = ""
- local toolAnimTrack = nil
- local toolAnimInstance = nil
- local currentToolAnimKeyframeHandler = nil
- function toolKeyFrameReachedFunc(frameName)
- if (frameName == "End") then
- -- print("Keyframe : ".. frameName)
- playToolAnimation(toolAnimName, 0.0, Humanoid)
- end
- end
- function playToolAnimation(animName, transitionTime, humanoid)
- local roll = math.random(1, animTable[animName].totalWeight)
- local origRoll = roll
- local idx = 1
- while (roll > animTable[animName][idx].weight) do
- roll = roll - animTable[animName][idx].weight
- idx = idx + 1
- end
- -- print(animName .. " * " .. idx .. " [" .. origRoll .. "]")
- local anim = animTable[animName][idx].anim
- if (toolAnimInstance ~= anim) then
- if (toolAnimTrack ~= nil) then
- toolAnimTrack:Stop()
- toolAnimTrack:Destroy()
- transitionTime = 0
- end
- -- load it to the humanoid; get AnimationTrack
- toolAnimTrack = humanoid:LoadAnimation(anim)
- -- play the animation
- toolAnimTrack:Play(transitionTime)
- toolAnimName = animName
- toolAnimInstance = anim
- currentToolAnimKeyframeHandler = toolAnimTrack.KeyframeReached:connect(toolKeyFrameReachedFunc)
- end
- end
- function stopToolAnimations()
- local oldAnim = toolAnimName
- if (currentToolAnimKeyframeHandler ~= nil) then
- currentToolAnimKeyframeHandler:disconnect()
- end
- toolAnimName = ""
- toolAnimInstance = nil
- if (toolAnimTrack ~= nil) then
- toolAnimTrack:Stop()
- toolAnimTrack:Destroy()
- toolAnimTrack = nil
- end
- return oldAnim
- end
- -------------------------------------------------------------------------------------------
- -------------------------------------------------------------------------------------------
- function onRunning(speed)
- if speed > 0.01 then
- local scale = 15.0
- playAnimation("walk", 0.1, Humanoid)
- setAnimationSpeed(speed / scale)
- pose = "Running"
- else
- playAnimation("idle", 0.1, Humanoid)
- pose = "Standing"
- end
- end
- function onDied()
- pose = "Dead"
- end
- function onJumping()
- playAnimation("jump", 0.1, Humanoid)
- jumpAnimTime = jumpAnimDuration
- pose = "Jumping"
- end
- function onClimbing(speed)
- local scale = 5.0
- playAnimation("climb", 0.1, Humanoid)
- setAnimationSpeed(speed / scale)
- pose = "Climbing"
- end
- function onGettingUp()
- pose = "GettingUp"
- end
- function onFreeFall()
- if (jumpAnimTime <= 0) then
- playAnimation("fall", fallTransitionTime, Humanoid)
- end
- pose = "FreeFall"
- end
- function onFallingDown()
- pose = "FallingDown"
- end
- function onSeated()
- pose = "Seated"
- end
- function onPlatformStanding()
- pose = "PlatformStanding"
- end
- function onSwimming(speed)
- if speed > 1.00 then
- local scale = 10.0
- playAnimation("swim", 0.4, Humanoid)
- setAnimationSpeed(speed / scale)
- pose = "Swimming"
- else
- playAnimation("swimidle", 0.4, Humanoid)
- pose = "Standing"
- end
- end
- function getTool()
- for _, kid in ipairs(Figure:GetChildren()) do
- if kid.className == "Tool" then return kid end
- end
- return nil
- end
- function getToolAnim(tool)
- for _, c in ipairs(tool:GetChildren()) do
- if c.Name == "toolanim" and c.className == "StringValue" then
- return c
- end
- end
- return nil
- end
- function animateTool()
- if (toolAnim == "None") then
- playToolAnimation("toolnone", toolTransitionTime, Humanoid)
- return
- end
- if (toolAnim == "Slash") then
- playToolAnimation("toolslash", 0, Humanoid)
- return
- end
- if (toolAnim == "Lunge") then
- playToolAnimation("toollunge", 0, Humanoid)
- return
- end
- end
- function moveSit()
- RightShoulder.MaxVelocity = 0.15
- LeftShoulder.MaxVelocity = 0.15
- RightShoulder:SetDesiredAngle(3.14 /2)
- LeftShoulder:SetDesiredAngle(-3.14 /2)
- RightHip:SetDesiredAngle(3.14 /2)
- LeftHip:SetDesiredAngle(-3.14 /2)
- end
- local lastTick = 0
- function move(time)
- local amplitude = 1
- local frequency = 1
- local deltaTime = time - lastTick
- lastTick = time
- local climbFudge = 0
- local setAngles = false
- if (jumpAnimTime > 0) then
- jumpAnimTime = jumpAnimTime - deltaTime
- end
- if (pose == "FreeFall" and jumpAnimTime <= 0) then
- playAnimation("fall", fallTransitionTime, Humanoid)
- elseif (pose == "Seated") then
- playAnimation("sit", 0.5, Humanoid)
- return
- elseif (pose == "Running") then
- playAnimation("walk", 0.1, Humanoid)
- elseif (pose == "Dead" or pose == "GettingUp" or pose == "FallingDown" or pose == "Seated" or pose == "PlatformStanding") then
- stopAllAnimations()
- amplitude = 0.1
- frequency = 1
- setAngles = true
- end
- -- Tool Animation handling
- local tool = getTool()
- if tool then
- animStringValueObject = getToolAnim(tool)
- if animStringValueObject then
- toolAnim = animStringValueObject.Value
- -- message recieved, delete StringValue
- animStringValueObject.Parent = nil
- toolAnimTime = time + .3
- end
- if time > toolAnimTime then
- toolAnimTime = 0
- toolAnim = "None"
- end
- animateTool()
- else
- stopToolAnimations()
- toolAnim = "None"
- toolAnimInstance = nil
- toolAnimTime = 0
- end
- end
- -- connect events
- Humanoid.Died:connect(onDied)
- Humanoid.Running:connect(onRunning)
- Humanoid.Jumping:connect(onJumping)
- Humanoid.Climbing:connect(onClimbing)
- Humanoid.GettingUp:connect(onGettingUp)
- Humanoid.FreeFalling:connect(onFreeFall)
- Humanoid.FallingDown:connect(onFallingDown)
- Humanoid.Seated:connect(onSeated)
- Humanoid.PlatformStanding:connect(onPlatformStanding)
- Humanoid.Swimming:connect(onSwimming)
- -- setup emote chat hook
- script.msg.Changed:connect(function(msg)
- script.msg.Value = ""
- local emote = ""
- if (string.sub(msg, 1, 3) == "/e ") then
- emote = string.sub(msg, 4)
- elseif (string.sub(msg, 1, 7) == "/emote ") then
- emote = string.sub(msg, 8)
- end
- if (pose == "Standing" and emoteNames[emote] ~= nil) then
- playAnimation(emote, 0.1, Humanoid)
- end
- -- print("===> " .. string.sub(msg, 1, 3) .. "(" .. emote .. ")")
- end)
- -- main program
- local runService = game:service("RunService");
- -- print("bottom")
- -- initialize to idle
- playAnimation("idle", 0.1, Humanoid)
- pose = "Standing"
- while Figure.Parent~=nil do
- local _, time = wait(0.1)
- move(time)
- end
- end))
- StringValue22.Name = "msg"
- StringValue22.Parent = Script21
- StringValue23.Name = "climb"
- StringValue23.Parent = Script21
- Animation24.Name = "ClimbAnim"
- Animation24.Parent = StringValue23
- Animation24.AnimationId = "http://www.roblox.com/asset/?id=616156119"
- StringValue25.Name = "fall"
- StringValue25.Parent = Script21
- Animation26.Name = "FallAnim"
- Animation26.Parent = StringValue25
- Animation26.AnimationId = "http://www.roblox.com/asset/?id=616157476"
- StringValue27.Name = "idle"
- StringValue27.Parent = Script21
- Animation28.Name = "Animation1"
- Animation28.Parent = StringValue27
- Animation28.AnimationId = "http://www.roblox.com/asset/?id=616158929"
- NumberValue29.Name = "Weight"
- NumberValue29.Parent = Animation28
- NumberValue29.Value = 9
- Animation30.Name = "Animation2"
- Animation30.Parent = StringValue27
- Animation30.AnimationId = "http://www.roblox.com/asset/?id=616160636"
- NumberValue31.Name = "Weight"
- NumberValue31.Parent = Animation30
- NumberValue31.Value = 1
- StringValue32.Name = "jump"
- StringValue32.Parent = Script21
- Animation33.Name = "JumpAnim"
- Animation33.Parent = StringValue32
- Animation33.AnimationId = "http://www.roblox.com/asset/?id=616161997"
- StringValue34.Name = "sit"
- StringValue34.Parent = Script21
- Animation35.Name = "SitAnim"
- Animation35.Parent = StringValue34
- Animation35.AnimationId = "http://www.roblox.com/asset/?id=507768133"
- StringValue36.Name = "swim"
- StringValue36.Parent = Script21
- Animation37.Name = "Swim"
- Animation37.Parent = StringValue36
- Animation37.AnimationId = "http://www.roblox.com/asset/?id=616165109"
- StringValue38.Name = "swimidle"
- StringValue38.Parent = Script21
- Animation39.Name = "SwimIdle"
- Animation39.Parent = StringValue38
- Animation39.AnimationId = "http://www.roblox.com/asset/?id=616166655"
- StringValue40.Name = "toolnone"
- StringValue40.Parent = Script21
- Animation41.Name = "ToolNoneAnim"
- Animation41.Parent = StringValue40
- Animation41.AnimationId = "http://www.roblox.com/asset/?id=507768375"
- StringValue42.Name = "walk"
- StringValue42.Parent = Script21
- Animation43.Name = "RunAnim"
- Animation43.Parent = StringValue42
- Animation43.AnimationId = "http://www.roblox.com/asset/?id=616168032"
- MeshPart44.Name = "RightUpperLeg"
- MeshPart44.Parent = Model0
- MeshPart44.CFrame = CFrame.new(-14.3351259, 1.46466565, -22.4125671, -0.00241400092, 3.49997972e-05, 0.999997497, 0, 1, -3.499991e-05, -0.999997497, -8.44897698e-08, -0.00241400092)
- MeshPart44.Orientation = Vector3.new(0, 90.1399994, 0)
- MeshPart44.Position = Vector3.new(-14.3351259, 1.46466565, -22.4125671)
- MeshPart44.Rotation = Vector3.new(179.169998, 89.8700027, -179.169998)
- MeshPart44.Color = Color3.new(0.643137, 0.741176, 0.278431)
- MeshPart44.Size = Vector3.new(1.00027561, 1.5362649, 1.00092912)
- MeshPart44.BrickColor = BrickColor.new("Br. yellowish green")
- MeshPart44.CanCollide = false
- MeshPart44.brickColor = BrickColor.new("Br. yellowish green")
- Vector3Value45.Name = "OriginalSize"
- Vector3Value45.Parent = MeshPart44
- Vector3Value45.Value = Vector3.new(1.00027561, 1.5362649, 1.00092912)
- Motor6D46.Name = "RightHip"
- Motor6D46.Parent = MeshPart44
- Motor6D46.C0 = CFrame.new(0.505080223, -0.243262246, 0.00102789141, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Motor6D46.C1 = CFrame.new(0.00382620096, 0.484913796, 0.000486815348, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Motor6D46.Part0 = MeshPart65
- Motor6D46.Part1 = MeshPart44
- Motor6D46.part1 = MeshPart44
- MeshPart47.Name = "RightUpperArm"
- MeshPart47.Parent = Model0
- MeshPart47.CFrame = CFrame.new(-14.3428421, 3.29312539, -23.4094353, -0.00241400092, 3.49997972e-05, 0.999997497, 0, 1, -3.499991e-05, -0.999997497, -8.44897698e-08, -0.00241400092)
- MeshPart47.Orientation = Vector3.new(0, 90.1399994, 0)
- MeshPart47.Position = Vector3.new(-14.3428421, 3.29312539, -23.4094353)
- MeshPart47.Rotation = Vector3.new(179.169998, 89.8700027, -179.169998)
- MeshPart47.Color = Color3.new(0.643137, 0.741176, 0.278431)
- MeshPart47.Size = Vector3.new(1.00027633, 1.39554, 1.00025082)
- MeshPart47.BrickColor = BrickColor.new("Br. yellowish green")
- MeshPart47.CanCollide = false
- MeshPart47.brickColor = BrickColor.new("Br. yellowish green")
- Vector3Value48.Name = "OriginalSize"
- Vector3Value48.Parent = MeshPart47
- Vector3Value48.Value = Vector3.new(1.00027633, 1.39554, 1.00025082)
- Motor6D49.Name = "RightShoulder"
- Motor6D49.Parent = MeshPart47
- Motor6D49.C0 = CFrame.new(1.25031853, 0.5565539, -0.015560925, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Motor6D49.C1 = CFrame.new(-0.24787569, 0.456878304, -0.00944012403, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Motor6D49.Part0 = MeshPart16
- Motor6D49.Part1 = MeshPart47
- Motor6D49.part1 = MeshPart47
- MeshPart50.Name = "RightLowerLeg"
- MeshPart50.Parent = Model0
- MeshPart50.CFrame = CFrame.new(-14.3348646, 0.910310864, -22.4125671, -0.00241400092, 3.49997972e-05, 0.999997497, 0, 1, -3.499991e-05, -0.999997497, -8.44897698e-08, -0.00241400092)
- MeshPart50.Orientation = Vector3.new(0, 90.1399994, 0)
- MeshPart50.Position = Vector3.new(-14.3348646, 0.910310864, -22.4125671)
- MeshPart50.Rotation = Vector3.new(179.169998, 89.8700027, -179.169998)
- MeshPart50.Color = Color3.new(0.643137, 0.741176, 0.278431)
- MeshPart50.Size = Vector3.new(1.00027585, 1.48964536, 1.00032854)
- MeshPart50.BrickColor = BrickColor.new("Br. yellowish green")
- MeshPart50.CanCollide = false
- MeshPart50.brickColor = BrickColor.new("Br. yellowish green")
- Vector3Value51.Name = "OriginalSize"
- Vector3Value51.Parent = MeshPart50
- Vector3Value51.Value = Vector3.new(1.00027585, 1.48964536, 1.00032854)
- Motor6D52.Name = "RightKnee"
- Motor6D52.Parent = MeshPart50
- Motor6D52.C0 = CFrame.new(0.00382620096, -0.265086174, 0.000426991843, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Motor6D52.C1 = CFrame.new(0.00382620096, 0.289268613, 0.000145851634, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Motor6D52.Part0 = MeshPart44
- Motor6D52.Part1 = MeshPart50
- Motor6D52.part1 = MeshPart50
- MeshPart53.Name = "RightLowerArm"
- MeshPart53.Parent = Model0
- MeshPart53.CFrame = CFrame.new(-14.3423996, 2.90703535, -23.4094353, -0.00241400092, 3.49997972e-05, 0.999997497, 0, 1, -3.499991e-05, -0.999997497, -8.44897698e-08, -0.00241400092)
- MeshPart53.Orientation = Vector3.new(0, 90.1399994, 0)
- MeshPart53.Position = Vector3.new(-14.3423996, 2.90703535, -23.4094353)
- MeshPart53.Rotation = Vector3.new(179.169998, 89.8700027, -179.169998)
- MeshPart53.Color = Color3.new(0.643137, 0.741176, 0.278431)
- MeshPart53.Size = Vector3.new(1.00027657, 1.26567209, 1.00025082)
- MeshPart53.BrickColor = BrickColor.new("Br. yellowish green")
- MeshPart53.CanCollide = false
- MeshPart53.brickColor = BrickColor.new("Br. yellowish green")
- Vector3Value54.Name = "OriginalSize"
- Vector3Value54.Parent = MeshPart53
- Vector3Value54.Value = Vector3.new(1.00027657, 1.26567209, 1.00025082)
- Motor6D55.Name = "RightElbow"
- Motor6D55.Parent = MeshPart53
- Motor6D55.C0 = CFrame.new(0.00214397907, -0.263139546, -0.00944012403, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Motor6D55.C1 = CFrame.new(0.00214457512, 0.122950554, -0.00989595056, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Motor6D55.Part0 = MeshPart47
- Motor6D55.Part1 = MeshPart53
- Motor6D55.part1 = MeshPart53
- MeshPart56.Name = "RightHand"
- MeshPart56.Parent = Model0
- MeshPart56.CFrame = CFrame.new(-14.3368855, 2.1668787, -23.4107285, -0.00241400092, 3.49997972e-05, 0.999997497, 0, 1, -3.499991e-05, -0.999997497, -8.44897698e-08, -0.00241400092)
- MeshPart56.Orientation = Vector3.new(0, 90.1399994, 0)
- MeshPart56.Position = Vector3.new(-14.3368855, 2.1668787, -23.4107285)
- MeshPart56.Rotation = Vector3.new(179.169998, 89.8700027, -179.169998)
- MeshPart56.Color = Color3.new(0.643137, 0.741176, 0.278431)
- MeshPart56.Size = Vector3.new(0.999299049, 0.335255772, 1.00029743)
- MeshPart56.BrickColor = BrickColor.new("Br. yellowish green")
- MeshPart56.CanCollide = false
- MeshPart56.brickColor = BrickColor.new("Br. yellowish green")
- Vector3Value57.Name = "OriginalSize"
- Vector3Value57.Parent = MeshPart56
- Vector3Value57.Value = Vector3.new(0.999299049, 0.335255772, 1.00029743)
- Motor6D58.Name = "RightWrist"
- Motor6D58.Parent = MeshPart56
- Motor6D58.C0 = CFrame.new(0.00214457512, -0.682049513, -0.00989595056, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Motor6D58.C1 = CFrame.new(0.000865101814, 0.058106944, -0.0154390335, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Motor6D58.Part0 = MeshPart53
- Motor6D58.Part1 = MeshPart56
- Motor6D58.part1 = MeshPart56
- MeshPart59.Name = "RightFoot"
- MeshPart59.Parent = Model0
- MeshPart59.CFrame = CFrame.new(-14.3347502, 0.167736173, -22.4073772, -0.00241400092, 3.49997972e-05, 0.999997497, 0, 1, -3.499991e-05, -0.999997497, -8.44897698e-08, -0.00241400092)
- MeshPart59.Orientation = Vector3.new(0, 90.1399994, 0)
- MeshPart59.Position = Vector3.new(-14.3347502, 0.167736173, -22.4073772)
- MeshPart59.Rotation = Vector3.new(179.169998, 89.8700027, -179.169998)
- MeshPart59.Color = Color3.new(0.643137, 0.741176, 0.278431)
- MeshPart59.Size = Vector3.new(1.00063133, 0.335407376, 1.00020337)
- MeshPart59.BrickColor = BrickColor.new("Br. yellowish green")
- MeshPart59.CanCollide = false
- MeshPart59.brickColor = BrickColor.new("Br. yellowish green")
- Vector3Value60.Name = "OriginalSize"
- Vector3Value60.Parent = MeshPart59
- Vector3Value60.Value = Vector3.new(1.00063133, 0.335407376, 1.00020337)
- Motor6D61.Name = "RightAnkle"
- Motor6D61.Parent = MeshPart59
- Motor6D61.C0 = CFrame.new(0.00382620096, -0.710731506, 0.000283418223, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Motor6D61.C1 = CFrame.new(0.00901681185, 0.0318431854, 0.000155551359, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Motor6D61.Part0 = MeshPart50
- Motor6D61.Part1 = MeshPart59
- Motor6D61.part1 = MeshPart59
- MeshPart62.Name = "LeftFoot"
- MeshPart62.Parent = Model0
- MeshPart62.CFrame = CFrame.new(-14.3323555, 0.167736173, -21.4158134, -0.00241400092, 3.49997972e-05, 0.999997497, 0, 1, -3.499991e-05, -0.999997497, -8.44897698e-08, -0.00241400092)
- MeshPart62.Orientation = Vector3.new(0, 90.1399994, 0)
- MeshPart62.Position = Vector3.new(-14.3323555, 0.167736173, -21.4158134)
- MeshPart62.Rotation = Vector3.new(179.169998, 89.8700027, -179.169998)
- MeshPart62.Color = Color3.new(0.643137, 0.741176, 0.278431)
- MeshPart62.Size = Vector3.new(1.00063133, 0.335407257, 1.00020337)
- MeshPart62.BrickColor = BrickColor.new("Br. yellowish green")
- MeshPart62.CanCollide = false
- MeshPart62.brickColor = BrickColor.new("Br. yellowish green")
- Vector3Value63.Name = "OriginalSize"
- Vector3Value63.Parent = MeshPart62
- Vector3Value63.Value = Vector3.new(1.00063133, 0.335407257, 1.00020337)
- Motor6D64.Name = "LeftAnkle"
- Motor6D64.Parent = MeshPart62
- Motor6D64.C0 = CFrame.new(-0.00382620096, -0.710131407, 0.00030554086, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Motor6D64.C1 = CFrame.new(-0.00901681185, 0.032443285, 0.000177569687, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Motor6D64.Part0 = MeshPart75
- Motor6D64.Part1 = MeshPart62
- Motor6D64.part1 = MeshPart62
- MeshPart65.Name = "LowerTorso"
- MeshPart65.Parent = Model0
- MeshPart65.CFrame = CFrame.new(-14.3344316, 2.19284177, -21.911314, -0.00241400092, 3.49997972e-05, 0.999997497, 0, 1, -3.499991e-05, -0.999997497, -8.44897698e-08, -0.00241400092)
- MeshPart65.Orientation = Vector3.new(0, 90.1399994, 0)
- MeshPart65.Position = Vector3.new(-14.3344316, 2.19284177, -21.911314)
- MeshPart65.Rotation = Vector3.new(179.169998, 89.8700027, -179.169998)
- MeshPart65.Color = Color3.new(0.643137, 0.741176, 0.278431)
- MeshPart65.Size = Vector3.new(2.00017595, 0.400037616, 1.00021255)
- MeshPart65.BrickColor = BrickColor.new("Br. yellowish green")
- MeshPart65.brickColor = BrickColor.new("Br. yellowish green")
- Vector3Value66.Name = "OriginalSize"
- Vector3Value66.Parent = MeshPart65
- Vector3Value66.Value = Vector3.new(2.00017595, 0.400037616, 1.00021255)
- Motor6D67.Name = "Root"
- Motor6D67.Parent = MeshPart65
- Motor6D67.C1 = CFrame.new(0.000280171633, 0.133037761, -0.0142721087, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Motor6D67.Part0 = Part13
- Motor6D67.Part1 = MeshPart65
- Motor6D67.part1 = MeshPart65
- Script68.Name = "Damage Script"
- Script68.Parent = MeshPart65
- table.insert(cors,sandbox(Script68,function()
- function onTouched(hit)
- local human = hit.Parent:findFirstChild("Humanoid")
- if (human ~= nil) then
- human.Health = human.Health - 5 -- Change the amount to change the damage.
- end
- end
- script.Parent.Touched:connect(onTouched)
- end))
- MeshPart69.Name = "LeftUpperLeg"
- MeshPart69.Parent = Model0
- MeshPart69.CFrame = CFrame.new(-14.3327074, 1.46466565, -21.4106236, -0.00241400092, 3.49997972e-05, 0.999997497, 0, 1, -3.499991e-05, -0.999997497, -8.44897698e-08, -0.00241400092)
- MeshPart69.Orientation = Vector3.new(0, 90.1399994, 0)
- MeshPart69.Position = Vector3.new(-14.3327074, 1.46466565, -21.4106236)
- MeshPart69.Rotation = Vector3.new(179.169998, 89.8700027, -179.169998)
- MeshPart69.Color = Color3.new(0.643137, 0.741176, 0.278431)
- MeshPart69.Size = Vector3.new(1.00027561, 1.5362649, 1.00092912)
- MeshPart69.BrickColor = BrickColor.new("Br. yellowish green")
- MeshPart69.CanCollide = false
- MeshPart69.brickColor = BrickColor.new("Br. yellowish green")
- Vector3Value70.Name = "OriginalSize"
- Vector3Value70.Parent = MeshPart69
- Vector3Value70.Value = Vector3.new(1.00027561, 1.5362649, 1.00092912)
- Motor6D71.Name = "LeftHip"
- Motor6D71.Parent = MeshPart69
- Motor6D71.C0 = CFrame.new(-0.50451982, -0.243062243, 0.00122789107, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Motor6D71.C1 = CFrame.new(-0.00382620096, 0.4851138, 0.000686740503, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Motor6D71.Part0 = MeshPart65
- Motor6D71.Part1 = MeshPart69
- Motor6D71.part1 = MeshPart69
- MeshPart72.Name = "LeftUpperArm"
- MeshPart72.Parent = Model0
- MeshPart72.CFrame = CFrame.new(-14.3356104, 3.29312539, -20.4137287, -0.00241400092, 3.49997972e-05, 0.999997497, 0, 1, -3.499991e-05, -0.999997497, -8.44897698e-08, -0.00241400092)
- MeshPart72.Orientation = Vector3.new(0, 90.1399994, 0)
- MeshPart72.Position = Vector3.new(-14.3356104, 3.29312539, -20.4137287)
- MeshPart72.Rotation = Vector3.new(179.169998, 89.8700027, -179.169998)
- MeshPart72.Color = Color3.new(0.643137, 0.741176, 0.278431)
- MeshPart72.Size = Vector3.new(1.00027633, 1.39554, 1.00025082)
- MeshPart72.BrickColor = BrickColor.new("Br. yellowish green")
- MeshPart72.CanCollide = false
- MeshPart72.brickColor = BrickColor.new("Br. yellowish green")
- Vector3Value73.Name = "OriginalSize"
- Vector3Value73.Parent = MeshPart72
- Vector3Value73.Value = Vector3.new(1.00027633, 1.39554, 1.00025082)
- Motor6D74.Name = "LeftShoulder"
- Motor6D74.Parent = MeshPart72
- Motor6D74.C0 = CFrame.new(-1.24955308, 0.556408584, -0.015560925, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Motor6D74.C1 = CFrame.new(0.247964978, 0.456732988, -0.00943991542, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Motor6D74.Part0 = MeshPart16
- Motor6D74.Part1 = MeshPart72
- Motor6D74.part1 = MeshPart72
- MeshPart75.Name = "LeftLowerLeg"
- MeshPart75.Parent = Model0
- MeshPart75.CFrame = CFrame.new(-14.3324451, 0.910310864, -21.4106236, -0.00241400092, 3.49997972e-05, 0.999997497, 0, 1, -3.499991e-05, -0.999997497, -8.44897698e-08, -0.00241400092)
- MeshPart75.Orientation = Vector3.new(0, 90.1399994, 0)
- MeshPart75.Position = Vector3.new(-14.3324451, 0.910310864, -21.4106236)
- MeshPart75.Rotation = Vector3.new(179.169998, 89.8700027, -179.169998)
- MeshPart75.Color = Color3.new(0.643137, 0.741176, 0.278431)
- MeshPart75.Size = Vector3.new(1.00027585, 1.48964536, 1.00032866)
- MeshPart75.BrickColor = BrickColor.new("Br. yellowish green")
- MeshPart75.CanCollide = false
- MeshPart75.brickColor = BrickColor.new("Br. yellowish green")
- Vector3Value76.Name = "OriginalSize"
- Vector3Value76.Parent = MeshPart75
- Vector3Value76.Value = Vector3.new(1.00027585, 1.48964536, 1.00032866)
- Motor6D77.Name = "LeftKnee"
- Motor6D77.Parent = MeshPart75
- Motor6D77.C0 = CFrame.new(-0.00382620096, -0.264486194, 0.000586740673, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Motor6D77.C1 = CFrame.new(-0.00382620096, 0.289868593, 0.00030554086, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Motor6D77.Part0 = MeshPart69
- Motor6D77.Part1 = MeshPart75
- Motor6D77.part1 = MeshPart75
- MeshPart78.Name = "LeftLowerArm"
- MeshPart78.Parent = Model0
- MeshPart78.CFrame = CFrame.new(-14.3351679, 2.90703535, -20.4137306, -0.00241400092, 3.49997972e-05, 0.999997497, 0, 1, -3.499991e-05, -0.999997497, -8.44897698e-08, -0.00241400092)
- MeshPart78.Orientation = Vector3.new(0, 90.1399994, 0)
- MeshPart78.Position = Vector3.new(-14.3351679, 2.90703535, -20.4137306)
- MeshPart78.Rotation = Vector3.new(179.169998, 89.8700027, -179.169998)
- MeshPart78.Color = Color3.new(0.643137, 0.741176, 0.278431)
- MeshPart78.Size = Vector3.new(1.00027657, 1.26567209, 1.00025082)
- MeshPart78.BrickColor = BrickColor.new("Br. yellowish green")
- MeshPart78.CanCollide = false
- MeshPart78.brickColor = BrickColor.new("Br. yellowish green")
- Vector3Value79.Name = "OriginalSize"
- Vector3Value79.Parent = MeshPart78
- Vector3Value79.Value = Vector3.new(1.00027657, 1.26567209, 1.00025082)
- Motor6D80.Name = "LeftElbow"
- Motor6D80.Parent = MeshPart78
- Motor6D80.C0 = CFrame.new(-0.00166511536, -0.263139546, -0.00943991542, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Motor6D80.C1 = CFrame.new(-0.0016657114, 0.122950554, -0.00989592075, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Motor6D80.Part0 = MeshPart72
- Motor6D80.Part1 = MeshPart78
- Motor6D80.part1 = MeshPart78
- MeshPart81.Name = "LeftHand"
- MeshPart81.Parent = Model0
- MeshPart81.CFrame = CFrame.new(-14.329648, 2.1668787, -20.4124641, -0.00241400092, 3.49997972e-05, 0.999997497, 0, 1, -3.499991e-05, -0.999997497, -8.44897698e-08, -0.00241400092)
- MeshPart81.Orientation = Vector3.new(0, 90.1399994, 0)
- MeshPart81.Position = Vector3.new(-14.329648, 2.1668787, -20.4124641)
- MeshPart81.Rotation = Vector3.new(179.169998, 89.8700027, -179.169998)
- MeshPart81.Color = Color3.new(0.643137, 0.741176, 0.278431)
- MeshPart81.Size = Vector3.new(0.999299049, 0.335255831, 1.00029743)
- MeshPart81.BrickColor = BrickColor.new("Br. yellowish green")
- MeshPart81.CanCollide = false
- MeshPart81.brickColor = BrickColor.new("Br. yellowish green")
- Vector3Value82.Name = "OriginalSize"
- Vector3Value82.Parent = MeshPart81
- Vector3Value82.Value = Vector3.new(0.999299049, 0.335255831, 1.00029743)
- Motor6D83.Name = "LeftWrist"
- Motor6D83.Parent = MeshPart81
- Motor6D83.C0 = CFrame.new(-0.0016657114, -0.682255626, -0.00989592075, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Motor6D83.C1 = CFrame.new(-0.000386238098, 0.0579008311, -0.0154390335, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Motor6D83.Part0 = MeshPart78
- Motor6D83.Part1 = MeshPart81
- Motor6D83.part1 = MeshPart81
- Script84.Name = "SoundScript"
- Script84.Parent = Model0
- table.insert(cors,sandbox(Script84,function()
- local moan = script.Parent.Head.Scream
- local moan2 = script.parent.Head.Scream
- local moan3 = script.parent.Head.Scream
- local moan4 = script.Parent.Head.Scream
- while true do
- Scream:Play()
- wait(8)
- Scream:Play()
- wait(5)
- Scream:Play()
- wait(7)
- Scream:Play()
- wait(6)
- end
- local death = script.Parent.Head.Death
- end))
- Script85.Name = "Health"
- Script85.Parent = Model0
- table.insert(cors,sandbox(Script85,function()
- --Responsible for regening a player's humanoid's health
- -- declarations
- local Figure = script.Parent
- local Head = Figure:WaitForChild("Head")
- local Humanoid = Figure:WaitForChild("Humanoid")
- local regening = false
- -- regeneration
- function regenHealth()
- if regening then return end
- regening = true
- while Humanoid.Health < Humanoid.MaxHealth do
- local s = wait(1)
- local health = Humanoid.Health
- if health > 0 and health < Humanoid.MaxHealth then
- local newHealthDelta = 0.01 * s * Humanoid.MaxHealth
- health = health + newHealthDelta
- Humanoid.Health = math.min(health,Humanoid.MaxHealth)
- end
- end
- if Humanoid.Health > Humanoid.MaxHealth then
- Humanoid.Health = Humanoid.MaxHealth
- end
- regening = false
- end
- Humanoid.HealthChanged:connect(regenHealth)
- end))
- BodyColors86.Parent = Model0
- BodyColors86.HeadColor = BrickColor.new("Br. yellowish green")
- BodyColors86.HeadColor3 = Color3.new(0.643137, 0.741176, 0.278431)
- BodyColors86.LeftArmColor = BrickColor.new("Br. yellowish green")
- BodyColors86.LeftArmColor3 = Color3.new(0.643137, 0.741176, 0.278431)
- BodyColors86.LeftLegColor = BrickColor.new("Br. yellowish green")
- BodyColors86.LeftLegColor3 = Color3.new(0.643137, 0.741176, 0.278431)
- BodyColors86.RightArmColor = BrickColor.new("Br. yellowish green")
- BodyColors86.RightArmColor3 = Color3.new(0.643137, 0.741176, 0.278431)
- BodyColors86.RightLegColor = BrickColor.new("Br. yellowish green")
- BodyColors86.RightLegColor3 = Color3.new(0.643137, 0.741176, 0.278431)
- BodyColors86.TorsoColor = BrickColor.new("Br. yellowish green")
- BodyColors86.TorsoColor3 = Color3.new(0.643137, 0.741176, 0.278431)
- Shirt87.Parent = Model0
- Shirt87.ShirtTemplate = "rbxassetid://133078194"
- Hat88.Name = "ShrekHead"
- Hat88.Parent = Model0
- Hat88.AttachmentPoint = CFrame.new(0, 0.300000012, 0.200000003, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Hat88.AttachmentPos = Vector3.new(0, 0.300000012, 0.200000003)
- Part89.Name = "Handle"
- Part89.Parent = Hat88
- Part89.CFrame = CFrame.new(-14.5524807, 4.76510477, -21.9110947, -0.00241400092, 3.49997972e-05, 0.999997497, 0, 1, -3.499991e-05, -0.999997497, -8.44897698e-08, -0.00241400092)
- Part89.Orientation = Vector3.new(0, 90.1399994, 0)
- Part89.Position = Vector3.new(-14.5524807, 4.76510477, -21.9110947)
- Part89.Rotation = Vector3.new(179.169998, 89.8700027, -179.169998)
- Part89.Color = Color3.new(0.756863, 0.745098, 0.258824)
- Part89.Size = Vector3.new(3.32467079, 3.12577987, 3.12577701)
- Part89.BackParamA = -99999
- Part89.BackParamB = 99999
- Part89.BackSurface = Enum.SurfaceType.SmoothNoOutlines
- Part89.BottomParamA = -99999
- Part89.BottomParamB = 99999
- Part89.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
- Part89.BrickColor = BrickColor.new("Olive")
- Part89.CanCollide = false
- Part89.Elasticity = 1
- Part89.Friction = 2
- Part89.FrontParamA = -99999
- Part89.FrontParamB = 99999
- Part89.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
- Part89.LeftParamA = -99999
- Part89.LeftParamB = 99999
- Part89.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
- Part89.Material = Enum.Material.Fabric
- Part89.RightParamA = -99999
- Part89.RightParamB = 99999
- Part89.RightSurface = Enum.SurfaceType.SmoothNoOutlines
- Part89.TopParamA = -99999
- Part89.TopParamB = 99999
- Part89.TopSurface = Enum.SurfaceType.SmoothNoOutlines
- Part89.brickColor = BrickColor.new("Olive")
- Part89.FormFactor = Enum.FormFactor.Custom
- Part89.formFactor = Enum.FormFactor.Custom
- SpecialMesh90.Parent = Part89
- SpecialMesh90.MeshId = "http://www.roblox.com/asset/?id=19999257"
- SpecialMesh90.Scale = Vector3.new(1.5, 1.5, 1.5)
- SpecialMesh90.TextureId = "rbxassetid://139761620"
- SpecialMesh90.MeshType = Enum.MeshType.FileMesh
- Camera91.Name = "ThumbnailCamera"
- Camera91.Parent = Hat88
- Camera91.CFrame = CFrame.new(1.98147953, 1.4764576, -3.35099077, -0.830983698, -0.0552478395, 0.553546607, -3.7252903e-09, 0.995056272, 0.0993135944, -0.556296825, 0.0825279802, -0.826875448)
- Camera91.CoordinateFrame = CFrame.new(1.98147953, 1.4764576, -3.35099077, -0.830983698, -0.0552478395, 0.553546607, -3.7252903e-09, 0.995056272, 0.0993135944, -0.556296825, 0.0825279802, -0.826875448)
- Camera91.FieldOfView = 20
- Camera91.Focus = CFrame.new(0.874386668, 1.27783048, -1.69724047, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Camera91.focus = CFrame.new(0.874386668, 1.27783048, -1.69724047, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Sound92.Name = "Squidward All Star"
- Sound92.Parent = Model0
- Sound92.Looped = true
- Sound92.Playing = true
- Sound92.SoundId = "rbxassetid://863058858"
- Script93.Name = "Respawn"
- Script93.Parent = Model0
- table.insert(cors,sandbox(Script93,function()
- name="Humanoid"
- robo=script.Parent:clone()
- while true do
- wait(1)
- if script.Parent.Humanoid.Health<1 then
- robot=robo:clone()
- robot.Parent=script.Parent.Parent
- robot:makeJoints()
- script.Parent:remove()
- end
- end
- end))
- Script94.Parent = Model0
- table.insert(cors,sandbox(Script94,function()
- local larm = script.Parent:FindFirstChild("HumanoidRootPart")
- local rarm = script.Parent:FindFirstChild("HumanoidRootPart")
- function findNearestTorso(pos)
- local list = game.Workspace:children()
- local torso = nil
- local dist = 10000
- local temp = nil
- local human = nil
- local temp2 = nil
- for x = 1, #list do
- temp2 = list[x]
- if (temp2.className == "Model") and (temp2 ~= script.Parent) then
- temp = temp2:findFirstChild("HumanoidRootPart")
- human = temp2:findFirstChild("Humanoid")
- if (temp ~= nil) and (human ~= nil) and (human.Health > 0) then
- if (temp.Position - pos).magnitude < dist then
- torso = temp
- dist = (temp.Position - pos).magnitude
- end
- end
- end
- end
- return torso
- end
- while true do
- wait(1)
- local target = findNearestTorso(script.Parent.HumanoidRootPart.Position)
- if target ~= nil then
- script.Parent.Zombie:MoveTo(target.Position, target)
- end
- end
- end))
- Script95.Parent = Model0
- table.insert(cors,sandbox(Script95,function()
- local larm = script.Parent:FindFirstChild("Left Arm")
- local rarm = script.Parent:FindFirstChild("Right Arm")
- function findNearestTorso(pos)
- local list = game.Workspace:children()
- local torso = nil
- local dist = 1000
- local temp = nil
- local human = nil
- local temp2 = nil
- for x = 1, #list do
- temp2 = list[x]
- if (temp2.className == "Model") and (temp2 ~= script.Parent) then
- temp = temp2:findFirstChild("Torso")
- human = temp2:findFirstChild("Humanoid")
- if (temp ~= nil) and (human ~= nil) and (human.Health > 0) then
- if (temp.Position - pos).magnitude < dist then
- torso = temp
- dist = (temp.Position - pos).magnitude
- end
- end
- end
- end
- return torso
- end
- while true do
- wait(math.random(1,5))
- --local target = findNearestTorso(script.Parent.Torso.Position)
- --if target ~= nil then
- -- script.Parent.Zombie:MoveTo(target.Position, target)
- --end
- script.Parent.Humanoid:MoveTo(Vector3.new(math.random(-100,100),0,math.random(-100,100)), game.Workspace.Base)
- end
- end))
- Script96.Parent = Model0
- table.insert(cors,sandbox(Script96,function()
- local larm = script.Parent:FindFirstChild("Left Arm")
- local rarm = script.Parent:FindFirstChild("Right Arm")
- function findNearestTorso(pos)
- local list = game.Workspace:children()
- local torso = nil
- local dist = 1000
- local temp = nil
- local human = nil
- local temp2 = nil
- for x = 1, #list do
- temp2 = list[x]
- if (temp2.className == "Model") and (temp2 ~= script.Parent) then
- temp = temp2:findFirstChild("Right Arm")
- human = temp2:findFirstChild("Humanoid")
- if (temp ~= nil) and (human ~= nil) and (human.Health > 0) then
- if (temp.Position - pos).magnitude < dist then
- torso = temp
- dist = (temp.Position - pos).magnitude
- end
- end
- end
- end
- return torso
- end
- while true do
- wait(math.random(1,5))
- local target = findNearestTorso(script.Parent.Torso.Position)
- if target ~= nil then
- script.Parent.Humanoid:MoveTo(target.Position, target)
- end
- end
- end))
- Script97.Name = "Sound"
- Script97.Parent = Model0
- table.insert(cors,sandbox(Script97,function()
- ---This server script creates the sounds and also exists so that it can be easily copied into an NPC and create sounds for that NPC.
- --Remove the local script if you copy this into an NPC.
- 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
- function newSound(name, id)
- local sound = Instance.new("Sound")
- sound.SoundId = id
- sound.Name = name
- sound.archivable = false
- sound.Parent = script.Parent.Head
- return sound
- end
- -- declarations
- local sGettingUp = newSound("GettingUp", "rbxasset://sounds/action_get_up.mp3")
- local sDied = newSound("Died", "rbxasset://sounds/uuhhh.mp3")
- local sFreeFalling = newSound("FreeFalling", "rbxasset://sounds/action_falling.mp3")
- local sJumping = newSound("Jumping", "rbxasset://sounds/action_jump.mp3")
- local sLanding = newSound("Landing", "rbxasset://sounds/action_jump_land.mp3")
- local sSplash = newSound("Splash", "rbxasset://sounds/impact_water.mp3")
- local sRunning = newSound("Running", "rbxasset://sounds/action_footsteps_plastic.mp3")
- sRunning.Looped = true
- local sSwimming = newSound("Swimming", "rbxasset://sounds/action_swim.mp3")
- sSwimming.Looped = true
- local sClimbing = newSound("Climbing", "rbxasset://sounds/action_footsteps_plastic.mp3")
- sClimbing.Looped = true
- local Figure = script.Parent
- local Head = waitForChild(Figure, "Head")
- local Humanoid = waitForChild(Figure, "Humanoid")
- local hasPlayer = game.Players:GetPlayerFromCharacter(script.Parent)
- local filteringEnabled = game.Workspace.FilteringEnabled
- local prevState = "None"
- -- functions
- function onDied()
- stopLoopedSounds()
- sDied:Play()
- end
- local fallCount = 0
- local fallSpeed = 0
- function onStateFall(state, sound)
- fallCount = fallCount + 1
- if state then
- sound.Volume = 0
- sound:Play()
- Spawn( function()
- local t = 0
- local thisFall = fallCount
- while t < 1.5 and fallCount == thisFall do
- local vol = math.max(t - 0.3 , 0)
- sound.Volume = vol
- wait(0.1)
- t = t + 0.1
- end
- end)
- else
- sound:Stop()
- end
- fallSpeed = math.max(fallSpeed, math.abs(Head.Velocity.Y))
- end
- function onStateNoStop(state, sound)
- if state then
- sound:Play()
- end
- end
- function onRunning(speed)
- sClimbing:Stop()
- sSwimming:Stop()
- if (prevState == "FreeFall" and fallSpeed > 0.1) then
- local vol = math.min(1.0, math.max(0.0, (fallSpeed - 50) / 110))
- sLanding.Volume = vol
- sLanding:Play()
- fallSpeed = 0
- end
- if speed>0.5 then
- sRunning:Play()
- sRunning.Pitch = speed / 8.0
- else
- sRunning:Stop()
- end
- prevState = "Run"
- end
- function onSwimming(speed)
- if (prevState ~= "Swim" and speed > 0.1) then
- local volume = math.min(1.0, speed / 350)
- sSplash.Volume = volume
- sSplash:Play()
- prevState = "Swim"
- end
- sClimbing:Stop()
- sRunning:Stop()
- sSwimming.Pitch = 1.6
- sSwimming:Play()
- end
- function onClimbing(speed)
- sRunning:Stop()
- sSwimming:Stop()
- if speed>0.01 then
- sClimbing:Play()
- sClimbing.Pitch = speed / 5.5
- else
- sClimbing:Stop()
- end
- prevState = "Climb"
- end
- -- connect up
- function stopLoopedSounds()
- sRunning:Stop()
- sClimbing:Stop()
- sSwimming:Stop()
- end
- if hasPlayer == nil then
- Humanoid.Died:connect(onDied)
- Humanoid.Running:connect(onRunning)
- Humanoid.Swimming:connect(onSwimming)
- Humanoid.Climbing:connect(onClimbing)
- Humanoid.Jumping:connect(function(state) onStateNoStop(state, sJumping) prevState = "Jump" end)
- Humanoid.GettingUp:connect(function(state) stopLoopedSounds() onStateNoStop(state, sGettingUp) prevState = "GetUp" end)
- Humanoid.FreeFalling:connect(function(state) stopLoopedSounds() onStateFall(state, sFreeFalling) prevState = "FreeFall" end)
- Humanoid.FallingDown:connect(function(state) stopLoopedSounds() end)
- Humanoid.StateChanged:connect(function(old, new)
- if not (new.Name == "Dead" or
- new.Name == "Running" or
- new.Name == "RunningNoPhysics" or
- new.Name == "Swimming" or
- new.Name == "Jumping" or
- new.Name == "GettingUp" or
- new.Name == "Freefall" or
- new.Name == "FallingDown") then
- stopLoopedSounds()
- end
- end)
- end
- end))
- LocalScript98.Name = "LocalSound"
- LocalScript98.Parent = Script97
- table.insert(cors,sandbox(LocalScript98,function()
- --This local script will run only for the player whos character it is in. It's changes to the sounds will replicate as they are changes to the character.
- -- util
- 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
- -- declarations
- local Figure = script.Parent.Parent
- local Head = waitForChild(Figure, "Head")
- local Humanoid = waitForChild(Figure, "Humanoid")
- local sGettingUp = waitForChild(Head, "GettingUp")
- local sDied = waitForChild(Head, "Died")
- local sFreeFalling = waitForChild(Head, "FreeFalling")
- local sJumping = waitForChild(Head, "Jumping")
- local sLanding = waitForChild(Head, "Landing")
- local sSplash = waitForChild(Head, "Splash")
- local sRunning = waitForChild(Head, "Running")
- sRunning.Looped = true
- local sSwimming = waitForChild(Head, "Swimming")
- sSwimming.Looped = true
- local sClimbing =waitForChild(Head, "Climbing")
- sClimbing.Looped = true
- local prevState = "None"
- -- functions
- function onDied()
- stopLoopedSounds()
- sDied:Play()
- end
- local fallCount = 0
- local fallSpeed = 0
- function onStateFall(state, sound)
- fallCount = fallCount + 1
- if state then
- sound.Volume = 0
- sound:Play()
- Spawn( function()
- local t = 0
- local thisFall = fallCount
- while t < 1.5 and fallCount == thisFall do
- local vol = math.max(t - 0.3 , 0)
- sound.Volume = vol
- wait(0.1)
- t = t + 0.1
- end
- end)
- else
- sound:Stop()
- end
- fallSpeed = math.max(fallSpeed, math.abs(Head.Velocity.Y))
- end
- function onStateNoStop(state, sound)
- if state then
- sound:Play()
- end
- end
- function onRunning(speed)
- sClimbing:Stop()
- sSwimming:Stop()
- if (prevState == "FreeFall" and fallSpeed > 0.1) then
- local vol = math.min(1.0, math.max(0.0, (fallSpeed - 50) / 110))
- sLanding.Volume = vol
- sLanding:Play()
- fallSpeed = 0
- end
- if speed>0.5 then
- sRunning:Play()
- sRunning.Pitch = speed / 8.0
- else
- sRunning:Stop()
- end
- prevState = "Run"
- end
- function onSwimming(speed)
- if (prevState ~= "Swim" and speed > 0.1) then
- local volume = math.min(1.0, speed / 350)
- sSplash.Volume = volume
- sSplash:Play()
- prevState = "Swim"
- end
- sClimbing:Stop()
- sRunning:Stop()
- sSwimming.Pitch = 1.6
- sSwimming:Play()
- end
- function onClimbing(speed)
- sRunning:Stop()
- sSwimming:Stop()
- if speed>0.01 then
- sClimbing:Play()
- sClimbing.Pitch = speed / 5.5
- else
- sClimbing:Stop()
- end
- prevState = "Climb"
- end
- -- connect up
- function stopLoopedSounds()
- sRunning:Stop()
- sClimbing:Stop()
- sSwimming:Stop()
- end
- Humanoid.Died:connect(onDied)
- Humanoid.Running:connect(onRunning)
- Humanoid.Swimming:connect(onSwimming)
- Humanoid.Climbing:connect(onClimbing)
- Humanoid.Jumping:connect(function(state) onStateNoStop(state, sJumping) prevState = "Jump" end)
- Humanoid.GettingUp:connect(function(state) stopLoopedSounds() onStateNoStop(state, sGettingUp) prevState = "GetUp" end)
- Humanoid.FreeFalling:connect(function(state) stopLoopedSounds() onStateFall(state, sFreeFalling) prevState = "FreeFall" end)
- Humanoid.FallingDown:connect(function(state) stopLoopedSounds() end)
- Humanoid.StateChanged:connect(function(old, new)
- if not (new.Name == "Dead" or
- new.Name == "Running" or
- new.Name == "RunningNoPhysics" or
- new.Name == "Swimming" or
- new.Name == "Jumping" or
- new.Name == "GettingUp" or
- new.Name == "Freefall" or
- new.Name == "FallingDown") then
- stopLoopedSounds()
- end
- end)
- end))
- Script99.Parent = Model0
- table.insert(cors,sandbox(Script99,function()
- script.Parent:Play()
- end))
- Sound100.Name = "Music"
- Sound100.Parent = Model0
- Sound100.Looped = true
- Sound100.SoundId = "rbxassetid://150771181"
- Script101.Name = "Kill Script"
- Script101.Parent = Model0
- table.insert(cors,sandbox(Script101,function()
- function wthomgblah(nose)
- humanoid = nose.Parent:findFirstChild("Humanoid")
- if humanoid ~= nil then
- humanoid.MaxHealth = 0
- humanoid.Health = 0
- if humanoid.Parent ~= workspace then
- humanoid.Parent:BreakJoints()
- script.Parent.Scream:Play()
- end
- end
- end
- script.Parent.Touched:connect(wthomgblah)
- end))
- for i,v in pairs(mas:GetChildren()) do
- v.Parent = workspace
- pcall(function() v:MakeJoints() end)
- end
- mas:Destroy()
- for i,v in pairs(cors) do
- spawn(function()
- pcall(v)
- end)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement