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: Attachment,MeshPart,Camera,Animator
- local runDummyScript = function(f,scri)
- local oldenv = getfenv(f)
- local newenv = setmetatable({}, {
- __index = function(_, k)
- if k:lower() == 'script' then
- return scri
- else
- return oldenv[k]
- end
- end
- })
- setfenv(f, newenv)
- ypcall(function() f() end)
- end
- cors = {}
- mas = Instance.new("Model",game:GetService("Lighting"))
- mas.Name = "CompiledModel"
- o1 = Instance.new("Model")
- o2 = Instance.new("Part")
- o3 = Instance.new("Decal")
- o4 = Instance.new("Motor6D")
- o5 = Instance.new("Motor6D")
- o6 = Instance.new("Motor6D")
- o7 = Instance.new("Motor6D")
- o8 = Instance.new("Motor6D")
- o18 = Instance.new("Part")
- o19 = Instance.new("Motor6D")
- o20 = Instance.new("Part")
- o22 = Instance.new("Part")
- o23 = Instance.new("SpecialMesh")
- o24 = Instance.new("Decal")
- o25 = Instance.new("ManualWeld")
- o26 = Instance.new("Sound")
- o27 = Instance.new("ParticleEmitter")
- o28 = Instance.new("ParticleEmitter")
- o34 = Instance.new("Part")
- o36 = Instance.new("Part")
- o37 = Instance.new("Part")
- o38 = Instance.new("Humanoid")
- o39 = Instance.new("Model")
- o40 = Instance.new("Model")
- o42 = Instance.new("Script")
- o43 = Instance.new("BodyColors")
- o44 = Instance.new("Pants")
- o45 = Instance.new("Script")
- o46 = Instance.new("LocalScript")
- o47 = Instance.new("Script")
- o48 = Instance.new("Decal")
- o49 = Instance.new("CharacterMesh")
- o50 = Instance.new("CharacterMesh")
- o51 = Instance.new("CharacterMesh")
- o52 = Instance.new("CharacterMesh")
- o53 = Instance.new("CharacterMesh")
- o54 = Instance.new("Script")
- o55 = Instance.new("Script")
- o56 = Instance.new("StringValue")
- o57 = Instance.new("Animation")
- o58 = Instance.new("StringValue")
- o59 = Instance.new("Animation")
- o60 = Instance.new("StringValue")
- o61 = Instance.new("Animation")
- o62 = Instance.new("NumberValue")
- o63 = Instance.new("Animation")
- o64 = Instance.new("NumberValue")
- 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("StringValue")
- o72 = Instance.new("Animation")
- o73 = Instance.new("StringValue")
- o74 = Instance.new("Animation")
- o75 = Instance.new("Script")
- o1.Name = "Laina"
- o1.Parent = mas
- o1.PrimaryPart = o22
- o2.Name = "Torso"
- o2.Parent = o1
- o2.Material = Enum.Material.SmoothPlastic
- o2.BrickColor = BrickColor.new("Dark green")
- o2.Position = Vector3.new(-85.4500046, 5.16122007, 90.7099991)
- o2.CanCollide = false
- o2.Locked = true
- o2.Elasticity = 0
- o2.FormFactor = Enum.FormFactor.Symmetric
- o2.Friction = 2
- o2.Size = Vector3.new(2, 2, 1)
- o2.CFrame = CFrame.new(-85.4500046, 5.16122007, 90.7099991, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- o2.BackSurface = Enum.SurfaceType.SmoothNoOutlines
- o2.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
- o2.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
- o2.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
- o2.RightSurface = Enum.SurfaceType.SmoothNoOutlines
- o2.TopSurface = Enum.SurfaceType.SmoothNoOutlines
- o2.Color = Color3.new(0.156863, 0.498039, 0.278431)
- o2.Position = Vector3.new(-85.4500046, 5.16122007, 90.7099991)
- o3.Name = "roblox"
- o3.Parent = o2
- o4.Name = "Right Shoulder"
- o4.Parent = o2
- o4.C0 = CFrame.new(1, 0.5, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
- o4.C1 = CFrame.new(-0.5, 0.5, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
- o4.Part0 = o2
- o4.Part1 = o34
- o4.MaxVelocity = 0.10000000149012
- o5.Name = "Left Shoulder"
- o5.Parent = o2
- o5.C0 = CFrame.new(-1, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
- o5.C1 = CFrame.new(0.5, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
- o5.Part0 = o2
- o5.Part1 = o20
- o5.MaxVelocity = 0.10000000149012
- o6.Name = "Right Hip"
- o6.Parent = o2
- o6.C0 = CFrame.new(1, -1, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
- o6.C1 = CFrame.new(0.5, 1, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
- o6.Part0 = o2
- o6.Part1 = o36
- o6.MaxVelocity = 0.10000000149012
- o7.Name = "Left Hip"
- o7.Parent = o2
- o7.C0 = CFrame.new(-1, -1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
- o7.C1 = CFrame.new(-0.5, 1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
- o7.Part0 = o2
- o7.Part1 = o37
- o7.MaxVelocity = 0.10000000149012
- o8.Name = "Neck"
- o8.Parent = o2
- o8.C0 = CFrame.new(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
- o8.C1 = CFrame.new(0, -0.5, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
- o8.Part0 = o2
- o8.Part1 = o22
- o8.MaxVelocity = 0.10000000149012
- o18.Name = "HumanoidRootPart"
- o18.Parent = o1
- o18.Material = Enum.Material.SmoothPlastic
- o18.Transparency = 1
- o18.Position = Vector3.new(-85.4500046, 5.16122007, 90.7099991)
- o18.CanCollide = false
- o18.Locked = true
- o18.Elasticity = 0
- o18.FormFactor = Enum.FormFactor.Symmetric
- o18.Friction = 2
- o18.Size = Vector3.new(2, 2, 1)
- o18.CFrame = CFrame.new(-85.4500046, 5.16122007, 90.7099991, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- o18.BackSurface = Enum.SurfaceType.SmoothNoOutlines
- o18.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
- o18.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
- o18.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
- o18.RightSurface = Enum.SurfaceType.SmoothNoOutlines
- o18.TopSurface = Enum.SurfaceType.SmoothNoOutlines
- o18.Position = Vector3.new(-85.4500046, 5.16122007, 90.7099991)
- o19.Name = "RootJoint"
- o19.Parent = o18
- o19.C0 = CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
- o19.C1 = CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
- o19.Part0 = o18
- o19.Part1 = o2
- o19.MaxVelocity = 0.10000000149012
- o20.Name = "Left Arm"
- o20.Parent = o1
- o20.Material = Enum.Material.SmoothPlastic
- o20.BrickColor = BrickColor.new("Cool yellow")
- o20.Position = Vector3.new(-86.9500046, 5.16122007, 90.7099991)
- 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(-86.9500046, 5.16122007, 90.7099991, 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.992157, 0.917647, 0.552941)
- o20.Position = Vector3.new(-86.9500046, 5.16122007, 90.7099991)
- o22.Name = "Head"
- o22.Parent = o1
- o22.Material = Enum.Material.SmoothPlastic
- o22.BrickColor = BrickColor.new("Cool yellow")
- o22.Position = Vector3.new(-85.4500046, 6.66122007, 90.7099991)
- o22.CanCollide = false
- o22.Locked = true
- o22.Elasticity = 0
- o22.FormFactor = Enum.FormFactor.Symmetric
- o22.Friction = 2
- o22.Size = Vector3.new(2, 1, 1)
- o22.CFrame = CFrame.new(-85.4500046, 6.66122007, 90.7099991, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- o22.BackSurface = Enum.SurfaceType.SmoothNoOutlines
- o22.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
- o22.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
- o22.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
- o22.RightSurface = Enum.SurfaceType.SmoothNoOutlines
- o22.TopSurface = Enum.SurfaceType.SmoothNoOutlines
- o22.Color = Color3.new(0.992157, 0.917647, 0.552941)
- o22.Position = Vector3.new(-85.4500046, 6.66122007, 90.7099991)
- o23.Name = "3.0 Female Head Mesh"
- o23.Parent = o22
- o23.MeshId = "rbxassetid://82992952"
- o23.Scale = Vector3.new(1.25, 1.25, 1.25)
- o23.MeshType = Enum.MeshType.FileMesh
- o24.Name = "face"
- o24.Parent = o22
- o24.Texture = "rbxassetid://912935344"
- o25.Name = "HairWeld"
- o25.Parent = o22
- o25.C1 = CFrame.new(-0.0288670063, 0.110000014, 0.00816631317, 0.962253213, 0, 0.27215606, 0, 1, 0, -0.27215606, 0, 0.962253213)
- o25.Part0 = o22
- o25.Part1 = mas
- o26.Name = "PlasticCreak"
- o26.Parent = o22
- o26.SoundId = "rbxassetid://913163726"
- o26.Volume = 1
- o26.Looped = true
- o27.Name = "BrokenHearts"
- o27.Parent = o22
- o27.Size = NumberSequence.new(0,0.30000001192093,1,0.30000001192093,0.30000001192093,1,0.30000001192093,0.30000001192093,0.5,0.061728358268738,0.12345671653748,0.37037014961243,0.18518507480621,0.30000001192093,0)
- o27.Color = ColorSequence.new(Color3.new(1, 0, 0),Color3.new(0, 0, 0))
- o27.Enabled = false
- o27.Texture = "rbxassetid://912982766"
- o27.Acceleration = Vector3.new(0, -10, 0)
- o27.Lifetime = NumberRange.new(1.5,1.5)
- o27.Rate = 10
- o27.RotSpeed = NumberRange.new(-100,100)
- o27.VelocitySpread = -99999
- o28.Name = "Hearts"
- o28.Parent = o22
- o28.Size = NumberSequence.new(0,0.30000001192093,1,0.30000001192093,0.30000001192093,1,0.30000001192093,0.30000001192093,0.5,0.061728358268738,0.12345671653748,0.37037014961243,0.18518507480621,0.30000001192093,0)
- o28.Color = ColorSequence.new(Color3.new(1, 1, 1),Color3.new(1, 0, 0))
- o28.Enabled = false
- o28.Texture = "rbxassetid://912982665"
- o28.Acceleration = Vector3.new(0, -2, 0)
- o28.Lifetime = NumberRange.new(2,2)
- o28.Rate = 10
- o28.RotSpeed = NumberRange.new(-100,100)
- o28.VelocitySpread = -99999
- o34.Name = "Right Arm"
- o34.Parent = o1
- o34.Material = Enum.Material.SmoothPlastic
- o34.BrickColor = BrickColor.new("Cool yellow")
- o34.Position = Vector3.new(-83.9500046, 5.16122007, 90.7099991)
- o34.CanCollide = false
- o34.Locked = true
- o34.Elasticity = 0
- o34.FormFactor = Enum.FormFactor.Symmetric
- o34.Friction = 2
- o34.Size = Vector3.new(1, 2, 1)
- o34.CFrame = CFrame.new(-83.9500046, 5.16122007, 90.7099991, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- o34.BackSurface = Enum.SurfaceType.SmoothNoOutlines
- o34.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
- o34.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
- o34.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
- o34.RightSurface = Enum.SurfaceType.SmoothNoOutlines
- o34.TopSurface = Enum.SurfaceType.SmoothNoOutlines
- o34.Color = Color3.new(0.992157, 0.917647, 0.552941)
- o34.Position = Vector3.new(-83.9500046, 5.16122007, 90.7099991)
- o36.Name = "Right Leg"
- o36.Parent = o1
- o36.Material = Enum.Material.SmoothPlastic
- o36.BrickColor = BrickColor.new("Bright blue")
- o36.Position = Vector3.new(-84.9500046, 3.16122007, 90.7099991)
- o36.CanCollide = false
- o36.Locked = true
- o36.Elasticity = 0
- o36.FormFactor = Enum.FormFactor.Symmetric
- o36.Friction = 2
- o36.Size = Vector3.new(1, 2, 1)
- o36.CFrame = CFrame.new(-84.9500046, 3.16122007, 90.7099991, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- o36.BackSurface = Enum.SurfaceType.SmoothNoOutlines
- o36.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
- o36.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
- o36.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
- o36.RightSurface = Enum.SurfaceType.SmoothNoOutlines
- o36.TopSurface = Enum.SurfaceType.SmoothNoOutlines
- o36.Color = Color3.new(0.0509804, 0.411765, 0.67451)
- o36.Position = Vector3.new(-84.9500046, 3.16122007, 90.7099991)
- o37.Name = "Left Leg"
- o37.Parent = o1
- o37.Material = Enum.Material.SmoothPlastic
- o37.BrickColor = BrickColor.new("Bright blue")
- o37.Position = Vector3.new(-85.9500046, 3.16122007, 90.7099991)
- o37.CanCollide = false
- o37.Locked = true
- o37.Elasticity = 0
- o37.FormFactor = Enum.FormFactor.Symmetric
- o37.Friction = 2
- o37.Size = Vector3.new(1, 2, 1)
- o37.CFrame = CFrame.new(-85.9500046, 3.16122007, 90.7099991, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- o37.BackSurface = Enum.SurfaceType.SmoothNoOutlines
- o37.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
- o37.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
- o37.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
- o37.RightSurface = Enum.SurfaceType.SmoothNoOutlines
- o37.TopSurface = Enum.SurfaceType.SmoothNoOutlines
- o37.Color = Color3.new(0.0509804, 0.411765, 0.67451)
- o37.Position = Vector3.new(-85.9500046, 3.16122007, 90.7099991)
- o38.Name = "SeductiveWoman"
- o38.Parent = o1
- o38.DisplayDistanceType = Enum.HumanoidDisplayDistanceType.None
- o38.HealthDisplayDistance = 0
- o38.NameDisplayDistance = 0
- o38.NameOcclusion = Enum.NameOcclusion.EnemyOcclusion
- o38.RightLeg = o36
- o38.LeftLeg = o37
- o38.Torso = o18
- o38.Health = inf
- o38.MaxHealth = inf
- o38.WalkSpeed = 18
- o39.Name = "Status"
- o39.Parent = o38
- o40.Name = "AvalibleSpawns"
- o40.Parent = o39
- o42.Name = "Respawn"
- o42.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 Laina=AdvancedRespawnScript.Parent;
- if AdvancedRespawnScript and Laina and Laina:FindFirstChild("Thumbnail")then
- Laina:FindFirstChild("Thumbnail"):Destroy();
- end;
- local GameDerbis=Game:GetService("Debris");
- local LainaHumanoid;
- for _,Child in pairs(Laina:GetChildren())do
- if Child and Child.ClassName=="Humanoid"and Child.Health~=0 then
- LainaHumanoid=Child;
- end;
- end;
- local Respawndant=Laina:Clone();
- if PlayerSpawning then --[[ LOOK AT LINE: 2. ]]--
- coroutine.resume(coroutine.create(function()
- if Laina and LainaHumanoid and LainaHumanoid:FindFirstChild("Status")and not LainaHumanoid:FindFirstChild("Status"):FindFirstChild("AvalibleSpawns")then
- SpawnModel=Instance.new("Model");
- SpawnModel.Parent=LainaHumanoid.Status;
- SpawnModel.Name="AvalibleSpawns";
- else
- SpawnModel=LainaHumanoid: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=Laina;
- RespawningForceField.Name="SpawnForceField";
- GameDerbis:AddItem(RespawningForceField,SpawnItself.Name);
- Laina:MoveTo(SpawnItself.Value+Vector3.new(0,3.5,0));
- else
- if Laina:FindFirstChild("SpawnForceField")then
- Laina:FindFirstChild("SpawnForceField"):Destroy();
- end;
- Laina:MoveTo(Vector3.new(0,115,0));
- end;
- end));
- end;
- function Respawn()
- Wait(5);
- Respawndant.Parent=Laina.Parent;
- Respawndant:makeJoints();
- Respawndant:FindFirstChild("Head"):MakeJoints();
- Respawndant:FindFirstChild("Torso"):MakeJoints();
- Laina:remove();
- end;
- if AdvancedRespawnScript and Laina and LainaHumanoid then
- LainaHumanoid.Died:connect(Respawn);
- end;
- --[[ By: Brutez, 2/28/2015, 1:34 AM, (UTC-08:00) Pacific Time (US & Canada) ]]--
- end,o42)
- end))
- o43.Parent = o1
- o43.HeadColor = BrickColor.new("Institutional white")
- o43.LeftArmColor = BrickColor.new("Institutional white")
- o43.LeftLegColor = BrickColor.new("Institutional white")
- o43.RightArmColor = BrickColor.new("Institutional white")
- o43.RightLegColor = BrickColor.new("Institutional white")
- o43.TorsoColor = BrickColor.new("Institutional white")
- o44.Name = "Dress"
- o44.Parent = o1
- o44.PantsTemplate = "rbxassetid://912935270"
- o45.Name = "LainaMain"
- o45.Parent = o1
- table.insert(cors,coroutine.create(function()
- wait()
- runDummyScript(function()
- --[[ By: Brutez. ]]--
- local LainaScript=script;
- repeat Wait(0)until script and script.Parent and script.Parent.ClassName=="Model"and script.Parent:FindFirstChild("Head")and script.Parent:FindFirstChild("Torso");
- local Laina=LainaScript.Parent;
- local LainaHumanoid;
- for _,Child in pairs(Laina:GetChildren())do
- if Child and Child:IsA("Humanoid")and Child.Health~=0 then
- LainaHumanoid=Child;
- end;
- end;
- local LeftLegC0,RightLegC0,LeftArmC0,RightArmC0,HeadC0,LeftLegC02,RightLegC02=CFrame.new(-1,-1,0,0,0,-1,0,1,0,1,0,0),CFrame.new(1,-1,0,0,0,1,0,1,-0,-1,0,0),CFrame.new(-1,0.5,0,0,0,-1,0,1,0,1,0,0),CFrame.new(1,0.5,0,0,0,1,0,1,-0,-1,0,0),CFrame.new(0,1,0,-1,0,0,0,0,1,0,1,-0),CFrame.new(-0.5,-1,0.5,0,0,-1,0,1,0,1,0,0),CFrame.new(0.5,-1,0.5,0,0,1,0,1,-0,-1,0,0);
- local LainaWeld;
- local LainaBodyGyro;
- RecreateThingies=function()
- LainaWeld=Instance.new("Weld");
- LainaWeld.Name="LainaWeld";
- LainaBodyGyro=Instance.new("BodyGyro");
- LainaBodyGyro.Name="LainaBodyGyro";
- LainaBodyGyro.cframe=CFrame.new(Vector3.new(0,0,0),Vector3.new(0,5000000,0));
- LainaBodyGyro.D=300;
- LainaBodyGyro.maxTorque=Vector3.new(99999e99999,99999e99999,0);
- LainaBodyGyro.P=7000;
- end;
- RecreateThingies();
- local IsOnTop=false;
- function RayCast(Position,Direction,MaxDistance,IgnoreList)
- return Game:GetService("Workspace"):FindPartOnRayWithIgnoreList(Ray.new(Position,Direction.unit * (MaxDistance or 999.8699)),IgnoreList)
- end;
- while Wait(0)do
- if LainaScript and Laina and Laina:FindFirstChild("Torso") and LainaHumanoid and LainaHumanoid.Health~=0 then
- local TargetPoint=LainaHumanoid.TargetPoint;
- local Blockage,BlockagePos=RayCast((Laina:FindFirstChild("Torso").CFrame+CFrame.new(Laina:FindFirstChild("Torso").Position,Vector3.new(TargetPoint.X,Laina:FindFirstChild("Torso").Position.Y,TargetPoint.Z)).lookVector*(Laina:FindFirstChild("Torso").Size.Z/2)).p,Laina:FindFirstChild("Torso").CFrame.lookVector,(Laina:FindFirstChild("Torso").Size.Z*2.5),{Laina,Laina})
- local Jumpable=false;
- if Blockage then
- Jumpable=true;
- if Blockage and Blockage.Parent and Blockage.Parent.ClassName~="Workspace"then
- local BlockageHumanoid;
- for _,Child in pairs(Blockage.Parent:GetChildren())do
- if Child and Child:IsA("Humanoid")and Child.Health~=0 then
- BlockageHumanoid=Child;
- end;
- end;
- if Blockage and Blockage:IsA("Terrain")then
- local CellPos=Blockage:WorldToCellPreferSolid((BlockagePos-Vector3.new(0,2,0)));
- local CellMaterial,CellShape,CellOrientation=Blockage:GetCell(CellPos.X,CellPos.Y,CellPos.Z);
- if CellMaterial==Enum.CellMaterial.Water then
- Jumpable=false;
- end;
- elseif BlockageHumanoid or Blockage.ClassName=="TrussPart"or Blockage.ClassName=="WedgePart"then
- Jumpable=false;
- end;
- end;
- if Jumpable and LainaScript and Laina and LainaHumanoid and LainaHumanoid.Health~=0 and not LainaHumanoid.Sit and not IsOnTop then
- LainaHumanoid.Jump=true;
- end;
- end;
- end;
- if Laina and LainaHumanoid and LainaHumanoid.Health==0 and Laina:FindFirstChild("Head") and Laina:FindFirstChild("Head"):FindFirstChild("face")and Laina:FindFirstChild("Head"):FindFirstChild("Hearts")and Laina:FindFirstChild("Head"):FindFirstChild("BrokenHearts")and Laina:FindFirstChild("Head"):FindFirstChild("PlasticCreak")then
- Laina:FindFirstChild("Head"):FindFirstChild("face").Texture="rbxassetid://912935337";
- Laina:FindFirstChild("Head"):FindFirstChild("Hearts").Enabled=false;
- Laina:FindFirstChild("Head"):FindFirstChild("BrokenHearts").Enabled=true;
- if LainaScript~=nil and Laina~=nil and Laina:FindFirstChild("Head")~=nil and Laina:FindFirstChild("Head"):FindFirstChild("PlasticCreak")~=nil and Laina:FindFirstChild("Head"):FindFirstChild("PlasticCreak").IsPlaying then
- Laina:FindFirstChild("Head"):FindFirstChild("PlasticCreak"):Stop();
- end;
- if LainaScript~=nil and Laina~=nil and Laina:FindFirstChild("Torso")~=nil and Laina:FindFirstChild("Torso"):FindFirstChild("Left Hip")~=nil and Laina:FindFirstChild("Torso"):FindFirstChild("Left Shoulder")~=nil and Laina:FindFirstChild("Torso"):FindFirstChild("Neck")~=nil and Laina:FindFirstChild("Torso"):FindFirstChild("Right Hip")~=nil and Laina:FindFirstChild("Torso"):FindFirstChild("Right Shoulder")~=nil then
- Laina:FindFirstChild("Torso"):FindFirstChild("Left Hip").C0=LeftLegC0;
- Laina:FindFirstChild("Torso"):FindFirstChild("Left Shoulder").C0=LeftArmC0;
- Laina:FindFirstChild("Torso"):FindFirstChild("Neck").C0=HeadC0;
- Laina:FindFirstChild("Torso"):FindFirstChild("Right Hip").C0=RightLegC0;
- Laina:FindFirstChild("Torso"):FindFirstChild("Right Shoulder").C0=RightArmC0;
- end;
- end;
- if Laina and LainaHumanoid and LainaHumanoid.Health~=0 and Laina:FindFirstChild("Head") and Laina:FindFirstChild("Head"):FindFirstChild("face")and Laina:FindFirstChild("Head"):FindFirstChild("Hearts")and Laina:FindFirstChild("Head"):FindFirstChild("BrokenHearts")and Laina:FindFirstChild("Head"):FindFirstChild("PlasticCreak")and not IsOnTop then
- Laina:FindFirstChild("Head"):FindFirstChild("face").Texture="rbxassetid://912935344";
- Laina:FindFirstChild("Head"):FindFirstChild("Hearts").Enabled=false;
- Laina:FindFirstChild("Head"):FindFirstChild("BrokenHearts").Enabled=false;
- if LainaScript~=nil and Laina~=nil and Laina:FindFirstChild("Head")~=nil and Laina:FindFirstChild("Head"):FindFirstChild("PlasticCreak")~=nil and Laina:FindFirstChild("Head"):FindFirstChild("PlasticCreak").IsPlaying then
- Laina:FindFirstChild("Head"):FindFirstChild("PlasticCreak"):Stop();
- end;
- if LainaScript~=nil and Laina~=nil and Laina:FindFirstChild("Torso")~=nil and Laina:FindFirstChild("Torso"):FindFirstChild("Left Hip")~=nil and Laina:FindFirstChild("Torso"):FindFirstChild("Left Shoulder")~=nil and Laina:FindFirstChild("Torso"):FindFirstChild("Neck")~=nil and Laina:FindFirstChild("Torso"):FindFirstChild("Right Hip")~=nil and Laina:FindFirstChild("Torso"):FindFirstChild("Right Shoulder")~=nil then
- Laina:FindFirstChild("Torso"):FindFirstChild("Left Hip").C0=LeftLegC0;
- Laina:FindFirstChild("Torso"):FindFirstChild("Left Shoulder").C0=LeftArmC0;
- Laina:FindFirstChild("Torso"):FindFirstChild("Neck").C0=HeadC0;
- Laina:FindFirstChild("Torso"):FindFirstChild("Right Hip").C0=RightLegC0;
- Laina:FindFirstChild("Torso"):FindFirstChild("Right Shoulder").C0=RightArmC0;
- end;
- elseif Laina and LainaHumanoid and LainaHumanoid.Health~=0 and Laina:FindFirstChild("Head") and Laina:FindFirstChild("Head"):FindFirstChild("face")and Laina:FindFirstChild("Head"):FindFirstChild("Hearts")and Laina:FindFirstChild("Head"):FindFirstChild("BrokenHearts")and Laina:FindFirstChild("Head"):FindFirstChild("PlasticCreak")and IsOnTop then
- Laina:FindFirstChild("Head"):FindFirstChild("face").Texture="rbxassetid://912935342";
- Laina:FindFirstChild("Head"):FindFirstChild("Hearts").Enabled=true;
- Laina:FindFirstChild("Head"):FindFirstChild("BrokenHearts").Enabled=false;
- if LainaScript~=nil and Laina~=nil and Laina:FindFirstChild("Head")~=nil and Laina:FindFirstChild("Head"):FindFirstChild("PlasticCreak")~=nil and not Laina:FindFirstChild("Head"):FindFirstChild("PlasticCreak").IsPlaying then
- Laina:FindFirstChild("Head"):FindFirstChild("PlasticCreak"):Play();
- end;
- local LRotation,RRotation,LARotation,RARotation,HRotation=math.sin(tick()*9.86)*0.5,math.sin(tick()*9.86)*0.5,math.sin(tick()*9.86)*-0.3,math.sin(tick()*9.86)*-0.3,math.sin(tick()*9.86)*-0.3
- if LainaScript~=nil and Laina~=nil and Laina:FindFirstChild("Torso")~=nil and Laina:FindFirstChild("Torso"):FindFirstChild("Left Hip")~=nil and Laina:FindFirstChild("Torso"):FindFirstChild("Left Shoulder")~=nil and Laina:FindFirstChild("Torso"):FindFirstChild("Neck")~=nil and Laina:FindFirstChild("Torso"):FindFirstChild("Right Hip")~=nil and Laina:FindFirstChild("Torso"):FindFirstChild("Right Shoulder")~=nil then
- Laina:FindFirstChild("Torso"):FindFirstChild("Left Hip").C0=LeftLegC02*CFrame.fromEulerAnglesXYZ(1.5,1.5-LRotation,-1);
- Laina:FindFirstChild("Torso"):FindFirstChild("Left Shoulder").C0=LeftArmC0*CFrame.fromEulerAnglesXYZ(0,0,0.3+LARotation);
- Laina:FindFirstChild("Torso"):FindFirstChild("Neck").C0=HeadC0*CFrame.fromEulerAnglesXYZ(0.5+HRotation,0,0);
- Laina:FindFirstChild("Torso"):FindFirstChild("Right Hip").C0=RightLegC02*CFrame.fromEulerAnglesXYZ(1.5,-1.5+RRotation,1);
- Laina:FindFirstChild("Torso"):FindFirstChild("Right Shoulder").C0=RightArmC0*CFrame.fromEulerAnglesXYZ(0,0,-0.3-RARotation);
- end;
- end;
- if Laina and LainaHumanoid and LainaHumanoid.Health~=0 and not LainaHumanoid.AutoJumpEnabled then
- LainaHumanoid.AutoJumpEnabled=true;
- end;
- if Laina and LainaHumanoid and LainaHumanoid.Health~=0 and not LainaHumanoid.AutoRotate then
- LainaHumanoid.AutoRotate=true;
- end;
- if Laina and LainaHumanoid and LainaHumanoid.Health~=0 and LainaHumanoid.PlatformStand then
- LainaHumanoid.PlatformStand=false;
- end;
- if Laina and LainaHumanoid and LainaHumanoid.Health~=0 and LainaHumanoid.Sit and not IsOnTop then
- LainaHumanoid.Sit=false;
- end;
- if Laina and LainaHumanoid and LainaHumanoid.Health~=0 then
- LainaHumanoid.JumpPower=60;
- LainaHumanoid.WalkSpeed=20;
- end;
- local NoticeDistance=99999e99999;
- for _,TargetModel in pairs(Game:GetService("Workspace"):GetChildren())do
- if TargetModel and TargetModel:IsA("Model")and TargetModel~=Laina 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~=nil and Child:IsA("Humanoid")and Child.Health~=0 then
- FoundHumanoid=Child;
- end;
- end;
- if Laina and Laina:FindFirstChild("HumanoidRootPart")and LainaHumanoid and LainaHumanoid.Health~=0 and TargetPart and FoundHumanoid and FoundHumanoid.Health>0 and(TargetPart.Position-Laina:FindFirstChild("HumanoidRootPart").Position).magnitude<NoticeDistance and not IsOnTop then
- NoticeDistance=(TargetPart.Position-Laina:FindFirstChild("HumanoidRootPart").Position).magnitude;
- if Laina and Laina:FindFirstChild("HumanoidRootPart")and LainaHumanoid and LainaHumanoid.Health~=0 and TargetPart and FoundHumanoid and FoundHumanoid.Health>0 and FoundHumanoid.Jump and not IsOnTop then
- LainaHumanoid.Jump=true;
- end;
- LainaHumanoid:MoveTo(TargetPart.Position+(TargetPart.Position-Laina:FindFirstChild("Torso").Position).unit*2,Game:GetService("Workspace"):FindFirstChild("Terrain"));
- if TargetPart and FoundHumanoid and FoundHumanoid.Health>0 and(TargetPart.Position-Laina:FindFirstChild("HumanoidRootPart").Position).magnitude<5 and not IsOnTop then
- IsOnTop=true;
- LainaWeld.Parent=Laina:FindFirstChild("Torso");
- LainaWeld.Part1=Laina:FindFirstChild("Torso");
- LainaWeld.C0=CFrame.new(0,-0.1,-1.4)*CFrame.fromEulerAnglesXYZ(-0.7+math.sin(tick()*9.86)*0.3,math.pi,0);
- LainaWeld.Part0=TargetPart;
- LainaBodyGyro.Parent=TargetPart;
- if LainaScript and LainaScript:FindFirstChild("JumpOk")and LainaScript:FindFirstChild("JumpOkNPC")and TargetModel.Parent~=nil and TargetPart.Parent~=nil and LainaBodyGyro~=nil and FoundHumanoid.Parent~=nil and LainaWeld.Parent~=nil and LainaBodyGyro.Parent~=nil and FoundHumanoid.Health~=0 and Laina and LainaHumanoid and LainaHumanoid.Health~=0 then
- if TargetModel and FoundHumanoid and FoundHumanoid.Health~=0 and FoundHumanoid:FindFirstChild("Status")and FoundHumanoid:FindFirstChild("Status").ClassName=="Status"then
- local JumpOk=LainaScript:FindFirstChild("JumpOk"):Clone();
- JumpOk.Parent=TargetModel;
- JumpOk.Disabled=false;
- elseif TargetModel and FoundHumanoid and FoundHumanoid.Health~=0 and FoundHumanoid:FindFirstChild("Status")and FoundHumanoid:FindFirstChild("Status").ClassName=="Model"or TargetModel and FoundHumanoid and FoundHumanoid.Health~=0 and not FoundHumanoid:FindFirstChild("Status")then
- local JumpOkNPC=LainaScript:FindFirstChild("JumpOkNPC"):Clone();
- JumpOkNPC.Parent=TargetModel;
- JumpOkNPC.Disabled=false;
- end;
- end;
- Spawn(function()
- while Wait(0)do
- if TargetModel.Parent~=nil and TargetPart.Parent~=nil and FoundHumanoid.Parent~=nil and LainaWeld.Parent~=nil and LainaBodyGyro.Parent~=nil and FoundHumanoid.Health~=0 and Laina and LainaHumanoid and LainaHumanoid.Health~=0 then
- LainaHumanoid.Sit=true;
- if Laina and LainaHumanoid and LainaHumanoid.Health~=0 and Laina:FindFirstChild("Torso")and LainaWeld then
- LainaWeld.C0=CFrame.new(0,-0.1,-1.4)*CFrame.fromEulerAnglesXYZ(-0.7+math.sin(tick()*9.86)*0.3,math.pi,0);
- end;
- if TargetModel~=nil and TargetPart~=nil and FoundHumanoid~=nil and FoundHumanoid.Health~=0 then
- FoundHumanoid.Jump=false;
- FoundHumanoid.Sit=true;
- end;
- else
- IsOnTop=false;
- if LainaWeld then
- LainaWeld:Destroy();
- end;
- if LainaBodyGyro then
- LainaBodyGyro:Destroy();
- end;
- RecreateThingies();
- break
- end;
- end;
- end)
- end;
- end;
- end;
- end;
- end;
- --[[ By: Brutez. ]]--
- end,o45)
- end))
- o46.Name = "JumpOk"
- o46.Parent = o45
- o46.Disabled = true
- table.insert(cors,coroutine.create(function()
- wait()
- runDummyScript(function()
- --[[ By: Brutez. ]]--
- local JumpScript=script;
- repeat Wait(0);until script and script.Parent and script.Parent.ClassName=="Model"and script.Parent:FindFirstChild("Head")and script.Parent:FindFirstChild("Torso");
- local ROBLOXian=JumpScript.Parent;
- local ROBLOXianHumanoid;
- for _,Child in pairs(ROBLOXian:GetChildren())do
- if Child and Child.ClassName=="Humanoid"and Child.Health>0.001 then
- ROBLOXianHumanoid=Child;
- end;
- end;
- if JumpScript and ROBLOXian and ROBLOXian.ClassName=="Model"and ROBLOXian:FindFirstChild("Head")and ROBLOXian:FindFirstChild("Torso")and ROBLOXianHumanoid and ROBLOXianHumanoid.Health>0.001 then
- ROBLOXianHumanoid.Changed:connect(function()
- if JumpScript and ROBLOXian and ROBLOXian.ClassName=="Model"and ROBLOXian:FindFirstChild("Head")and ROBLOXian:FindFirstChild("Torso")and ROBLOXianHumanoid and ROBLOXianHumanoid.Health>0.001 and ROBLOXianHumanoid.Jump then
- ROBLOXianHumanoid.Jump=false;
- end;
- end);
- end;
- while Wait(0)do
- if JumpScript and ROBLOXian and ROBLOXian.ClassName=="Model"and ROBLOXian:FindFirstChild("Head")and ROBLOXian:FindFirstChild("Torso")and ROBLOXianHumanoid and ROBLOXianHumanoid.Health>0.001 and not ROBLOXian:FindFirstChild("Torso"):FindFirstChild("LainaBodyGyro")then
- JumpScript.Disabled=true;
- JumpScript:Destroy();
- break
- end;
- end;
- --[[ By: Brutez. ]]--
- end,o46)
- end))
- o47.Name = "JumpOkNPC"
- o47.Parent = o45
- o47.Disabled = true
- table.insert(cors,coroutine.create(function()
- wait()
- runDummyScript(function()
- --[[ By: Brutez. ]]--
- local JumpScript=script;
- repeat Wait(0);until script and script.Parent and script.Parent.ClassName=="Model"and script.Parent:FindFirstChild("Head")and script.Parent:FindFirstChild("Torso");
- local ROBLOXian=JumpScript.Parent;
- local ROBLOXianHumanoid;
- for _,Child in pairs(ROBLOXian:GetChildren())do
- if Child and Child.ClassName=="Humanoid"and Child.Health>0.001 then
- ROBLOXianHumanoid=Child;
- end;
- end;
- if JumpScript and ROBLOXian and ROBLOXian.ClassName=="Model"and ROBLOXian:FindFirstChild("Head")and ROBLOXian:FindFirstChild("Torso")and ROBLOXianHumanoid and ROBLOXianHumanoid.Health>0.001 then
- ROBLOXianHumanoid.Changed:connect(function()
- if JumpScript and ROBLOXian and ROBLOXian.ClassName=="Model"and ROBLOXian:FindFirstChild("Head")and ROBLOXian:FindFirstChild("Torso")and ROBLOXianHumanoid and ROBLOXianHumanoid.Health>0.001 and ROBLOXianHumanoid.Jump then
- ROBLOXianHumanoid.Jump=false;
- end;
- end);
- end;
- while Wait(0)do
- if JumpScript and ROBLOXian and ROBLOXian.ClassName=="Model"and ROBLOXian:FindFirstChild("Head")and ROBLOXian:FindFirstChild("Torso")and ROBLOXianHumanoid and ROBLOXianHumanoid.Health>0.001 and not ROBLOXian:FindFirstChild("Torso"):FindFirstChild("LainaBodyGyro")then
- JumpScript.Disabled=true;
- JumpScript:Destroy();
- break
- end;
- end;
- --[[ By: Brutez. ]]--
- end,o47)
- end))
- o48.Parent = o45
- o48.Texture = "http://www.roblox.com/asset/?id=912935342"
- o49.Name = "3.0 Female Left Arm"
- o49.Parent = o1
- o49.MeshId = 83001137
- o49.BodyPart = Enum.BodyPart.LeftArm
- o50.Name = "3.0 Female Left Leg"
- o50.Parent = o1
- o50.MeshId = 81628361
- o50.BodyPart = Enum.BodyPart.LeftLeg
- o51.Name = "3.0 Female Right Arm"
- o51.Parent = o1
- o51.MeshId = 83001181
- o51.BodyPart = Enum.BodyPart.RightArm
- o52.Name = "3.0 Female Right Leg"
- o52.Parent = o1
- o52.MeshId = 81628308
- o52.BodyPart = Enum.BodyPart.RightLeg
- o53.Name = "3.0 Female Torso"
- o53.Parent = o1
- o53.MeshId = 82987757
- o53.BodyPart = Enum.BodyPart.Torso
- o54.Name = "SoundNew"
- o54.Parent = o1
- table.insert(cors,coroutine.create(function()
- wait()
- runDummyScript(function()
- --[[ Compact mode by: Brutez. ]]--
- Spawn(function()
- local SFX,Humanoid,Head,Sounds={Died=0;Running=1;Swimming=2;Climbing=3,Jumping=4;GettingUp=5;FreeFalling=6;FallingDown=7;Landing=8;Splash=9;},nil,nil,{};
- local Figure=script.Parent;Head=Figure:FindFirstChild("Head");while not Humanoid do for _,NewHumanoid in pairs(Figure:GetChildren())do if NewHumanoid:IsA("Humanoid")then Humanoid=NewHumanoid;break;end;end;Figure.ChildAdded:wait();end;Sounds[SFX.Died]=Head:FindFirstChild("Died");Sounds[SFX.Running]=Head:FindFirstChild("Running");Sounds[SFX.Swimming]=Head:FindFirstChild("Swimming");Sounds[SFX.Climbing]=Head:FindFirstChild("Climbing");Sounds[SFX.Jumping]=Head:FindFirstChild("Jumping");Sounds[SFX.GettingUp]=Head:FindFirstChild("GettingUp");Sounds[SFX.FreeFalling]=Head:FindFirstChild("FreeFalling");Sounds[SFX.Landing]=Head:FindFirstChild("Landing");Sounds[SFX.Splash]=Head:FindFirstChild("Splash");
- local Util={YForLineGivenXAndTwoPts=function(x,pt1x,pt1y,pt2x,pt2y)local m=(pt1y-pt2y)/(pt1x-pt2x);local b=(pt1y-m*pt1x);return m*x+b;end;Clamp=function(val,min,max)return math.min(max,math.max(min,val));end;HorizontalSpeed=function(Head)local hVel=Head.Velocity+Vector3.new(0,-Head.Velocity.Y,0);return hVel.magnitude;end;VerticalSpeed=function(Head)return math.abs(Head.Velocity.Y);end;Play=function(sound)if sound.TimePosition~=0 then sound.TimePosition=0;end;if not sound.IsPlaying then sound.Playing=true;end;end;Pause=function(sound)if sound.IsPlaying then sound.Playing=false;end;end;Resume=function(sound)if not sound.IsPlaying then sound.Playing=true;end;end;Stop=function(sound)if sound.IsPlaying then sound.Playing=false;end;if sound.TimePosition~=0 then sound.TimePosition=0;end;end;};
- local playingLoopedSounds={};local activeState=nil;function setSoundInPlayingLoopedSounds(sound)for i=1,#playingLoopedSounds do if playingLoopedSounds[i]==sound then return;end;end;table.insert(playingLoopedSounds,sound);end;function stopPlayingLoopedSoundsExcept(except)for i=#playingLoopedSounds,1,-1 do if playingLoopedSounds[i]~=except then Util.Pause(playingLoopedSounds[i]);table.remove(playingLoopedSounds,i);end;end;end;local stateUpdateHandler={[Enum.HumanoidStateType.Dead]=function()stopPlayingLoopedSoundsExcept();local sound=Sounds[SFX.Died];Util.Play(sound);end;[Enum.HumanoidStateType.RunningNoPhysics]=function()stateUpdated(Enum.HumanoidStateType.Running);end;[Enum.HumanoidStateType.Running]=function()local sound=Sounds[SFX.Running];stopPlayingLoopedSoundsExcept(sound);if Util.HorizontalSpeed(Head)>0.5 then Util.Resume(sound);setSoundInPlayingLoopedSounds(sound);else stopPlayingLoopedSoundsExcept();end;end;[Enum.HumanoidStateType.Swimming]=function()if activeState~=Enum.HumanoidStateType.Swimming and Util.VerticalSpeed(Head)>0.1 then local splashSound=Sounds[SFX.Splash];splashSound.Volume=Util.Clamp(Util.YForLineGivenXAndTwoPts(Util.VerticalSpeed(Head),100,0.28,350,1),0,1);Util.Play(splashSound);end;do local sound=Sounds[SFX.Swimming];stopPlayingLoopedSoundsExcept(sound);Util.Resume(sound);setSoundInPlayingLoopedSounds(sound);end;end;[Enum.HumanoidStateType.Climbing]=function()local sound=Sounds[SFX.Climbing];if Util.VerticalSpeed(Head)>0.1 then Util.Resume(sound);stopPlayingLoopedSoundsExcept(sound);else stopPlayingLoopedSoundsExcept();end;setSoundInPlayingLoopedSounds(sound);end;[Enum.HumanoidStateType.Jumping]=function()if activeState==Enum.HumanoidStateType.Jumping then return;end;stopPlayingLoopedSoundsExcept();local sound=Sounds[SFX.Jumping];Util.Play(sound);end;[Enum.HumanoidStateType.GettingUp]=function()stopPlayingLoopedSoundsExcept();local sound=Sounds[SFX.GettingUp];Util.Play(sound);end;[Enum.HumanoidStateType.Freefall]=function()if activeState==Enum.HumanoidStateType.Freefall then return;end;local sound=Sounds[SFX.FreeFalling];sound.Volume=0;stopPlayingLoopedSoundsExcept();end;[Enum.HumanoidStateType.FallingDown]=function()stopPlayingLoopedSoundsExcept();end;[Enum.HumanoidStateType.Landed]=function()stopPlayingLoopedSoundsExcept();if Util.VerticalSpeed(Head)>75 then local landingSound=Sounds[SFX.Landing];landingSound.Volume=Util.Clamp(Util.YForLineGivenXAndTwoPts(Util.VerticalSpeed(Head),50,0,100,1),0,1);Util.Play(landingSound);end;end;[Enum.HumanoidStateType.Seated]=function()stopPlayingLoopedSoundsExcept();end;};function stateUpdated(state)if stateUpdateHandler[state]~=nil then stateUpdateHandler[state]();end;activeState=state;end;Humanoid.Died:connect(function()stateUpdated(Enum.HumanoidStateType.Dead);end);Humanoid.Running:connect(function()stateUpdated(Enum.HumanoidStateType.Running);end);Humanoid.Swimming:connect(function()stateUpdated(Enum.HumanoidStateType.Swimming);end);Humanoid.Climbing:connect(function()stateUpdated(Enum.HumanoidStateType.Climbing);end);Humanoid.Jumping:connect(function()stateUpdated(Enum.HumanoidStateType.Jumping);end);Humanoid.GettingUp:connect(function()stateUpdated(Enum.HumanoidStateType.GettingUp);end);Humanoid.FreeFalling:connect(function()stateUpdated(Enum.HumanoidStateType.Freefall);end);Humanoid.FallingDown:connect(function()stateUpdated(Enum.HumanoidStateType.FallingDown);end);Humanoid.StateChanged:connect(function(old,new)stateUpdated(new);end);function onUpdate(stepDeltaSeconds,tickSpeedSeconds)local stepScale=stepDeltaSeconds/tickSpeedSeconds;do local sound=Sounds[SFX.FreeFalling];if activeState==Enum.HumanoidStateType.Freefall then if Head.Velocity.Y<0 and Util.VerticalSpeed(Head)>75 then Util.Resume(sound);local ANIMATION_LENGTH_SECONDS=1.1;local normalizedIncrement=tickSpeedSeconds/ANIMATION_LENGTH_SECONDS;sound.Volume=Util.Clamp(sound.Volume+normalizedIncrement*stepScale,0,1);else sound.Volume=0;end;else Util.Pause(sound);end;end;do local sound=Sounds[SFX.Running];if activeState==Enum.HumanoidStateType.Running then if Util.HorizontalSpeed(Head)<0.5 then Util.Pause(sound);end;end;end;end;local lastTick=tick();local TICK_SPEED_SECONDS=0.25;while true do onUpdate(tick()-lastTick,TICK_SPEED_SECONDS);lastTick=tick();wait(TICK_SPEED_SECONDS);end;
- end);
- --[[ Compact mode by: Brutez. ]]--
- function CreateNewSound(name,id,looped,pitch,parent)
- local sound=Instance.new("Sound");
- sound.SoundId=id;
- sound.Name=name;
- sound.archivable=false;
- sound.Parent=parent;
- sound.Pitch=pitch;
- sound.Looped=looped;
- sound.MinDistance=20;
- sound.MaxDistance=10000;
- sound.Volume=1;
- return sound;
- end;
- local head=script.Parent:FindFirstChild("Head");
- CreateNewSound("GettingUp","rbxasset://sounds/action_get_up.mp3",false,1,head);
- CreateNewSound("Died","rbxasset://sounds/uuhhh.mp3",false,1,head);
- CreateNewSound("FreeFalling","rbxasset://sounds/action_falling.mp3",true,1,head);
- CreateNewSound("Jumping","rbxasset://sounds/action_jump.mp3",false,1,head);
- CreateNewSound("Landing","rbxasset://sounds/action_jump_land.mp3",false,1,head);
- CreateNewSound("Splash","rbxasset://sounds/impact_water.mp3",false,1,head);
- CreateNewSound("Running","rbxasset://sounds/action_footsteps_plastic.mp3",true,1.85,head);
- CreateNewSound("Swimming","rbxasset://sounds/action_swim.mp3",true,1.6,head);
- CreateNewSound("Climbing","rbxasset://sounds/action_footsteps_plastic.mp3",true,1,head);
- end,o54)
- end))
- o55.Name = "AnimateNew"
- o55.Parent = o1
- table.insert(cors,coroutine.create(function()
- wait()
- runDummyScript(function()
- local Figure = script.Parent
- local Torso = Figure:FindFirstChild("Torso")
- local RightShoulder = Torso:FindFirstChild("Right Shoulder")
- local LeftShoulder = Torso:FindFirstChild("Left Shoulder")
- local RightHip = Torso:FindFirstChild("Right Hip")
- local LeftHip = Torso:FindFirstChild("Left Hip")
- local Neck = Torso:FindFirstChild("Neck")
- local Humanoid;
- for _,Child in pairs(Figure:GetChildren())do
- if Child~=nil and Child:IsA("Humanoid")and Child.Health~=0 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 = "run.xml", weight = 10 }
- },
- 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)
- currentAnimTrack.Priority = Enum.AnimationPriority.Core
- -- 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, priority)
- 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)
- if priority then
- toolAnimTrack.Priority = priority
- end
- -- 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
- playAnimation("walk", 0.1, Humanoid)
- if currentAnimInstance and currentAnimInstance.AnimationId == "http://www.roblox.com/asset/?id=180426354" then
- setAnimationSpeed(speed / 14.5)
- end
- pose = "Running"
- else
- if emoteNames[currentAnim] == nil then
- playAnimation("idle", 0.1, Humanoid)
- pose = "Standing"
- end
- 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, Enum.AnimationPriority.Idle)
- return
- end
- if (toolAnim == "Slash") then
- playToolAnimation("toolslash", 0, Humanoid, Enum.AnimationPriority.Action)
- return
- end
- if (toolAnim == "Lunge") then
- playToolAnimation("toollunge", 0, Humanoid, Enum.AnimationPriority.Action)
- 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
- -- print("Wha " .. pose)
- 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)
- playAnimation("idle", 0.1, Humanoid)
- pose = "Standing"
- while Figure.Parent ~= nil do
- local _, time = wait(0.1)
- move(time)
- end
- end,o55)
- end))
- o56.Name = "climb"
- o56.Parent = o55
- o57.Name = "ClimbAnim"
- o57.Parent = o56
- o57.AnimationId = "http://www.roblox.com/asset/?id=180436334"
- o58.Name = "fall"
- o58.Parent = o55
- o59.Name = "FallAnim"
- o59.Parent = o58
- o59.AnimationId = "http://www.roblox.com/asset/?id=180436148"
- o60.Name = "idle"
- o60.Parent = o55
- o61.Name = "Animation1"
- o61.Parent = o60
- o61.AnimationId = "http://www.roblox.com/asset/?id=180435571"
- o62.Name = "Weight"
- o62.Parent = o61
- o62.Value = 9
- o63.Name = "Animation2"
- o63.Parent = o60
- o63.AnimationId = "http://www.roblox.com/asset/?id=180435792"
- o64.Name = "Weight"
- o64.Parent = o63
- o64.Value = 1
- o65.Name = "jump"
- o65.Parent = o55
- o66.Name = "JumpAnim"
- o66.Parent = o65
- o66.AnimationId = "http://www.roblox.com/asset/?id=125750702"
- o67.Name = "run"
- o67.Parent = o55
- o68.Name = "RunAnim"
- o68.Parent = o67
- o68.AnimationId = "http://www.roblox.com/asset/?id=180426354"
- o69.Name = "sit"
- o69.Parent = o55
- o70.Name = "SitAnim"
- o70.Parent = o69
- o70.AnimationId = "http://www.roblox.com/asset/?id=178130996"
- o71.Name = "toolnone"
- o71.Parent = o55
- o72.Name = "ToolNoneAnim"
- o72.Parent = o71
- o72.AnimationId = "http://www.roblox.com/asset/?id=182393478"
- o73.Name = "walk"
- o73.Parent = o55
- o74.Name = "WalkAnim"
- o74.Parent = o73
- o74.AnimationId = "http://www.roblox.com/asset/?id=180426354"
- o75.Name = "HealthNew"
- o75.Parent = o1
- table.insert(cors,coroutine.create(function()
- wait()
- runDummyScript(function()
- --[[ By: Brutez. ]]--
- local LainaHealthScript=script;
- local Laina=LainaHealthScript.Parent;
- local LainaHumanoid;
- for _,Child in pairs(Laina:GetChildren())do
- if Child~=nil and Child:IsA("Humanoid")and Child.Health~=0 then
- LainaHumanoid=Child;
- end;
- end;
- local Regenerating=false;
- function UpdateHealth()
- if not Regenerating then
- Regenerating=true;
- Spawn(function()
- while LainaHumanoid.Health<LainaHumanoid.MaxHealth do
- local StoredHealth=LainaHumanoid.Health;
- if StoredHealth>0 and StoredHealth<LainaHumanoid.MaxHealth then
- local AdditionalHealth=0.01*LainaHumanoid.MaxHealth;
- StoredHealth=StoredHealth+AdditionalHealth;
- LainaHumanoid.Health=math.min(StoredHealth,LainaHumanoid.MaxHealth);
- end;
- Wait(0.3);
- end;
- if LainaHumanoid.Health>LainaHumanoid.MaxHealth then
- LainaHumanoid.Health=LainaHumanoid.MaxHealth;
- end;
- Regenerating=false;
- end);
- end;
- end;
- LainaHumanoid.HealthChanged:connect(UpdateHealth);
- --[[ By: Brutez. ]]--
- end,o75)
- end))
- mas.Parent = workspace
- mas:MakeJoints()
- local mas1 = mas:GetChildren()
- for i=1,#mas1 do
- mas1[i].Parent = workspace
- ypcall(function() mas1[i]:MakeJoints() end)
- end
- mas:Destroy()
- for i=1,#cors do
- coroutine.resume(cors[i])
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement