Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Created with PenguinAnonymous's compiler
- --PenguinAnonymous is not responsible for damages caused to your game
- --This plugin does not remove things
- --PenguinAnonymous cannot be held resonsible for manual deletion for the purpose of testing
- --Keep in mind, any items that cause errors in compilation will be skipped and documented within the last line of the disclaimer comments
- --Thank you for using my plugin and enjoy :)
- --It is free to use
- --If you use this plugin to create your own, please give me credit
- --Z_V edited my plugin to look like his own and published it without giving me credit, and that makes me very angry
- --Errors: Animator,Accessory,Camera
- local runDummyScript = function(f,scri)
- local oldenv = getfenv(f)
- local newenv = setmetatable({}, {
- __index = function(_, k)
- if k:lower() == 'script' then
- return scri
- else
- return oldenv[k]
- end
- end
- })
- setfenv(f, newenv)
- ypcall(function() f() end)
- end
- cors = {}
- mas = Instance.new("Model",game:GetService("Lighting"))
- mas.Name = "CompiledModel"
- o1 = Instance.new("Model")
- o2 = Instance.new("Animation")
- o3 = Instance.new("Humanoid")
- o4 = Instance.new("Model")
- o5 = Instance.new("Model")
- o7 = Instance.new("BodyColors")
- o8 = Instance.new("Hat")
- o9 = Instance.new("Part")
- o10 = Instance.new("SpecialMesh")
- o12 = Instance.new("Hat")
- o13 = Instance.new("Part")
- o14 = Instance.new("SpecialMesh")
- o16 = Instance.new("Hat")
- o17 = Instance.new("Part")
- o18 = Instance.new("SpecialMesh")
- o20 = Instance.new("Part")
- o21 = Instance.new("Hat")
- o22 = Instance.new("Part")
- o23 = Instance.new("SpecialMesh")
- o25 = Instance.new("Script")
- o26 = Instance.new("Script")
- o27 = Instance.new("Script")
- o28 = Instance.new("Script")
- o29 = Instance.new("Part")
- o30 = Instance.new("Part")
- o31 = Instance.new("Part")
- o32 = Instance.new("SpecialMesh")
- o33 = Instance.new("Sound")
- o34 = Instance.new("Weld")
- o35 = Instance.new("Weld")
- o36 = Instance.new("Weld")
- o37 = Instance.new("Weld")
- o38 = Instance.new("Sound")
- o39 = Instance.new("Weld")
- o40 = Instance.new("Weld")
- o41 = Instance.new("Weld")
- o42 = Instance.new("Weld")
- o43 = Instance.new("Weld")
- o44 = Instance.new("Weld")
- o45 = Instance.new("Part")
- o46 = Instance.new("Motor6D")
- o47 = Instance.new("Part")
- o49 = Instance.new("Part")
- o50 = Instance.new("Decal")
- o51 = Instance.new("Motor6D")
- o52 = Instance.new("Motor6D")
- o53 = Instance.new("Motor6D")
- o54 = Instance.new("Motor6D")
- o55 = Instance.new("Motor6D")
- o56 = Instance.new("Animation")
- o57 = Instance.new("CharacterMesh")
- o58 = Instance.new("CharacterMesh")
- o59 = Instance.new("CharacterMesh")
- o60 = Instance.new("CharacterMesh")
- o61 = Instance.new("CharacterMesh")
- o62 = Instance.new("Sound")
- o63 = Instance.new("BodyColors")
- o64 = Instance.new("Script")
- o65 = Instance.new("StringValue")
- o66 = Instance.new("Animation")
- o67 = Instance.new("StringValue")
- o68 = Instance.new("Animation")
- o69 = Instance.new("StringValue")
- o70 = Instance.new("Animation")
- o71 = Instance.new("NumberValue")
- o72 = Instance.new("Animation")
- o73 = Instance.new("NumberValue")
- o74 = Instance.new("StringValue")
- o75 = Instance.new("Animation")
- o76 = Instance.new("StringValue")
- o77 = Instance.new("Animation")
- o78 = Instance.new("StringValue")
- o79 = Instance.new("Animation")
- o80 = Instance.new("StringValue")
- o81 = Instance.new("Animation")
- o82 = Instance.new("StringValue")
- o83 = Instance.new("Animation")
- o84 = Instance.new("Script")
- o85 = Instance.new("Script")
- o86 = Instance.new("Animation")
- o87 = Instance.new("Script")
- o1.Name = "SCP 049"
- o1.Parent = mas
- o2.Name = "WalkAnim"
- o2.Parent = o1
- o2.AnimationId = "http://www.roblox.com/asset/?id=189040478"
- o3.Name = "Shadow"
- o3.Parent = o1
- o3.DisplayDistanceType = Enum.HumanoidDisplayDistanceType.None
- o3.HealthDisplayDistance = 0
- o3.NameDisplayDistance = 0
- o3.NameOcclusion = Enum.NameOcclusion.EnemyOcclusion
- o3.RightLeg = o30
- o3.LeftLeg = o20
- o3.Torso = o45
- o3.Health = 5000
- o3.MaxHealth = 5000
- o3.WalkSpeed = 0
- o4.Name = "Status"
- o4.Parent = o3
- o5.Name = "AvalibleSpawns"
- o5.Parent = o4
- o7.Parent = o1
- o7.HeadColor = BrickColor.new("Really black")
- o7.LeftArmColor = BrickColor.new("Black")
- o7.LeftLegColor = BrickColor.new("Black")
- o7.RightArmColor = BrickColor.new("Black")
- o7.RightLegColor = BrickColor.new("Black")
- o7.TorsoColor = BrickColor.new("Really black")
- o8.Name = "Eye"
- o8.Parent = o1
- o8.AttachmentPos = Vector3.new(0.180000007, 0.449999988, 0.49000001)
- o9.Name = "Handle"
- o9.Parent = o8
- o9.BrickColor = BrickColor.new("Institutional white")
- o9.Position = Vector3.new(-44.8000031, 4.7014761, -220.610001)
- o9.CanCollide = false
- o9.FormFactor = Enum.FormFactor.Custom
- o9.Size = Vector3.new(0.5, 0.5, 0.5)
- o9.CFrame = CFrame.new(-44.8000031, 4.7014761, -220.610001, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- o9.BottomSurface = Enum.SurfaceType.Smooth
- o9.TopSurface = Enum.SurfaceType.Smooth
- o9.Color = Color3.new(0.972549, 0.972549, 0.972549)
- o9.Position = Vector3.new(-44.8000031, 4.7014761, -220.610001)
- o10.Parent = o9
- o10.MeshId = "http://www.roblox.com/asset/?id=1185246"
- o10.Scale = Vector3.new(0.300000012, 0.300000012, 0.300000012)
- o10.TextureId = "http://www.roblox.com/asset/?id=189023804"
- o10.MeshType = Enum.MeshType.FileMesh
- o12.Name = "Eye"
- o12.Parent = o1
- o12.AttachmentForward = Vector3.new(-0, 0, -0.99999994)
- o12.AttachmentPos = Vector3.new(-0.180000007, 0.449999988, 0.49000001)
- o13.Name = "Handle"
- o13.Parent = o12
- o13.BrickColor = BrickColor.new("Institutional white")
- o13.Position = Vector3.new(-44.4400024, 4.7014761, -220.610001)
- o13.CanCollide = false
- o13.FormFactor = Enum.FormFactor.Custom
- o13.Size = Vector3.new(0.5, 0.5, 0.5)
- o13.CFrame = CFrame.new(-44.4400024, 4.7014761, -220.610001, 1, 0, 0, 0, 1, 0, 0, 0, 0.99999994)
- o13.BottomSurface = Enum.SurfaceType.Smooth
- o13.TopSurface = Enum.SurfaceType.Smooth
- o13.Color = Color3.new(0.972549, 0.972549, 0.972549)
- o13.Position = Vector3.new(-44.4400024, 4.7014761, -220.610001)
- o14.Parent = o13
- o14.MeshId = "http://www.roblox.com/asset/?id=1185246"
- o14.Scale = Vector3.new(0.300000012, 0.300000012, 0.300000012)
- o14.TextureId = "http://www.roblox.com/asset/?id=189023804"
- o14.MeshType = Enum.MeshType.FileMesh
- o16.Name = "Hood"
- o16.Parent = o1
- o16.AttachmentPos = Vector3.new(0, 0.200000003, 0)
- o17.Name = "Handle"
- o17.Parent = o16
- o17.BrickColor = BrickColor.new("Really black")
- o17.Position = Vector3.new(-44.6200027, 4.9514761, -220.119995)
- o17.CanCollide = false
- o17.FormFactor = Enum.FormFactor.Symmetric
- o17.Size = Vector3.new(1, 1, 2)
- o17.CFrame = CFrame.new(-44.6200027, 4.9514761, -220.119995, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- o17.BottomSurface = Enum.SurfaceType.Smooth
- o17.TopSurface = Enum.SurfaceType.Smooth
- o17.Color = Color3.new(0.0666667, 0.0666667, 0.0666667)
- o17.Position = Vector3.new(-44.6200027, 4.9514761, -220.119995)
- o18.Parent = o17
- o18.MeshId = "http://www.roblox.com/asset/?id=16952952"
- o18.Scale = Vector3.new(1, 1.14999998, 1.29999995)
- o18.TextureId = "http://www.roblox.com/asset/?id=189029867"
- o18.MeshType = Enum.MeshType.FileMesh
- o20.Name = "Left Leg"
- o20.Parent = o1
- o20.Material = Enum.Material.SmoothPlastic
- o20.BrickColor = BrickColor.new("Really black")
- o20.Position = Vector3.new(-45.1200027, 1.15147591, -220.119995)
- o20.CanCollide = false
- o20.Locked = true
- o20.Elasticity = 0
- o20.FormFactor = Enum.FormFactor.Symmetric
- o20.Friction = 2
- o20.Size = Vector3.new(1, 2, 1)
- o20.CFrame = CFrame.new(-45.1200027, 1.15147591, -220.119995, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- o20.BackSurface = Enum.SurfaceType.SmoothNoOutlines
- o20.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
- o20.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
- o20.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
- o20.RightSurface = Enum.SurfaceType.SmoothNoOutlines
- o20.TopSurface = Enum.SurfaceType.SmoothNoOutlines
- o20.Color = Color3.new(0.0666667, 0.0666667, 0.0666667)
- o20.Position = Vector3.new(-45.1200027, 1.15147591, -220.119995)
- o21.Name = "Mask"
- o21.Parent = o1
- o21.AttachmentPos = Vector3.new(0, 0.400000006, 0.639999986)
- o22.Name = "Handle"
- o22.Parent = o21
- o22.Position = Vector3.new(-44.6200027, 4.75147581, -220.759995)
- o22.CanCollide = false
- o22.FormFactor = Enum.FormFactor.Symmetric
- o22.Size = Vector3.new(1, 1, 2)
- o22.CFrame = CFrame.new(-44.6200027, 4.75147581, -220.759995, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- o22.BottomSurface = Enum.SurfaceType.Smooth
- o22.TopSurface = Enum.SurfaceType.Smooth
- o22.Position = Vector3.new(-44.6200027, 4.75147581, -220.759995)
- o23.Parent = o22
- o23.MeshId = "http://www.roblox.com/asset/?id=12472639"
- o23.Scale = Vector3.new(1.20000005, 1.20000005, 1.5)
- o23.TextureId = "http://www.roblox.com/asset/?id=189029251"
- o23.MeshType = Enum.MeshType.FileMesh
- o25.Name = "SCP049AnimationScript"
- o25.Parent = o1
- table.insert(cors,coroutine.create(function()
- wait()
- runDummyScript(function()
- local SCP049=script.Parent;
- local SCP049Humanoid = SCP049:FindFirstChild("Humanoid");
- local SCP049WalkAnimation = SCP049Humanoid:LoadAnimation(SCP049.WalkAnim);
- repeat Wait(0.5) until SCP049Humanoid ~= nil
- function SCP049Walk(WalkSpeed)
- if WalkSpeed>0.05 then
- SCP049WalkAnimation:Play()
- else
- SCP049WalkAnimation:Stop()
- end
- end
- SCP049Humanoid.Running:connect(SCP049Walk)
- end,o25)
- end))
- o26.Name = "SCP049AttackScript"
- o26.Parent = o1
- table.insert(cors,coroutine.create(function()
- wait()
- runDummyScript(function()
- local SCP049MainScript = script;
- local SCP049 = SCP049MainScript.Parent;
- local SCP049Humanoid = SCP049:FindFirstChild("Humanoid")
- local Head = SCP049:FindFirstChild("Head");
- local HumanoidRootPart = SCP049:FindFirstChild("HumanoidRootPart");
- local LeftArm = SCP049:FindFirstChild("Left Arm");
- local LeftLeg = SCP049:FindFirstChild("Left Leg");
- local RightArm = SCP049:FindFirstChild("Right Arm");
- local RightLeg = SCP049:FindFirstChild("Right Leg");
- local Torso = SCP049:FindFirstChild("Torso");
- local NeckSnapAnimation = SCP049Humanoid:LoadAnimation(SCP049.ArmOutAnim);
- local SCP049AttackEnable = true;
- function FindTargetToTerrorise(TargetPosition)
- local PlayerList = Game.Workspace:children();
- local TargetTorso = nil;
- local VisibleDistance = 5;
- local TempTargetModel = nil;
- local TargetHumanoid = nil;
- local TargetModel = nil;
- for Check = 1, #PlayerList do
- TargetModel = PlayerList[Check]
- if (TargetModel.className == "Model") and (TargetModel ~= SCP049) and (TargetModel.Name ~= SCP049.Name) and (TargetModel.Name ~= "SCP-106") and (TargetModel.Name ~= "SCP-173") and (TargetModel.Name ~= "SCP-096") then
- TempTargetModel = TargetModel:findFirstChild("Torso")
- TargetHumanoid = TargetModel:findFirstChild("Humanoid")
- if (TempTargetModel ~= nil) and (TargetHumanoid ~= nil) and (TargetHumanoid.Health > 0) then
- if (TempTargetModel.Position - TargetPosition).magnitude < VisibleDistance then
- TargetTorso = TempTargetModel
- VisibleDistance = (TempTargetModel.Position - TargetPosition).magnitude
- end
- end
- end
- end
- return TargetTorso
- end
- while true do
- Wait(0)
- local SCP049ChosenTarget = FindTargetToTerrorise(Head.Position);
- if SCP049ChosenTarget ~= nil then
- if SCP049AttackEnable == false then return end
- SCP049AttackEnable = false
- local SCP049Damage = 999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999
- local SelectedAttackList = {"NeckSnap1", "NeckSnap2", "NeckSnap3"};
- local SelectedAttackSound = Torso[math.random(1, #SelectedAttackList)];
- SelectedAttackSound:Play()
- SCP049ChosenTarget.Parent.Humanoid:TakeDamage(SCP049Damage)
- NeckSnapAnimation:Play()
- Wait(0.5)
- NeckSnapAnimation:Stop()
- SCP049AttackEnable = true
- end
- end
- end,o26)
- end))
- o27.Name = "SCP049HeadSoundScript"
- o27.Parent = o1
- table.insert(cors,coroutine.create(function()
- wait()
- runDummyScript(function()
- --[[ By: Brutez ]]--
- local SCP049 = script.Parent;
- local SCP049Head = SCP049:FindFirstChild("Head");
- local SelectedSoundID = {187645728, 187645755, 187645778};
- local SelectedSounds = {};
- local HurtEnable = true;
- while true do
- Wait(0)
- SCP049RandomSound=math.random(1,1000)
- if SCP049RandomSound==10 or SCP049RandomSound==20 or SCP049RandomSound==30 then
- if HurtEnable==false then return end
- HurtEnable = false;
- local SCP049HurtSoundList = {"049_1", "049_2", "049_3", "049_4", "049_5", "049_6", "049_7", "049_8"};
- local SelectedHurtSound = SCP049Head[math.random(1, #SCP049HurtSoundList)];
- SelectedHurtSound:Play()
- Wait(4)
- HurtEnable = true;
- end
- end
- --[[ By: Brutez ]]--
- end,o27)
- end))
- o28.Name = "SCP049TargetScript"
- o28.Parent = o1
- table.insert(cors,coroutine.create(function()
- wait()
- runDummyScript(function()
- local SCP049MainScript = script;
- local SCP049 = SCP049MainScript.Parent;
- local Head = SCP049:FindFirstChild("Head");
- local HumanoidRootPart = SCP049:FindFirstChild("HumanoidRootPart");
- local LeftArm = SCP049:FindFirstChild("Left Arm");
- local LeftLeg = SCP049:FindFirstChild("Left Leg");
- local RightArm = SCP049:FindFirstChild("Right Arm");
- local RightLeg = SCP049:FindFirstChild("Right Leg");
- local Torso = SCP049:FindFirstChild("Torso");
- local SCP049Humanoid = SCP049:FindFirstChild("Humanoid");
- local RechargeTime = 0;
- for SCP049HealthCheck = 1,5 do
- SCP049Humanoid.Health = SCP049Humanoid.MaxHealth
- Wait(0)
- end
- local SpawnForceField = Instance.new("ForceField")
- SpawnForceField.Name = "SpawnForceField"
- SpawnForceField.Parent = SCP049
- function FindTargetToTerrorise(TargetPosition)
- local PlayerList = Game.Workspace:children();
- local TargetTorso = nil;
- local VisibleDistance = 13337777777;
- local TempTargetModel = nil;
- local TargetHumanoid = nil;
- local TargetModel = nil;
- for Check = 1, #PlayerList do
- TargetModel = PlayerList[Check]
- if (TargetModel.className == "Model") and (TargetModel ~= SCP049) and (TargetModel.Name ~= SCP049.Name) and (TargetModel.Name ~= "SCP-106") and (TargetModel.Name ~= "SCP-173") and (TargetModel.Name ~= "SCP-096") then
- TempTargetModel = TargetModel:FindFirstChild("Torso")
- TargetHumanoid = TargetModel:FindFirstChild("Humanoid")
- if (TempTargetModel ~= nil) and (TargetHumanoid ~= nil) and (TargetHumanoid.Health > 0) then
- if (TempTargetModel.Position - TargetPosition).magnitude < VisibleDistance then
- TargetTorso = TempTargetModel
- VisibleDistance = (TempTargetModel.Position - TargetPosition).magnitude
- end
- end
- end
- end
- return TargetTorso
- end
- Wait(5)
- for SCP049HealthCheck = 1,5 do
- SCP049Humanoid.Health = SCP049Humanoid.MaxHealth
- Wait(0)
- end
- HumanoidRootPart.Anchored = false
- SpawnForceField:Destroy()
- while true do
- Wait(0)
- if SCP049Humanoid.Health == 0 or SCP049Humanoid.Health < 0 then
- SCP049["SCP049AttackScript"].Disabled = true
- SCP049["SCP049TargetScript"].Disabled = true
- SCP049["SCP049HeadSoundScript"].Disabled = true
- Wait(5)
- SCP049:Destroy()
- end
- local SCP049ChosenTarget = FindTargetToTerrorise(Torso.Position);
- if SCP049Humanoid.Sit==true then
- SCP049Humanoid.Jump=true
- end
- if SCP049Humanoid.PlatformStand==true then
- SCP049Humanoid.Jump=true
- end
- if SCP049ChosenTarget ~= nil then
- SCP049RadiusXAxis = math.random(-2,2)
- SCP049RadiusYAxis = math.random(-2,2)
- SCP049RadiusZAxis = math.random(-2,2)
- SCP049Humanoid:MoveTo(SCP049ChosenTarget.Position+Vector3.new(SCP049RadiusXAxis,SCP049RadiusYAxis,SCP049RadiusZAxis), SCP049ChosenTarget)
- end
- end
- end,o28)
- end))
- o29.Name = "Right Arm"
- o29.Parent = o1
- o29.Material = Enum.Material.SmoothPlastic
- o29.BrickColor = BrickColor.new("Really black")
- o29.Position = Vector3.new(-43.1200027, 3.15147591, -220.119995)
- o29.CanCollide = false
- o29.Locked = true
- o29.Elasticity = 0
- o29.FormFactor = Enum.FormFactor.Symmetric
- o29.Friction = 2
- o29.Size = Vector3.new(1, 2, 1)
- o29.CFrame = CFrame.new(-43.1200027, 3.15147591, -220.119995, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- o29.BackSurface = Enum.SurfaceType.SmoothNoOutlines
- o29.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
- o29.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
- o29.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
- o29.RightSurface = Enum.SurfaceType.SmoothNoOutlines
- o29.TopSurface = Enum.SurfaceType.SmoothNoOutlines
- o29.Color = Color3.new(0.0666667, 0.0666667, 0.0666667)
- o29.Position = Vector3.new(-43.1200027, 3.15147591, -220.119995)
- o30.Name = "Right Leg"
- o30.Parent = o1
- o30.Material = Enum.Material.SmoothPlastic
- o30.BrickColor = BrickColor.new("Really black")
- o30.Position = Vector3.new(-44.1200027, 1.15147591, -220.119995)
- o30.CanCollide = false
- o30.Locked = true
- o30.Elasticity = 0
- o30.FormFactor = Enum.FormFactor.Symmetric
- o30.Friction = 2
- o30.Size = Vector3.new(1, 2, 1)
- o30.CFrame = CFrame.new(-44.1200027, 1.15147591, -220.119995, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- o30.BackSurface = Enum.SurfaceType.SmoothNoOutlines
- o30.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
- o30.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
- o30.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
- o30.RightSurface = Enum.SurfaceType.SmoothNoOutlines
- o30.TopSurface = Enum.SurfaceType.SmoothNoOutlines
- o30.Color = Color3.new(0.0666667, 0.0666667, 0.0666667)
- o30.Position = Vector3.new(-44.1200027, 1.15147591, -220.119995)
- o31.Name = "Head"
- o31.Parent = o1
- o31.Material = Enum.Material.SmoothPlastic
- o31.BrickColor = BrickColor.new("Really black")
- o31.Position = Vector3.new(-44.6200027, 4.65147591, -220.119995)
- o31.CanCollide = false
- o31.Locked = true
- o31.Elasticity = 0
- o31.FormFactor = Enum.FormFactor.Symmetric
- o31.Friction = 0
- o31.Size = Vector3.new(2, 1, 1)
- o31.CFrame = CFrame.new(-44.6200027, 4.65147591, -220.119995, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- o31.BackSurface = Enum.SurfaceType.SmoothNoOutlines
- o31.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
- o31.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
- o31.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
- o31.RightSurface = Enum.SurfaceType.SmoothNoOutlines
- o31.TopSurface = Enum.SurfaceType.SmoothNoOutlines
- o31.Color = Color3.new(0.0666667, 0.0666667, 0.0666667)
- o31.Position = Vector3.new(-44.6200027, 4.65147591, -220.119995)
- o32.Name = "HeadMesh"
- o32.Parent = o31
- o32.Scale = Vector3.new(1.25, 1.25, 1.25)
- o33.Name = "Runner"
- o33.Parent = o31
- o33.Pitch = 0.80000001192093
- o33.SoundId = "rbxassetid://432854997"
- o33.Volume = 1
- o33.Looped = true
- o34.Name = "HeadWeld"
- o34.Parent = o31
- o34.C0 = CFrame.new(0, 0.5, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- o34.C1 = CFrame.new(0, 0.200000003, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- o34.Part0 = o31
- o34.Part1 = o17
- o35.Name = "HeadWeld"
- o35.Parent = o31
- o35.C0 = CFrame.new(0, 0.5, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- o35.C1 = CFrame.new(0, 0.400000006, 0.639999986, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- o35.Part0 = o31
- o35.Part1 = o22
- o36.Name = "HeadWeld"
- o36.Parent = o31
- o36.C0 = CFrame.new(0, 0.5, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- o36.C1 = CFrame.new(0.180000007, 0.449999988, 0.49000001, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- o36.Part0 = o31
- o36.Part1 = o9
- o37.Name = "HeadWeld"
- o37.Parent = o31
- o37.C0 = CFrame.new(0, 0.5, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- o37.C1 = CFrame.new(-0.180000007, 0.449999988, 0.49000001, 1, -0, 0, 0, 1, -0, 0, 0, 0.99999994)
- o37.Part0 = o31
- o37.Part1 = o13
- o38.Name = "Psst"
- o38.Parent = o31
- o38.SoundId = "rbxassetid://432855060"
- o38.Volume = 1
- o38.Looped = true
- o39.Name = "HeadWeld"
- o39.Parent = o31
- o39.C0 = CFrame.new(0, 0.5, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- o39.C1 = CFrame.new(0.180000007, 0.449999988, 0.49000001, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- o39.Part0 = o31
- o39.Part1 = o9
- o40.Name = "HeadWeld"
- o40.Parent = o31
- o40.C0 = CFrame.new(0, 0.5, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- o40.C1 = CFrame.new(-0.180000007, 0.449999988, 0.49000001, 1, -0, 0, 0, 1, -0, 0, 0, 0.99999994)
- o40.Part0 = o31
- o40.Part1 = o13
- o41.Name = "HeadWeld"
- o41.Parent = o31
- o41.C0 = CFrame.new(0, 0.5, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- o41.C1 = CFrame.new(0, 0.400000006, 0.639999986, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- o41.Part0 = o31
- o41.Part1 = o22
- o42.Name = "HeadWeld"
- o42.Parent = o31
- o42.C0 = CFrame.new(0, 0.5, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- o42.C1 = CFrame.new(0.180000007, 0.449999988, 0.49000001, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- o42.Part0 = o31
- o42.Part1 = o9
- o43.Name = "HeadWeld"
- o43.Parent = o31
- o43.C0 = CFrame.new(0, 0.5, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- o43.C1 = CFrame.new(-0.180000007, 0.449999988, 0.49000001, 1, -0, 0, 0, 1, -0, 0, 0, 0.99999994)
- o43.Part0 = o31
- o43.Part1 = o13
- o44.Name = "HeadWeld"
- o44.Parent = o31
- o44.C0 = CFrame.new(0, 0.5, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- o44.C1 = CFrame.new(0, 0.400000006, 0.639999986, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- o44.Part0 = o31
- o44.Part1 = o22
- o45.Name = "HumanoidRootPart"
- o45.Parent = o1
- o45.Material = Enum.Material.SmoothPlastic
- o45.BrickColor = BrickColor.new("Deep blue")
- o45.Transparency = 1
- o45.Position = Vector3.new(-44.6200027, 3.15147591, -220.119995)
- o45.CanCollide = false
- o45.Locked = true
- o45.Elasticity = 0
- o45.FormFactor = Enum.FormFactor.Symmetric
- o45.Friction = 0
- o45.Size = Vector3.new(2, 2, 1)
- o45.CFrame = CFrame.new(-44.6200027, 3.15147591, -220.119995, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- o45.BackSurface = Enum.SurfaceType.SmoothNoOutlines
- o45.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
- o45.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
- o45.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
- o45.RightSurface = Enum.SurfaceType.SmoothNoOutlines
- o45.TopSurface = Enum.SurfaceType.SmoothNoOutlines
- o45.Color = Color3.new(0.129412, 0.329412, 0.72549)
- o45.Position = Vector3.new(-44.6200027, 3.15147591, -220.119995)
- o46.Name = "RootJoint"
- o46.Parent = o45
- o46.C0 = CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
- o46.C1 = CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
- o46.Part0 = o45
- o46.Part1 = o49
- o46.MaxVelocity = 0.10000000149012
- o47.Name = "Left Arm"
- o47.Parent = o1
- o47.Material = Enum.Material.SmoothPlastic
- o47.BrickColor = BrickColor.new("Really black")
- o47.Position = Vector3.new(-46.1200027, 3.15147591, -220.119995)
- o47.CanCollide = false
- o47.Locked = true
- o47.Elasticity = 0
- o47.FormFactor = Enum.FormFactor.Symmetric
- o47.Friction = 2
- o47.Size = Vector3.new(1, 2, 1)
- o47.CFrame = CFrame.new(-46.1200027, 3.15147591, -220.119995, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- o47.BackSurface = Enum.SurfaceType.SmoothNoOutlines
- o47.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
- o47.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
- o47.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
- o47.RightSurface = Enum.SurfaceType.SmoothNoOutlines
- o47.TopSurface = Enum.SurfaceType.SmoothNoOutlines
- o47.Color = Color3.new(0.0666667, 0.0666667, 0.0666667)
- o47.Position = Vector3.new(-46.1200027, 3.15147591, -220.119995)
- o49.Name = "Torso"
- o49.Parent = o1
- o49.Material = Enum.Material.SmoothPlastic
- o49.BrickColor = BrickColor.new("Really black")
- o49.Position = Vector3.new(-44.6200027, 3.15147591, -220.119995)
- o49.CanCollide = false
- o49.Locked = true
- o49.Elasticity = 0
- o49.FormFactor = Enum.FormFactor.Symmetric
- o49.Friction = 2
- o49.Size = Vector3.new(2, 2, 1)
- o49.CFrame = CFrame.new(-44.6200027, 3.15147591, -220.119995, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- o49.BackSurface = Enum.SurfaceType.SmoothNoOutlines
- o49.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
- o49.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
- o49.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
- o49.RightSurface = Enum.SurfaceType.SmoothNoOutlines
- o49.TopSurface = Enum.SurfaceType.SmoothNoOutlines
- o49.Color = Color3.new(0.0666667, 0.0666667, 0.0666667)
- o49.Position = Vector3.new(-44.6200027, 3.15147591, -220.119995)
- o50.Name = "roblox"
- o50.Parent = o49
- o51.Name = "Right Shoulder"
- o51.Parent = o49
- o51.C0 = CFrame.new(1, 0.5, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
- o51.C1 = CFrame.new(-0.5, 0.5, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
- o51.Part0 = o49
- o51.Part1 = o29
- o51.DesiredAngle = -0.077736437320709
- o51.MaxVelocity = 0.10000000149012
- o52.Name = "Left Shoulder"
- o52.Parent = o49
- o52.C0 = CFrame.new(-1, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
- o52.C1 = CFrame.new(0.5, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
- o52.Part0 = o49
- o52.Part1 = o47
- o52.DesiredAngle = -0.077736437320709
- o52.MaxVelocity = 0.10000000149012
- o53.Name = "Right Hip"
- o53.Parent = o49
- o53.C0 = CFrame.new(1, -1, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
- o53.C1 = CFrame.new(0.5, 1, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
- o53.Part0 = o49
- o53.Part1 = o30
- o53.DesiredAngle = 0.077736437320709
- o53.MaxVelocity = 0.10000000149012
- o54.Name = "Left Hip"
- o54.Parent = o49
- o54.C0 = CFrame.new(-1, -1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
- o54.C1 = CFrame.new(-0.5, 1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
- o54.Part0 = o49
- o54.Part1 = o20
- o54.DesiredAngle = 0.077736437320709
- o54.MaxVelocity = 0.10000000149012
- o55.Name = "Neck"
- o55.Parent = o49
- o55.C0 = CFrame.new(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
- o55.C1 = CFrame.new(0, -0.5, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
- o55.Part0 = o49
- o55.Part1 = o31
- o55.MaxVelocity = 0.10000000149012
- o56.Name = "ArmOutAnim"
- o56.Parent = o1
- o56.AnimationId = "http://www.roblox.com/item.aspx?id=189040829"
- o57.Name = "Pilgrim Left Arm"
- o57.Parent = o1
- o57.MeshId = 66229897
- o57.BodyPart = Enum.BodyPart.LeftArm
- o57.OverlayTextureId = 189033450
- o58.Name = "Pilgrim Right Arm"
- o58.Parent = o1
- o58.MeshId = 66229924
- o58.BodyPart = Enum.BodyPart.RightArm
- o58.OverlayTextureId = 189033450
- o59.Name = "Pilgrim Torso"
- o59.Parent = o1
- o59.MeshId = 66230010
- o59.BodyPart = Enum.BodyPart.Torso
- o59.OverlayTextureId = 189033450
- o60.Name = "WAI Left Leg"
- o60.Parent = o1
- o60.MeshId = 106703213
- o60.BodyPart = Enum.BodyPart.LeftLeg
- o60.OverlayTextureId = 189033450
- o61.Name = "WAI RightLeg"
- o61.Parent = o1
- o61.MeshId = 106703301
- o61.BodyPart = Enum.BodyPart.RightLeg
- o61.OverlayTextureId = 189033450
- o62.Name = "Night1"
- o62.Parent = o1
- o62.SoundId = "rbxassetid://432855173"
- o62.Volume = 1
- o62.Looped = true
- o63.Parent = o1
- o63.HeadColor = BrickColor.new("Really black")
- o63.LeftArmColor = BrickColor.new("Really black")
- o63.LeftLegColor = BrickColor.new("Really black")
- o63.RightArmColor = BrickColor.new("Really black")
- o63.RightLegColor = BrickColor.new("Really black")
- o63.TorsoColor = BrickColor.new("Really black")
- o64.Name = "AnimateSauce"
- o64.Parent = o1
- table.insert(cors,coroutine.create(function()
- wait()
- runDummyScript(function()
- function waitForChild(parent, childName)
- local child = parent:findFirstChild(childName)
- if child then return child end
- while true do
- child = parent.ChildAdded:wait()
- if child.Name==childName then return child end
- end
- end
- local Figure = script.Parent
- local Torso = waitForChild(Figure, "Torso")
- local RightShoulder = waitForChild(Torso, "Right Shoulder")
- local LeftShoulder = waitForChild(Torso, "Left Shoulder")
- local RightHip = waitForChild(Torso, "Right Hip")
- local LeftHip = waitForChild(Torso, "Left Hip")
- local Neck = waitForChild(Torso, "Neck")
- local Humanoid;
- for _,Child in pairs(Figure:GetChildren())do
- if Child and Child.ClassName=="Humanoid"then
- Humanoid=Child;
- end;
- end;
- local pose = "Standing"
- local currentAnim = ""
- local currentAnimInstance = nil
- local currentAnimTrack = nil
- local currentAnimKeyframeHandler = nil
- local currentAnimSpeed = 1.0
- local animTable = {}
- local animNames = {
- idle = {
- { id = "http://www.roblox.com/asset/?id=180435571", weight = 9 },
- { id = "http://www.roblox.com/asset/?id=180435792", weight = 1 }
- },
- walk = {
- { id = "http://www.roblox.com/asset/?id=180426354", weight = 10 }
- },
- run = {
- { id = "http://www.roblox.com/asset/?id=252557606", weight = 20 }
- },
- jump = {
- { id = "http://www.roblox.com/asset/?id=125750702", weight = 10 }
- },
- fall = {
- { id = "http://www.roblox.com/asset/?id=180436148", weight = 10 }
- },
- climb = {
- { id = "http://www.roblox.com/asset/?id=180436334", weight = 10 }
- },
- sit = {
- { id = "http://www.roblox.com/asset/?id=178130996", weight = 10 }
- },
- toolnone = {
- { id = "http://www.roblox.com/asset/?id=182393478", weight = 10 }
- },
- toolslash = {
- { id = "http://www.roblox.com/asset/?id=129967390", weight = 10 }
- --{ id = "slash.xml", weight = 10 }
- },
- toollunge = {
- { id = "http://www.roblox.com/asset/?id=129967478", weight = 10 }
- },
- wave = {
- { id = "http://www.roblox.com/asset/?id=128777973", weight = 10 }
- },
- point = {
- { id = "http://www.roblox.com/asset/?id=128853357", weight = 10 }
- },
- dance1 = {
- { id = "http://www.roblox.com/asset/?id=182435998", weight = 10 },
- { id = "http://www.roblox.com/asset/?id=182491037", weight = 10 },
- { id = "http://www.roblox.com/asset/?id=182491065", weight = 10 }
- },
- dance2 = {
- { id = "http://www.roblox.com/asset/?id=182436842", weight = 10 },
- { id = "http://www.roblox.com/asset/?id=182491248", weight = 10 },
- { id = "http://www.roblox.com/asset/?id=182491277", weight = 10 }
- },
- dance3 = {
- { id = "http://www.roblox.com/asset/?id=182436935", weight = 10 },
- { id = "http://www.roblox.com/asset/?id=182491368", weight = 10 },
- { id = "http://www.roblox.com/asset/?id=182491423", weight = 10 }
- },
- laugh = {
- { id = "http://www.roblox.com/asset/?id=129423131", weight = 10 }
- },
- cheer = {
- { id = "http://www.roblox.com/asset/?id=129423030", weight = 10 }
- },
- }
- local dances = {"dance1", "dance2", "dance3"}
- -- Existance in this list signifies that it is an emote, the value indicates if it is a looping emote
- local emoteNames = { wave = false, point = false, dance1 = true, dance2 = true, dance3 = true, laugh = false, cheer = false}
- function configureAnimationSet(name, fileList)
- if (animTable[name] ~= nil) then
- for _, connection in pairs(animTable[name].connections) do
- connection:disconnect()
- end
- end
- animTable[name] = {}
- animTable[name].count = 0
- animTable[name].totalWeight = 0
- animTable[name].connections = {}
- -- check for config values
- local config = script:FindFirstChild(name)
- if (config ~= nil) then
- --print("Loading anims " .. name)
- table.insert(animTable[name].connections, config.ChildAdded:connect(function(child) configureAnimationSet(name, fileList) end))
- table.insert(animTable[name].connections, config.ChildRemoved:connect(function(child) configureAnimationSet(name, fileList) end))
- local idx = 1
- for _, childPart in pairs(config:GetChildren()) do
- if (childPart:IsA("Animation")) then
- table.insert(animTable[name].connections, childPart.Changed:connect(function(property) configureAnimationSet(name, fileList) end))
- animTable[name][idx] = {}
- animTable[name][idx].anim = childPart
- local weightObject = childPart:FindFirstChild("Weight")
- if (weightObject == nil) then
- animTable[name][idx].weight = 1
- else
- animTable[name][idx].weight = weightObject.Value
- end
- animTable[name].count = animTable[name].count + 1
- animTable[name].totalWeight = animTable[name].totalWeight + animTable[name][idx].weight
- --print(name .. " [" .. idx .. "] " .. animTable[name][idx].anim.AnimationId .. " (" .. animTable[name][idx].weight .. ")")
- idx = idx + 1
- end
- end
- end
- -- fallback to defaults
- if (animTable[name].count <= 0) then
- for idx, anim in pairs(fileList) do
- animTable[name][idx] = {}
- animTable[name][idx].anim = Instance.new("Animation")
- animTable[name][idx].anim.Name = name
- animTable[name][idx].anim.AnimationId = anim.id
- animTable[name][idx].weight = anim.weight
- animTable[name].count = animTable[name].count + 1
- animTable[name].totalWeight = animTable[name].totalWeight + anim.weight
- --print(name .. " [" .. idx .. "] " .. anim.id .. " (" .. anim.weight .. ")")
- end
- end
- end
- -- Setup animation objects
- function scriptChildModified(child)
- local fileList = animNames[child.Name]
- if (fileList ~= nil) then
- configureAnimationSet(child.Name, fileList)
- end
- end
- script.ChildAdded:connect(scriptChildModified)
- script.ChildRemoved:connect(scriptChildModified)
- for name, fileList in pairs(animNames) do
- configureAnimationSet(name, fileList)
- end
- -- ANIMATION
- -- declarations
- local toolAnim = "None"
- local toolAnimTime = 0
- local jumpAnimTime = 0
- local jumpAnimDuration = 0.3
- local toolTransitionTime = 0.1
- local fallTransitionTime = 0.3
- local jumpMaxLimbVelocity = 0.75
- -- functions
- function stopAllAnimations()
- local oldAnim = currentAnim
- -- return to idle if finishing an emote
- if (emoteNames[oldAnim] ~= nil and emoteNames[oldAnim] == false) then
- oldAnim = "idle"
- end
- currentAnim = ""
- currentAnimInstance = nil
- if (currentAnimKeyframeHandler ~= nil) then
- currentAnimKeyframeHandler:disconnect()
- end
- if (currentAnimTrack ~= nil) then
- currentAnimTrack:Stop()
- currentAnimTrack:Destroy()
- currentAnimTrack = nil
- end
- return oldAnim
- end
- function setAnimationSpeed(speed)
- if speed ~= currentAnimSpeed then
- currentAnimSpeed = speed
- currentAnimTrack:AdjustSpeed(currentAnimSpeed)
- end
- end
- function keyFrameReachedFunc(frameName)
- if (frameName == "End") then
- local repeatAnim = currentAnim
- -- return to idle if finishing an emote
- if (emoteNames[repeatAnim] ~= nil and emoteNames[repeatAnim] == false) then
- repeatAnim = "idle"
- end
- local animSpeed = currentAnimSpeed
- playAnimation(repeatAnim, 0.0, Humanoid)
- setAnimationSpeed(animSpeed)
- end
- end
- -- Preload animations
- function playAnimation(animName, transitionTime, humanoid)
- local roll = math.random(1, animTable[animName].totalWeight)
- local origRoll = roll
- local idx = 1
- while (roll > animTable[animName][idx].weight) do
- roll = roll - animTable[animName][idx].weight
- idx = idx + 1
- end
- --print(animName .. " " .. idx .. " [" .. origRoll .. "]")
- local anim = animTable[animName][idx].anim
- -- switch animation
- if (anim ~= currentAnimInstance) then
- if (currentAnimTrack ~= nil) then
- currentAnimTrack:Stop(transitionTime)
- currentAnimTrack:Destroy()
- end
- currentAnimSpeed = 1.0
- -- load it to the humanoid; get AnimationTrack
- currentAnimTrack = humanoid:LoadAnimation(anim)
- -- play the animation
- currentAnimTrack:Play(transitionTime)
- currentAnim = animName
- currentAnimInstance = anim
- -- set up keyframe name triggers
- if (currentAnimKeyframeHandler ~= nil) then
- currentAnimKeyframeHandler:disconnect()
- end
- currentAnimKeyframeHandler = currentAnimTrack.KeyframeReached:connect(keyFrameReachedFunc)
- end
- end
- -------------------------------------------------------------------------------------------
- -------------------------------------------------------------------------------------------
- local toolAnimName = ""
- local toolAnimTrack = nil
- local toolAnimInstance = nil
- local currentToolAnimKeyframeHandler = nil
- function toolKeyFrameReachedFunc(frameName)
- if (frameName == "End") then
- --print("Keyframe : ".. frameName)
- playToolAnimation(toolAnimName, 0.0, Humanoid)
- end
- end
- function playToolAnimation(animName, transitionTime, humanoid)
- local roll = math.random(1, animTable[animName].totalWeight)
- local origRoll = roll
- local idx = 1
- while (roll > animTable[animName][idx].weight) do
- roll = roll - animTable[animName][idx].weight
- idx = idx + 1
- end
- --print(animName .. " * " .. idx .. " [" .. origRoll .. "]")
- local anim = animTable[animName][idx].anim
- if (toolAnimInstance ~= anim) then
- if (toolAnimTrack ~= nil) then
- toolAnimTrack:Stop()
- toolAnimTrack:Destroy()
- transitionTime = 0
- end
- -- load it to the humanoid; get AnimationTrack
- toolAnimTrack = humanoid:LoadAnimation(anim)
- -- play the animation
- toolAnimTrack:Play(transitionTime)
- toolAnimName = animName
- toolAnimInstance = anim
- currentToolAnimKeyframeHandler = toolAnimTrack.KeyframeReached:connect(toolKeyFrameReachedFunc)
- end
- end
- function stopToolAnimations()
- local oldAnim = toolAnimName
- if (currentToolAnimKeyframeHandler ~= nil) then
- currentToolAnimKeyframeHandler:disconnect()
- end
- toolAnimName = ""
- toolAnimInstance = nil
- if (toolAnimTrack ~= nil) then
- toolAnimTrack:Stop()
- toolAnimTrack:Destroy()
- toolAnimTrack = nil
- end
- return oldAnim
- end
- -------------------------------------------------------------------------------------------
- -------------------------------------------------------------------------------------------
- function onRunning(speed)
- if speed>0.01 then
- if Figure and Humanoid and Humanoid.WalkSpeed<17 then
- playAnimation("walk", 0.1, Humanoid);
- elseif Figure and Humanoid and Humanoid.WalkSpeed>17 then
- playAnimation("run", 0.1, Humanoid);
- end;
- if currentAnimInstance and currentAnimInstance.AnimationId == "http://www.roblox.com/asset/?id=180426354" then
- setAnimationSpeed(speed / 14.5)
- end
- pose = "Running"
- else
- playAnimation("idle", 0.1, Humanoid)
- pose = "Standing"
- end
- end
- function onDied()
- pose = "Dead"
- end
- function onJumping()
- playAnimation("jump", 0.1, Humanoid)
- jumpAnimTime = jumpAnimDuration
- pose = "Jumping"
- end
- function onClimbing(speed)
- playAnimation("climb", 0.1, Humanoid)
- setAnimationSpeed(speed / 12.0)
- pose = "Climbing"
- end
- function onGettingUp()
- pose = "GettingUp"
- end
- function onFreeFall()
- if (jumpAnimTime <= 0) then
- playAnimation("fall", fallTransitionTime, Humanoid)
- end
- pose = "FreeFall"
- end
- function onFallingDown()
- pose = "FallingDown"
- end
- function onSeated()
- pose = "Seated"
- end
- function onPlatformStanding()
- pose = "PlatformStanding"
- end
- function onSwimming(speed)
- if speed>0 then
- pose = "Running"
- else
- pose = "Standing"
- end
- end
- function getTool()
- for _, kid in ipairs(Figure:GetChildren()) do
- if kid.className == "Tool" then return kid end
- end
- return nil
- end
- function getToolAnim(tool)
- for _, c in ipairs(tool:GetChildren()) do
- if c.Name == "toolanim" and c.className == "StringValue" then
- return c
- end
- end
- return nil
- end
- function animateTool()
- if (toolAnim == "None") then
- playToolAnimation("toolnone", toolTransitionTime, Humanoid)
- return
- end
- if (toolAnim == "Slash") then
- playToolAnimation("toolslash", 0, Humanoid)
- return
- end
- if (toolAnim == "Lunge") then
- playToolAnimation("toollunge", 0, Humanoid)
- return
- end
- end
- function moveSit()
- RightShoulder.MaxVelocity = 0.15
- LeftShoulder.MaxVelocity = 0.15
- RightShoulder:SetDesiredAngle(3.14 /2)
- LeftShoulder:SetDesiredAngle(-3.14 /2)
- RightHip:SetDesiredAngle(3.14 /2)
- LeftHip:SetDesiredAngle(-3.14 /2)
- end
- local lastTick = 0
- function move(time)
- local amplitude = 1
- local frequency = 1
- local deltaTime = time - lastTick
- lastTick = time
- local climbFudge = 0
- local setAngles = false
- if (jumpAnimTime > 0) then
- jumpAnimTime = jumpAnimTime - deltaTime
- end
- if (pose == "FreeFall" and jumpAnimTime <= 0) then
- playAnimation("fall", fallTransitionTime, Humanoid)
- elseif (pose == "Seated") then
- playAnimation("sit", 0.5, Humanoid)
- return
- elseif (pose == "Running") then
- if Figure and Humanoid and Humanoid.WalkSpeed<17 then
- playAnimation("walk", 0.1, Humanoid);
- elseif Figure and Humanoid and Humanoid.WalkSpeed>17 then
- playAnimation("run", 0.1, Humanoid);
- end;
- elseif (pose == "Dead" or pose == "GettingUp" or pose == "FallingDown" or pose == "Seated" or pose == "PlatformStanding") then
- stopAllAnimations()
- amplitude = 0.1
- frequency = 1
- setAngles = true
- end
- if (setAngles) then
- local desiredAngle = amplitude * math.sin(time * frequency)
- RightShoulder:SetDesiredAngle(desiredAngle + climbFudge)
- LeftShoulder:SetDesiredAngle(desiredAngle - climbFudge)
- RightHip:SetDesiredAngle(-desiredAngle)
- LeftHip:SetDesiredAngle(-desiredAngle)
- end
- -- Tool Animation handling
- local tool = getTool()
- if tool and tool:FindFirstChild("Handle") then
- local animStringValueObject = getToolAnim(tool)
- if animStringValueObject then
- toolAnim = animStringValueObject.Value
- -- message recieved, delete StringValue
- animStringValueObject.Parent = nil
- toolAnimTime = time + .3
- end
- if time > toolAnimTime then
- toolAnimTime = 0
- toolAnim = "None"
- end
- animateTool()
- else
- stopToolAnimations()
- toolAnim = "None"
- toolAnimInstance = nil
- toolAnimTime = 0
- end
- end
- -- connect events
- Humanoid.Died:connect(onDied)
- Humanoid.Running:connect(onRunning)
- Humanoid.Jumping:connect(onJumping)
- Humanoid.Climbing:connect(onClimbing)
- Humanoid.GettingUp:connect(onGettingUp)
- Humanoid.FreeFalling:connect(onFreeFall)
- Humanoid.FallingDown:connect(onFallingDown)
- Humanoid.Seated:connect(onSeated)
- Humanoid.PlatformStanding:connect(onPlatformStanding)
- Humanoid.Swimming:connect(onSwimming)
- local runService = game:GetService("RunService");
- playAnimation("idle", 0.1, Humanoid)
- pose = "Standing"
- while Wait(0)do
- local _,time=wait(0)
- move(time)
- end
- end,o64)
- end))
- o65.Name = "climb"
- o65.Parent = o64
- o66.Name = "ClimbAnim"
- o66.Parent = o65
- o66.AnimationId = "http://www.roblox.com/asset/?id=180436334"
- o67.Name = "fall"
- o67.Parent = o64
- o68.Name = "FallAnim"
- o68.Parent = o67
- o68.AnimationId = "http://www.roblox.com/asset/?id=180436148"
- o69.Name = "idle"
- o69.Parent = o64
- o70.Name = "Animation1"
- o70.Parent = o69
- o70.AnimationId = "http://www.roblox.com/asset/?id=180435571"
- o71.Name = "Weight"
- o71.Parent = o70
- o71.Value = 9
- o72.Name = "Animation2"
- o72.Parent = o69
- o72.AnimationId = "http://www.roblox.com/asset/?id=180435792"
- o73.Name = "Weight"
- o73.Parent = o72
- o73.Value = 1
- o74.Name = "jump"
- o74.Parent = o64
- o75.Name = "JumpAnim"
- o75.Parent = o74
- o75.AnimationId = "http://www.roblox.com/asset/?id=125750702"
- o76.Name = "run"
- o76.Parent = o64
- o77.Name = "RunAnim"
- o77.Parent = o76
- o77.AnimationId = "http://www.roblox.com/asset/?id=252557606"
- o78.Name = "sit"
- o78.Parent = o64
- o79.Name = "SitAnim"
- o79.Parent = o78
- o79.AnimationId = "http://www.roblox.com/asset/?id=178130996"
- o80.Name = "toolnone"
- o80.Parent = o64
- o81.Name = "ToolNoneAnim"
- o81.Parent = o80
- o81.AnimationId = "http://www.roblox.com/asset/?id=182393478"
- o82.Name = "walk"
- o82.Parent = o64
- o83.Name = "WalkAnim"
- o83.Parent = o82
- o83.AnimationId = "http://www.roblox.com/asset/?id=180426354"
- o84.Name = "Health"
- o84.Parent = o1
- table.insert(cors,coroutine.create(function()
- wait()
- runDummyScript(function()
- --Responsible for regening a player's humanoid's health
- -- declarations
- local Figure = script.Parent
- local Head = Figure:WaitForChild("Head")
- local Humanoid;
- for _,Child in pairs(Figure:GetChildren())do
- if Child and Child.ClassName=="Humanoid"then
- Humanoid=Child;
- end;
- end;
- local regening = false
- -- regeneration
- function regenHealth()
- if regening then return end
- regening = true
- while Humanoid.Health < Humanoid.MaxHealth do
- local s = wait(1)
- local health = Humanoid.Health
- if health~=0 and health < Humanoid.MaxHealth then
- local newHealthDelta = 0.01 * s * Humanoid.MaxHealth
- health = health + newHealthDelta
- Humanoid.Health = math.min(health,Humanoid.MaxHealth)
- end
- end
- if Humanoid.Health > Humanoid.MaxHealth then
- Humanoid.Health = Humanoid.MaxHealth
- end
- regening = false
- end
- Humanoid.HealthChanged:connect(regenHealth)
- end,o84)
- end))
- o85.Name = "PsstGuyMain"
- o85.Parent = o1
- table.insert(cors,coroutine.create(function()
- wait()
- runDummyScript(function()
- --[[ By: Brutez. ]]--
- local PsstGuyScript=script;
- repeat Wait(0);until PsstGuyScript and PsstGuyScript.Parent and PsstGuyScript.Parent.ClassName=="Model"and PsstGuyScript.Parent:FindFirstChild("Head")and PsstGuyScript.Parent:FindFirstChild("Torso");
- local PsstGuy=PsstGuyScript.Parent;
- function raycast(Spos,vec,currentdist)
- local hit2,pos2=game.Workspace:FindPartOnRay(Ray.new(Spos+(vec*.05),vec*currentdist),PsstGuy);
- 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;
- local PsstGuyHumanoid;
- for _,Child in pairs(PsstGuy:GetChildren())do
- if Child and Child.ClassName=="Humanoid"and Child.Health~=0 then
- PsstGuyHumanoid=Child;
- end;
- end;
- local FindPartOnRay = Game:GetService("Workspace").FindPartOnRay;
- function IsAbleToSee(Parent,Target)
- if Parent and Parent:FindFirstChild("Torso")and Target and Target:FindFirstChild("Torso")then
- if (Parent:FindFirstChild("Torso").Position-Target:FindFirstChild("Torso").Position):Dot(Target:FindFirstChild("Torso").CFrame.lookVector)>0 then
- if Parent and Parent:FindFirstChild("Torso")and Target and Target:FindFirstChild("Torso")then
- local TheRay = Ray.new(Target:FindFirstChild("Torso").Position,(Parent:FindFirstChild("Torso").Position-Target:FindFirstChild("Torso").Position).unit*200)
- local ThePartOnTheRay = FindPartOnRay(Game:GetService("Workspace"),TheRay,Target,false)
- return not ThePartOnTheRay or ThePartOnTheRay:IsDescendantOf(Parent)
- end;
- end;
- return false;
- end;
- end;
- function IsAbleToSee2(Parent,Target)
- if Parent and Parent:FindFirstChild("Torso")and Target and Target:FindFirstChild("Torso")then
- local TheRay = Ray.new(Target:FindFirstChild("Torso").Position,(Parent:FindFirstChild("Torso").Position-Target:FindFirstChild("Torso").Position).unit*200)
- local ThePartOnTheRay = FindPartOnRay(Game:GetService("Workspace"),TheRay,Target,false)
- return not ThePartOnTheRay or ThePartOnTheRay:IsDescendantOf(Parent)
- end;
- return false;
- end;
- local AttackDebounce=false;
- local PsstGuyHead=PsstGuy:FindFirstChild("Head");
- local PsstGuyHumanoidRootPart=PsstGuy:FindFirstChild("HumanoidRootPart");
- local PsstDebounce=false;
- local DynamicWander=true;
- local OriginalC0;
- if PsstGuyScript and PsstGuy and PsstGuy:FindFirstChild("Torso")and PsstGuy:FindFirstChild("Torso"):FindFirstChild("Neck")then
- PsstGuy:FindFirstChild("Torso"):FindFirstChild("Neck").C0=CFrame.new(0,1,0,-1,0,0,0,0,1,0,1,-0);
- OriginalC0=PsstGuy:FindFirstChild("Torso"):FindFirstChild("Neck").C0;
- end;
- local SwingAnimation=PsstGuyHumanoid:LoadAnimation(PsstGuyScript:FindFirstChild("Swing"));
- function FindNearestBae()
- local NoticeDistance=100;
- local TargetMain;
- for _,TargetModel in pairs(Game:GetService("Workspace"):GetChildren())do
- if PsstGuyScript and PsstGuy and PsstGuyHumanoid and PsstGuyHumanoid.Health~=0 and TargetModel.className=="Model"and TargetModel~=PsstGuy and TargetModel.Name~=PsstGuy.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-PsstGuyHumanoidRootPart.Position).magnitude<NoticeDistance then
- TargetMain=TargetPart;
- NoticeDistance=(TargetPart.Position-PsstGuyHumanoidRootPart.Position).magnitude;
- end;
- end;
- end;
- return TargetMain;
- end;
- while Wait(0)do
- if PsstGuyScript and PsstGuy and PsstGuy:FindFirstChild("Night1")and not PsstGuy:FindFirstChild("Night1").IsPlaying then
- PsstGuy:FindFirstChild("Night1"):Play();
- end;
- local IsBeingLookedAt=false;
- local TargetPoint=PsstGuyHumanoid.TargetPoint;
- local Blockage,BlockagePos=RayCast((PsstGuyHumanoidRootPart.CFrame+CFrame.new(PsstGuyHumanoidRootPart.Position,Vector3.new(TargetPoint.X,PsstGuyHumanoidRootPart.Position.Y,TargetPoint.Z)).lookVector*(PsstGuyHumanoidRootPart.Size.Z/2)).p,PsstGuyHumanoidRootPart.CFrame.lookVector,(PsstGuyHumanoidRootPart.Size.Z*2.5),{PsstGuy,PsstGuy})
- local Jumpable=false;
- local MainTarget=FindNearestBae();
- local BlockageHumanoid;
- if Blockage then
- if Blockage and Blockage.Parent and Blockage.Parent:IsA("Model")then
- for _,Child in pairs(Blockage.Parent:GetChildren())do
- if Child and Child:IsA("Humanoid")and Child.Health~=0 then
- BlockageHumanoid=Child;
- end;
- end;
- end;
- Jumpable=true;
- 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 or MainTarget and Blockage:IsDescendantOf(MainTarget.Parent)or BlockageHumanoid~=nil then
- Jumpable=false;
- end;
- elseif Blockage.ClassName=="TrussPart"or Blockage.ClassName=="WedgePart"or Blockage.Name=="Handle"and Blockage.Parent:IsA("Hat")or Blockage.Name=="Handle"and Blockage.Parent:IsA("Tool")or MainTarget and Blockage:IsDescendantOf(MainTarget.Parent)or BlockageHumanoid~=nil then
- Jumpable=false;
- end;
- end;
- if PsstGuyScript and PsstGuy and PsstGuyHumanoid and PsstGuyHumanoid.Health~=0 and not PsstGuyHumanoid.Sit and Jumpable then
- PsstGuyHumanoid.Jump=true;
- end;
- if PsstGuyScript and PsstGuy and PsstGuyHead and PsstGuyHumanoidRootPart and PsstGuyHead:FindFirstChild("Runner")and(PsstGuyHumanoidRootPart.Velocity-Vector3.new(0,PsstGuyHumanoidRootPart.Velocity.y,0)).magnitude>=5 and PsstGuyHumanoid and PsstGuyHumanoid.Health~=0 then
- local FiredRay=Ray.new(PsstGuyHumanoidRootPart.Position,Vector3.new(0,-4,0));
- local RayTarget,endPoint=Game:GetService("Workspace"):FindPartOnRay(FiredRay,PsstGuy);
- if RayTarget then
- if PsstGuyScript and PsstGuy and PsstGuyHead and PsstGuyHead:FindFirstChild("Runner")and PsstGuyHumanoid and PsstGuyHumanoid.WalkSpeed<29 then
- PsstGuy:FindFirstChild("Head"):FindFirstChild("Runner").Pitch=0.8;
- if PsstGuyScript and PsstGuy and PsstGuyHead and PsstGuyHead:FindFirstChild("Runner")and not PsstGuyHead:FindFirstChild("Runner").IsPlaying then
- PsstGuy:FindFirstChild("Head"):FindFirstChild("Runner"):Play();
- end;
- elseif PsstGuyScript and PsstGuy and PsstGuyHead and PsstGuyHead:FindFirstChild("Runner")and PsstGuyHumanoid and PsstGuyHumanoid.WalkSpeed>29 then
- PsstGuy:FindFirstChild("Head"):FindFirstChild("Runner").Pitch=1;
- if PsstGuyScript and PsstGuy and PsstGuyHead and PsstGuyHead:FindFirstChild("Runner")and not PsstGuyHead:FindFirstChild("Runner").IsPlaying then
- PsstGuy:FindFirstChild("Head"):FindFirstChild("Runner"):Play();
- end;
- end;
- end;
- elseif PsstGuyScript and PsstGuy and PsstGuyHead and PsstGuyHumanoidRootPart and PsstGuyHead:FindFirstChild("Runner")and(PsstGuyHumanoidRootPart.Velocity-Vector3.new(0,PsstGuyHumanoidRootPart.Velocity.y,0)).magnitude<=5 and PsstGuyHumanoid and PsstGuyHumanoid.Health~=0 then
- PsstGuy:FindFirstChild("Head"):FindFirstChild("Runner").Pitch=0.8;
- if PsstGuyScript and PsstGuy and PsstGuyHead and PsstGuyHead:FindFirstChild("Runner")and PsstGuyHead:FindFirstChild("Runner").IsPlaying then
- PsstGuy:FindFirstChild("Head"):FindFirstChild("Runner"):Stop();
- 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 PsstGuyScript and PsstGuy and PsstGuyHumanoid and PsstGuyHumanoid.Health~=0 and MainTarget and MainTarget.Parent and FoundHumanoid and FoundHumanoid.Jump then
- PsstGuyHumanoid.Jump=true;
- end;
- if MainTarget then
- if PsstGuyScript and PsstGuy and PsstGuyHumanoid and PsstGuyHumanoid.Health~=0 then
- if MainTarget and FoundHumanoid and FoundHumanoid.Health~=0 and(MainTarget.Position-PsstGuyHumanoidRootPart.Position).magnitude>7 then
- PsstGuyHumanoid.WalkSpeed=30;
- PsstDebounce=false;
- elseif MainTarget and FoundHumanoid and FoundHumanoid.Health~=0 and(MainTarget.Position-PsstGuyHumanoidRootPart.Position).magnitude<7 then
- if not PsstDebounce and PsstGuyScript and PsstGuy and PsstGuyHead and PsstGuyHead:FindFirstChild("Psst")then
- PsstGuyHead:FindFirstChild("Psst").Pitch=0.9+math.random()*0.2;
- PsstGuyHead:FindFirstChild("Psst"):Play();
- PsstDebounce=true;
- end;
- PsstGuyHumanoid.WalkSpeed=0.004;
- end;
- PsstGuyHumanoid:MoveTo(MainTarget.Position+(MainTarget.Position-PsstGuyHumanoidRootPart.Position).unit*2,Game:GetService("Workspace"):FindFirstChild("Terrain"));
- end;
- if PsstGuyScript and PsstGuy and PsstGuy:FindFirstChild("Torso")and PsstGuy:FindFirstChild("Torso"):FindFirstChild("Neck")then
- local NeckRotation=(PsstGuy:FindFirstChild("Torso").Position.Y-MainTarget.Parent:FindFirstChild("Head").Position.Y)/10;
- if NeckRotation>-1.5 and NeckRotation<1.5 then
- if PsstGuyScript and PsstGuy and PsstGuy:FindFirstChild("Torso")and PsstGuy:FindFirstChild("Torso"):FindFirstChild("Neck")then
- PsstGuy:FindFirstChild("Torso"):FindFirstChild("Neck").C0=OriginalC0*CFrame.fromEulerAnglesXYZ(NeckRotation,0,0);
- end;
- end;
- if NeckRotation<-1.5 then
- PsstGuy: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
- if PsstGuyScript and PsstGuy and PsstGuy:FindFirstChild("Torso")and PsstGuy:FindFirstChild("Torso"):FindFirstChild("Neck")then
- PsstGuy:FindFirstChild("Torso"):FindFirstChild("Neck").C0=CFrame.new(0,1,0,-1,0,0,0,0.996671617,0.081521146,0,0.081521146,-0.996671617);
- end;
- end;
- end;
- if PsstDebounce and(PsstGuy:FindFirstChild("Torso").CFrame.p-MainTarget.CFrame.p).magnitude<200 and IsAbleToSee(PsstGuy,MainTarget.Parent)then
- IsBeingLookedAt=true;
- if MainTarget.Parent and MainTarget and FoundHumanoid and FoundHumanoid.Health~=0 and IsBeingLookedAt and IsAbleToSee2(PsstGuy,MainTarget.Parent)then
- if(PsstGuy:FindFirstChild("Torso").CFrame.p-MainTarget.CFrame.p).magnitude then
- SwingAnimation:Play();
- FoundHumanoid:TakeDamage(10);
- end;
- end;
- end;
- else
- if PsstGuyScript and PsstGuy and PsstGuyHumanoid and PsstGuyHumanoid.Health~=0 and PsstGuyHead and PsstGuyHead:FindFirstChild("Runner")then
- PsstGuyHumanoid.WalkSpeed=16;
- PsstGuyHead:FindFirstChild("Runner").Pitch=0.8;
- end;
- if PsstGuyScript and PsstGuy and PsstGuy:FindFirstChild("Torso")and PsstGuy:FindFirstChild("Torso"):FindFirstChild("Neck")then
- PsstGuy:FindFirstChild("Torso"):FindFirstChild("Neck").C0=CFrame.new(0,1,0,-1,0,0,0,0,1,0,1,-0);
- end;
- local SwitchWander=math.random(1,2000);
- if SwitchWander==1 and not DynamicWander then
- DynamicWander=true;
- elseif SwitchWander==1 and DynamicWander then
- DynamicWander=false;
- end;
- local WalkChance=math.random(1,40);
- local JumpChance=math.random(1,70);
- if WalkChance==1 and PsstGuyScript and PsstGuy and PsstGuy:FindFirstChild("Torso")and PsstGuy:FindFirstChild("Head")and PsstGuyHumanoid and PsstGuyHumanoid.Health>0.001 and not DynamicWander then
- PsstGuyHumanoid:MoveTo(Game:GetService("Workspace"):FindFirstChild("Terrain").Position+Vector3.new(math.random(-2048,2048),0,math.random(-2048,2048)),Game:GetService("Workspace"):FindFirstChild("Terrain"));
- elseif PsstGuyScript and PsstGuy and PsstGuy:FindFirstChild("Torso")and PsstGuy:FindFirstChild("Head")and PsstGuyHumanoid and PsstGuyHumanoid.Health>0.001 and DynamicWander then
- local WanderAngle=(math.random()-0.5)*1;
- local RotatingLookVector=CFrame.Angles(0,WanderAngle,0)*script.Parent.Torso.CFrame.lookVector;
- PsstGuyHumanoid:MoveTo(PsstGuy:FindFirstChild("Torso").Position+6*RotatingLookVector,PsstGuy:FindFirstChild("Torso"));
- end;
- if JumpChance==1 and PsstGuyScript and PsstGuy and PsstGuy:FindFirstChild("Torso")and PsstGuy:FindFirstChild("Head")and PsstGuyHumanoid and PsstGuyHumanoid.Health>0.001 then
- PsstGuyHumanoid.Jump=true;
- end;
- end;
- if PsstGuyScript and PsstGuy and PsstGuyHumanoid then
- PsstGuyHumanoid.DisplayDistanceType="None";
- PsstGuyHumanoid.HealthDisplayDistance=0;
- PsstGuyHumanoid.Name="Shadow";
- PsstGuyHumanoid.NameDisplayDistance=0;
- PsstGuyHumanoid.NameOcclusion="EnemyOcclusion";
- PsstGuyHumanoid.AutoJumpEnabled=true;
- PsstGuyHumanoid.AutoRotate=true;
- PsstGuyHumanoid.MaxHealth=5000;
- PsstGuyHumanoid.JumpPower=60;
- PsstGuyHumanoid.MaxSlopeAngle=89.9;
- end;
- if PsstGuyScript and PsstGuy and PsstGuyHumanoid and not PsstGuyHumanoid.AutoJumpEnabled then
- PsstGuyHumanoid.AutoJumpEnabled=true;
- end;
- if PsstGuyScript and PsstGuy and PsstGuyHumanoid and not PsstGuyHumanoid.AutoRotate then
- PsstGuyHumanoid.AutoRotate=true;
- end;
- if PsstGuyScript and PsstGuy and PsstGuyHumanoid and PsstGuyHumanoid.PlatformStand then
- PsstGuyHumanoid.PlatformStand=false;
- end;
- if PsstGuyScript and PsstGuy and PsstGuyHumanoid and PsstGuyHumanoid.Sit then
- PsstGuyHumanoid.Sit=false;
- end;
- end;
- --[[ By: Brutez. ]]--
- end,o85)
- end))
- o86.Name = "Swing"
- o86.Parent = o85
- o86.AnimationId = "rbxassetid://191123156"
- o87.Name = "Respawn"
- o87.Parent = o1
- table.insert(cors,coroutine.create(function()
- wait()
- runDummyScript(function()
- --[[ By: Brutez, 2/28/2015, 1:34 AM, (UTC-08:00) Pacific Time (US & Canada) ]]--
- local PlayerSpawning=false; --[[ Change this to true if you want the NPC to spawn like a player, and change this to false if you want the NPC to spawn at it's current position. ]]--
- local AdvancedRespawnScript=script;
- repeat Wait(0)until script and script.Parent and script.Parent.ClassName=="Model";
- local PsstGuy=AdvancedRespawnScript.Parent;
- if AdvancedRespawnScript and PsstGuy and PsstGuy:FindFirstChild("Thumbnail")then
- PsstGuy:FindFirstChild("Thumbnail"):Destroy();
- end;
- local GameDerbis=Game:GetService("Debris");
- local PsstGuyHumanoid;
- for _,Child in pairs(PsstGuy:GetChildren())do
- if Child and Child.ClassName=="Humanoid"and Child.Health~=0 then
- PsstGuyHumanoid=Child;
- end;
- end;
- local Respawndant=PsstGuy:Clone();
- if PlayerSpawning then --[[ LOOK AT LINE: 2. ]]--
- coroutine.resume(coroutine.create(function()
- if PsstGuy and PsstGuyHumanoid and PsstGuyHumanoid:FindFirstChild("Status")and not PsstGuyHumanoid:FindFirstChild("Status"):FindFirstChild("AvalibleSpawns")then
- SpawnModel=Instance.new("Model");
- SpawnModel.Parent=PsstGuyHumanoid.Status;
- SpawnModel.Name="AvalibleSpawns";
- else
- SpawnModel=PsstGuyHumanoid: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=PsstGuy;
- RespawningForceField.Name="SpawnForceField";
- GameDerbis:AddItem(RespawningForceField,SpawnItself.Name);
- PsstGuy:MoveTo(SpawnItself.Value+Vector3.new(0,3.5,0));
- else
- if PsstGuy:FindFirstChild("SpawnForceField")then
- PsstGuy:FindFirstChild("SpawnForceField"):Destroy();
- end;
- PsstGuy:MoveTo(Vector3.new(0,115,0));
- end;
- end));
- end;
- function Respawn()
- Wait(5);
- Respawndant.Parent=PsstGuy.Parent;
- Respawndant:makeJoints();
- Respawndant:FindFirstChild("Head"):MakeJoints();
- Respawndant:FindFirstChild("Torso"):MakeJoints();
- PsstGuy:remove();
- end;
- if AdvancedRespawnScript and PsstGuy and PsstGuyHumanoid then
- PsstGuyHumanoid.Died:connect(Respawn);
- end;
- --[[ By: Brutez, 2/28/2015, 1:34 AM, (UTC-08:00) Pacific Time (US & Canada) ]]--
- end,o87)
- end))
- mas.Parent = workspace
- mas:MakeJoints()
- local mas1 = mas:GetChildren()
- for i=1,#mas1 do
- mas1[i].Parent = script
- ypcall(function() mas1[i]:MakeJoints() end)
- end
- mas:Destroy()
- for i=1,#cors do
- coroutine.resume(cors[i])
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement