Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[if game.PlaceId ~= 15506075243 then
- local ScreenGui1 = Instance.new("ScreenGui")
- local QuestionFrame = Instance.new("Frame")
- local QuestionLabel = Instance.new("TextLabel")
- local QuestionLabelUICorner = Instance.new("UICorner")
- local QuestionFrameUICorner = Instance.new("UICorner")
- local TextLabel = Instance.new("TextLabel")
- local TextLabelUICorner = Instance.new("UICorner")
- local YesButton = Instance.new("TextButton")
- local YesButtonUICorner = Instance.new("UICorner")
- local NoButton = Instance.new("TextButton")
- local NoButtonUICorner = Instance.new("UICorner")
- local Blur = Instance.new("BlurEffect")
- Blur.Parent = game:GetService("Lighting")
- Blur.Size = 100
- ScreenGui1.Parent = game.CoreGui
- QuestionFrame.Parent = ScreenGui1
- QuestionFrame.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
- QuestionFrame.Position = UDim2.new(0.3, 0, 0.2, 0)
- QuestionFrame.Size = UDim2.new(0, 400, 0, 250)
- QuestionLabel.Name = "QuestionLabel"
- QuestionLabel.Parent = QuestionFrame
- QuestionLabel.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- QuestionLabel.Size = UDim2.new(0, 400, 0, 25)
- QuestionLabel.Font = Enum.Font.IndieFlower
- QuestionLabel.Text = "Teleport?"
- QuestionLabel.TextColor3 = Color3.fromRGB(0, 0, 0)
- QuestionLabel.TextSize = 30
- QuestionFrameUICorner.Parent = QuestionFrame
- QuestionLabelUICorner.Parent = QuestionLabel
- TextLabel.Name = "TextLabel"
- TextLabel.Parent = QuestionFrame
- TextLabel.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
- TextLabel.Position = UDim2.new(0.05, 0, 0.1, 0)
- TextLabel.Size = UDim2.new(0, 350, 0, 150)
- TextLabel.Font = Enum.Font.IndieFlower
- TextLabel.Text = "When you click on the 'Yes' button, you will be teleported to the game 'For Visual Scripts'. After teleporting into the game, restart the script."
- TextLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
- TextLabel.TextSize = 30
- TextLabel.TextWrapped = true
- TextLabel.TextScaled = true
- TextLabelUICorner.Parent = TextLabel
- NoButton.Name = "NoButton"
- NoButton.Parent = QuestionFrame
- NoButton.BackgroundColor3 = Color3.fromRGB(255, 0, 0)
- NoButton.Position = UDim2.new(0.07, 0, 0.7, 0)
- NoButton.Size = UDim2.new(0, 125, 0, 50)
- NoButton.Font = Enum.Font.IndieFlower
- NoButton.Text = "No"
- NoButton.TextColor3 = Color3.fromRGB(0, 0, 0)
- NoButton.TextScaled = true
- NoButton.TextSize = 14.000
- NoButton.TextWrapped = true
- NoButton.MouseButton1Down:connect(function()
- ScreenGui1:Destroy()
- Blur.Size = 0
- end)
- NoButtonUICorner.Parent = NoButton
- YesButton.Name = "YesButton"
- YesButton.Parent = QuestionFrame
- YesButton.BackgroundColor3 = Color3.fromRGB(0, 255, 0)
- YesButton.Position = UDim2.new(0.6, 0, 0.7, 0)
- YesButton.Size = UDim2.new(0, 125, 0, 50)
- YesButton.Font = Enum.Font.IndieFlower
- YesButton.Text = "Yes"
- YesButton.TextColor3 = Color3.fromRGB(0, 0, 0)
- YesButton.TextScaled = true
- YesButton.TextSize = 14.000
- YesButton.TextWrapped = true
- YesButton.MouseButton1Down:connect(function()
- game.Players.LocalPlayer:Kick("Teleporting...")
- wait(5)
- local TeleportService = game:GetService("TeleportService")
- local PId = 15506075243
- TeleportService:Teleport(PId, game.Players.LocalPlayer)
- end)
- YesButtonUICorner.Parent = YesButton
- else]]--
- game:GetObjects("rbxassetid://9505234463")[1].Parent = game.Workspace
- if loaded then
- game.Players.LocalPlayer:Kick("Restart")
- local TeleportService = game:GetService("TeleportService")
- local Players = game:GetService("Players")
- local LocalPlayer = Players.LocalPlayer
- local Rejoin = coroutine.create(function()
- local Success, ErrorMessage = pcall(function()
- TeleportService:Teleport(game.PlaceId, LocalPlayer)
- end)
- if ErrorMessage and not Success then
- warn(ErrorMessage)
- end
- end)
- coroutine.resume(Rejoin)
- end
- pcall(function()
- getgenv().loaded = true
- game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = CFrame.new(-1612.68, 0.8, 566.899)
- local lighting = game:GetService("Lighting")
- lighting.FogEnd = 20
- lighting.FogColor = Color3.new(0, 0, 0)
- lighting.TimeOfDay = 0
- local camera = workspace.CurrentCamera
- local player = game.Players.LocalPlayer
- local character = player.Character
- local humanoid = character.Humanoid
- player.CameraMaxZoomDistance = 0.5
- camera.FieldOfView = 100
- humanoid.CameraOffset = Vector3.new(0, 0, -1)
- for childIndex, child in pairs(character:GetChildren()) do
- if child:IsA("BasePart") and child.Name ~= "Head" then
- child:GetPropertyChangedSignal("LocalTransparencyModifier"):Connect(function()
- child.LocalTransparencyModifier = child.Transparency
- end)
- child.LocalTransparencyModifier = child.Transparency
- end
- end
- camera:GetPropertyChangedSignal("CameraSubject"):Connect(function()
- if camera.CameraSubject:IsA("VehicleSeat") then
- camera.CameraSubject = humanoid
- end
- end)
- local CameraPart = Instance.new("Part")
- CameraPart.Parent = workspace
- CameraPart.Anchored = true
- CameraPart.Size = Vector3.new(4, 1, 2)
- CameraPart.CanCollide = false
- CameraPart.Position = Vector3.new(-1631.281, 525.4, 608.398)
- CameraPart.Transparency = 1
- local FakeSoulForPrevPart = Instance.new("Part")
- FakeSoulForPrevPart.Parent = workspace
- FakeSoulForPrevPart.Anchored = true
- FakeSoulForPrevPart.Size = Vector3.new(2, 2, 2)
- FakeSoulForPrevPart.CanCollide = true
- FakeSoulForPrevPart.Position = Vector3.new(-1633.995, 525.4, 608.514)
- FakeSoulForPrevPart.BrickColor = BrickColor.new("Institutional white")
- FakeSoulForPrevPart.Material = "ForceField"
- local FakeSoulForPrevPartMesh = Instance.new("SpecialMesh", FakeSoulForPrevPart)
- FakeSoulForPrevPartMesh.MeshType = Enum.MeshType.Sphere
- local FakeSoulForPrevPartFire = Instance.new("Fire", FakeSoulForPrevPart)
- FakeSoulForPrevPartFire.Size = 5
- FakeSoulForPrevPartFire.Color = Color3.new(255,255,255)
- FakeSoulForPrevPartFire.Heat = 0
- local player = game.Players.LocalPlayer
- local character = player.Character
- local cam = workspace.CurrentCamera
- cam.CameraSubject = CameraPart
- local plr = game.Players.LocalPlayer
- local gui = Instance.new("ScreenGui")
- gui.Parent = plr.PlayerGui
- gui.ResetOnSpawn = false
- local Prev = Instance.new("TextLabel")
- Prev.Parent = gui
- Prev.BackgroundTransparency = 1
- Prev.Size = UDim2.new(2, 0, 2, 0)
- Prev.Position = UDim2.new(-0.5, 0, 0 ,-255)
- Prev.TextXAlignment = Enum.TextXAlignment.Center
- Prev.TextScaled = true
- Prev.Text = "My nightmare 2 Awakening"
- Prev.TextColor3 = Color3.new(255, 255, 255)
- Prev.Font = Enum.Font.IndieFlower
- local ScreenGui = Instance.new("ScreenGui")
- local PlayFrame = Instance.new("Frame")
- local Play = Instance.new("TextButton")
- ScreenGui.Parent = game.CoreGui
- PlayFrame.Name = "PlayFrame"
- PlayFrame.Parent = ScreenGui
- PlayFrame.BackgroundColor3 = Color3.new(255, 255, 255)
- PlayFrame.BackgroundTransparency = 1
- PlayFrame.Position = UDim2.new(0.105540894, 0, 0.778873265, 0)
- PlayFrame.Size = UDim2.new(0, 100, 0, 100)
- Play.Name = "Play"
- Play.Parent = PlayFrame
- Play.BackgroundColor3 = Color3.new(0, 0, 0)
- Play.BorderSizePixel = 0
- Play.Draggable = false
- Play.Position = UDim2.new(3, 0, 0, 0)
- Play.Size = UDim2.new(0, 155, 0, 95)
- Play.Font = Enum.Font.IndieFlower
- Play.FontSize = Enum.FontSize.Size48
- Play.Text = "Play"
- Play.TextColor3 = Color3.new(255, 255, 255)
- Play.TextSize = 100
- Play.MouseButton1Click:connect(function()
- cam.CameraSubject = character
- FakeSoulForPrevPart:Destroy()
- local L = game:GetService("Lighting") L.ClockTime = 0
- --ERROR_CODE'S CHARACTER
- game:GetObjects("rbxassetid://15008776812")[1].Parent = game.Workspace
- local CharacterPart = Instance.new("Part")
- CharacterPart.Parent = workspace
- CharacterPart.Anchored = true
- CharacterPart.Size = Vector3.new(4.935, 3.902, 4.857)
- CharacterPart.CanCollide = true
- CharacterPart.Position = Vector3.new(117.134, 1666.5, 133.078)
- CharacterPart.Transparency = 1
- Play:Destroy()
- Prev:Destroy()
- function createZombie()
- function sandbox(var,func)
- local env = getfenv(func)
- local newenv = setmetatable({},{
- __index = function(self,k)
- if k=="script" then
- return var
- else
- return env[k]
- end
- end,
- })
- setfenv(func,newenv)
- return func
- end
- cors = {}
- mas = Instance.new("Model",game:GetService("Lighting"))
- Model0 = Instance.new("Model")
- Part1 = Instance.new("Part")
- SpecialMesh2 = Instance.new("SpecialMesh")
- Vector3Value3 = Instance.new("Vector3Value")
- Motor6D4 = Instance.new("Motor6D")
- Decal5 = Instance.new("Decal")
- Sound6 = Instance.new("Sound")
- Sound7 = Instance.new("Sound")
- Sound8 = Instance.new("Sound")
- Sound9 = Instance.new("Sound")
- Sound10 = Instance.new("Sound")
- Part11 = Instance.new("Part")
- Vector3Value12 = Instance.new("Vector3Value")
- BodyColors13 = Instance.new("BodyColors")
- MeshPart14 = Instance.new("MeshPart")
- Vector3Value15 = Instance.new("Vector3Value")
- Motor6D16 = Instance.new("Motor6D")
- Script17 = Instance.new("Script")
- Humanoid18 = Instance.new("Humanoid")
- Script19 = Instance.new("Script")
- MeshPart20 = Instance.new("MeshPart")
- Vector3Value21 = Instance.new("Vector3Value")
- Motor6D22 = Instance.new("Motor6D")
- MeshPart23 = Instance.new("MeshPart")
- Vector3Value24 = Instance.new("Vector3Value")
- Motor6D25 = Instance.new("Motor6D")
- MeshPart26 = Instance.new("MeshPart")
- Vector3Value27 = Instance.new("Vector3Value")
- Motor6D28 = Instance.new("Motor6D")
- MeshPart29 = Instance.new("MeshPart")
- Vector3Value30 = Instance.new("Vector3Value")
- Motor6D31 = Instance.new("Motor6D")
- MeshPart32 = Instance.new("MeshPart")
- Vector3Value33 = Instance.new("Vector3Value")
- Motor6D34 = Instance.new("Motor6D")
- MeshPart35 = Instance.new("MeshPart")
- Vector3Value36 = Instance.new("Vector3Value")
- Motor6D37 = Instance.new("Motor6D")
- MeshPart38 = Instance.new("MeshPart")
- Vector3Value39 = Instance.new("Vector3Value")
- Motor6D40 = Instance.new("Motor6D")
- MeshPart41 = Instance.new("MeshPart")
- Vector3Value42 = Instance.new("Vector3Value")
- Motor6D43 = Instance.new("Motor6D")
- Script44 = Instance.new("Script")
- MeshPart45 = Instance.new("MeshPart")
- Vector3Value46 = Instance.new("Vector3Value")
- Motor6D47 = Instance.new("Motor6D")
- MeshPart48 = Instance.new("MeshPart")
- Vector3Value49 = Instance.new("Vector3Value")
- Motor6D50 = Instance.new("Motor6D")
- MeshPart51 = Instance.new("MeshPart")
- Vector3Value52 = Instance.new("Vector3Value")
- Motor6D53 = Instance.new("Motor6D")
- MeshPart54 = Instance.new("MeshPart")
- Vector3Value55 = Instance.new("Vector3Value")
- Motor6D56 = Instance.new("Motor6D")
- MeshPart57 = Instance.new("MeshPart")
- Vector3Value58 = Instance.new("Vector3Value")
- Motor6D59 = Instance.new("Motor6D")
- Script60 = Instance.new("Script")
- Script61 = Instance.new("Script")
- Script62 = Instance.new("Script")
- StringValue63 = Instance.new("StringValue")
- StringValue64 = Instance.new("StringValue")
- Animation65 = Instance.new("Animation")
- StringValue66 = Instance.new("StringValue")
- Animation67 = Instance.new("Animation")
- StringValue68 = Instance.new("StringValue")
- Animation69 = Instance.new("Animation")
- NumberValue70 = Instance.new("NumberValue")
- Animation71 = Instance.new("Animation")
- NumberValue72 = Instance.new("NumberValue")
- StringValue73 = Instance.new("StringValue")
- Animation74 = Instance.new("Animation")
- StringValue75 = Instance.new("StringValue")
- Animation76 = Instance.new("Animation")
- StringValue77 = Instance.new("StringValue")
- Animation78 = Instance.new("Animation")
- StringValue79 = Instance.new("StringValue")
- Animation80 = Instance.new("Animation")
- StringValue81 = Instance.new("StringValue")
- Animation82 = Instance.new("Animation")
- StringValue83 = Instance.new("StringValue")
- Animation84 = Instance.new("Animation")
- Script85 = Instance.new("Script")
- Model0.Name = "Zombie"
- Model0.Parent = mas
- Part1.Name = "Head"
- Part1.Parent = Model0
- Part1.CFrame = CFrame.new(-0.695644557, 4.56509781, -2.19861078, -0.00241400092, 3.49997972e-05, 0.999997497, 0, 1, -3.499991e-05, -0.999997497, -8.44897698e-08, -0.00241400092)
- Part1.Orientation = Vector3.new(0, 90.1399994, 0)
- Part1.Position = Vector3.new(-0.695644557, 4.56509781, -2.19861078)
- Part1.Rotation = Vector3.new(179.169998, 89.8700027, -179.169998)
- Part1.Color = Color3.new(0.541176, 0.670588, 0.521569)
- Part1.Size = Vector3.new(1, 1, 1)
- Part1.BottomSurface = Enum.SurfaceType.Smooth
- Part1.BrickColor = BrickColor.new("Artichoke")
- Part1.TopSurface = Enum.SurfaceType.Smooth
- Part1.brickColor = BrickColor.new("Artichoke")
- Part1.FormFactor = Enum.FormFactor.Custom
- Part1.formFactor = Enum.FormFactor.Custom
- SpecialMesh2.Parent = Part1
- SpecialMesh2.MeshId = "http://www.roblox.com/asset?id=419776358"
- SpecialMesh2.MeshType = Enum.MeshType.FileMesh
- Vector3Value3.Name = "OriginalSize"
- Vector3Value3.Parent = Part1
- Vector3Value3.Value = Vector3.new(1, 1, 1)
- Motor6D4.Name = "Neck"
- Motor6D4.Parent = Part1
- Motor6D4.C0 = CFrame.new(0.000338107347, 0.806032121, -0.015560925, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Motor6D4.C1 = CFrame.new(-2.72095203e-05, -0.565615535, 0.00386685133, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Motor6D4.Part0 = MeshPart14
- Motor6D4.Part1 = Part1
- Motor6D4.part1 = Part1
- Decal5.Parent = Part1
- Decal5.Texture = "http://www.roblox.com/asset/?id=174393211"
- Sound6.Name = "Moan"
- Sound6.Parent = Part1
- Sound6.SoundId = "rbxassetid://131060249"
- Sound6.Volume = 1
- Sound7.Name = "Moan2"
- Sound7.Parent = Part1
- Sound7.SoundId = "rbxassetid://131060145"
- Sound7.Volume = 1
- Sound8.Name = "Moan3"
- Sound8.Parent = Part1
- Sound8.SoundId = "rbxassetid://131060210"
- Sound8.Volume = 1
- Sound9.Name = "Moan4"
- Sound9.Parent = Part1
- Sound9.SoundId = "rbxassetid://131138835"
- Sound9.Volume = 1
- Sound10.Name = "Death"
- Sound10.Parent = Part1
- Part11.Name = "HumanoidRootPart"
- Part11.Parent = Model0
- Part11.CFrame = CFrame.new(-0.691856027, 2.32588005, -2.1985929, -0.00241400092, 3.49997972e-05, 0.999997497, 0, 1, -3.499991e-05, -0.999997497, -8.44897698e-08, -0.00241400092)
- Part11.Orientation = Vector3.new(0, 90.1399994, 0)
- Part11.Position = Vector3.new(-17.023, 2.4, 237.781)
- Part11.Rotation = Vector3.new(179.169998, 89.8700027, -179.169998)
- Part11.Transparency = 1
- Part11.Size = Vector3.new(2, 2, 1)
- Part11.CanCollide = false
- Vector3Value12.Name = "OriginalSize"
- Vector3Value12.Parent = Part11
- Vector3Value12.Value = Vector3.new(2, 2, 1)
- BodyColors13.Parent = Model0
- BodyColors13.HeadColor = BrickColor.new("Artichoke")
- BodyColors13.HeadColor3 = Color3.new(0.541176, 0.670588, 0.521569)
- BodyColors13.LeftArmColor = BrickColor.new("Artichoke")
- BodyColors13.LeftArmColor3 = Color3.new(0.541176, 0.670588, 0.521569)
- BodyColors13.LeftLegColor = BrickColor.new("Burnt Sienna")
- BodyColors13.LeftLegColor3 = Color3.new(0.415686, 0.223529, 0.0352941)
- BodyColors13.RightArmColor = BrickColor.new("Artichoke")
- BodyColors13.RightArmColor3 = Color3.new(0.541176, 0.670588, 0.521569)
- BodyColors13.RightLegColor = BrickColor.new("Burnt Sienna")
- BodyColors13.RightLegColor3 = Color3.new(0.415686, 0.223529, 0.0352941)
- BodyColors13.TorsoColor = BrickColor.new("Burnt Sienna")
- BodyColors13.TorsoColor3 = Color3.new(0.415686, 0.223529, 0.0352941)
- MeshPart14.Name = "UpperTorso"
- MeshPart14.Parent = Model0
- MeshPart14.CFrame = CFrame.new(-0.676263928, 3.1934495, -2.19829226, -0.00241400092, 3.49997972e-05, 0.999997497, 0, 1, -3.499991e-05, -0.999997497, -8.44897698e-08, -0.00241400092)
- MeshPart14.Orientation = Vector3.new(0, 90.1399994, 0)
- MeshPart14.Position = Vector3.new(-0.676263928, 3.1934495, -2.19829226)
- MeshPart14.Rotation = Vector3.new(179.169998, 89.8700027, -179.169998)
- MeshPart14.Color = Color3.new(0.156863, 0.498039, 0.278431)
- MeshPart14.Size = Vector3.new(2.00029206, 1.60093355, 1.0005368)
- MeshPart14.BrickColor = BrickColor.new("Dark green")
- MeshPart14.brickColor = BrickColor.new("Dark green")
- Vector3Value15.Name = "OriginalSize"
- Vector3Value15.Parent = MeshPart14
- Vector3Value15.Value = Vector3.new(2.00029206, 1.60093355, 1.0005368)
- Motor6D16.Name = "Waist"
- Motor6D16.Parent = MeshPart14
- Motor6D16.C0 = CFrame.new(0.000280171633, 0.537143946, -0.0142721087, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Motor6D16.C1 = CFrame.new(0.000338107347, -0.463463932, -0.015560925, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Motor6D16.Part0 = MeshPart41
- Motor6D16.Part1 = MeshPart14
- Motor6D16.part1 = MeshPart14
- Script17.Name = "Damage Script"
- Script17.Parent = MeshPart14
- table.insert(cors,sandbox(Script17,function()
- function onTouched(hit)
- local human = hit.Parent:findFirstChild("Humanoid")
- if (human ~= nil) then
- human.Health = human.Health - 0.5
- end
- end
- script.Parent.Touched:connect(onTouched)
- end))
- Humanoid18.Name = "Zombie"
- Humanoid18.Parent = Model0
- Humanoid18.DisplayDistanceType = Enum.HumanoidDisplayDistanceType.Subject
- Humanoid18.Health = 100
- Humanoid18.HealthDisplayType = Enum.HumanoidHealthDisplayType.AlwaysOff
- Humanoid18.HipHeight = 1.3500000238419
- Humanoid18.LeftLeg = MeshPart45
- Humanoid18.MaxHealth = 125
- Humanoid18.NameOcclusion = Enum.NameOcclusion.NoOcclusion
- Humanoid18.RigType = Enum.HumanoidRigType.R15
- Humanoid18.RightLeg = MeshPart20
- Humanoid18.Torso = Part11
- Humanoid18.WalkSpeed = 4
- Humanoid18.maxHealth = 100
- Script19.Parent = Model0
- table.insert(cors,sandbox(Script19,function()
- local larm = script.Parent:FindFirstChild("HumanoidRootPart")
- local rarm = script.Parent:FindFirstChild("HumanoidRootPart")
- local char = script.Parent
- local pathFinder = game:GetService("PathfindingService")
- local path = pathFinder:CreatePath()
- function findNearestTorso(pos)
- local list = game.Workspace:children()
- local torso = nil
- local dist = 100
- local temp = nil
- local human = nil
- local temp2 = nil
- for x = 1, #list do
- temp2 = list[x]
- if (temp2.className == "Model") and (temp2 ~= script.Parent) then
- temp = temp2:findFirstChild("HumanoidRootPart")
- human = temp2:findFirstChild("Humanoid")
- if (temp ~= nil) and (human ~= nil) and (human.Health > 0) then
- if (temp.Position - pos).magnitude < dist then
- torso = temp
- dist = (temp.Position - pos).magnitude
- end
- end
- end
- end
- return torso
- end
- while true do
- wait()
- local target = findNearestTorso(script.Parent.HumanoidRootPart.Position)
- if target ~= nil then
- path:ComputeAsync(char.HumanoidRootPart.Position, target.Position)
- for i, wayPoint in pairs(path:GetWaypoints()) do
- char.Zombie:MoveTo(wayPoint.Position)
- if wayPoint.Action == Enum.PathWaypointAction.Jump then
- char.Zombie:ChangeState(Enum.HumanoidStateType.Jumping)
- end
- char.Zombie.MoveToFinished:wait(0.0000001)
- end
- end
- end
- end))
- MeshPart20.Name = "RightUpperLeg"
- MeshPart20.Parent = Model0
- MeshPart20.CFrame = CFrame.new(-0.67828238, 1.46466565, -2.69960117, -0.00241400092, 3.49997972e-05, 0.999997497, 0, 1, -3.499991e-05, -0.999997497, -8.44897698e-08, -0.00241400092)
- MeshPart20.Orientation = Vector3.new(0, 90.1399994, 0)
- MeshPart20.Position = Vector3.new(-0.67828238, 1.46466565, -2.69960117)
- MeshPart20.Rotation = Vector3.new(179.169998, 89.8700027, -179.169998)
- MeshPart20.Color = Color3.new(0.0509804, 0.411765, 0.67451)
- MeshPart20.Size = Vector3.new(1.00027561, 1.5362649, 1.00092912)
- MeshPart20.BrickColor = BrickColor.new("Bright blue")
- MeshPart20.CanCollide = false
- MeshPart20.brickColor = BrickColor.new("Bright blue")
- Vector3Value21.Name = "OriginalSize"
- Vector3Value21.Parent = MeshPart20
- Vector3Value21.Value = Vector3.new(1.00027561, 1.5362649, 1.00092912)
- Motor6D22.Name = "RightHip"
- Motor6D22.Parent = MeshPart20
- Motor6D22.C0 = CFrame.new(0.505080223, -0.243262246, 0.00102789141, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Motor6D22.C1 = CFrame.new(0.00382620096, 0.484913796, 0.000486815348, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Motor6D22.Part0 = MeshPart41
- Motor6D22.Part1 = MeshPart20
- Motor6D22.part1 = MeshPart20
- MeshPart23.Name = "RightUpperArm"
- MeshPart23.Parent = Model0
- MeshPart23.CFrame = CFrame.new(-0.685997844, 3.29312539, -3.69646788, -0.00241400092, 3.49997972e-05, 0.999997497, 0, 1, -3.499991e-05, -0.999997497, -8.44897698e-08, -0.00241400092)
- MeshPart23.Orientation = Vector3.new(0, 90.1399994, 0)
- MeshPart23.Position = Vector3.new(-0.685997844, 3.29312539, -3.69646788)
- MeshPart23.Rotation = Vector3.new(179.169998, 89.8700027, -179.169998)
- MeshPart23.Color = Color3.new(0.992157, 0.917647, 0.552941)
- MeshPart23.Size = Vector3.new(1.00027633, 1.39554, 1.00025082)
- MeshPart23.BrickColor = BrickColor.new("Cool yellow")
- MeshPart23.CanCollide = false
- MeshPart23.brickColor = BrickColor.new("Cool yellow")
- Vector3Value24.Name = "OriginalSize"
- Vector3Value24.Parent = MeshPart23
- Vector3Value24.Value = Vector3.new(1.00027633, 1.39554, 1.00025082)
- Motor6D25.Name = "RightShoulder"
- Motor6D25.Parent = MeshPart23
- Motor6D25.C0 = CFrame.new(1.25031853, 0.5565539, -0.015560925, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Motor6D25.C1 = CFrame.new(-0.24787569, 0.456878304, -0.00944012403, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Motor6D25.Part0 = MeshPart14
- Motor6D25.Part1 = MeshPart23
- Motor6D25.part1 = MeshPart23
- MeshPart26.Name = "RightLowerLeg"
- MeshPart26.Parent = Model0
- MeshPart26.CFrame = CFrame.new(-0.678020656, 0.910310864, -2.69960189, -0.00241400092, 3.49997972e-05, 0.999997497, 0, 1, -3.499991e-05, -0.999997497, -8.44897698e-08, -0.00241400092)
- MeshPart26.Orientation = Vector3.new(0, 90.1399994, 0)
- MeshPart26.Position = Vector3.new(-0.678020656, 0.910310864, -2.69960189)
- MeshPart26.Rotation = Vector3.new(179.169998, 89.8700027, -179.169998)
- MeshPart26.Color = Color3.new(0.0509804, 0.411765, 0.67451)
- MeshPart26.Size = Vector3.new(1.00027585, 1.48964536, 1.00032854)
- MeshPart26.BrickColor = BrickColor.new("Bright blue")
- MeshPart26.CanCollide = false
- MeshPart26.brickColor = BrickColor.new("Bright blue")
- Vector3Value27.Name = "OriginalSize"
- Vector3Value27.Parent = MeshPart26
- Vector3Value27.Value = Vector3.new(1.00027585, 1.48964536, 1.00032854)
- Motor6D28.Name = "RightKnee"
- Motor6D28.Parent = MeshPart26
- Motor6D28.C0 = CFrame.new(0.00382620096, -0.265086174, 0.000426991843, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Motor6D28.C1 = CFrame.new(0.00382620096, 0.289268613, 0.000145851634, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Motor6D28.Part0 = MeshPart20
- Motor6D28.Part1 = MeshPart26
- Motor6D28.part1 = MeshPart26
- MeshPart29.Name = "RightLowerArm"
- MeshPart29.Parent = Model0
- MeshPart29.CFrame = CFrame.new(-0.685555518, 2.90703535, -3.69646835, -0.00241400092, 3.49997972e-05, 0.999997497, 0, 1, -3.499991e-05, -0.999997497, -8.44897698e-08, -0.00241400092)
- MeshPart29.Orientation = Vector3.new(0, 90.1399994, 0)
- MeshPart29.Position = Vector3.new(-0.685555518, 2.90703535, -3.69646835)
- MeshPart29.Rotation = Vector3.new(179.169998, 89.8700027, -179.169998)
- MeshPart29.Color = Color3.new(0.992157, 0.917647, 0.552941)
- MeshPart29.Size = Vector3.new(1.00027657, 1.26567209, 1.00025082)
- MeshPart29.BrickColor = BrickColor.new("Cool yellow")
- MeshPart29.CanCollide = false
- MeshPart29.brickColor = BrickColor.new("Cool yellow")
- Vector3Value30.Name = "OriginalSize"
- Vector3Value30.Parent = MeshPart29
- Vector3Value30.Value = Vector3.new(1.00027657, 1.26567209, 1.00025082)
- Motor6D31.Name = "RightElbow"
- Motor6D31.Parent = MeshPart29
- Motor6D31.C0 = CFrame.new(0.00214397907, -0.263139546, -0.00944012403, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Motor6D31.C1 = CFrame.new(0.00214457512, 0.122950554, -0.00989595056, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Motor6D31.Part0 = MeshPart23
- Motor6D31.Part1 = MeshPart29
- Motor6D31.part1 = MeshPart29
- MeshPart32.Name = "RightHand"
- MeshPart32.Parent = Model0
- MeshPart32.CFrame = CFrame.new(-0.680041432, 2.1668787, -3.69776106, -0.00241400092, 3.49997972e-05, 0.999997497, 0, 1, -3.499991e-05, -0.999997497, -8.44897698e-08, -0.00241400092)
- MeshPart32.Orientation = Vector3.new(0, 90.1399994, 0)
- MeshPart32.Position = Vector3.new(-0.680041432, 2.1668787, -3.69776106)
- MeshPart32.Rotation = Vector3.new(179.169998, 89.8700027, -179.169998)
- MeshPart32.Color = Color3.new(0.992157, 0.917647, 0.552941)
- MeshPart32.Size = Vector3.new(0.999299049, 0.335255772, 1.00029743)
- MeshPart32.BrickColor = BrickColor.new("Cool yellow")
- MeshPart32.CanCollide = false
- MeshPart32.brickColor = BrickColor.new("Cool yellow")
- Vector3Value33.Name = "OriginalSize"
- Vector3Value33.Parent = MeshPart32
- Vector3Value33.Value = Vector3.new(0.999299049, 0.335255772, 1.00029743)
- Motor6D34.Name = "RightWrist"
- Motor6D34.Parent = MeshPart32
- Motor6D34.C0 = CFrame.new(0.00214457512, -0.682049513, -0.00989595056, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Motor6D34.C1 = CFrame.new(0.000865101814, 0.058106944, -0.0154390335, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Motor6D34.Part0 = MeshPart29
- Motor6D34.Part1 = MeshPart32
- Motor6D34.part1 = MeshPart32
- MeshPart35.Name = "RightFoot"
- MeshPart35.Parent = Model0
- MeshPart35.CFrame = CFrame.new(-0.677906275, 0.167736173, -2.69441152, -0.00241400092, 3.49997972e-05, 0.999997497, 0, 1, -3.499991e-05, -0.999997497, -8.44897698e-08, -0.00241400092)
- MeshPart35.Orientation = Vector3.new(0, 90.1399994, 0)
- MeshPart35.Position = Vector3.new(-0.677906275, 0.167736173, -2.69441152)
- MeshPart35.Rotation = Vector3.new(179.169998, 89.8700027, -179.169998)
- MeshPart35.Color = Color3.new(0.0509804, 0.411765, 0.67451)
- MeshPart35.Size = Vector3.new(1.00063133, 0.335407376, 1.00020337)
- MeshPart35.BrickColor = BrickColor.new("Bright blue")
- MeshPart35.CanCollide = false
- MeshPart35.brickColor = BrickColor.new("Bright blue")
- Vector3Value36.Name = "OriginalSize"
- Vector3Value36.Parent = MeshPart35
- Vector3Value36.Value = Vector3.new(1.00063133, 0.335407376, 1.00020337)
- Motor6D37.Name = "RightAnkle"
- Motor6D37.Parent = MeshPart35
- Motor6D37.C0 = CFrame.new(0.00382620096, -0.710731506, 0.000283418223, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Motor6D37.C1 = CFrame.new(0.00901681185, 0.0318431854, 0.000155551359, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Motor6D37.Part0 = MeshPart26
- Motor6D37.Part1 = MeshPart35
- Motor6D37.part1 = MeshPart35
- MeshPart38.Name = "LeftFoot"
- MeshPart38.Parent = Model0
- MeshPart38.CFrame = CFrame.new(-0.675512314, 0.167736173, -1.70284736, -0.00241400092, 3.49997972e-05, 0.999997497, 0, 1, -3.499991e-05, -0.999997497, -8.44897698e-08, -0.00241400092)
- MeshPart38.Orientation = Vector3.new(0, 90.1399994, 0)
- MeshPart38.Position = Vector3.new(-0.675512314, 0.167736173, -1.70284736)
- MeshPart38.Rotation = Vector3.new(179.169998, 89.8700027, -179.169998)
- MeshPart38.Color = Color3.new(0.0509804, 0.411765, 0.67451)
- MeshPart38.Size = Vector3.new(1.00063133, 0.335407257, 1.00020337)
- MeshPart38.BrickColor = BrickColor.new("Bright blue")
- MeshPart38.CanCollide = false
- MeshPart38.brickColor = BrickColor.new("Bright blue")
- Vector3Value39.Name = "OriginalSize"
- Vector3Value39.Parent = MeshPart38
- Vector3Value39.Value = Vector3.new(1.00063133, 0.335407257, 1.00020337)
- Motor6D40.Name = "LeftAnkle"
- Motor6D40.Parent = MeshPart38
- Motor6D40.C0 = CFrame.new(-0.00382620096, -0.710131407, 0.00030554086, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Motor6D40.C1 = CFrame.new(-0.00901681185, 0.032443285, 0.000177569687, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Motor6D40.Part0 = MeshPart51
- Motor6D40.Part1 = MeshPart38
- Motor6D40.part1 = MeshPart38
- MeshPart41.Name = "LowerTorso"
- MeshPart41.Parent = Model0
- MeshPart41.CFrame = CFrame.new(-0.677587926, 2.19284177, -2.19834709, -0.00241400092, 3.49997972e-05, 0.999997497, 0, 1, -3.499991e-05, -0.999997497, -8.44897698e-08, -0.00241400092)
- MeshPart41.Orientation = Vector3.new(0, 90.1399994, 0)
- MeshPart41.Position = Vector3.new(-0.677587926, 2.19284177, -2.19834709)
- MeshPart41.Rotation = Vector3.new(179.169998, 89.8700027, -179.169998)
- MeshPart41.Color = Color3.new(0.156863, 0.498039, 0.278431)
- MeshPart41.Size = Vector3.new(2.00017595, 0.400037616, 1.00021255)
- MeshPart41.BrickColor = BrickColor.new("Dark green")
- MeshPart41.brickColor = BrickColor.new("Dark green")
- Vector3Value42.Name = "OriginalSize"
- Vector3Value42.Parent = MeshPart41
- Vector3Value42.Value = Vector3.new(2.00017595, 0.400037616, 1.00021255)
- Motor6D43.Name = "Root"
- Motor6D43.Parent = MeshPart41
- Motor6D43.C1 = CFrame.new(0.000280171633, 0.133037761, -0.0142721087, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Motor6D43.Part0 = Part11
- Motor6D43.Part1 = MeshPart41
- Motor6D43.part1 = MeshPart41
- Script44.Name = "Damage Script"
- Script44.Parent = MeshPart41
- table.insert(cors,sandbox(Script44,function()
- function onTouched(hit)
- local human = hit.Parent:findFirstChild("Humanoid")
- if (human ~= nil) then
- human.Health = human.Health - 0.5
- end
- end
- script.Parent.Touched:connect(onTouched)
- end))
- MeshPart45.Name = "LeftUpperLeg"
- MeshPart45.Parent = Model0
- MeshPart45.CFrame = CFrame.new(-0.675863564, 1.46466565, -1.69765592, -0.00241400092, 3.49997972e-05, 0.999997497, 0, 1, -3.499991e-05, -0.999997497, -8.44897698e-08, -0.00241400092)
- MeshPart45.Orientation = Vector3.new(0, 90.1399994, 0)
- MeshPart45.Position = Vector3.new(-0.675863564, 1.46466565, -1.69765592)
- MeshPart45.Rotation = Vector3.new(179.169998, 89.8700027, -179.169998)
- MeshPart45.Color = Color3.new(0.0509804, 0.411765, 0.67451)
- MeshPart45.Size = Vector3.new(1.00027561, 1.5362649, 1.00092912)
- MeshPart45.BrickColor = BrickColor.new("Bright blue")
- MeshPart45.CanCollide = false
- MeshPart45.brickColor = BrickColor.new("Bright blue")
- Vector3Value46.Name = "OriginalSize"
- Vector3Value46.Parent = MeshPart45
- Vector3Value46.Value = Vector3.new(1.00027561, 1.5362649, 1.00092912)
- Motor6D47.Name = "LeftHip"
- Motor6D47.Parent = MeshPart45
- Motor6D47.C0 = CFrame.new(-0.50451982, -0.243062243, 0.00122789107, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Motor6D47.C1 = CFrame.new(-0.00382620096, 0.4851138, 0.000686740503, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Motor6D47.Part0 = MeshPart41
- Motor6D47.Part1 = MeshPart45
- Motor6D47.part1 = MeshPart45
- MeshPart48.Name = "LeftUpperArm"
- MeshPart48.Parent = Model0
- MeshPart48.CFrame = CFrame.new(-0.678766429, 3.29312539, -0.700763106, -0.00241400092, 3.49997972e-05, 0.999997497, 0, 1, -3.499991e-05, -0.999997497, -8.44897698e-08, -0.00241400092)
- MeshPart48.Orientation = Vector3.new(0, 90.1399994, 0)
- MeshPart48.Position = Vector3.new(-0.678766429, 3.29312539, -0.700763106)
- MeshPart48.Rotation = Vector3.new(179.169998, 89.8700027, -179.169998)
- MeshPart48.Color = Color3.new(0.992157, 0.917647, 0.552941)
- MeshPart48.Size = Vector3.new(1.00027633, 1.39554, 1.00025082)
- MeshPart48.BrickColor = BrickColor.new("Cool yellow")
- MeshPart48.CanCollide = false
- MeshPart48.brickColor = BrickColor.new("Cool yellow")
- Vector3Value49.Name = "OriginalSize"
- Vector3Value49.Parent = MeshPart48
- Vector3Value49.Value = Vector3.new(1.00027633, 1.39554, 1.00025082)
- Motor6D50.Name = "LeftShoulder"
- Motor6D50.Parent = MeshPart48
- Motor6D50.C0 = CFrame.new(-1.24955308, 0.556408584, -0.015560925, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Motor6D50.C1 = CFrame.new(0.247964978, 0.456732988, -0.00943991542, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Motor6D50.Part0 = MeshPart14
- Motor6D50.Part1 = MeshPart48
- Motor6D50.part1 = MeshPart48
- MeshPart51.Name = "LeftLowerLeg"
- MeshPart51.Parent = Model0
- MeshPart51.CFrame = CFrame.new(-0.67560178, 0.910310864, -1.69765651, -0.00241400092, 3.49997972e-05, 0.999997497, 0, 1, -3.499991e-05, -0.999997497, -8.44897698e-08, -0.00241400092)
- MeshPart51.Orientation = Vector3.new(0, 90.1399994, 0)
- MeshPart51.Position = Vector3.new(-0.67560178, 0.910310864, -1.69765651)
- MeshPart51.Rotation = Vector3.new(179.169998, 89.8700027, -179.169998)
- MeshPart51.Color = Color3.new(0.0509804, 0.411765, 0.67451)
- MeshPart51.Size = Vector3.new(1.00027585, 1.48964536, 1.00032866)
- MeshPart51.BrickColor = BrickColor.new("Bright blue")
- MeshPart51.CanCollide = false
- MeshPart51.brickColor = BrickColor.new("Bright blue")
- Vector3Value52.Name = "OriginalSize"
- Vector3Value52.Parent = MeshPart51
- Vector3Value52.Value = Vector3.new(1.00027585, 1.48964536, 1.00032866)
- Motor6D53.Name = "LeftKnee"
- Motor6D53.Parent = MeshPart51
- Motor6D53.C0 = CFrame.new(-0.00382620096, -0.264486194, 0.000586740673, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Motor6D53.C1 = CFrame.new(-0.00382620096, 0.289868593, 0.00030554086, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Motor6D53.Part0 = MeshPart45
- Motor6D53.Part1 = MeshPart51
- Motor6D53.part1 = MeshPart51
- MeshPart54.Name = "LeftLowerArm"
- MeshPart54.Parent = Model0
- MeshPart54.CFrame = CFrame.new(-0.678323925, 2.90703535, -0.700764775, -0.00241400092, 3.49997972e-05, 0.999997497, 0, 1, -3.499991e-05, -0.999997497, -8.44897698e-08, -0.00241400092)
- MeshPart54.Orientation = Vector3.new(0, 90.1399994, 0)
- MeshPart54.Position = Vector3.new(-0.678323925, 2.90703535, -0.700764775)
- MeshPart54.Rotation = Vector3.new(179.169998, 89.8700027, -179.169998)
- MeshPart54.Color = Color3.new(0.992157, 0.917647, 0.552941)
- MeshPart54.Size = Vector3.new(1.00027657, 1.26567209, 1.00025082)
- MeshPart54.BrickColor = BrickColor.new("Cool yellow")
- MeshPart54.CanCollide = false
- MeshPart54.brickColor = BrickColor.new("Cool yellow")
- Vector3Value55.Name = "OriginalSize"
- Vector3Value55.Parent = MeshPart54
- Vector3Value55.Value = Vector3.new(1.00027657, 1.26567209, 1.00025082)
- Motor6D56.Name = "LeftElbow"
- Motor6D56.Parent = MeshPart54
- Motor6D56.C0 = CFrame.new(-0.00166511536, -0.263139546, -0.00943991542, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Motor6D56.C1 = CFrame.new(-0.0016657114, 0.122950554, -0.00989592075, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Motor6D56.Part0 = MeshPart48
- Motor6D56.Part1 = MeshPart54
- Motor6D56.part1 = MeshPart54
- MeshPart57.Name = "LeftHand"
- MeshPart57.Parent = Model0
- MeshPart57.CFrame = CFrame.new(-0.67280364, 2.1668787, -0.699498653, -0.00241400092, 3.49997972e-05, 0.999997497, 0, 1, -3.499991e-05, -0.999997497, -8.44897698e-08, -0.00241400092)
- MeshPart57.Orientation = Vector3.new(0, 90.1399994, 0)
- MeshPart57.Position = Vector3.new(-0.67280364, 2.1668787, -0.699498653)
- MeshPart57.Rotation = Vector3.new(179.169998, 89.8700027, -179.169998)
- MeshPart57.Color = Color3.new(0.992157, 0.917647, 0.552941)
- MeshPart57.Size = Vector3.new(0.999299049, 0.335255831, 1.00029743)
- MeshPart57.BrickColor = BrickColor.new("Cool yellow")
- MeshPart57.CanCollide = false
- MeshPart57.brickColor = BrickColor.new("Cool yellow")
- Vector3Value58.Name = "OriginalSize"
- Vector3Value58.Parent = MeshPart57
- Vector3Value58.Value = Vector3.new(0.999299049, 0.335255831, 1.00029743)
- Motor6D59.Name = "LeftWrist"
- Motor6D59.Parent = MeshPart57
- Motor6D59.C0 = CFrame.new(-0.0016657114, -0.682255626, -0.00989592075, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Motor6D59.C1 = CFrame.new(-0.000386238098, 0.0579008311, -0.0154390335, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Motor6D59.Part0 = MeshPart54
- Motor6D59.Part1 = MeshPart57
- Motor6D59.part1 = MeshPart57
- Script60.Name = "Respawn"
- Script60.Parent = Model0
- table.insert(cors,sandbox(Script60,function()
- z = script.Parent
- backup = z:clone()
- while true do
- wait(5)
- if z.Zombie.Health == 0 then
- z:Remove()
- wait(4)
- backup.Parent = game.Workspace
- backup.Head:MakeJoints()
- backup.Torso:MakeJoints()
- end
- if z == nil then
- wait(4)
- backup.Parent = game.Workspace
- backup.Head:MakeJoints()
- backup.Torso:MakeJoints()
- end
- end
- end))
- Script61.Name = "Health"
- Script61.Parent = Model0
- table.insert(cors,sandbox(Script61,function()
- --Responsible for regening a player's humanoid's health
- -- declarations
- local Figure = script.Parent
- local Head = Figure:WaitForChild("Head")
- local Humanoid = Figure:WaitForChild("Humanoid")
- local regening = false
- -- regeneration
- function regenHealth()
- if regening then return end
- regening = true
- while Humanoid.Health < Humanoid.MaxHealth do
- local s = wait(1)
- local health = Humanoid.Health
- if health > 0 and health < Humanoid.MaxHealth then
- local newHealthDelta = 0.01 * s * Humanoid.MaxHealth
- health = health + newHealthDelta
- Humanoid.Health = math.min(health,Humanoid.MaxHealth)
- end
- end
- if Humanoid.Health > Humanoid.MaxHealth then
- Humanoid.Health = Humanoid.MaxHealth
- end
- regening = false
- end
- Humanoid.HealthChanged:connect(regenHealth)
- end))
- Script62.Name = "Animate"
- Script62.Parent = Model0
- table.insert(cors,sandbox(Script62,function()
- function waitForChild(parent, childName)
- local child = parent:findFirstChild(childName)
- if child then return child end
- while true do
- child = parent.ChildAdded:wait()
- if child.Name==childName then return child end
- end
- end
- local Figure = script.Parent
- local Humanoid = waitForChild(Figure, "Zombie")
- local pose = "Standing"
- local currentAnim = ""
- local currentAnimInstance = nil
- local currentAnimTrack = nil
- local currentAnimKeyframeHandler = nil
- local currentAnimSpeed = 1.0
- local animTable = {}
- local animNames = {
- idle = {
- { id = "http://www.roblox.com/asset/?id=507766666", weight = 1 },
- { id = "http://www.roblox.com/asset/?id=507766951", weight = 1 },
- { id = "http://www.roblox.com/asset/?id=507766388", weight = 9 }
- },
- walk = {
- { id = "http://www.roblox.com/asset/?id=507777826", weight = 10 }
- },
- run = {
- { id = "http://www.roblox.com/asset/?id=507767714", weight = 10 }
- },
- swim = {
- { id = "http://www.roblox.com/asset/?id=507784897", weight = 10 }
- },
- swimidle = {
- { id = "http://www.roblox.com/asset/?id=507785072", weight = 10 }
- },
- jump = {
- { id = "http://www.roblox.com/asset/?id=507765000", weight = 10 }
- },
- fall = {
- { id = "http://www.roblox.com/asset/?id=507767968", weight = 10 }
- },
- climb = {
- { id = "http://www.roblox.com/asset/?id=507765644", weight = 10 }
- },
- sit = {
- { id = "http://www.roblox.com/asset/?id=507768133", weight = 10 }
- },
- toolnone = {
- { id = "http://www.roblox.com/asset/?id=507768375", weight = 10 }
- },
- toolslash = {
- { id = "http://www.roblox.com/asset/?id=507768375", weight = 10 }
- -- { id = "slash.xml", weight = 10 }
- },
- toollunge = {
- { id = "http://www.roblox.com/asset/?id=507768375", weight = 10 }
- },
- wave = {
- { id = "http://www.roblox.com/asset/?id=507770239", weight = 10 }
- },
- point = {
- { id = "http://www.roblox.com/asset/?id=507770453", weight = 10 }
- },
- dance = {
- { id = "http://www.roblox.com/asset/?id=507771019", weight = 10 },
- { id = "http://www.roblox.com/asset/?id=507771955", weight = 10 },
- { id = "http://www.roblox.com/asset/?id=507772104", weight = 10 }
- },
- dance2 = {
- { id = "http://www.roblox.com/asset/?id=507776043", weight = 10 },
- { id = "http://www.roblox.com/asset/?id=507776720", weight = 10 },
- { id = "http://www.roblox.com/asset/?id=507776879", weight = 10 }
- },
- dance3 = {
- { id = "http://www.roblox.com/asset/?id=507777268", weight = 10 },
- { id = "http://www.roblox.com/asset/?id=507777451", weight = 10 },
- { id = "http://www.roblox.com/asset/?id=507777623", weight = 10 }
- },
- laugh = {
- { id = "http://www.roblox.com/asset/?id=507770818", weight = 10 }
- },
- cheer = {
- { id = "http://www.roblox.com/asset/?id=507770677", weight = 10 }
- },
- }
- -- Existance in this list signifies that it is an emote, the value indicates if it is a looping emote
- local emoteNames = { wave = false, point = false, dance = true, dance2 = true, dance3 = true, laugh = false, cheer = false}
- math.randomseed(tick())
- function configureAnimationSet(name, fileList)
- if (animTable[name] ~= nil) then
- for _, connection in pairs(animTable[name].connections) do
- connection:disconnect()
- end
- end
- animTable[name] = {}
- animTable[name].count = 0
- animTable[name].totalWeight = 0
- animTable[name].connections = {}
- -- check for config values
- local config = script:FindFirstChild(name)
- if (config ~= nil) then
- -- print("Loading anims " .. name)
- table.insert(animTable[name].connections, config.ChildAdded:connect(function(child) configureAnimationSet(name, fileList) end))
- table.insert(animTable[name].connections, config.ChildRemoved:connect(function(child) configureAnimationSet(name, fileList) end))
- local idx = 1
- for _, childPart in pairs(config:GetChildren()) do
- if (childPart:IsA("Animation")) then
- table.insert(animTable[name].connections, childPart.Changed:connect(function(property) configureAnimationSet(name, fileList) end))
- animTable[name][idx] = {}
- animTable[name][idx].anim = childPart
- local weightObject = childPart:FindFirstChild("Weight")
- if (weightObject == nil) then
- animTable[name][idx].weight = 1
- else
- animTable[name][idx].weight = weightObject.Value
- end
- animTable[name].count = animTable[name].count + 1
- animTable[name].totalWeight = animTable[name].totalWeight + animTable[name][idx].weight
- -- print(name .. " [" .. idx .. "] " .. animTable[name][idx].anim.AnimationId .. " (" .. animTable[name][idx].weight .. ")")
- idx = idx + 1
- end
- end
- end
- -- fallback to defaults
- if (animTable[name].count <= 0) then
- for idx, anim in pairs(fileList) do
- animTable[name][idx] = {}
- animTable[name][idx].anim = Instance.new("Animation")
- animTable[name][idx].anim.Name = name
- animTable[name][idx].anim.AnimationId = anim.id
- animTable[name][idx].weight = anim.weight
- animTable[name].count = animTable[name].count + 1
- animTable[name].totalWeight = animTable[name].totalWeight + anim.weight
- -- print(name .. " [" .. idx .. "] " .. anim.id .. " (" .. anim.weight .. ")")
- end
- end
- end
- -- Setup animation objects
- function scriptChildModified(child)
- local fileList = animNames[child.Name]
- if (fileList ~= nil) then
- configureAnimationSet(child.Name, fileList)
- end
- end
- script.ChildAdded:connect(scriptChildModified)
- script.ChildRemoved:connect(scriptChildModified)
- for name, fileList in pairs(animNames) do
- configureAnimationSet(name, fileList)
- end
- -- ANIMATION
- -- declarations
- local toolAnim = "None"
- local toolAnimTime = 0
- local jumpAnimTime = 0
- local jumpAnimDuration = 0.31
- local toolTransitionTime = 0.1
- local fallTransitionTime = 0.2
- -- functions
- function stopAllAnimations()
- local oldAnim = currentAnim
- -- return to idle if finishing an emote
- if (emoteNames[oldAnim] ~= nil and emoteNames[oldAnim] == false) then
- oldAnim = "idle"
- end
- currentAnim = ""
- currentAnimInstance = nil
- if (currentAnimKeyframeHandler ~= nil) then
- currentAnimKeyframeHandler:disconnect()
- end
- if (currentAnimTrack ~= nil) then
- currentAnimTrack:Stop()
- currentAnimTrack:Destroy()
- currentAnimTrack = nil
- end
- return oldAnim
- end
- function setAnimationSpeed(speed)
- if speed ~= currentAnimSpeed then
- currentAnimSpeed = speed
- currentAnimTrack:AdjustSpeed(currentAnimSpeed)
- end
- end
- function keyFrameReachedFunc(frameName)
- if (frameName == "End") then
- -- print("Keyframe : ".. frameName)
- local repeatAnim = currentAnim
- -- return to idle if finishing an emote
- if (emoteNames[repeatAnim] ~= nil and emoteNames[repeatAnim] == false) then
- repeatAnim = "idle"
- end
- local animSpeed = currentAnimSpeed
- playAnimation(repeatAnim, 0.15, Humanoid)
- setAnimationSpeed(animSpeed)
- end
- end
- -- Preload animations
- function playAnimation(animName, transitionTime, humanoid)
- local roll = math.random(1, animTable[animName].totalWeight)
- local origRoll = roll
- local idx = 1
- while (roll > animTable[animName][idx].weight) do
- roll = roll - animTable[animName][idx].weight
- idx = idx + 1
- end
- -- print(animName .. " " .. idx .. " [" .. origRoll .. "]")
- local anim = animTable[animName][idx].anim
- -- switch animation
- if (anim ~= currentAnimInstance) then
- if (currentAnimTrack ~= nil) then
- currentAnimTrack:Stop(transitionTime)
- currentAnimTrack:Destroy()
- end
- currentAnimSpeed = 1.0
- -- load it to the humanoid; get AnimationTrack
- currentAnimTrack = humanoid:LoadAnimation(anim)
- -- play the animation
- currentAnimTrack:Play(transitionTime)
- currentAnim = animName
- currentAnimInstance = anim
- -- set up keyframe name triggers
- if (currentAnimKeyframeHandler ~= nil) then
- currentAnimKeyframeHandler:disconnect()
- end
- currentAnimKeyframeHandler = currentAnimTrack.KeyframeReached:connect(keyFrameReachedFunc)
- end
- end
- -------------------------------------------------------------------------------------------
- -------------------------------------------------------------------------------------------
- local toolAnimName = ""
- local toolAnimTrack = nil
- local toolAnimInstance = nil
- local currentToolAnimKeyframeHandler = nil
- function toolKeyFrameReachedFunc(frameName)
- if (frameName == "End") then
- -- print("Keyframe : ".. frameName)
- playToolAnimation(toolAnimName, 0.0, Humanoid)
- end
- end
- function playToolAnimation(animName, transitionTime, humanoid)
- local roll = math.random(1, animTable[animName].totalWeight)
- local origRoll = roll
- local idx = 1
- while (roll > animTable[animName][idx].weight) do
- roll = roll - animTable[animName][idx].weight
- idx = idx + 1
- end
- -- print(animName .. " * " .. idx .. " [" .. origRoll .. "]")
- local anim = animTable[animName][idx].anim
- if (toolAnimInstance ~= anim) then
- if (toolAnimTrack ~= nil) then
- toolAnimTrack:Stop()
- toolAnimTrack:Destroy()
- transitionTime = 0
- end
- -- load it to the humanoid; get AnimationTrack
- toolAnimTrack = humanoid:LoadAnimation(anim)
- -- play the animation
- toolAnimTrack:Play(transitionTime)
- toolAnimName = animName
- toolAnimInstance = anim
- currentToolAnimKeyframeHandler = toolAnimTrack.KeyframeReached:connect(toolKeyFrameReachedFunc)
- end
- end
- function stopToolAnimations()
- local oldAnim = toolAnimName
- if (currentToolAnimKeyframeHandler ~= nil) then
- currentToolAnimKeyframeHandler:disconnect()
- end
- toolAnimName = ""
- toolAnimInstance = nil
- if (toolAnimTrack ~= nil) then
- toolAnimTrack:Stop()
- toolAnimTrack:Destroy()
- toolAnimTrack = nil
- end
- return oldAnim
- end
- -------------------------------------------------------------------------------------------
- -------------------------------------------------------------------------------------------
- function onRunning(speed)
- if speed > 0.01 then
- local scale = 15.0
- playAnimation("walk", 0.1, Humanoid)
- setAnimationSpeed(speed / scale)
- pose = "Running"
- else
- playAnimation("idle", 0.1, Humanoid)
- pose = "Standing"
- end
- end
- function onDied()
- pose = "Dead"
- end
- function onJumping()
- playAnimation("jump", 0.1, Humanoid)
- jumpAnimTime = jumpAnimDuration
- pose = "Jumping"
- end
- function onClimbing(speed)
- local scale = 5.0
- playAnimation("climb", 0.1, Humanoid)
- setAnimationSpeed(speed / scale)
- pose = "Climbing"
- end
- function onGettingUp()
- pose = "GettingUp"
- end
- function onFreeFall()
- if (jumpAnimTime <= 0) then
- playAnimation("fall", fallTransitionTime, Humanoid)
- end
- pose = "FreeFall"
- end
- function onFallingDown()
- pose = "FallingDown"
- end
- function onSeated()
- pose = "Seated"
- end
- function onPlatformStanding()
- pose = "PlatformStanding"
- end
- function onSwimming(speed)
- if speed > 1.00 then
- local scale = 10.0
- playAnimation("swim", 0.4, Humanoid)
- setAnimationSpeed(speed / scale)
- pose = "Swimming"
- else
- playAnimation("swimidle", 0.4, Humanoid)
- pose = "Standing"
- end
- end
- function getTool()
- for _, kid in ipairs(Figure:GetChildren()) do
- if kid.className == "Tool" then return kid end
- end
- return nil
- end
- function getToolAnim(tool)
- for _, c in ipairs(tool:GetChildren()) do
- if c.Name == "toolanim" and c.className == "StringValue" then
- return c
- end
- end
- return nil
- end
- function animateTool()
- if (toolAnim == "None") then
- playToolAnimation("toolnone", toolTransitionTime, Humanoid)
- return
- end
- if (toolAnim == "Slash") then
- playToolAnimation("toolslash", 0, Humanoid)
- return
- end
- if (toolAnim == "Lunge") then
- playToolAnimation("toollunge", 0, Humanoid)
- return
- end
- end
- function moveSit()
- RightShoulder.MaxVelocity = 0.15
- LeftShoulder.MaxVelocity = 0.15
- RightShoulder:SetDesiredAngle(3.14 /2)
- LeftShoulder:SetDesiredAngle(-3.14 /2)
- RightHip:SetDesiredAngle(3.14 /2)
- LeftHip:SetDesiredAngle(-3.14 /2)
- end
- local lastTick = 0
- function move(time)
- local amplitude = 1
- local frequency = 1
- local deltaTime = time - lastTick
- lastTick = time
- local climbFudge = 0
- local setAngles = false
- if (jumpAnimTime > 0) then
- jumpAnimTime = jumpAnimTime - deltaTime
- end
- if (pose == "FreeFall" and jumpAnimTime <= 0) then
- playAnimation("fall", fallTransitionTime, Humanoid)
- elseif (pose == "Seated") then
- playAnimation("sit", 0.5, Humanoid)
- return
- elseif (pose == "Running") then
- playAnimation("walk", 0.1, Humanoid)
- elseif (pose == "Dead" or pose == "GettingUp" or pose == "FallingDown" or pose == "Seated" or pose == "PlatformStanding") then
- stopAllAnimations()
- amplitude = 0.1
- frequency = 1
- setAngles = true
- end
- -- Tool Animation handling
- local tool = getTool()
- if tool then
- animStringValueObject = getToolAnim(tool)
- if animStringValueObject then
- toolAnim = animStringValueObject.Value
- -- message recieved, delete StringValue
- animStringValueObject.Parent = nil
- toolAnimTime = time + .3
- end
- if time > toolAnimTime then
- toolAnimTime = 0
- toolAnim = "None"
- end
- animateTool()
- else
- stopToolAnimations()
- toolAnim = "None"
- toolAnimInstance = nil
- toolAnimTime = 0
- end
- end
- -- connect events
- Humanoid.Died:connect(onDied)
- Humanoid.Running:connect(onRunning)
- Humanoid.Jumping:connect(onJumping)
- Humanoid.Climbing:connect(onClimbing)
- Humanoid.GettingUp:connect(onGettingUp)
- Humanoid.FreeFalling:connect(onFreeFall)
- Humanoid.FallingDown:connect(onFallingDown)
- Humanoid.Seated:connect(onSeated)
- Humanoid.PlatformStanding:connect(onPlatformStanding)
- Humanoid.Swimming:connect(onSwimming)
- -- setup emote chat hook
- script.msg.Changed:connect(function(msg)
- script.msg.Value = ""
- local emote = ""
- if (string.sub(msg, 1, 3) == "/e ") then
- emote = string.sub(msg, 4)
- elseif (string.sub(msg, 1, 7) == "/emote ") then
- emote = string.sub(msg, 8)
- end
- if (pose == "Standing" and emoteNames[emote] ~= nil) then
- playAnimation(emote, 0.1, Humanoid)
- end
- -- print("===> " .. string.sub(msg, 1, 3) .. "(" .. emote .. ")")
- end)
- -- main program
- local runService = game:service("RunService");
- -- print("bottom")
- -- initialize to idle
- playAnimation("idle", 0.1, Humanoid)
- pose = "Standing"
- while Figure.Parent~=nil do
- local _, time = wait(0.1)
- move(time)
- end
- end))
- StringValue63.Name = "msg"
- StringValue63.Parent = Script62
- StringValue64.Name = "climb"
- StringValue64.Parent = Script62
- Animation65.Name = "ClimbAnim"
- Animation65.Parent = StringValue64
- Animation65.AnimationId = "http://www.roblox.com/asset/?id=616156119"
- StringValue66.Name = "fall"
- StringValue66.Parent = Script62
- Animation67.Name = "FallAnim"
- Animation67.Parent = StringValue66
- Animation67.AnimationId = "http://www.roblox.com/asset/?id=616157476"
- StringValue68.Name = "idle"
- StringValue68.Parent = Script62
- Animation69.Name = "Animation1"
- Animation69.Parent = StringValue68
- Animation69.AnimationId = "http://www.roblox.com/asset/?id=616158929"
- NumberValue70.Name = "Weight"
- NumberValue70.Parent = Animation69
- NumberValue70.Value = 9
- Animation71.Name = "Animation2"
- Animation71.Parent = StringValue68
- Animation71.AnimationId = "http://www.roblox.com/asset/?id=616160636"
- NumberValue72.Name = "Weight"
- NumberValue72.Parent = Animation71
- NumberValue72.Value = 1
- StringValue73.Name = "jump"
- StringValue73.Parent = Script62
- Animation74.Name = "JumpAnim"
- Animation74.Parent = StringValue73
- Animation74.AnimationId = "http://www.roblox.com/asset/?id=616161997"
- StringValue75.Name = "sit"
- StringValue75.Parent = Script62
- Animation76.Name = "SitAnim"
- Animation76.Parent = StringValue75
- Animation76.AnimationId = "http://www.roblox.com/asset/?id=507768133"
- StringValue77.Name = "swim"
- StringValue77.Parent = Script62
- Animation78.Name = "Swim"
- Animation78.Parent = StringValue77
- Animation78.AnimationId = "http://www.roblox.com/asset/?id=616165109"
- StringValue79.Name = "swimidle"
- StringValue79.Parent = Script62
- Animation80.Name = "SwimIdle"
- Animation80.Parent = StringValue79
- Animation80.AnimationId = "http://www.roblox.com/asset/?id=616166655"
- StringValue81.Name = "toolnone"
- StringValue81.Parent = Script62
- Animation82.Name = "ToolNoneAnim"
- Animation82.Parent = StringValue81
- Animation82.AnimationId = "http://www.roblox.com/asset/?id=507768375"
- StringValue83.Name = "walk"
- StringValue83.Parent = Script62
- Animation84.Name = "RunAnim"
- Animation84.Parent = StringValue83
- Animation84.AnimationId = "http://www.roblox.com/asset/?id=616168032"
- Script85.Name = "SoundScript"
- Script85.Parent = Model0
- table.insert(cors,sandbox(Script85,function()
- local moan = script.Parent.Head.Moan
- local moan2 = script.parent.Head.Moan2
- local moan3 = script.parent.Head.Moan3
- local moan4 = script.Parent.Head.Moan4
- while true do
- moan:Play()
- wait(8)
- moan2:Play()
- wait(5)
- moan3:Play()
- wait(7)
- moan4:Play()
- wait(6)
- end
- local death = script.Parent.Head.Death
- end))
- for i,v in pairs(mas:GetChildren()) do
- v.Parent = workspace
- pcall(function() v:MakeJoints() end)
- end
- mas:Destroy()
- for i,v in pairs(cors) do
- spawn(function()
- pcall(v)
- end)
- end
- end
- for i = 1,1 do
- createZombie()
- end
- local CellerLamp1 = Instance.new("Part")
- CellerLamp1.Parent = workspace
- CellerLamp1.Anchored = true
- CellerLamp1.Size = Vector3.new(1, 1,6)
- CellerLamp1.CanCollide = true
- CellerLamp1.Position = Vector3.new(143.615, 1678.5, 148.468)
- CellerLamp1.Material = "Glass"
- CellerLamp1.BrickColor = BrickColor.new("Institutional white")
- local LampLight1 = Instance.new("PointLight", CellerLamp1)
- LampLight1.Color = Color3.new(255, 255, 255)
- LampLight1.Range = 15
- LampLight1.Brightness = 5
- local CellerLamp2 = Instance.new("Part")
- CellerLamp2.Parent = workspace
- CellerLamp2.Anchored = true
- CellerLamp2.Size = Vector3.new(1, 1,6)
- CellerLamp2.CanCollide = true
- CellerLamp2.Position = Vector3.new(117.615, 1678.5, 148.468)
- CellerLamp2.Material = "Glass"
- CellerLamp2.BrickColor = BrickColor.new("Institutional white")
- local LampLight2 = Instance.new("PointLight", CellerLamp2)
- LampLight2.Color = Color3.new(255, 255, 255)
- LampLight2.Range = 15
- LampLight2.Brightness = 5
- game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = 0
- game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = CFrame.new(-26.146, 61.9, 248.911)
- game:GetObjects("rbxassetid://1008107388")[1].Parent = game.Workspace
- game:GetObjects("rbxassetid://12899113663")[1].Parent = game.Workspace
- local LockedSkyScreaperDoor1 = Instance.new("Part")
- LockedSkyScreaperDoor1.Parent = workspace
- LockedSkyScreaperDoor1.Anchored = true
- LockedSkyScreaperDoor1.Size = Vector3.new(4, 7, 1)
- LockedSkyScreaperDoor1.CanCollide = true
- LockedSkyScreaperDoor1.Position = Vector3.new(-1553.618, 538.1, 551.215)
- local LockedSkyScreaperDoor2 = Instance.new("Part")
- LockedSkyScreaperDoor2.Parent = workspace
- LockedSkyScreaperDoor2.Anchored = true
- LockedSkyScreaperDoor2.Size = Vector3.new(4, 7, 2)
- LockedSkyScreaperDoor2.CanCollide = true
- LockedSkyScreaperDoor2.Position = Vector3.new(-1553.778, 481.003, 551.766)
- LockedSkyScreaperDoor2.Transparency = 1
- local NoCheatPart = Instance.new("Part")
- NoCheatPart.Parent = workspace
- NoCheatPart.Anchored = true
- NoCheatPart.Size = Vector3.new(19, 17, 30)
- NoCheatPart.CanCollide = true
- NoCheatPart.Position = Vector3.new(-1560.239, 543.1, 611.628)
- NoCheatPart.Transparency = 1
- local LockedSkyScreaperDoor3 = Instance.new("Part")
- LockedSkyScreaperDoor3.Parent = workspace
- LockedSkyScreaperDoor3.Anchored = true
- LockedSkyScreaperDoor3.Size = Vector3.new(4, 7, 1)
- LockedSkyScreaperDoor3.CanCollide = true
- LockedSkyScreaperDoor3.Position = Vector3.new(-1553.752, 494.9, 551.204)
- local LockedSkyScreaperDoor4 = Instance.new("Part")
- LockedSkyScreaperDoor4.Parent = workspace
- LockedSkyScreaperDoor4.Anchored = true
- LockedSkyScreaperDoor4.Size = Vector3.new(4, 7, 1)
- LockedSkyScreaperDoor4.CanCollide = true
- LockedSkyScreaperDoor4.Position = Vector3.new(-1553.752, 509.363, 551.266)
- local LockedSkyScreaperWall= Instance.new("Part")
- LockedSkyScreaperWall.Parent = workspace
- LockedSkyScreaperWall.Anchored = true
- LockedSkyScreaperWall.Size = Vector3.new(9, 11, 2)
- LockedSkyScreaperWall.CanCollide = true
- LockedSkyScreaperWall.Position = Vector3.new(-1703.162, 528.749, 603.962)
- LockedSkyScreaperWall.Transparency = 1
- local SkyScreaperWall1= Instance.new("Part")
- SkyScreaperWall1.Parent = workspace
- SkyScreaperWall1.Anchored = true
- SkyScreaperWall1.Size = Vector3.new(1, 31, 132)
- SkyScreaperWall1.CanCollide = true
- SkyScreaperWall1.Position = Vector3.new(-1531.379, 551.3, 574.172)
- SkyScreaperWall1.Transparency = 1
- local SkyScreaperWall2= Instance.new("Part")
- SkyScreaperWall2.Parent = workspace
- SkyScreaperWall2.Anchored = true
- SkyScreaperWall2.Size = Vector3.new(1, 31, 132)
- SkyScreaperWall2.CanCollide = true
- SkyScreaperWall2.Position = Vector3.new(-1731.379, 551.3, 574.172)
- SkyScreaperWall2.Transparency = 1
- local SkyScreaperWall3= Instance.new("Part")
- SkyScreaperWall3.Parent = workspace
- SkyScreaperWall3.Anchored = true
- SkyScreaperWall3.Size = Vector3.new(205, 31, 2)
- SkyScreaperWall3.CanCollide = true
- SkyScreaperWall3.Position = Vector3.new(-1633.256, 551.3, 508.352)
- SkyScreaperWall3.Transparency = 1
- local SkyScreaperWall4= Instance.new("Part")
- SkyScreaperWall4.Parent = workspace
- SkyScreaperWall4.Anchored = true
- SkyScreaperWall4.Size = Vector3.new(205, 31, 2)
- SkyScreaperWall4.CanCollide = true
- SkyScreaperWall4.Position = Vector3.new(-1633.256, 551.3, 640.352)
- SkyScreaperWall4.Transparency = 1
- local LockedSkyScreaperDoor5 = Instance.new("Part")
- LockedSkyScreaperDoor5.Parent = workspace
- LockedSkyScreaperDoor5.Anchored = true
- LockedSkyScreaperDoor5.Size = Vector3.new(1, 7, 4)
- LockedSkyScreaperDoor5.CanCollide = true
- LockedSkyScreaperDoor5.Position = Vector3.new(-1712.102, 538.656, 596.066)
- LockedSkyScreaperDoor5.Rotation = Vector3.new(0, 90, 0)
- local LockedSkyScreaperDoor5Mesh = Instance.new("SpecialMesh", LockedSkyScreaperDoor5)
- LockedSkyScreaperDoor5Mesh.Scale = Vector3.new(0.3, 1.2, 2.3)
- LockedSkyScreaperDoor5Mesh.MeshId = "rbxassetid://431484008"
- LockedSkyScreaperDoor5Mesh.TextureId = "rbxassetid://431484036"
- local ScreenGui = Instance.new("ScreenGui")
- local SoulsLabelFrame = Instance.new("Frame")
- local SoulsLabel = Instance.new("TextLabel")
- ScreenGui.Parent = game.CoreGui
- SoulsLabelFrame.Name = "SoulsLabelFrame"
- SoulsLabelFrame.Parent = ScreenGui
- SoulsLabelFrame.BackgroundColor3 = Color3.new(255, 255, 255)
- SoulsLabelFrame.BackgroundTransparency = 1
- SoulsLabelFrame.Position = UDim2.new(0.105540894, 0, 0.778873265, 0)
- SoulsLabelFrame.Size = UDim2.new(0, 100, 0, 100)
- SoulsLabel.Name = "SoulsLabel"
- SoulsLabel.Parent = SoulsLabelFrame
- SoulsLabel.BackgroundColor3 = Color3.new(0, 0, 0)
- SoulsLabel.BorderSizePixel = 0
- SoulsLabel.Draggable = false
- SoulsLabel.Position = UDim2.new(3, 0, -3.5, 0)
- SoulsLabel.Size = UDim2.new(0, 155, 0, 95)
- SoulsLabel.Text = "Souls: 0/3"
- SoulsLabel.Font = Enum.Font.IndieFlower
- SoulsLabel.BackgroundTransparency = 1
- SoulsLabel.FontSize = Enum.FontSize.Size48
- SoulsLabel.TextColor3 = Color3.new(255, 255, 255)
- SoulsLabel.TextSize = 100
- SoulsLabelFrame.Visible = false
- SoulClickDetector1 = Instance.new("ClickDetector")
- local SoulPart1 = Instance.new("Part")
- local SoulPart2 = Instance.new("Part")
- local SoulPart3 = Instance.new("Part")
- SoulPart1.Parent = workspace
- SoulPart1.Anchored = true
- SoulPart1.Size = Vector3.new(2, 2, 2)
- SoulPart1.CanCollide = true
- SoulPart1.Position = Vector3.new(-1633.995, 525.4, 608.514)
- SoulPart1.BrickColor = BrickColor.new("Institutional white")
- SoulPart1.Material = "ForceField"
- local SoulPart1Mesh = Instance.new("SpecialMesh", SoulPart1)
- SoulPart1Mesh.MeshType = Enum.MeshType.Sphere
- local SoulPart1Fire = Instance.new("Fire", SoulPart1)
- SoulPart1Fire.Size = 5
- SoulPart1Fire.Color = Color3.new(255,255,255)
- SoulPart1Fire.Heat = 0
- SoulClickDetector1.Parent = SoulPart1
- SoulClickDetector1.MouseClick:connect(function()
- SoulsLabel.Text = "Souls: 1/3"
- local SoulSound1 = Instance.new("Sound")
- local Id = "297569488"
- SoulSound1.Parent = game.Workspace
- SoulSound1.SoundId = "rbxassetid://"..Id
- SoulSound1.Playing = true
- SoulSound1.Looped = false
- SoulSound1.Volume = 1
- SoulPart1.Position = Vector3.new(9999999999999, 9999999999999, 9999999999999)
- SoulPart2.Position = Vector3.new(-1619.355, 525.27, 558.027)
- end)
- SoulClickDetector2 = Instance.new("ClickDetector")
- SoulPart2.Parent = workspace
- SoulPart2.Anchored = true
- SoulPart2.Size = Vector3.new(2, 2, 2)
- SoulPart2.CanCollide = true
- SoulPart2.Position = Vector3.new(9999999999999, 9999999999999, 9999999999999)
- SoulPart2.BrickColor = BrickColor.new("Institutional white")
- SoulPart2.Material = "ForceField"
- local SoulPart2Mesh = Instance.new("SpecialMesh", SoulPart2)
- SoulPart2Mesh.MeshType = Enum.MeshType.Sphere
- local SoulPart2Fire = Instance.new("Fire", SoulPart2)
- SoulPart2Fire.Size = 5
- SoulPart2Fire.Color = Color3.new(255,255,255)
- SoulPart2Fire.Heat = 0
- SoulClickDetector2.Parent = SoulPart2
- SoulClickDetector2.MouseClick:connect(function()
- SoulsLabel.Text = "Souls: 2/3"
- local SoulSound2 = Instance.new("Sound")
- local Id = "297569488"
- SoulSound2.Parent = game.Workspace
- SoulSound2.SoundId = "rbxassetid://"..Id
- SoulSound2.Playing = true
- SoulSound2.Looped = false
- SoulSound2.Volume = 1
- SoulPart2.Position = Vector3.new(9999999999999, 9999999999999, 9999999999999)
- SoulPart3.Position = Vector3.new(-1636.4, 524.3, 524.566)
- end)
- SoulClickDetector3 = Instance.new("ClickDetector")
- SoulPart3.Parent = workspace
- SoulPart3.Anchored = true
- SoulPart3.Size = Vector3.new(2, 2, 2)
- SoulPart3.CanCollide = true
- SoulPart3.Position = Vector3.new(9999999999999, 9999999999999, 9999999999999)
- SoulPart3.BrickColor = BrickColor.new("Institutional white")
- SoulPart3.Material = "ForceField"
- local SoulPart3Mesh = Instance.new("SpecialMesh", SoulPart3)
- SoulPart3Mesh.MeshType = Enum.MeshType.Sphere
- local SoulPart3Fire = Instance.new("Fire", SoulPart3)
- SoulPart3Fire.Size = 5
- SoulPart3Fire.Color = Color3.new(255,255,255)
- SoulPart3Fire.Heat = 0
- SoulClickDetector3.Parent = SoulPart3
- SoulClickDetector3.MouseClick:connect(function()
- SoulsLabel.Text = "Souls: 3/3"
- local SoulSound3 = Instance.new("Sound")
- local Id = "297569488"
- SoulSound3.Parent = game.Workspace
- SoulSound3.SoundId = "rbxassetid://"..Id
- SoulSound3.Playing = true
- SoulSound3.Looped = false
- SoulSound3.Volume = 1
- SoulPart3.Position = Vector3.new(9999999999999, 9999999999999, 9999999999999)
- game.StarterGui:SetCore("ChatMakeSystemMessage", {
- Text = "[ERROR_CODE]:Good job, now go to the 2nd floor, to the heliport.";
- Color = Color3.fromRGB(255, 255, 255);
- })
- wait(2)
- SoulsLabel:Destroy()
- LockedSkyScreaperDoor5.Position = Vector3.new(9999999999999, 9999999999999, 9999999999999)
- local DoorSound = Instance.new("Sound")
- local Id = "5468133300"
- DoorSound.Parent = game.Workspace
- DoorSound.SoundId = "rbxassetid://"..Id
- DoorSound.Playing = true
- DoorSound.Looped = false
- DoorSound.Volume = 1
- end)
- local Dresser = Instance.new("Part")
- Dresser.Parent = workspace
- Dresser.Anchored = true
- Dresser.Size = Vector3.new(2, 6.5, 6)
- Dresser.CanCollide = true
- Dresser.Position = Vector3.new(-28.71, 4.9, 232.908)
- Dresser.Rotation = Vector3.new(0,90,0)
- local DresserMesh = Instance.new("SpecialMesh", Dresser)
- DresserMesh.Scale = Vector3.new(0.1, 0.15, 0.19)
- DresserMesh.MeshId = "rbxassetid://6965783518"
- DresserMesh.TextureId = "rbxassetid://6965783533"
- game:FindService("RunService"):Set3dRenderingEnabled(false)
- local plr = game.Players.LocalPlayer
- local gui = Instance.new("ScreenGui")
- gui.Parent = plr.PlayerGui
- gui.ResetOnSpawn = false
- local StartQuestion = Instance.new("TextLabel")
- StartQuestion.Parent = gui
- StartQuestion.BackgroundTransparency = 1
- StartQuestion.Size = UDim2.new(2, 0, 2, 0)
- StartQuestion.Position = UDim2.new(-0.5, 0, 0 ,-255)
- StartQuestion.TextXAlignment = Enum.TextXAlignment.Center
- StartQuestion.TextScaled = true
- StartQuestion.Text = "Ugh...Terrible dream."
- StartQuestion.TextColor3 = Color3.new(0, 0, 0)
- StartQuestion.Font = Enum.Font.IndieFlower
- wait(3)
- StartQuestion:Destroy()
- local StartQuestion2 = Instance.new("TextLabel")
- StartQuestion2.Parent = gui
- StartQuestion2.BackgroundTransparency = 1
- StartQuestion2.Size = UDim2.new(2, 0, 2, 0)
- StartQuestion2.Position = UDim2.new(-0.5, 0, 0 ,-255)
- StartQuestion2.TextXAlignment = Enum.TextXAlignment.Center
- StartQuestion2.TextScaled = true
- StartQuestion2.Text = "Stop..."
- StartQuestion2.TextColor3 = Color3.new(0, 0, 0)
- StartQuestion2.Font = Enum.Font.IndieFlower
- wait(3)
- StartQuestion2:Destroy()
- local Blur = Instance.new("BlurEffect")
- Blur.Size = 5
- Blur.Parent = game:GetService("Lighting")
- local SoundAlfa = Instance.new("Sound")
- local Id = "1837901628"
- SoundAlfa.Parent = game.Workspace
- SoundAlfa.SoundId = "rbxassetid://"..Id
- SoundAlfa.Playing = true
- SoundAlfa.Looped = true
- SoundAlfa.Volume = 1
- game:FindService("RunService"):Set3dRenderingEnabled(true)
- game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = 5
- game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = CFrame.new(3.713, 13.6, 218.234)
- local Player = game.Players.LocalPlayer
- local Character = Player.Character
- local Humanoid = Character.Humanoid
- if Humanoid.WalkSpeed > 5 then
- game.Players.LocalPlayer:Kick("DO NOT USE EXPLOIT!")
- end
- Humanoid.MaxHealth = 100
- Humanoid.HealthChanged:connect(function()
- if Humanoid.Health < 5 then
- Humanoid.Health = Humanoid.MaxHealth
- localaction = math.random(1,5)
- if localaction == 1 then
- for i,v in pairs(game.Players:GetPlayers()) do
- spawn(function()
- local newgui = Instance.new("ScreenGui",v.PlayerGui)
- newgui.Name = "Screamer"
- local newimage = Instance.new("ImageLabel",newgui)
- newimage.Image = "rbxassetid://6679835009"
- newimage.Size = UDim2.new(1,0,1,0)
- local Sound = Instance.new("Sound")
- local Id = "670599653"
- Sound.Parent = game.Workspace
- Sound.SoundId = "rbxassetid://"..Id
- Sound.Playing = true
- Sound.Looped = false
- Sound.Volume = 999
- wait(0.2)
- newimage:Destroy()
- Sound:Stop()
- end)
- end
- end
- if localaction == 2 then
- for i,v in pairs(game.Players:GetPlayers()) do
- spawn(function()
- local newgui = Instance.new("ScreenGui",v.PlayerGui)
- newgui.Name = "Screamer"
- local newimage = Instance.new("ImageLabel",newgui)
- newimage.Image = "rbxassetid://1119705746"
- newimage.Size = UDim2.new(1,0,1,0)
- local Sound = Instance.new("Sound")
- local Id = "670599653"
- Sound.Parent = game.Workspace
- Sound.SoundId = "rbxassetid://"..Id
- Sound.Playing = true
- Sound.Looped = false
- Sound.Volume = 999
- wait(0.2)
- newimage:Destroy()
- Sound:Stop()
- end)
- end
- end
- if localaction == 3 then
- for i,v in pairs(game.Players:GetPlayers()) do
- spawn(function()
- local newgui = Instance.new("ScreenGui",v.PlayerGui)
- newgui.Name = "Screamer"
- local newimage = Instance.new("ImageLabel",newgui)
- newimage.Image = "rbxassetid://2293755576"
- newimage.Size = UDim2.new(1,0,1,0)
- local Sound = Instance.new("Sound")
- local Id = "670599653"
- Sound.Parent = game.Workspace
- Sound.SoundId = "rbxassetid://"..Id
- Sound.Playing = true
- Sound.Looped = false
- Sound.Volume = 999
- wait(0.2)
- newimage:Destroy()
- Sound:Stop()
- end)
- end
- end
- if localaction == 4 then
- for i,v in pairs(game.Players:GetPlayers()) do
- spawn(function()
- local newgui = Instance.new("ScreenGui",v.PlayerGui)
- newgui.Name = "Screamer"
- local newimage = Instance.new("ImageLabel",newgui)
- newimage.Image = "rbxassetid://100876676"
- newimage.Size = UDim2.new(1,0,1,0)
- local Sound = Instance.new("Sound")
- local Id = "670599653"
- Sound.Parent = game.Workspace
- Sound.SoundId = "rbxassetid://"..Id
- Sound.Playing = true
- Sound.Looped = false
- Sound.Volume = 999
- wait(0.2)
- newimage:Destroy()
- Sound:Stop()
- end)
- end
- end
- if localaction == 5 then
- for i,v in pairs(game.Players:GetPlayers()) do
- spawn(function()
- local newgui = Instance.new("ScreenGui",v.PlayerGui)
- newgui.Name = "Screamer"
- local newimage = Instance.new("ImageLabel",newgui)
- newimage.Image = "rbxassetid://11518873999"
- newimage.Size = UDim2.new(1,0,1,0)
- local Sound = Instance.new("Sound")
- local Id = "670599653"
- Sound.Parent = game.Workspace
- Sound.SoundId = "rbxassetid://"..Id
- Sound.Playing = true
- Sound.Looped = false
- Sound.Volume = 999
- wait(0.2)
- newimage:Destroy()
- Sound:Stop()
- end)
- end
- end
- end
- SoulsLabelFrame.Visible = false
- local Sound = Instance.new("Sound")
- local Id = "131038747"
- Sound.Parent = game.Workspace
- Sound.SoundId = "rbxassetid://"..Id
- Sound.Playing = true
- Sound.Looped = true
- Sound.Volume = 1
- game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = CFrame.new(-26.146, 61.9, 248.911)
- local plr = game.Players.LocalPlayer
- local gui = Instance.new("ScreenGui")
- gui.Parent = plr.PlayerGui
- gui.ResetOnSpawn = false
- local Thx = Instance.new("TextLabel")
- Thx.Parent = gui
- Thx.BackgroundTransparency = 1
- Thx.Size = UDim2.new(1, 0, 1, 0)
- Thx.Position = UDim2.new(0, 0, 0.6 ,-255)
- Thx.TextXAlignment = Enum.TextXAlignment.Center
- Thx.TextScaled = true
- Thx.Text = "Game Over"
- Thx.TextColor3 = Color3.new(255, 255, 255)
- Thx.Font = Enum.Font.IndieFlower
- while true do
- local Camera = game.Workspace.Camera
- Camera.CameraType = Enum.CameraType.Scriptable
- Camera.CFrame = CFrame.new(-38.902, 7.4, 229.421)
- wait(2)
- local Camera = game.Workspace.Camera
- Camera.CameraType = Enum.CameraType.Scriptable
- Camera.CFrame = CFrame.new(-2.172, 17, 259.511)
- wait(2)
- local Camera = game.Workspace.Camera
- Camera.CameraType = Enum.CameraType.Scriptable
- Camera.CFrame = CFrame.new(-8.936, 5.402, 235.685)
- wait(2)
- end
- end)
- function sandbox(var,func)
- local env = getfenv(func)
- local newenv = setmetatable({},{
- __index = function(self,k)
- if k=="script" then
- return var
- else
- return env[k]
- end
- end,
- })
- setfenv(func,newenv)
- return func
- end
- cors = {}
- mas = Instance.new("Model",game:GetService("Lighting"))
- Tool0 = Instance.new("Tool")
- Part1 = Instance.new("Part")
- Sound2 = Instance.new("Sound")
- SpecialMesh3 = Instance.new("SpecialMesh")
- SpotLight4 = Instance.new("SpotLight")
- LocalScript5 = Instance.new("LocalScript")
- LocalScript6 = Instance.new("LocalScript")
- ModuleScript7 = Instance.new("ModuleScript")
- Tool0.Name = "Flashlight"
- Tool0.Parent = mas
- Tool0.TextureId = "http://www.roblox.com/asset/?id=115955232"
- Tool0.Grip = CFrame.new(0.100000001, -0.400000006, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Tool0.GripPos = Vector3.new(0.10000000149011612, -0.4000000059604645, 0)
- Tool0.ToolTip = "Flashlight"
- Part1.Name = "Handle"
- Part1.Parent = Tool0
- Part1.CFrame = CFrame.new(10.9154053, 0.25, -18.9892578, 0, 0, 1, 0, 1, 0, -1, 0, 0)
- Part1.Orientation = Vector3.new(0, 90, 0)
- Part1.Position = Vector3.new(10.9154052734375, 0.25, -18.9892578125)
- Part1.Rotation = Vector3.new(0, 90, 0)
- Part1.Color = Color3.new(0.960784, 0.803922, 0.188235)
- Part1.Size = Vector3.new(0.5, 0.5, 2)
- Part1.BottomSurface = Enum.SurfaceType.Smooth
- Part1.BrickColor = BrickColor.new("Bright yellow")
- Part1.TopSurface = Enum.SurfaceType.Smooth
- Part1.brickColor = BrickColor.new("Bright yellow")
- Part1.FormFactor = Enum.FormFactor.Custom
- Part1.formFactor = Enum.FormFactor.Custom
- Sound2.Parent = Part1
- Sound2.SoundId = "http://www.roblox.com/asset/?id=115959318"
- Sound2.Volume = 1
- SpecialMesh3.Parent = Part1
- SpecialMesh3.MeshId = "http://www.roblox.com/asset/?id=115955313"
- SpecialMesh3.Scale = Vector3.new(0.699999988079071, 0.699999988079071, 0.699999988079071)
- SpecialMesh3.TextureId = "http://www.roblox.com/asset?id=115955343"
- SpecialMesh3.MeshType = Enum.MeshType.FileMesh
- SpotLight4.Parent = Part1
- SpotLight4.Enabled = false
- SpotLight4.Range = 40
- SpotLight4.Brightness = 10
- SpotLight4.Shadows = true
- LocalScript5.Parent = Tool0
- table.insert(cors,sandbox(LocalScript5,function()
- player = game.Players.LocalPlayer
- tool = script.Parent
- repeat wait() until player
- tool.Equipped:connect(function(mouse)
- mouse.Button1Down:connect(function()
- tool.Handle.SpotLight.Enabled = not tool.Handle.SpotLight.Enabled
- tool.Handle.Sound:Play()
- end)
- end)
- end))
- LocalScript6.Parent = Tool0
- table.insert(cors,sandbox(LocalScript6,function()
- -- Variables for services
- local render = game:GetService("RunService").RenderStepped
- local contextActionService = game:GetService("ContextActionService")
- local userInputService = game:GetService("UserInputService")
- local player = game.Players.LocalPlayer
- local mouse = player:GetMouse()
- local Tool = script.Parent
- -- Variables for Module Scripts
- local screenSpace = require(Tool:WaitForChild("ScreenSpace"))
- local connection
- local neck, shoulder, oldNeckC0, oldShoulderC0
- local mobileShouldTrack = true
- -- Thourough check to see if a character is sitting
- local function amISitting(character)
- local t = character.Torso
- for _, part in pairs(t:GetConnectedParts(true)) do
- if part:IsA("Seat") or part:IsA("VehicleSeat") then
- return true
- end
- end
- end
- -- Function to call on renderstepped. Orients the character so it is facing towards
- -- the player mouse's position in world space. If character is sitting then the torso
- -- should not track
- local function frame(mousePosition)
- -- Special mobile consideration. We don't want to track if the user was touching a ui
- -- element such as the movement controls. Just return out of function if so to make sure
- -- character doesn't track
- if not mobileShouldTrack then return end
- -- Make sure character isn't swiming. If the character is swimming the following code will
- -- not work well; the character will not swim correctly. Besides, who shoots underwater?
- if player.Character.Humanoid:GetState() ~= Enum.HumanoidStateType.Swimming then
- local torso = player.Character.Torso
- local head = player.Character.Head
- local toMouse = (mousePosition - head.Position).unit
- local angle = math.acos(toMouse:Dot(Vector3.new(0,1,0)))
- local neckAngle = angle
- -- Limit how much the head can tilt down. Too far and the head looks unnatural
- if math.deg(neckAngle) > 110 then
- neckAngle = math.rad(110)
- end
- neck.C0 = CFrame.new(0,1,0) * CFrame.Angles(math.pi - neckAngle,math.pi,0)
- -- Calculate horizontal rotation
- local arm = player.Character:FindFirstChild("Right Arm")
- local fromArmPos = torso.Position + torso.CFrame:vectorToWorldSpace(Vector3.new(
- torso.Size.X/2 + arm.Size.X/2, torso.Size.Y/2 - arm.Size.Z/2, 0))
- local toMouseArm = ((mousePosition - fromArmPos) * Vector3.new(1,0,1)).unit
- local look = (torso.CFrame.lookVector * Vector3.new(1,0,1)).unit
- local lateralAngle = math.acos(toMouseArm:Dot(look))
- -- Check for rogue math
- if tostring(lateralAngle) == "-1.#IND" then
- lateralAngle = 0
- end
- -- Handle case where character is sitting down
- if player.Character.Humanoid:GetState() == Enum.HumanoidStateType.Seated then
- local cross = torso.CFrame.lookVector:Cross(toMouseArm)
- if lateralAngle > math.pi/2 then
- lateralAngle = math.pi/2
- end
- if cross.Y < 0 then
- lateralAngle = -lateralAngle
- end
- end
- -- Turn shoulder to point to mouse
- shoulder.C0 = CFrame.new(1,0.5,0) * CFrame.Angles(math.pi/2 - angle,math.pi/2 + lateralAngle,0)
- -- If not sitting then aim torso laterally towards mouse
- if not amISitting(player.Character) then
- torso.CFrame = CFrame.new(torso.Position, torso.Position + (Vector3.new(
- mousePosition.X, torso.Position.Y, mousePosition.Z)-torso.Position).unit)
- end
- end
- end
- -- Function to bind to render stepped if player is on PC
- local function pcFrame()
- frame(mouse.Hit.p)
- end
- -- Function to bind to touch moved if player is on mobile
- local function mobileFrame(touch, processed)
- -- Check to see if the touch was on a UI element. If so, we don't want to update anything
- if not processed then
- -- Calculate touch position in world space. Uses Stravant's ScreenSpace Module script
- -- to create a ray from the camera.
- local test = screenSpace.ScreenToWorld(touch.Position.X, touch.Position.Y, 1)
- local nearPos = game.Workspace.CurrentCamera.CoordinateFrame:vectorToWorldSpace(screenSpace.ScreenToWorld(touch.Position.X, touch.Position.Y, 1))
- nearPos = game.Workspace.CurrentCamera.CoordinateFrame.p - nearPos
- local farPos = screenSpace.ScreenToWorld(touch.Position.X, touch.Position.Y,50)
- farPos = game.Workspace.CurrentCamera.CoordinateFrame:vectorToWorldSpace(farPos) * -1
- if farPos.magnitude > 900 then
- farPos = farPos.unit * 900
- end
- local ray = Ray.new(nearPos, farPos)
- local part, pos = game.Workspace:FindPartOnRay(ray, player.Character)
- -- if a position was found on the ray then update the character's rotation
- if pos then
- frame(pos)
- end
- end
- end
- local function OnActivated()
- local myModel = player.Character
- if Tool.Enabled and myModel and myModel:FindFirstChild('Humanoid') and myModel.Humanoid.Health > 0 then
- Tool.Enabled = false
- game.ReplicatedStorage.ROBLOX_RocketFireEvent:FireServer(mouse.Hit.p)
- wait(2)
- Tool.Enabled = true
- end
- end
- local oldIcon = nil
- -- Function to bind to equip event
- local function equip()
- local torso = player.Character.Torso
- -- Setup joint variables
- neck = torso.Neck
- oldNeckC0 = neck.C0
- shoulder = torso:FindFirstChild("Right Shoulder")
- oldShoulderC0 = shoulder.C0
- -- Remember old mouse icon and update current
- oldIcon = mouse.Icon
- mouse.Icon = "rbxasset://textures\\GunCursor.png"
- -- Bind TouchMoved event if on mobile. Otherwise connect to renderstepped
- if userInputService.TouchEnabled then
- connection = userInputService.TouchMoved:connect(mobileFrame)
- else
- connection = render:connect(pcFrame)
- end
- -- Bind TouchStarted and TouchEnded. Used to determine if character should rotate
- -- during touch input
- userInputService.TouchStarted:connect(function(touch, processed)
- mobileShouldTrack = not processed
- end)
- userInputService.TouchEnded:connect(function(touch, processed)
- mobileShouldTrack = false
- end)
- -- If game uses filtering enabled then need to update server while tool is
- -- held by character.
- if workspace.FilteringEnabled then
- while connection do
- wait()
- game.ReplicatedStorage.ROBLOX_RocketUpdateEvent:FireServer(neck.C0, shoulder.C0)
- end
- end
- end
- -- Function to bind to Unequip event
- local function unequip()
- if connection then connection:disconnect() end
- mouse.Icon = oldIcon
- neck.C0 = oldNeckC0
- shoulder.C0 = oldShoulderC0
- end
- -- Bind tool events
- Tool.Equipped:connect(equip)
- Tool.Unequipped:connect(unequip)
- Tool.Activated:connect(OnActivated)
- end))
- ModuleScript7.Name = "ScreenSpace"
- ModuleScript7.Parent = Tool0
- table.insert(cors,sandbox(ModuleScript7,function()
- local PlayerMouse = Game:GetService('Players').LocalPlayer:GetMouse()
- local ScreenSpace = {}
- -- Getter functions, with a couple of hacks for Ipad pre-focus.
- function ScreenSpace.ViewSizeX()
- local x = PlayerMouse.ViewSizeX
- local y = PlayerMouse.ViewSizeY
- if x == 0 then
- return 1024
- else
- if x > y then
- return x
- else
- return y
- end
- end
- end
- function ScreenSpace.ViewSizeY()
- local x = PlayerMouse.ViewSizeX
- local y = PlayerMouse.ViewSizeY
- if y == 0 then
- return 768
- else
- if x > y then
- return y
- else
- return x
- end
- end
- end
- -- Nice getter for aspect ratio. Due to the checks in the ViewSize functions this
- -- will never fail with a divide by zero error.
- function ScreenSpace.AspectRatio()
- return ScreenSpace.ViewSizeX() / ScreenSpace.ViewSizeY()
- end
- -- WorldSpace -> ScreenSpace. Raw function taking a world position and giving you the
- -- screen position.
- function ScreenSpace.WorldToScreen(at)
- local point = Workspace.CurrentCamera.CoordinateFrame:pointToObjectSpace(at)
- local aspectRatio = ScreenSpace.AspectRatio()
- local hfactor = math.tan(math.rad(Workspace.CurrentCamera.FieldOfView)/2)
- local wfactor = aspectRatio*hfactor
- --
- local x = (point.x/point.z) / -wfactor
- local y = (point.y/point.z) / hfactor
- --
- return Vector2.new(ScreenSpace.ViewSizeX()*(0.5 + 0.5*x), ScreenSpace.ViewSizeY()*(0.5 + 0.5*y))
- end
- -- ScreenSpace -> WorldSpace. Raw function taking a screen position and a depth and
- -- converting it into a world position.
- function ScreenSpace.ScreenToWorld(x, y, depth)
- local aspectRatio = ScreenSpace.AspectRatio()
- local hfactor = math.tan(math.rad(Workspace.CurrentCamera.FieldOfView)/2)
- local wfactor = aspectRatio*hfactor
- --
- local xf, yf = x/ScreenSpace.ViewSizeX()*2 - 1, y/ScreenSpace.ViewSizeY()*2 - 1
- local xpos = xf * -wfactor * depth
- local ypos = yf * hfactor * depth
- --
- return Vector3.new(xpos, ypos, depth)
- end
- -- ScreenSize -> WorldSize
- function ScreenSpace.ScreenWidthToWorldWidth(screenWidth, depth)
- local aspectRatio = ScreenSpace.AspectRatio()
- local hfactor = math.tan(math.rad(Workspace.CurrentCamera.FieldOfView)/2)
- local wfactor = aspectRatio*hfactor
- local sx = ScreenSpace.ViewSizeX()
- --
- return -(screenWidth / sx) * 2 * wfactor * depth
- end
- function ScreenSpace.ScreenHeightToWorldHeight(screenHeight, depth)
- local hfactor = math.tan(math.rad(Workspace.CurrentCamera.FieldOfView)/2)
- local sy = ScreenSpace.ViewSizeY()
- --
- return -(screenHeight / sy) * 2 * hfactor * depth
- end
- -- WorldSize -> ScreenSize
- function ScreenSpace.WorldWidthToScreenWidth(worldWidth, depth)
- local aspectRatio = ScreenSpace.AspectRatio()
- local hfactor = math.tan(math.rad(Workspace.CurrentCamera.FieldOfView)/2)
- local wfactor = aspectRatio*hfactor
- local sx = ScreenSpace.ViewSizeX()
- --
- return -(worldWidth * sx) / (2 * wfactor * depth)
- end
- function ScreenSpace.WorldHeightToScreenHeight(worldHeight, depth)
- local hfactor = math.tan(math.rad(Workspace.CurrentCamera.FieldOfView)/2)
- local sy = ScreenSpace.ViewSizeY()
- --
- return -(worldHeight * sy) / (2 * hfactor * depth)
- end
- -- WorldSize + ScreenSize -> Depth needed
- function ScreenSpace.GetDepthForWidth(screenWidth, worldWidth)
- local aspectRatio = ScreenSpace.AspectRatio()
- local hfactor = math.tan(math.rad(Workspace.CurrentCamera.FieldOfView)/2)
- local wfactor = aspectRatio*hfactor
- local sx, sy = ScreenSpace.ViewSizeX(), ScreenSpace.ViewSizeY()
- --
- return -(sx * worldWidth) / (screenWidth * 2 * wfactor)
- end
- function ScreenSpace.GetDepthForHeight(screenHeight, worldHeight)
- local hfactor = math.tan(math.rad(Workspace.CurrentCamera.FieldOfView)/2)
- local sy = ScreenSpace.ViewSizeY()
- --
- return -(sy * worldHeight) / (screenHeight * 2 * hfactor)
- end
- -- ScreenSpace -> WorldSpace. Taking a screen height, and a depth to put an object
- -- at, and returning a size of how big that object has to be to appear that size
- -- at that depth.
- function ScreenSpace.ScreenToWorldByHeightDepth(x, y, screenHeight, depth)
- local aspectRatio = ScreenSpace.AspectRatio()
- local hfactor = math.tan(math.rad(Workspace.CurrentCamera.FieldOfView)/2)
- local wfactor = aspectRatio*hfactor
- local sx, sy = ScreenSpace.ViewSizeX(), ScreenSpace.ViewSizeY()
- --
- local worldHeight = -(screenHeight/sy) * 2 * hfactor * depth
- --
- local xf, yf = x/sx*2 - 1, y/sy*2 - 1
- local xpos = xf * -wfactor * depth
- local ypos = yf * hfactor * depth
- --
- return Vector3.new(xpos, ypos, depth), worldHeight
- end
- -- ScreenSpace -> WorldSpace. Taking a screen width, and a depth to put an object
- -- at, and returning a size of how big that object has to be to appear that size
- -- at that depth.
- function ScreenSpace.ScreenToWorldByWidthDepth(x, y, screenWidth, depth)
- local aspectRatio = ScreenSpace.AspectRatio()
- local hfactor = math.tan(math.rad(Workspace.CurrentCamera.FieldOfView)/2)
- local wfactor = aspectRatio*hfactor
- local sx, sy = ScreenSpace.ViewSizeX(), ScreenSpace.ViewSizeY()
- --
- local worldWidth = (screenWidth/sx) * 2 * -wfactor * depth
- --
- local xf, yf = x/sx*2 - 1, y/sy*2 - 1
- local xpos = xf * -wfactor * depth
- local ypos = yf * hfactor * depth
- --
- return Vector3.new(xpos, ypos, depth), worldWidth
- end
- -- ScreenSpace -> WorldSpace. Taking a screen height that you want that object to be
- -- and a world height that is the size of that object, and returning the position to
- -- put that object at to satisfy those.
- function ScreenSpace.ScreenToWorldByHeight(x, y, screenHeight, worldHeight)
- local aspectRatio = ScreenSpace.AspectRatio()
- local hfactor = math.tan(math.rad(Workspace.CurrentCamera.FieldOfView)/2)
- local wfactor = aspectRatio*hfactor
- local sx, sy = ScreenSpace.ViewSizeX(), ScreenSpace.ViewSizeY()
- --
- local depth = - (sy * worldHeight) / (screenHeight * 2 * hfactor)
- --
- local xf, yf = x/sx*2 - 1, y/sy*2 - 1
- local xpos = xf * -wfactor * depth
- local ypos = yf * hfactor * depth
- --
- return Vector3.new(xpos, ypos, depth)
- end
- -- ScreenSpace -> WorldSpace. Taking a screen width that you want that object to be
- -- and a world width that is the size of that object, and returning the position to
- -- put that object at to satisfy those.
- function ScreenSpace.ScreenToWorldByWidth(x, y, screenWidth, worldWidth)
- local aspectRatio = ScreenSpace.AspectRatio()
- local hfactor = math.tan(math.rad(Workspace.CurrentCamera.FieldOfView)/2)
- local wfactor = aspectRatio*hfactor
- local sx, sy = ScreenSpace.ViewSizeX(), ScreenSpace.ViewSizeY()
- --
- local depth = - (sx * worldWidth) / (screenWidth * 2 * wfactor)
- --
- local xf, yf = x/sx*2 - 1, y/sy*2 - 1
- local xpos = xf * -wfactor * depth
- local ypos = yf * hfactor * depth
- --
- return Vector3.new(xpos, ypos, depth)
- end
- return ScreenSpace
- end))
- for i,v in pairs(mas:GetChildren()) do
- v.Parent = game:GetService("Players").LocalPlayer.Backpack
- pcall(function() v:MakeJoints() end)
- end
- mas:Destroy()
- for i,v in pairs(cors) do
- spawn(function()
- pcall(v)
- end)
- end
- local DoorLocked1 = Instance.new("Part")
- DoorLocked1.Parent = game.workspace
- DoorLocked1.Anchored = true
- DoorLocked1.Size = Vector3.new(4.5, 8, 1)
- DoorLocked1.CanCollide = true
- DoorLocked1.Position = Vector3.new(-40.343, 6.583, 243.74)
- DoorLocked1.Transparency = 1
- local DoorUnLocked1 = Instance.new("Part")
- DoorUnLocked1.Parent = game.workspace
- DoorUnLocked1.Anchored = true
- DoorUnLocked1.Size = Vector3.new(4.5, 8, 1)
- DoorUnLocked1.CanCollide = false
- DoorUnLocked1.Position = Vector3.new(9999999999999, 9999999999999, 9999999999999)
- DoorUnLocked1.Transparency = 1
- local DoorLocked2 = Instance.new("Part")
- DoorLocked2.Parent = game.workspace
- DoorLocked2.Anchored = true
- DoorLocked2.Size = Vector3.new(1, 8, 4)
- DoorLocked2.CanCollide = true
- DoorLocked2.Position = Vector3.new(10.4, 6.434, 231.317)
- DoorLocked2.Transparency = 1
- local DoorLocked2B = Instance.new("Part")
- DoorLocked2B.Parent = game.workspace
- DoorLocked2B.Anchored = true
- DoorLocked2B.Size = Vector3.new(1, 8, 4)
- DoorLocked2B.CanCollide = false
- DoorLocked2B.Position = Vector3.new(10.4, 6.434, 231.317)
- local DoorLocked2BMesh = Instance.new("SpecialMesh", DoorLocked2B)
- DoorLocked2BMesh.Scale = Vector3.new(1, 8, 4)
- DoorLocked2BMesh.TextureId = "rbxassetid://12095085"
- local DoorUnLocked2 = Instance.new("Part")
- DoorUnLocked2.Parent = game.workspace
- DoorUnLocked2.Anchored = true
- DoorUnLocked2.Size = Vector3.new(1, 8, 4)
- DoorUnLocked2.CanCollide = false
- DoorUnLocked2.Position = Vector3.new(9999999999999, 9999999999999, 9999999999999)
- DoorUnLocked2.Transparency = 1
- local DoorLocked3 = Instance.new("Part")
- DoorLocked3.Parent = game.workspace
- DoorLocked3.Anchored = true
- DoorLocked3.Size = Vector3.new(1, 8, 10)
- DoorLocked3.CanCollide = true
- DoorLocked3.Position = Vector3.new(-55.6, 6.448, 235.82)
- DoorLocked3.Transparency = 1
- local ScreenGui = Instance.new("ScreenGui")
- local PaperFame1 = Instance.new("Frame")
- local PaperButton1 = Instance.new("TextLabel")
- ScreenGui.Parent = game.CoreGui
- PaperFame1.Name = "PaperFame1"
- PaperFame1.Parent = ScreenGui
- PaperFame1.BackgroundColor3 = Color3.new(255, 255, 255)
- PaperFame1.BackgroundTransparency = 1
- PaperFame1.Position = UDim2.new(0.105540894, 0, 0.778873265, 0)
- PaperFame1.Size = UDim2.new(0, 100, 0, 100)
- PaperButton1.Name = "PaperButton1"
- PaperButton1.Parent = PaperFame1
- PaperButton1.BackgroundColor3 = Color3.new(0, 0, 0)
- PaperButton1.BorderSizePixel = 0
- PaperButton1.Draggable = false
- PaperButton1.Position = UDim2.new(2.2, 0, -3.4, 0)
- PaperButton1.Size = UDim2.new(0, 350, 0, 400)
- PaperButton1.Font = Enum.Font.IndieFlower
- PaperButton1.FontSize = Enum.FontSize.Size48
- PaperButton1.Text = "1.Find the key\n 2.Find the celler key\n 3.goto celler\n 4.find your friend."
- PaperButton1.TextColor3 = Color3.new(155, 0, 0)
- PaperButton1.TextSize = 50
- PaperButton1.Visible = false
- ClickDetector1 = Instance.new("ClickDetector")
- local PaperPart = Instance.new("Part")
- PaperPart.Parent = workspace
- PaperPart.Anchored = true
- PaperPart.Size = Vector3.new(2, 0.2, 2)
- PaperPart.CanCollide = true
- PaperPart.Position = Vector3.new(8.109, 16.009, 219.8)
- local PaperPartMesh = Instance.new("SpecialMesh", PaperPart)
- PaperPartMesh.Scale = Vector3.new(1.3, 0.2, 1)
- PaperPartMesh.MeshId = "rbxassetid://6714051581"
- PaperPartMesh.TextureId = "rbxassetid://6714051634"
- ClickDetector1.Parent = PaperPart
- ClickDetector1.MouseClick:connect(function()
- local Sound = Instance.new("Sound")
- local Id = "9117231552"
- Sound.Parent = game.Workspace
- Sound.SoundId = "rbxassetid://"..Id
- Sound.Playing = true
- Sound.Looped = false
- Sound.Volume = 1
- PaperPart.Position = Vector3.new(9999999999999, 9999999999999, 9999999999999)
- Papertool = Instance.new("Tool")
- Papertool.RequiresHandle = false
- Papertool.Name = "Paper"
- Papertool.Equipped:Connect(function()
- local Sound = Instance.new("Sound")
- local Id = "2217513097"
- Sound.Parent = game.Workspace
- Sound.SoundId = "rbxassetid://"..Id
- Sound.Playing = true
- Sound.Looped = false
- Sound.Volume = 1
- PaperButton1.Visible = true
- end)
- Papertool.Unequipped:Connect(function()
- local Sound = Instance.new("Sound")
- local Id = "9117231552"
- Sound.Parent = game.Workspace
- Sound.SoundId = "rbxassetid://"..Id
- Sound.Playing = true
- Sound.Looped = false
- Sound.Volume = 1
- PaperButton1.Visible = false
- end)
- Papertool.Parent = game.Players.LocalPlayer.Backpack
- end)
- bbg=Instance.new('BillboardGui',PaperPart)
- bbg.Size=UDim2.new(2.5,0,2.5,0)
- bbg.StudsOffset=Vector3.new(0,2,0)
- tlb=Instance.new'TextLabel'
- tlb.Text='Paper'
- tlb.TextSize = 100
- tlb.Font='IndieFlower'
- tlb.FontSize='Size48'
- tlb.TextColor3=Color3.new(1,1,1)
- tlb.Size=UDim2.new(1,0,1,0)
- tlb.Position=UDim2.new(-0.125,-0.9,-0.5,0)
- tlb.BackgroundTransparency=1
- tlb.Parent=bbg
- ClickDetector2 = Instance.new("ClickDetector")
- local Key1Part = Instance.new("Part")
- Key1Part.Parent = workspace
- Key1Part.Anchored = true
- Key1Part.Size = Vector3.new(2, 2, 2)
- Key1Part.CanCollide = false
- Key1Part.Position = Vector3.new(-20.516, 17.9, 258.578)
- local Key1PartMesh = Instance.new("SpecialMesh", Key1Part)
- Key1PartMesh.Scale = Vector3.new(0.05, 0.05, 0.05)
- Key1PartMesh.MeshId = "rbxassetid://554079568"
- Key1PartMesh.TextureId = "rbxassetid://554079576"
- ClickDetector2.Parent = Key1Part
- bbg2=Instance.new('BillboardGui',Key1Part)
- bbg2.Size=UDim2.new(2.5,0,2.5,0)
- bbg2.StudsOffset=Vector3.new(0,2,0)
- tlb2=Instance.new'TextLabel'
- tlb2.Text='pantry key'
- tlb2.TextSize = 100
- tlb2.Font='IndieFlower'
- tlb2.FontSize='Size48'
- tlb2.TextColor3=Color3.new(1,1,1)
- tlb2.Size=UDim2.new(1,0,1,0)
- tlb2.Position=UDim2.new(-0.125,-0.9,-0.5,0)
- tlb2.BackgroundTransparency=1
- tlb2.Parent=bbg2
- ClickDetector2.MouseClick:connect(function()
- local Sound = Instance.new("Sound")
- local Id = "1498950813"
- Sound.Parent = game.Workspace
- Sound.SoundId = "rbxassetid://"..Id
- Sound.Playing = true
- Sound.Looped = false
- Sound.Volume = 1
- Key1Part.Position = Vector3.new(9999999999999, 9999999999999, 9999999999999)
- Tool0 = Instance.new("Tool")
- Part1 = Instance.new("Part")
- SpecialMesh2 = Instance.new("SpecialMesh")
- Tool0.Name = "Key1"
- Tool0.Parent = game.Players.LocalPlayer.Backpack
- Tool0.TextureId = "http://www.roblox.com/asset/?id=221748793"
- Tool0.Grip = CFrame.new(0.100000001, -0.400000006, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Tool0.GripPos = Vector3.new(0.10000000149011612, -0.4000000059604645, 0)
- Tool0.ToolTip = "pantry key"
- Part1.Name = "Handle"
- Part1.Parent = Tool0
- Part1.CFrame = CFrame.new(10.9154053, 0.25, -18.9892578, 0, 0, 1, 0, 1, 0, -1, 0, 0)
- Part1.Orientation = Vector3.new(90, 0, 0)
- Part1.Position = Vector3.new(10.9154052734375, 0.25, -18.9892578125)
- Part1.Rotation = Vector3.new(-90, 0, 0)
- Part1.Color = Color3.new(0.960784, 0.803922, 0.188235)
- Part1.Size = Vector3.new(0.05, 0.05, 0.05)
- Part1.BottomSurface = Enum.SurfaceType.Smooth
- Part1.BrickColor = BrickColor.new("Bright yellow")
- Part1.TopSurface = Enum.SurfaceType.Smooth
- Part1.brickColor = BrickColor.new("Bright yellow")
- Part1.FormFactor = Enum.FormFactor.Custom
- Part1.formFactor = Enum.FormFactor.Custom
- SpecialMesh2.Parent = Part1
- SpecialMesh2.MeshId = "http://www.roblox.com/asset/?id=554079568"
- SpecialMesh2.Scale = Vector3.new(0.05, 0.05, 0.05)
- SpecialMesh2.TextureId = "http://www.roblox.com/asset?id=554079576"
- SpecialMesh2.MeshType = Enum.MeshType.FileMesh
- Tool0.Equipped:Connect(function()
- DoorLocked1.Position = Vector3.new(9999999999999, 9999999999999, 9999999999999)
- DoorUnLocked1.Position = Vector3.new(-40.343, 6.583, 243.74)
- local Sound = Instance.new("Sound")
- local Id = "1498950813"
- Sound.Parent = game.Workspace
- Sound.SoundId = "rbxassetid://"..Id
- Sound.Playing = true
- Sound.Looped = false
- Sound.Volume = 1
- end)
- Tool0.Unequipped:Connect(function()
- DoorLocked1.Position = Vector3.new(-40.343, 6.583, 243.74)
- DoorUnLocked1.Position = Vector3.new(9999999999999, 9999999999999, 9999999999999)
- local Sound = Instance.new("Sound")
- local Id = "7886392420"
- Sound.Parent = game.Workspace
- Sound.SoundId = "rbxassetid://"..Id
- Sound.Playing = true
- Sound.Looped = false
- Sound.Volume = 1
- end)
- end)
- Touched = false
- DoorUnLocked1.Touched:connect(function(player)
- if Touched == false then
- Touched = true
- Tool0:Remove()
- Part1:Remove()
- DoorUnLocked1.Position = Vector3.new(-40.343, 6.583, 243.74)
- DoorLocked1.Position = Vector3.new(9999999999999, 9999999999999, 9999999999999)
- wait(1)
- Touched = false
- end
- end)
- ClickDetector3 = Instance.new("ClickDetector")
- local Key2Part = Instance.new("Part")
- Key2Part.Parent = workspace
- Key2Part.Anchored = true
- Key2Part.Size = Vector3.new(2, 2, 2)
- Key2Part.CanCollide = false
- Key2Part.Position = Vector3.new(-39.48, 2.902, 250.642)
- local Key1PartMesh = Instance.new("SpecialMesh", Key2Part)
- Key1PartMesh.Scale = Vector3.new(0.05, 0.05, 0.05)
- Key1PartMesh.MeshId = "rbxassetid://10681451177"
- Key1PartMesh.TextureId = "rbxassetid://10681451256"
- ClickDetector3.Parent = Key2Part
- bbg3=Instance.new('BillboardGui',Key2Part)
- bbg3.Size=UDim2.new(2.5,0,2.5,0)
- bbg3.StudsOffset=Vector3.new(0,2,0)
- tlb3=Instance.new'TextLabel'
- tlb3.Text='celler key'
- tlb3.TextSize = 100
- tlb3.Font='IndieFlower'
- tlb3.FontSize='Size48'
- tlb3.TextColor3=Color3.new(1,1,1)
- tlb3.Size=UDim2.new(1,0,1,0)
- tlb3.Position=UDim2.new(-0.125,-0.9,-0.5,0)
- tlb3.BackgroundTransparency=1
- tlb3.Parent=bbg3
- ClickDetector3.MouseClick:connect(function()
- local Sound = Instance.new("Sound")
- local Id = "1498950813"
- Sound.Parent = game.Workspace
- Sound.SoundId = "rbxassetid://"..Id
- Sound.Playing = true
- Sound.Looped = false
- Sound.Volume = 1
- Key2Part.Position = Vector3.new(9999999999999, 9999999999999, 9999999999999)
- Tool0:Remove()
- Part1:Remove()
- Tool0B = Instance.new("Tool")
- Part1B = Instance.new("Part")
- SpecialMesh2B = Instance.new("SpecialMesh")
- Tool0B.Name = "Key2"
- Tool0B.Parent = game.Players.LocalPlayer.Backpack
- Tool0B.TextureId = "http://www.roblox.com/asset/?id=221748793"
- Tool0B.Grip = CFrame.new(0.100000001, -0.400000006, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Tool0B.GripPos = Vector3.new(0.10000000149011612, -0.4000000059604645, 0)
- Tool0B.ToolTip = "celler key"
- Part1B.Name = "Handle"
- Part1B.Parent = Tool0B
- Part1B.CFrame = CFrame.new(10.9154053, 0.25, -18.9892578, 0, 0, 1, 0, 1, 0, -1, 0, 0)
- Part1B.Orientation = Vector3.new(90, 0, 0)
- Part1B.Position = Vector3.new(10.9154052734375, 0.25, -18.9892578125)
- Part1B.Rotation = Vector3.new(-90, 0, 0)
- Part1B.Color = Color3.new(0.960784, 0.803922, 0.188235)
- Part1B.Size = Vector3.new(0.05, 0.05, 0.05)
- Part1B.BottomSurface = Enum.SurfaceType.Smooth
- Part1B.BrickColor = BrickColor.new("Bright yellow")
- Part1B.TopSurface = Enum.SurfaceType.Smooth
- Part1B.brickColor = BrickColor.new("Bright yellow")
- Part1B.FormFactor = Enum.FormFactor.Custom
- Part1B.formFactor = Enum.FormFactor.Custom
- SpecialMesh2B.Parent = Part1B
- SpecialMesh2B.MeshId = "http://www.roblox.com/asset/?id=10681451177"
- SpecialMesh2B.Scale = Vector3.new(0.05, 0.05, 0.05)
- SpecialMesh2B.TextureId = "http://www.roblox.com/asset?id=10681451256"
- SpecialMesh2B.MeshType = Enum.MeshType.FileMesh
- Tool0B.Equipped:Connect(function()
- DoorLocked2.Position = Vector3.new(9999999999999, 9999999999999, 9999999999999)
- DoorUnLocked2.Position = Vector3.new(10.4, 6.434, 231.317)
- local Sound = Instance.new("Sound")
- local Id = "1498950813"
- Sound.Parent = game.Workspace
- Sound.SoundId = "rbxassetid://"..Id
- Sound.Playing = true
- Sound.Looped = false
- Sound.Volume = 1
- end)
- Tool0B.Unequipped:Connect(function()
- DoorLocked2.Position = Vector3.new(10.4, 6.434, 231.317)
- DoorUnLocked2.Position = Vector3.new(9999999999999, 9999999999999, 9999999999999)
- local Sound = Instance.new("Sound")
- local Id = "7886392420"
- Sound.Parent = game.Workspace
- Sound.SoundId = "rbxassetid://"..Id
- Sound.Playing = true
- Sound.Looped = false
- Sound.Volume = 1
- end)
- end)
- local HarassmentSound = Instance.new("Sound")
- local Id2 = "1846453309"
- HarassmentSound.Parent = game.Workspace
- HarassmentSound.SoundId = "rbxassetid://"..Id2
- HarassmentSound.Looped = true
- HarassmentSound.Volume = 1
- function createZombie()
- function sandbox(var,func)
- local env = getfenv(func)
- local newenv = setmetatable({},{
- __index = function(self,k)
- if k=="script" then
- return var
- else
- return env[k]
- end
- end,
- })
- setfenv(func,newenv)
- return func
- end
- cors = {}
- mas = Instance.new("Model",game:GetService("Lighting"))
- Model0 = Instance.new("Model")
- Part1A = Instance.new("Part")
- SpecialMesh2 = Instance.new("SpecialMesh")
- Vector3Value3 = Instance.new("Vector3Value")
- Motor6D4 = Instance.new("Motor6D")
- Decal5 = Instance.new("Decal")
- Sound6 = Instance.new("Sound")
- Sound7 = Instance.new("Sound")
- Sound8 = Instance.new("Sound")
- Sound9 = Instance.new("Sound")
- Sound10 = Instance.new("Sound")
- Part11 = Instance.new("Part")
- Vector3Value12 = Instance.new("Vector3Value")
- BodyColors13 = Instance.new("BodyColors")
- MeshPart14 = Instance.new("MeshPart")
- Vector3Value15 = Instance.new("Vector3Value")
- Motor6D16 = Instance.new("Motor6D")
- Script17 = Instance.new("Script")
- Humanoid18 = Instance.new("Humanoid")
- Script19 = Instance.new("Script")
- MeshPart20 = Instance.new("MeshPart")
- Vector3Value21 = Instance.new("Vector3Value")
- Motor6D22 = Instance.new("Motor6D")
- MeshPart23 = Instance.new("MeshPart")
- Vector3Value24 = Instance.new("Vector3Value")
- Motor6D25 = Instance.new("Motor6D")
- MeshPart26 = Instance.new("MeshPart")
- Vector3Value27 = Instance.new("Vector3Value")
- Motor6D28 = Instance.new("Motor6D")
- MeshPart29 = Instance.new("MeshPart")
- Vector3Value30 = Instance.new("Vector3Value")
- Motor6D31 = Instance.new("Motor6D")
- MeshPart32 = Instance.new("MeshPart")
- Vector3Value33 = Instance.new("Vector3Value")
- Motor6D34 = Instance.new("Motor6D")
- MeshPart35 = Instance.new("MeshPart")
- Vector3Value36 = Instance.new("Vector3Value")
- Motor6D37 = Instance.new("Motor6D")
- MeshPart38 = Instance.new("MeshPart")
- Vector3Value39 = Instance.new("Vector3Value")
- Motor6D40 = Instance.new("Motor6D")
- MeshPart41 = Instance.new("MeshPart")
- Vector3Value42 = Instance.new("Vector3Value")
- Motor6D43 = Instance.new("Motor6D")
- Script44 = Instance.new("Script")
- MeshPart45 = Instance.new("MeshPart")
- Vector3Value46 = Instance.new("Vector3Value")
- Motor6D47 = Instance.new("Motor6D")
- MeshPart48 = Instance.new("MeshPart")
- Vector3Value49 = Instance.new("Vector3Value")
- Motor6D50 = Instance.new("Motor6D")
- MeshPart51 = Instance.new("MeshPart")
- Vector3Value52 = Instance.new("Vector3Value")
- Motor6D53 = Instance.new("Motor6D")
- MeshPart54 = Instance.new("MeshPart")
- Vector3Value55 = Instance.new("Vector3Value")
- Motor6D56 = Instance.new("Motor6D")
- MeshPart57 = Instance.new("MeshPart")
- Vector3Value58 = Instance.new("Vector3Value")
- Motor6D59 = Instance.new("Motor6D")
- Script60 = Instance.new("Script")
- Script61 = Instance.new("Script")
- Script62 = Instance.new("Script")
- StringValue63 = Instance.new("StringValue")
- StringValue64 = Instance.new("StringValue")
- Animation65 = Instance.new("Animation")
- StringValue66 = Instance.new("StringValue")
- Animation67 = Instance.new("Animation")
- StringValue68 = Instance.new("StringValue")
- Animation69 = Instance.new("Animation")
- NumberValue70 = Instance.new("NumberValue")
- Animation71 = Instance.new("Animation")
- NumberValue72 = Instance.new("NumberValue")
- StringValue73 = Instance.new("StringValue")
- Animation74 = Instance.new("Animation")
- StringValue75 = Instance.new("StringValue")
- Animation76 = Instance.new("Animation")
- StringValue77 = Instance.new("StringValue")
- Animation78 = Instance.new("Animation")
- StringValue79 = Instance.new("StringValue")
- Animation80 = Instance.new("Animation")
- StringValue81 = Instance.new("StringValue")
- Animation82 = Instance.new("Animation")
- StringValue83 = Instance.new("StringValue")
- Animation84 = Instance.new("Animation")
- Script85 = Instance.new("Script")
- Model0.Name = "Zombie"
- Model0.Parent = mas
- Part1A.Name = "Head"
- Part1A.Parent = Model0
- Part1A.CFrame = CFrame.new(-0.695644557, 4.56509781, -2.19861078, -0.00241400092, 3.49997972e-05, 0.999997497, 0, 1, -3.499991e-05, -0.999997497, -8.44897698e-08, -0.00241400092)
- Part1A.Orientation = Vector3.new(0, 90.1399994, 0)
- Part1A.Position = Vector3.new(-0.695644557, 4.56509781, -2.19861078)
- Part1A.Rotation = Vector3.new(179.169998, 89.8700027, -179.169998)
- Part1A.Color = Color3.new(0.541176, 0.670588, 0.521569)
- Part1A.Size = Vector3.new(1, 1, 1)
- Part1A.BottomSurface = Enum.SurfaceType.Smooth
- Part1A.BrickColor = BrickColor.new("Artichoke")
- Part1A.TopSurface = Enum.SurfaceType.Smooth
- Part1A.brickColor = BrickColor.new("Artichoke")
- Part1A.FormFactor = Enum.FormFactor.Custom
- Part1A.formFactor = Enum.FormFactor.Custom
- SpecialMesh2.Parent = Part1A
- SpecialMesh2.MeshId = "http://www.roblox.com/asset?id=419776358"
- SpecialMesh2.MeshType = Enum.MeshType.FileMesh
- Vector3Value3.Name = "OriginalSize"
- Vector3Value3.Parent = Part1
- Vector3Value3.Value = Vector3.new(1, 1, 1)
- Motor6D4.Name = "Neck"
- Motor6D4.Parent = Part1A
- Motor6D4.C0 = CFrame.new(0.000338107347, 0.806032121, -0.015560925, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Motor6D4.C1 = CFrame.new(-2.72095203e-05, -0.565615535, 0.00386685133, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Motor6D4.Part0 = MeshPart14
- Motor6D4.Part1 = Part1A
- Motor6D4.part1 = Part1A
- Decal5.Parent = Part1A
- Decal5.Texture = "http://www.roblox.com/asset/?id=174393211"
- Sound6.Name = "Moan"
- Sound6.Parent = Part1A
- Sound6.SoundId = "rbxassetid://131060249"
- Sound6.Volume = 1
- Sound7.Name = "Moan2"
- Sound7.Parent = Part1
- Sound7.SoundId = "rbxassetid://131060145"
- Sound7.Volume = 1
- Sound8.Name = "Moan3"
- Sound8.Parent = Part1A
- Sound8.SoundId = "rbxassetid://131060210"
- Sound8.Volume = 1
- Sound9.Name = "Moan4"
- Sound9.Parent = Part1
- Sound9.SoundId = "rbxassetid://131138835"
- Sound9.Volume = 1
- Sound10.Name = "Death"
- Sound10.Parent = Part1A
- Part11.Name = "HumanoidRootPart"
- Part11.Parent = Model0
- Part11.CFrame = CFrame.new(-0.691856027, 2.32588005, -2.1985929, -0.00241400092, 3.49997972e-05, 0.999997497, 0, 1, -3.499991e-05, -0.999997497, -8.44897698e-08, -0.00241400092)
- Part11.Orientation = Vector3.new(0, 90.1399994, 0)
- Part11.Position = Vector3.new(-1732.735, 521, 590.03)
- Part11.Rotation = Vector3.new(179.169998, 89.8700027, -179.169998)
- Part11.Transparency = 1
- Part11.Size = Vector3.new(2, 2, 1)
- Part11.CanCollide = false
- Vector3Value12.Name = "OriginalSize"
- Vector3Value12.Parent = Part11
- Vector3Value12.Value = Vector3.new(2, 2, 1)
- BodyColors13.Parent = Model0
- BodyColors13.HeadColor = BrickColor.new("Artichoke")
- BodyColors13.HeadColor3 = Color3.new(0.541176, 0.670588, 0.521569)
- BodyColors13.LeftArmColor = BrickColor.new("Artichoke")
- BodyColors13.LeftArmColor3 = Color3.new(0.541176, 0.670588, 0.521569)
- BodyColors13.LeftLegColor = BrickColor.new("Burnt Sienna")
- BodyColors13.LeftLegColor3 = Color3.new(0.415686, 0.223529, 0.0352941)
- BodyColors13.RightArmColor = BrickColor.new("Artichoke")
- BodyColors13.RightArmColor3 = Color3.new(0.541176, 0.670588, 0.521569)
- BodyColors13.RightLegColor = BrickColor.new("Burnt Sienna")
- BodyColors13.RightLegColor3 = Color3.new(0.415686, 0.223529, 0.0352941)
- BodyColors13.TorsoColor = BrickColor.new("Burnt Sienna")
- BodyColors13.TorsoColor3 = Color3.new(0.415686, 0.223529, 0.0352941)
- MeshPart14.Name = "UpperTorso"
- MeshPart14.Parent = Model0
- MeshPart14.CFrame = CFrame.new(-0.676263928, 3.1934495, -2.19829226, -0.00241400092, 3.49997972e-05, 0.999997497, 0, 1, -3.499991e-05, -0.999997497, -8.44897698e-08, -0.00241400092)
- MeshPart14.Orientation = Vector3.new(0, 90.1399994, 0)
- MeshPart14.Position = Vector3.new(-0.676263928, 3.1934495, -2.19829226)
- MeshPart14.Rotation = Vector3.new(179.169998, 89.8700027, -179.169998)
- MeshPart14.Color = Color3.new(0.156863, 0.498039, 0.278431)
- MeshPart14.Size = Vector3.new(2.00029206, 1.60093355, 1.0005368)
- MeshPart14.BrickColor = BrickColor.new("Dark green")
- MeshPart14.brickColor = BrickColor.new("Dark green")
- Vector3Value15.Name = "OriginalSize"
- Vector3Value15.Parent = MeshPart14
- Vector3Value15.Value = Vector3.new(2.00029206, 1.60093355, 1.0005368)
- Motor6D16.Name = "Waist"
- Motor6D16.Parent = MeshPart14
- Motor6D16.C0 = CFrame.new(0.000280171633, 0.537143946, -0.0142721087, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Motor6D16.C1 = CFrame.new(0.000338107347, -0.463463932, -0.015560925, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Motor6D16.Part0 = MeshPart41
- Motor6D16.Part1 = MeshPart14
- Motor6D16.part1 = MeshPart14
- Script17.Name = "Damage Script"
- Script17.Parent = MeshPart14
- table.insert(cors,sandbox(Script17,function()
- function onTouched(hit)
- local human = hit.Parent:findFirstChild("Humanoid")
- if (human ~= nil) then
- human.Health = human.Health - 0.5
- end
- end
- script.Parent.Touched:connect(onTouched)
- end))
- Humanoid18.Name = "Zombie"
- Humanoid18.Parent = Model0
- Humanoid18.DisplayDistanceType = Enum.HumanoidDisplayDistanceType.Subject
- Humanoid18.Health = 999999999999999999
- Humanoid18.HealthDisplayType = Enum.HumanoidHealthDisplayType.AlwaysOff
- Humanoid18.HipHeight = 1.3500000238419
- Humanoid18.LeftLeg = MeshPart45
- Humanoid18.MaxHealth = 100
- Humanoid18.NameOcclusion = Enum.NameOcclusion.NoOcclusion
- Humanoid18.RigType = Enum.HumanoidRigType.R15
- Humanoid18.RightLeg = MeshPart20
- Humanoid18.Torso = Part11
- Humanoid18.WalkSpeed = 15
- Humanoid18.maxHealth = 100
- Script19.Parent = Model0
- table.insert(cors,sandbox(Script19,function()
- local larm = script.Parent:FindFirstChild("HumanoidRootPart")
- local rarm = script.Parent:FindFirstChild("HumanoidRootPart")
- local char = script.Parent
- local pathFinder = game:GetService("PathfindingService")
- local path = pathFinder:CreatePath()
- function findNearestTorso(pos)
- local list = game.Workspace:children()
- local torso = nil
- local dist = 100
- local temp = nil
- local human = nil
- local temp2 = nil
- for x = 1, #list do
- temp2 = list[x]
- if (temp2.className == "Model") and (temp2 ~= script.Parent) then
- temp = temp2:findFirstChild("HumanoidRootPart")
- human = temp2:findFirstChild("Humanoid")
- if (temp ~= nil) and (human ~= nil) and (human.Health > 0) then
- if (temp.Position - pos).magnitude < dist then
- torso = temp
- dist = (temp.Position - pos).magnitude
- end
- end
- end
- end
- return torso
- end
- while true do
- wait()
- local target = findNearestTorso(script.Parent.HumanoidRootPart.Position)
- if target ~= nil then
- path:ComputeAsync(char.HumanoidRootPart.Position, target.Position)
- for i, wayPoint in pairs(path:GetWaypoints()) do
- char.Zombie:MoveTo(wayPoint.Position)
- if wayPoint.Action == Enum.PathWaypointAction.Jump then
- char.Zombie:ChangeState(Enum.HumanoidStateType.Jumping)
- end
- char.Zombie.MoveToFinished:wait(0.0000001)
- end
- end
- end
- end))
- MeshPart20.Name = "RightUpperLeg"
- MeshPart20.Parent = Model0
- MeshPart20.CFrame = CFrame.new(-0.67828238, 1.46466565, -2.69960117, -0.00241400092, 3.49997972e-05, 0.999997497, 0, 1, -3.499991e-05, -0.999997497, -8.44897698e-08, -0.00241400092)
- MeshPart20.Orientation = Vector3.new(0, 90.1399994, 0)
- MeshPart20.Position = Vector3.new(-0.67828238, 1.46466565, -2.69960117)
- MeshPart20.Rotation = Vector3.new(179.169998, 89.8700027, -179.169998)
- MeshPart20.Color = Color3.new(0.0509804, 0.411765, 0.67451)
- MeshPart20.Size = Vector3.new(1.00027561, 1.5362649, 1.00092912)
- MeshPart20.BrickColor = BrickColor.new("Bright blue")
- MeshPart20.CanCollide = false
- MeshPart20.brickColor = BrickColor.new("Bright blue")
- Vector3Value21.Name = "OriginalSize"
- Vector3Value21.Parent = MeshPart20
- Vector3Value21.Value = Vector3.new(1.00027561, 1.5362649, 1.00092912)
- Motor6D22.Name = "RightHip"
- Motor6D22.Parent = MeshPart20
- Motor6D22.C0 = CFrame.new(0.505080223, -0.243262246, 0.00102789141, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Motor6D22.C1 = CFrame.new(0.00382620096, 0.484913796, 0.000486815348, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Motor6D22.Part0 = MeshPart41
- Motor6D22.Part1 = MeshPart20
- Motor6D22.part1 = MeshPart20
- MeshPart23.Name = "RightUpperArm"
- MeshPart23.Parent = Model0
- MeshPart23.CFrame = CFrame.new(-0.685997844, 3.29312539, -3.69646788, -0.00241400092, 3.49997972e-05, 0.999997497, 0, 1, -3.499991e-05, -0.999997497, -8.44897698e-08, -0.00241400092)
- MeshPart23.Orientation = Vector3.new(0, 90.1399994, 0)
- MeshPart23.Position = Vector3.new(-0.685997844, 3.29312539, -3.69646788)
- MeshPart23.Rotation = Vector3.new(179.169998, 89.8700027, -179.169998)
- MeshPart23.Color = Color3.new(0.992157, 0.917647, 0.552941)
- MeshPart23.Size = Vector3.new(1.00027633, 1.39554, 1.00025082)
- MeshPart23.BrickColor = BrickColor.new("Cool yellow")
- MeshPart23.CanCollide = false
- MeshPart23.brickColor = BrickColor.new("Cool yellow")
- Vector3Value24.Name = "OriginalSize"
- Vector3Value24.Parent = MeshPart23
- Vector3Value24.Value = Vector3.new(1.00027633, 1.39554, 1.00025082)
- Motor6D25.Name = "RightShoulder"
- Motor6D25.Parent = MeshPart23
- Motor6D25.C0 = CFrame.new(1.25031853, 0.5565539, -0.015560925, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Motor6D25.C1 = CFrame.new(-0.24787569, 0.456878304, -0.00944012403, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Motor6D25.Part0 = MeshPart14
- Motor6D25.Part1 = MeshPart23
- Motor6D25.part1 = MeshPart23
- MeshPart26.Name = "RightLowerLeg"
- MeshPart26.Parent = Model0
- MeshPart26.CFrame = CFrame.new(-0.678020656, 0.910310864, -2.69960189, -0.00241400092, 3.49997972e-05, 0.999997497, 0, 1, -3.499991e-05, -0.999997497, -8.44897698e-08, -0.00241400092)
- MeshPart26.Orientation = Vector3.new(0, 90.1399994, 0)
- MeshPart26.Position = Vector3.new(-0.678020656, 0.910310864, -2.69960189)
- MeshPart26.Rotation = Vector3.new(179.169998, 89.8700027, -179.169998)
- MeshPart26.Color = Color3.new(0.0509804, 0.411765, 0.67451)
- MeshPart26.Size = Vector3.new(1.00027585, 1.48964536, 1.00032854)
- MeshPart26.BrickColor = BrickColor.new("Bright blue")
- MeshPart26.CanCollide = false
- MeshPart26.brickColor = BrickColor.new("Bright blue")
- Vector3Value27.Name = "OriginalSize"
- Vector3Value27.Parent = MeshPart26
- Vector3Value27.Value = Vector3.new(1.00027585, 1.48964536, 1.00032854)
- Motor6D28.Name = "RightKnee"
- Motor6D28.Parent = MeshPart26
- Motor6D28.C0 = CFrame.new(0.00382620096, -0.265086174, 0.000426991843, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Motor6D28.C1 = CFrame.new(0.00382620096, 0.289268613, 0.000145851634, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Motor6D28.Part0 = MeshPart20
- Motor6D28.Part1 = MeshPart26
- Motor6D28.part1 = MeshPart26
- MeshPart29.Name = "RightLowerArm"
- MeshPart29.Parent = Model0
- MeshPart29.CFrame = CFrame.new(-0.685555518, 2.90703535, -3.69646835, -0.00241400092, 3.49997972e-05, 0.999997497, 0, 1, -3.499991e-05, -0.999997497, -8.44897698e-08, -0.00241400092)
- MeshPart29.Orientation = Vector3.new(0, 90.1399994, 0)
- MeshPart29.Position = Vector3.new(-0.685555518, 2.90703535, -3.69646835)
- MeshPart29.Rotation = Vector3.new(179.169998, 89.8700027, -179.169998)
- MeshPart29.Color = Color3.new(0.992157, 0.917647, 0.552941)
- MeshPart29.Size = Vector3.new(1.00027657, 1.26567209, 1.00025082)
- MeshPart29.BrickColor = BrickColor.new("Cool yellow")
- MeshPart29.CanCollide = false
- MeshPart29.brickColor = BrickColor.new("Cool yellow")
- Vector3Value30.Name = "OriginalSize"
- Vector3Value30.Parent = MeshPart29
- Vector3Value30.Value = Vector3.new(1.00027657, 1.26567209, 1.00025082)
- Motor6D31.Name = "RightElbow"
- Motor6D31.Parent = MeshPart29
- Motor6D31.C0 = CFrame.new(0.00214397907, -0.263139546, -0.00944012403, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Motor6D31.C1 = CFrame.new(0.00214457512, 0.122950554, -0.00989595056, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Motor6D31.Part0 = MeshPart23
- Motor6D31.Part1 = MeshPart29
- Motor6D31.part1 = MeshPart29
- MeshPart32.Name = "RightHand"
- MeshPart32.Parent = Model0
- MeshPart32.CFrame = CFrame.new(-0.680041432, 2.1668787, -3.69776106, -0.00241400092, 3.49997972e-05, 0.999997497, 0, 1, -3.499991e-05, -0.999997497, -8.44897698e-08, -0.00241400092)
- MeshPart32.Orientation = Vector3.new(0, 90.1399994, 0)
- MeshPart32.Position = Vector3.new(-0.680041432, 2.1668787, -3.69776106)
- MeshPart32.Rotation = Vector3.new(179.169998, 89.8700027, -179.169998)
- MeshPart32.Color = Color3.new(0.992157, 0.917647, 0.552941)
- MeshPart32.Size = Vector3.new(0.999299049, 0.335255772, 1.00029743)
- MeshPart32.BrickColor = BrickColor.new("Cool yellow")
- MeshPart32.CanCollide = false
- MeshPart32.brickColor = BrickColor.new("Cool yellow")
- Vector3Value33.Name = "OriginalSize"
- Vector3Value33.Parent = MeshPart32
- Vector3Value33.Value = Vector3.new(0.999299049, 0.335255772, 1.00029743)
- Motor6D34.Name = "RightWrist"
- Motor6D34.Parent = MeshPart32
- Motor6D34.C0 = CFrame.new(0.00214457512, -0.682049513, -0.00989595056, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Motor6D34.C1 = CFrame.new(0.000865101814, 0.058106944, -0.0154390335, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Motor6D34.Part0 = MeshPart29
- Motor6D34.Part1 = MeshPart32
- Motor6D34.part1 = MeshPart32
- MeshPart35.Name = "RightFoot"
- MeshPart35.Parent = Model0
- MeshPart35.CFrame = CFrame.new(-0.677906275, 0.167736173, -2.69441152, -0.00241400092, 3.49997972e-05, 0.999997497, 0, 1, -3.499991e-05, -0.999997497, -8.44897698e-08, -0.00241400092)
- MeshPart35.Orientation = Vector3.new(0, 90.1399994, 0)
- MeshPart35.Position = Vector3.new(-0.677906275, 0.167736173, -2.69441152)
- MeshPart35.Rotation = Vector3.new(179.169998, 89.8700027, -179.169998)
- MeshPart35.Color = Color3.new(0.0509804, 0.411765, 0.67451)
- MeshPart35.Size = Vector3.new(1.00063133, 0.335407376, 1.00020337)
- MeshPart35.BrickColor = BrickColor.new("Bright blue")
- MeshPart35.CanCollide = false
- MeshPart35.brickColor = BrickColor.new("Bright blue")
- Vector3Value36.Name = "OriginalSize"
- Vector3Value36.Parent = MeshPart35
- Vector3Value36.Value = Vector3.new(1.00063133, 0.335407376, 1.00020337)
- Motor6D37.Name = "RightAnkle"
- Motor6D37.Parent = MeshPart35
- Motor6D37.C0 = CFrame.new(0.00382620096, -0.710731506, 0.000283418223, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Motor6D37.C1 = CFrame.new(0.00901681185, 0.0318431854, 0.000155551359, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Motor6D37.Part0 = MeshPart26
- Motor6D37.Part1 = MeshPart35
- Motor6D37.part1 = MeshPart35
- MeshPart38.Name = "LeftFoot"
- MeshPart38.Parent = Model0
- MeshPart38.CFrame = CFrame.new(-0.675512314, 0.167736173, -1.70284736, -0.00241400092, 3.49997972e-05, 0.999997497, 0, 1, -3.499991e-05, -0.999997497, -8.44897698e-08, -0.00241400092)
- MeshPart38.Orientation = Vector3.new(0, 90.1399994, 0)
- MeshPart38.Position = Vector3.new(-0.675512314, 0.167736173, -1.70284736)
- MeshPart38.Rotation = Vector3.new(179.169998, 89.8700027, -179.169998)
- MeshPart38.Color = Color3.new(0.0509804, 0.411765, 0.67451)
- MeshPart38.Size = Vector3.new(1.00063133, 0.335407257, 1.00020337)
- MeshPart38.BrickColor = BrickColor.new("Bright blue")
- MeshPart38.CanCollide = false
- MeshPart38.brickColor = BrickColor.new("Bright blue")
- Vector3Value39.Name = "OriginalSize"
- Vector3Value39.Parent = MeshPart38
- Vector3Value39.Value = Vector3.new(1.00063133, 0.335407257, 1.00020337)
- Motor6D40.Name = "LeftAnkle"
- Motor6D40.Parent = MeshPart38
- Motor6D40.C0 = CFrame.new(-0.00382620096, -0.710131407, 0.00030554086, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Motor6D40.C1 = CFrame.new(-0.00901681185, 0.032443285, 0.000177569687, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Motor6D40.Part0 = MeshPart51
- Motor6D40.Part1 = MeshPart38
- Motor6D40.part1 = MeshPart38
- MeshPart41.Name = "LowerTorso"
- MeshPart41.Parent = Model0
- MeshPart41.CFrame = CFrame.new(-0.677587926, 2.19284177, -2.19834709, -0.00241400092, 3.49997972e-05, 0.999997497, 0, 1, -3.499991e-05, -0.999997497, -8.44897698e-08, -0.00241400092)
- MeshPart41.Orientation = Vector3.new(0, 90.1399994, 0)
- MeshPart41.Position = Vector3.new(-0.677587926, 2.19284177, -2.19834709)
- MeshPart41.Rotation = Vector3.new(179.169998, 89.8700027, -179.169998)
- MeshPart41.Color = Color3.new(0.156863, 0.498039, 0.278431)
- MeshPart41.Size = Vector3.new(2.00017595, 0.400037616, 1.00021255)
- MeshPart41.BrickColor = BrickColor.new("Dark green")
- MeshPart41.brickColor = BrickColor.new("Dark green")
- Vector3Value42.Name = "OriginalSize"
- Vector3Value42.Parent = MeshPart41
- Vector3Value42.Value = Vector3.new(2.00017595, 0.400037616, 1.00021255)
- Motor6D43.Name = "Root"
- Motor6D43.Parent = MeshPart41
- Motor6D43.C1 = CFrame.new(0.000280171633, 0.133037761, -0.0142721087, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Motor6D43.Part0 = Part11
- Motor6D43.Part1 = MeshPart41
- Motor6D43.part1 = MeshPart41
- Script44.Name = "Damage Script"
- Script44.Parent = MeshPart41
- table.insert(cors,sandbox(Script44,function()
- function onTouched(hit)
- local human = hit.Parent:findFirstChild("Humanoid")
- if (human ~= nil) then
- human.Health = human.Health - 0.5
- end
- end
- script.Parent.Touched:connect(onTouched)
- end))
- MeshPart45.Name = "LeftUpperLeg"
- MeshPart45.Parent = Model0
- MeshPart45.CFrame = CFrame.new(-0.675863564, 1.46466565, -1.69765592, -0.00241400092, 3.49997972e-05, 0.999997497, 0, 1, -3.499991e-05, -0.999997497, -8.44897698e-08, -0.00241400092)
- MeshPart45.Orientation = Vector3.new(0, 90.1399994, 0)
- MeshPart45.Position = Vector3.new(-0.675863564, 1.46466565, -1.69765592)
- MeshPart45.Rotation = Vector3.new(179.169998, 89.8700027, -179.169998)
- MeshPart45.Color = Color3.new(0.0509804, 0.411765, 0.67451)
- MeshPart45.Size = Vector3.new(1.00027561, 1.5362649, 1.00092912)
- MeshPart45.BrickColor = BrickColor.new("Bright blue")
- MeshPart45.CanCollide = false
- MeshPart45.brickColor = BrickColor.new("Bright blue")
- Vector3Value46.Name = "OriginalSize"
- Vector3Value46.Parent = MeshPart45
- Vector3Value46.Value = Vector3.new(1.00027561, 1.5362649, 1.00092912)
- Motor6D47.Name = "LeftHip"
- Motor6D47.Parent = MeshPart45
- Motor6D47.C0 = CFrame.new(-0.50451982, -0.243062243, 0.00122789107, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Motor6D47.C1 = CFrame.new(-0.00382620096, 0.4851138, 0.000686740503, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Motor6D47.Part0 = MeshPart41
- Motor6D47.Part1 = MeshPart45
- Motor6D47.part1 = MeshPart45
- MeshPart48.Name = "LeftUpperArm"
- MeshPart48.Parent = Model0
- MeshPart48.CFrame = CFrame.new(-0.678766429, 3.29312539, -0.700763106, -0.00241400092, 3.49997972e-05, 0.999997497, 0, 1, -3.499991e-05, -0.999997497, -8.44897698e-08, -0.00241400092)
- MeshPart48.Orientation = Vector3.new(0, 90.1399994, 0)
- MeshPart48.Position = Vector3.new(-0.678766429, 3.29312539, -0.700763106)
- MeshPart48.Rotation = Vector3.new(179.169998, 89.8700027, -179.169998)
- MeshPart48.Color = Color3.new(0.992157, 0.917647, 0.552941)
- MeshPart48.Size = Vector3.new(1.00027633, 1.39554, 1.00025082)
- MeshPart48.BrickColor = BrickColor.new("Cool yellow")
- MeshPart48.CanCollide = false
- MeshPart48.brickColor = BrickColor.new("Cool yellow")
- Vector3Value49.Name = "OriginalSize"
- Vector3Value49.Parent = MeshPart48
- Vector3Value49.Value = Vector3.new(1.00027633, 1.39554, 1.00025082)
- Motor6D50.Name = "LeftShoulder"
- Motor6D50.Parent = MeshPart48
- Motor6D50.C0 = CFrame.new(-1.24955308, 0.556408584, -0.015560925, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Motor6D50.C1 = CFrame.new(0.247964978, 0.456732988, -0.00943991542, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Motor6D50.Part0 = MeshPart14
- Motor6D50.Part1 = MeshPart48
- Motor6D50.part1 = MeshPart48
- MeshPart51.Name = "LeftLowerLeg"
- MeshPart51.Parent = Model0
- MeshPart51.CFrame = CFrame.new(-0.67560178, 0.910310864, -1.69765651, -0.00241400092, 3.49997972e-05, 0.999997497, 0, 1, -3.499991e-05, -0.999997497, -8.44897698e-08, -0.00241400092)
- MeshPart51.Orientation = Vector3.new(0, 90.1399994, 0)
- MeshPart51.Position = Vector3.new(-0.67560178, 0.910310864, -1.69765651)
- MeshPart51.Rotation = Vector3.new(179.169998, 89.8700027, -179.169998)
- MeshPart51.Color = Color3.new(0.0509804, 0.411765, 0.67451)
- MeshPart51.Size = Vector3.new(1.00027585, 1.48964536, 1.00032866)
- MeshPart51.BrickColor = BrickColor.new("Bright blue")
- MeshPart51.CanCollide = false
- MeshPart51.brickColor = BrickColor.new("Bright blue")
- Vector3Value52.Name = "OriginalSize"
- Vector3Value52.Parent = MeshPart51
- Vector3Value52.Value = Vector3.new(1.00027585, 1.48964536, 1.00032866)
- Motor6D53.Name = "LeftKnee"
- Motor6D53.Parent = MeshPart51
- Motor6D53.C0 = CFrame.new(-0.00382620096, -0.264486194, 0.000586740673, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Motor6D53.C1 = CFrame.new(-0.00382620096, 0.289868593, 0.00030554086, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Motor6D53.Part0 = MeshPart45
- Motor6D53.Part1 = MeshPart51
- Motor6D53.part1 = MeshPart51
- MeshPart54.Name = "LeftLowerArm"
- MeshPart54.Parent = Model0
- MeshPart54.CFrame = CFrame.new(-0.678323925, 2.90703535, -0.700764775, -0.00241400092, 3.49997972e-05, 0.999997497, 0, 1, -3.499991e-05, -0.999997497, -8.44897698e-08, -0.00241400092)
- MeshPart54.Orientation = Vector3.new(0, 90.1399994, 0)
- MeshPart54.Position = Vector3.new(-0.678323925, 2.90703535, -0.700764775)
- MeshPart54.Rotation = Vector3.new(179.169998, 89.8700027, -179.169998)
- MeshPart54.Color = Color3.new(0.992157, 0.917647, 0.552941)
- MeshPart54.Size = Vector3.new(1.00027657, 1.26567209, 1.00025082)
- MeshPart54.BrickColor = BrickColor.new("Cool yellow")
- MeshPart54.CanCollide = false
- MeshPart54.brickColor = BrickColor.new("Cool yellow")
- Vector3Value55.Name = "OriginalSize"
- Vector3Value55.Parent = MeshPart54
- Vector3Value55.Value = Vector3.new(1.00027657, 1.26567209, 1.00025082)
- Motor6D56.Name = "LeftElbow"
- Motor6D56.Parent = MeshPart54
- Motor6D56.C0 = CFrame.new(-0.00166511536, -0.263139546, -0.00943991542, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Motor6D56.C1 = CFrame.new(-0.0016657114, 0.122950554, -0.00989592075, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Motor6D56.Part0 = MeshPart48
- Motor6D56.Part1 = MeshPart54
- Motor6D56.part1 = MeshPart54
- MeshPart57.Name = "LeftHand"
- MeshPart57.Parent = Model0
- MeshPart57.CFrame = CFrame.new(-0.67280364, 2.1668787, -0.699498653, -0.00241400092, 3.49997972e-05, 0.999997497, 0, 1, -3.499991e-05, -0.999997497, -8.44897698e-08, -0.00241400092)
- MeshPart57.Orientation = Vector3.new(0, 90.1399994, 0)
- MeshPart57.Position = Vector3.new(-0.67280364, 2.1668787, -0.699498653)
- MeshPart57.Rotation = Vector3.new(179.169998, 89.8700027, -179.169998)
- MeshPart57.Color = Color3.new(0.992157, 0.917647, 0.552941)
- MeshPart57.Size = Vector3.new(0.999299049, 0.335255831, 1.00029743)
- MeshPart57.BrickColor = BrickColor.new("Cool yellow")
- MeshPart57.CanCollide = false
- MeshPart57.brickColor = BrickColor.new("Cool yellow")
- Vector3Value58.Name = "OriginalSize"
- Vector3Value58.Parent = MeshPart57
- Vector3Value58.Value = Vector3.new(0.999299049, 0.335255831, 1.00029743)
- Motor6D59.Name = "LeftWrist"
- Motor6D59.Parent = MeshPart57
- Motor6D59.C0 = CFrame.new(-0.0016657114, -0.682255626, -0.00989592075, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Motor6D59.C1 = CFrame.new(-0.000386238098, 0.0579008311, -0.0154390335, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Motor6D59.Part0 = MeshPart54
- Motor6D59.Part1 = MeshPart57
- Motor6D59.part1 = MeshPart57
- Script60.Name = "Respawn"
- Script60.Parent = Model0
- table.insert(cors,sandbox(Script60,function()
- z = script.Parent
- backup = z:clone()
- while true do
- wait(5)
- if z.Zombie.Health == 0 then
- z:Remove()
- wait(4)
- backup.Parent = game.Workspace
- backup.Head:MakeJoints()
- backup.Torso:MakeJoints()
- end
- if z == nil then
- wait(4)
- backup.Parent = game.Workspace
- backup.Head:MakeJoints()
- backup.Torso:MakeJoints()
- end
- end
- end))
- Script61.Name = "Health"
- Script61.Parent = Model0
- table.insert(cors,sandbox(Script61,function()
- --Responsible for regening a player's humanoid's health
- -- declarations
- local Figure = script.Parent
- local Head = Figure:WaitForChild("Head")
- local Humanoid = Figure:WaitForChild("Humanoid")
- local regening = false
- -- regeneration
- function regenHealth()
- if regening then return end
- regening = true
- while Humanoid.Health < Humanoid.MaxHealth do
- local s = wait(1)
- local health = Humanoid.Health
- if health > 0 and health < Humanoid.MaxHealth then
- local newHealthDelta = 0.01 * s * Humanoid.MaxHealth
- health = health + newHealthDelta
- Humanoid.Health = math.min(health,Humanoid.MaxHealth)
- end
- end
- if Humanoid.Health > Humanoid.MaxHealth then
- Humanoid.Health = Humanoid.MaxHealth
- end
- regening = false
- end
- Humanoid.HealthChanged:connect(regenHealth)
- end))
- Script62.Name = "Animate"
- Script62.Parent = Model0
- table.insert(cors,sandbox(Script62,function()
- function waitForChild(parent, childName)
- local child = parent:findFirstChild(childName)
- if child then return child end
- while true do
- child = parent.ChildAdded:wait()
- if child.Name==childName then return child end
- end
- end
- local Figure = script.Parent
- local Humanoid = waitForChild(Figure, "Zombie")
- local pose = "Standing"
- local currentAnim = ""
- local currentAnimInstance = nil
- local currentAnimTrack = nil
- local currentAnimKeyframeHandler = nil
- local currentAnimSpeed = 1.0
- local animTable = {}
- local animNames = {
- idle = {
- { id = "http://www.roblox.com/asset/?id=507766666", weight = 1 },
- { id = "http://www.roblox.com/asset/?id=507766951", weight = 1 },
- { id = "http://www.roblox.com/asset/?id=507766388", weight = 9 }
- },
- walk = {
- { id = "http://www.roblox.com/asset/?id=507777826", weight = 10 }
- },
- run = {
- { id = "http://www.roblox.com/asset/?id=507767714", weight = 10 }
- },
- swim = {
- { id = "http://www.roblox.com/asset/?id=507784897", weight = 10 }
- },
- swimidle = {
- { id = "http://www.roblox.com/asset/?id=507785072", weight = 10 }
- },
- jump = {
- { id = "http://www.roblox.com/asset/?id=507765000", weight = 10 }
- },
- fall = {
- { id = "http://www.roblox.com/asset/?id=507767968", weight = 10 }
- },
- climb = {
- { id = "http://www.roblox.com/asset/?id=507765644", weight = 10 }
- },
- sit = {
- { id = "http://www.roblox.com/asset/?id=507768133", weight = 10 }
- },
- toolnone = {
- { id = "http://www.roblox.com/asset/?id=507768375", weight = 10 }
- },
- toolslash = {
- { id = "http://www.roblox.com/asset/?id=507768375", weight = 10 }
- -- { id = "slash.xml", weight = 10 }
- },
- toollunge = {
- { id = "http://www.roblox.com/asset/?id=507768375", weight = 10 }
- },
- wave = {
- { id = "http://www.roblox.com/asset/?id=507770239", weight = 10 }
- },
- point = {
- { id = "http://www.roblox.com/asset/?id=507770453", weight = 10 }
- },
- dance = {
- { id = "http://www.roblox.com/asset/?id=507771019", weight = 10 },
- { id = "http://www.roblox.com/asset/?id=507771955", weight = 10 },
- { id = "http://www.roblox.com/asset/?id=507772104", weight = 10 }
- },
- dance2 = {
- { id = "http://www.roblox.com/asset/?id=507776043", weight = 10 },
- { id = "http://www.roblox.com/asset/?id=507776720", weight = 10 },
- { id = "http://www.roblox.com/asset/?id=507776879", weight = 10 }
- },
- dance3 = {
- { id = "http://www.roblox.com/asset/?id=507777268", weight = 10 },
- { id = "http://www.roblox.com/asset/?id=507777451", weight = 10 },
- { id = "http://www.roblox.com/asset/?id=507777623", weight = 10 }
- },
- laugh = {
- { id = "http://www.roblox.com/asset/?id=507770818", weight = 10 }
- },
- cheer = {
- { id = "http://www.roblox.com/asset/?id=507770677", weight = 10 }
- },
- }
- -- Existance in this list signifies that it is an emote, the value indicates if it is a looping emote
- local emoteNames = { wave = false, point = false, dance = true, dance2 = true, dance3 = true, laugh = false, cheer = false}
- math.randomseed(tick())
- function configureAnimationSet(name, fileList)
- if (animTable[name] ~= nil) then
- for _, connection in pairs(animTable[name].connections) do
- connection:disconnect()
- end
- end
- animTable[name] = {}
- animTable[name].count = 0
- animTable[name].totalWeight = 0
- animTable[name].connections = {}
- -- check for config values
- local config = script:FindFirstChild(name)
- if (config ~= nil) then
- -- print("Loading anims " .. name)
- table.insert(animTable[name].connections, config.ChildAdded:connect(function(child) configureAnimationSet(name, fileList) end))
- table.insert(animTable[name].connections, config.ChildRemoved:connect(function(child) configureAnimationSet(name, fileList) end))
- local idx = 1
- for _, childPart in pairs(config:GetChildren()) do
- if (childPart:IsA("Animation")) then
- table.insert(animTable[name].connections, childPart.Changed:connect(function(property) configureAnimationSet(name, fileList) end))
- animTable[name][idx] = {}
- animTable[name][idx].anim = childPart
- local weightObject = childPart:FindFirstChild("Weight")
- if (weightObject == nil) then
- animTable[name][idx].weight = 1
- else
- animTable[name][idx].weight = weightObject.Value
- end
- animTable[name].count = animTable[name].count + 1
- animTable[name].totalWeight = animTable[name].totalWeight + animTable[name][idx].weight
- -- print(name .. " [" .. idx .. "] " .. animTable[name][idx].anim.AnimationId .. " (" .. animTable[name][idx].weight .. ")")
- idx = idx + 1
- end
- end
- end
- -- fallback to defaults
- if (animTable[name].count <= 0) then
- for idx, anim in pairs(fileList) do
- animTable[name][idx] = {}
- animTable[name][idx].anim = Instance.new("Animation")
- animTable[name][idx].anim.Name = name
- animTable[name][idx].anim.AnimationId = anim.id
- animTable[name][idx].weight = anim.weight
- animTable[name].count = animTable[name].count + 1
- animTable[name].totalWeight = animTable[name].totalWeight + anim.weight
- -- print(name .. " [" .. idx .. "] " .. anim.id .. " (" .. anim.weight .. ")")
- end
- end
- end
- -- Setup animation objects
- function scriptChildModified(child)
- local fileList = animNames[child.Name]
- if (fileList ~= nil) then
- configureAnimationSet(child.Name, fileList)
- end
- end
- script.ChildAdded:connect(scriptChildModified)
- script.ChildRemoved:connect(scriptChildModified)
- for name, fileList in pairs(animNames) do
- configureAnimationSet(name, fileList)
- end
- -- ANIMATION
- -- declarations
- local toolAnim = "None"
- local toolAnimTime = 0
- local jumpAnimTime = 0
- local jumpAnimDuration = 0.31
- local toolTransitionTime = 0.1
- local fallTransitionTime = 0.2
- -- functions
- function stopAllAnimations()
- local oldAnim = currentAnim
- -- return to idle if finishing an emote
- if (emoteNames[oldAnim] ~= nil and emoteNames[oldAnim] == false) then
- oldAnim = "idle"
- end
- currentAnim = ""
- currentAnimInstance = nil
- if (currentAnimKeyframeHandler ~= nil) then
- currentAnimKeyframeHandler:disconnect()
- end
- if (currentAnimTrack ~= nil) then
- currentAnimTrack:Stop()
- currentAnimTrack:Destroy()
- currentAnimTrack = nil
- end
- return oldAnim
- end
- function setAnimationSpeed(speed)
- if speed ~= currentAnimSpeed then
- currentAnimSpeed = speed
- currentAnimTrack:AdjustSpeed(currentAnimSpeed)
- end
- end
- function keyFrameReachedFunc(frameName)
- if (frameName == "End") then
- -- print("Keyframe : ".. frameName)
- local repeatAnim = currentAnim
- -- return to idle if finishing an emote
- if (emoteNames[repeatAnim] ~= nil and emoteNames[repeatAnim] == false) then
- repeatAnim = "idle"
- end
- local animSpeed = currentAnimSpeed
- playAnimation(repeatAnim, 0.15, Humanoid)
- setAnimationSpeed(animSpeed)
- end
- end
- -- Preload animations
- function playAnimation(animName, transitionTime, humanoid)
- local roll = math.random(1, animTable[animName].totalWeight)
- local origRoll = roll
- local idx = 1
- while (roll > animTable[animName][idx].weight) do
- roll = roll - animTable[animName][idx].weight
- idx = idx + 1
- end
- -- print(animName .. " " .. idx .. " [" .. origRoll .. "]")
- local anim = animTable[animName][idx].anim
- -- switch animation
- if (anim ~= currentAnimInstance) then
- if (currentAnimTrack ~= nil) then
- currentAnimTrack:Stop(transitionTime)
- currentAnimTrack:Destroy()
- end
- currentAnimSpeed = 1.0
- -- load it to the humanoid; get AnimationTrack
- currentAnimTrack = humanoid:LoadAnimation(anim)
- -- play the animation
- currentAnimTrack:Play(transitionTime)
- currentAnim = animName
- currentAnimInstance = anim
- -- set up keyframe name triggers
- if (currentAnimKeyframeHandler ~= nil) then
- currentAnimKeyframeHandler:disconnect()
- end
- currentAnimKeyframeHandler = currentAnimTrack.KeyframeReached:connect(keyFrameReachedFunc)
- end
- end
- -------------------------------------------------------------------------------------------
- -------------------------------------------------------------------------------------------
- local toolAnimName = ""
- local toolAnimTrack = nil
- local toolAnimInstance = nil
- local currentToolAnimKeyframeHandler = nil
- function toolKeyFrameReachedFunc(frameName)
- if (frameName == "End") then
- -- print("Keyframe : ".. frameName)
- playToolAnimation(toolAnimName, 0.0, Humanoid)
- end
- end
- function playToolAnimation(animName, transitionTime, humanoid)
- local roll = math.random(1, animTable[animName].totalWeight)
- local origRoll = roll
- local idx = 1
- while (roll > animTable[animName][idx].weight) do
- roll = roll - animTable[animName][idx].weight
- idx = idx + 1
- end
- -- print(animName .. " * " .. idx .. " [" .. origRoll .. "]")
- local anim = animTable[animName][idx].anim
- if (toolAnimInstance ~= anim) then
- if (toolAnimTrack ~= nil) then
- toolAnimTrack:Stop()
- toolAnimTrack:Destroy()
- transitionTime = 0
- end
- -- load it to the humanoid; get AnimationTrack
- toolAnimTrack = humanoid:LoadAnimation(anim)
- -- play the animation
- toolAnimTrack:Play(transitionTime)
- toolAnimName = animName
- toolAnimInstance = anim
- currentToolAnimKeyframeHandler = toolAnimTrack.KeyframeReached:connect(toolKeyFrameReachedFunc)
- end
- end
- function stopToolAnimations()
- local oldAnim = toolAnimName
- if (currentToolAnimKeyframeHandler ~= nil) then
- currentToolAnimKeyframeHandler:disconnect()
- end
- toolAnimName = ""
- toolAnimInstance = nil
- if (toolAnimTrack ~= nil) then
- toolAnimTrack:Stop()
- toolAnimTrack:Destroy()
- toolAnimTrack = nil
- end
- return oldAnim
- end
- -------------------------------------------------------------------------------------------
- -------------------------------------------------------------------------------------------
- function onRunning(speed)
- if speed > 0.01 then
- local scale = 15.0
- playAnimation("walk", 0.1, Humanoid)
- setAnimationSpeed(speed / scale)
- pose = "Running"
- else
- playAnimation("idle", 0.1, Humanoid)
- pose = "Standing"
- end
- end
- function onDied()
- pose = "Dead"
- end
- function onJumping()
- playAnimation("jump", 0.1, Humanoid)
- jumpAnimTime = jumpAnimDuration
- pose = "Jumping"
- end
- function onClimbing(speed)
- local scale = 5.0
- playAnimation("climb", 0.1, Humanoid)
- setAnimationSpeed(speed / scale)
- pose = "Climbing"
- end
- function onGettingUp()
- pose = "GettingUp"
- end
- function onFreeFall()
- if (jumpAnimTime <= 0) then
- playAnimation("fall", fallTransitionTime, Humanoid)
- end
- pose = "FreeFall"
- end
- function onFallingDown()
- pose = "FallingDown"
- end
- function onSeated()
- pose = "Seated"
- end
- function onPlatformStanding()
- pose = "PlatformStanding"
- end
- function onSwimming(speed)
- if speed > 1.00 then
- local scale = 10.0
- playAnimation("swim", 0.4, Humanoid)
- setAnimationSpeed(speed / scale)
- pose = "Swimming"
- else
- playAnimation("swimidle", 0.4, Humanoid)
- pose = "Standing"
- end
- end
- function getTool()
- for _, kid in ipairs(Figure:GetChildren()) do
- if kid.className == "Tool" then return kid end
- end
- return nil
- end
- function getToolAnim(tool)
- for _, c in ipairs(tool:GetChildren()) do
- if c.Name == "toolanim" and c.className == "StringValue" then
- return c
- end
- end
- return nil
- end
- function animateTool()
- if (toolAnim == "None") then
- playToolAnimation("toolnone", toolTransitionTime, Humanoid)
- return
- end
- if (toolAnim == "Slash") then
- playToolAnimation("toolslash", 0, Humanoid)
- return
- end
- if (toolAnim == "Lunge") then
- playToolAnimation("toollunge", 0, Humanoid)
- return
- end
- end
- function moveSit()
- RightShoulder.MaxVelocity = 0.15
- LeftShoulder.MaxVelocity = 0.15
- RightShoulder:SetDesiredAngle(3.14 /2)
- LeftShoulder:SetDesiredAngle(-3.14 /2)
- RightHip:SetDesiredAngle(3.14 /2)
- LeftHip:SetDesiredAngle(-3.14 /2)
- end
- local lastTick = 0
- function move(time)
- local amplitude = 1
- local frequency = 1
- local deltaTime = time - lastTick
- lastTick = time
- local climbFudge = 0
- local setAngles = false
- if (jumpAnimTime > 0) then
- jumpAnimTime = jumpAnimTime - deltaTime
- end
- if (pose == "FreeFall" and jumpAnimTime <= 0) then
- playAnimation("fall", fallTransitionTime, Humanoid)
- elseif (pose == "Seated") then
- playAnimation("sit", 0.5, Humanoid)
- return
- elseif (pose == "Running") then
- playAnimation("walk", 0.1, Humanoid)
- elseif (pose == "Dead" or pose == "GettingUp" or pose == "FallingDown" or pose == "Seated" or pose == "PlatformStanding") then
- stopAllAnimations()
- amplitude = 0.1
- frequency = 1
- setAngles = true
- end
- -- Tool Animation handling
- local tool = getTool()
- if tool then
- animStringValueObject = getToolAnim(tool)
- if animStringValueObject then
- toolAnim = animStringValueObject.Value
- -- message recieved, delete StringValue
- animStringValueObject.Parent = nil
- toolAnimTime = time + .3
- end
- if time > toolAnimTime then
- toolAnimTime = 0
- toolAnim = "None"
- end
- animateTool()
- else
- stopToolAnimations()
- toolAnim = "None"
- toolAnimInstance = nil
- toolAnimTime = 0
- end
- end
- -- connect events
- Humanoid.Died:connect(onDied)
- Humanoid.Running:connect(onRunning)
- Humanoid.Jumping:connect(onJumping)
- Humanoid.Climbing:connect(onClimbing)
- Humanoid.GettingUp:connect(onGettingUp)
- Humanoid.FreeFalling:connect(onFreeFall)
- Humanoid.FallingDown:connect(onFallingDown)
- Humanoid.Seated:connect(onSeated)
- Humanoid.PlatformStanding:connect(onPlatformStanding)
- Humanoid.Swimming:connect(onSwimming)
- -- setup emote chat hook
- script.msg.Changed:connect(function(msg)
- script.msg.Value = ""
- local emote = ""
- if (string.sub(msg, 1, 3) == "/e ") then
- emote = string.sub(msg, 4)
- elseif (string.sub(msg, 1, 7) == "/emote ") then
- emote = string.sub(msg, 8)
- end
- if (pose == "Standing" and emoteNames[emote] ~= nil) then
- playAnimation(emote, 0.1, Humanoid)
- end
- -- print("===> " .. string.sub(msg, 1, 3) .. "(" .. emote .. ")")
- end)
- -- main program
- local runService = game:service("RunService");
- -- print("bottom")
- -- initialize to idle
- playAnimation("idle", 0.1, Humanoid)
- pose = "Standing"
- while Figure.Parent~=nil do
- local _, time = wait(0.1)
- move(time)
- end
- end))
- StringValue63.Name = "msg"
- StringValue63.Parent = Script62
- StringValue64.Name = "climb"
- StringValue64.Parent = Script62
- Animation65.Name = "ClimbAnim"
- Animation65.Parent = StringValue64
- Animation65.AnimationId = "http://www.roblox.com/asset/?id=616156119"
- StringValue66.Name = "fall"
- StringValue66.Parent = Script62
- Animation67.Name = "FallAnim"
- Animation67.Parent = StringValue66
- Animation67.AnimationId = "http://www.roblox.com/asset/?id=616157476"
- StringValue68.Name = "idle"
- StringValue68.Parent = Script62
- Animation69.Name = "Animation1"
- Animation69.Parent = StringValue68
- Animation69.AnimationId = "http://www.roblox.com/asset/?id=616158929"
- NumberValue70.Name = "Weight"
- NumberValue70.Parent = Animation69
- NumberValue70.Value = 9
- Animation71.Name = "Animation2"
- Animation71.Parent = StringValue68
- Animation71.AnimationId = "http://www.roblox.com/asset/?id=616160636"
- NumberValue72.Name = "Weight"
- NumberValue72.Parent = Animation71
- NumberValue72.Value = 1
- StringValue73.Name = "jump"
- StringValue73.Parent = Script62
- Animation74.Name = "JumpAnim"
- Animation74.Parent = StringValue73
- Animation74.AnimationId = "http://www.roblox.com/asset/?id=616161997"
- StringValue75.Name = "sit"
- StringValue75.Parent = Script62
- Animation76.Name = "SitAnim"
- Animation76.Parent = StringValue75
- Animation76.AnimationId = "http://www.roblox.com/asset/?id=507768133"
- StringValue77.Name = "swim"
- StringValue77.Parent = Script62
- Animation78.Name = "Swim"
- Animation78.Parent = StringValue77
- Animation78.AnimationId = "http://www.roblox.com/asset/?id=616165109"
- StringValue79.Name = "swimidle"
- StringValue79.Parent = Script62
- Animation80.Name = "SwimIdle"
- Animation80.Parent = StringValue79
- Animation80.AnimationId = "http://www.roblox.com/asset/?id=616166655"
- StringValue81.Name = "toolnone"
- StringValue81.Parent = Script62
- Animation82.Name = "ToolNoneAnim"
- Animation82.Parent = StringValue81
- Animation82.AnimationId = "http://www.roblox.com/asset/?id=507768375"
- StringValue83.Name = "walk"
- StringValue83.Parent = Script62
- Animation84.Name = "RunAnim"
- Animation84.Parent = StringValue83
- Animation84.AnimationId = "http://www.roblox.com/asset/?id=616168032"
- Script85.Name = "SoundScript"
- Script85.Parent = Model0
- table.insert(cors,sandbox(Script85,function()
- local moan = script.Parent.Head.Moan
- local moan2 = script.parent.Head.Moan2
- local moan3 = script.parent.Head.Moan3
- local moan4 = script.Parent.Head.Moan4
- while true do
- moan:Play()
- wait(8)
- moan2:Play()
- wait(5)
- moan3:Play()
- wait(7)
- moan4:Play()
- wait(6)
- end
- local death = script.Parent.Head.Death
- end))
- for i,v in pairs(mas:GetChildren()) do
- v.Parent = workspace
- pcall(function() v:MakeJoints() end)
- end
- mas:Destroy()
- for i,v in pairs(cors) do
- spawn(function()
- pcall(v)
- end)
- end
- end
- for i = 1,5 do
- createZombie()
- end
- Touched = false
- DoorUnLocked2.Touched:connect(function(player)
- if Touched == false then
- Touched = true
- Tool0B:Remove()
- Part1B:Remove()
- DoorUnLocked2.Position = Vector3.new(10.4, 6.434, 231.317)
- DoorLocked2.Position = Vector3.new(9999999999999, 9999999999999, 9999999999999)
- SoundAlfa:Stop()
- game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = CFrame.new(146.243, 1666.5, 136.792)
- wait(1)
- Touched = false
- end
- end)
- local screen = Instance.new("Part")
- screen.Parent = workspace
- screen.Anchored = true
- screen.Size = Vector3.new(0.1, 3, 4.5)
- screen.CanCollide = true
- screen.Position = Vector3.new(-57.2, 6.94, 220.7)
- screen.Material = "Plastic"
- screen.BrickColor = BrickColor.new("Really black")
- local TVFloor = Instance.new("Part")
- TVFloor.Parent = workspace
- TVFloor.Anchored = true
- TVFloor.Size = Vector3.new(15, 1, 12)
- TVFloor.CanCollide = false
- TVFloor.Position = Vector3.new(-48.739, 2.8, 220.917)
- TVFloor.Transparency = 1
- Touched = false
- TVFloor.Touched:connect(function(player)
- if Touched == false then
- Touched = true
- local screenmesh = Instance.new("SpecialMesh", screen)
- screenmesh.Scale = Vector3.new(0.1, 3, 4.5)
- screenmesh.TextureId = "rbxassetid://12095085"
- TVFloor.Position = Vector3.new(9999999999999, 9999999999999, 9999999999999)
- local SoundScreen = Instance.new("Sound")
- local Id = "132081621"
- SoundScreen.Parent = screen
- SoundScreen.SoundId = "rbxassetid://"..Id
- SoundScreen.Playing = true
- SoundScreen.Looped = true
- SoundScreen.Volume = 1
- wait(1)
- Touched = false
- end
- end)
- local CellerDoor2 = Instance.new("Part")
- CellerDoor2.Parent = workspace
- CellerDoor2.Anchored = true
- CellerDoor2.Size = Vector3.new(4, 7,2)
- CellerDoor2.CanCollide = true
- CellerDoor2.Position = Vector3.new(146.482, 1669.5, 131.572)
- CellerDoor2.Material = "Corroded Metal"
- CellerDoor2.BrickColor = BrickColor.new("Really black")
- Touched = false
- CellerDoor2.Touched:connect(function(player)
- if Touched == false then
- Touched = true
- game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = CFrame.new(3.718, 2.4, 231.087)
- wait(1)
- Touched = false
- end
- end)
- local CellerWall6 = Instance.new("Part")
- CellerWall6.Parent = workspace
- CellerWall6.Anchored = true
- CellerWall6.Size = Vector3.new(55, 1, 44)
- CellerWall6.CanCollide = true
- CellerWall6.Position = Vector3.new(129.427, 1679, 153.559)
- CellerWall6.Material = "Concrete"
- local CellerWall5 = Instance.new("Part")
- CellerWall5.Parent = workspace
- CellerWall5.Anchored = true
- CellerWall5.Size = Vector3.new(1, 13,23)
- CellerWall5.CanCollide = true
- CellerWall5.Position = Vector3.new(131.769, 1672.5, 142.493)
- CellerWall5.Material = "Concrete"
- local CellerWall4 = Instance.new("Part")
- CellerWall4.Parent = workspace
- CellerWall4.Anchored = true
- CellerWall4.Size = Vector3.new(1, 13,45)
- CellerWall4.CanCollide = true
- CellerWall4.Position = Vector3.new(102.781, 1672.5, 153.497)
- CellerWall4.Material = "Concrete"
- local CellerWall3 = Instance.new("Part")
- CellerWall3.Parent = workspace
- CellerWall3.Anchored = true
- CellerWall3.Size = Vector3.new(1, 13,45)
- CellerWall3.CanCollide = true
- CellerWall3.Position = Vector3.new(156.781, 1672.5, 153.497)
- CellerWall3.Material = "Concrete"
- local CellerWall2 = Instance.new("Part")
- CellerWall2.Parent = workspace
- CellerWall2.Anchored = true
- CellerWall2.Size = Vector3.new(55, 13,1)
- CellerWall2.CanCollide = true
- CellerWall2.Position = Vector3.new(129.794, 1672.5, 175.493)
- CellerWall2.Material = "Concrete"
- local CellerWall1 = Instance.new("Part")
- CellerWall1.Parent = workspace
- CellerWall1.Anchored = true
- CellerWall1.Size = Vector3.new(55, 13,1)
- CellerWall1.CanCollide = true
- CellerWall1.Position = Vector3.new(129.794, 1672.5, 131.493)
- CellerWall1.Material = "Concrete"
- local CellerBazeFloor2 = Instance.new("Part")
- CellerBazeFloor2.Parent = workspace
- CellerBazeFloor2.Anchored = true
- CellerBazeFloor2.Size = Vector3.new(55, 1, 44)
- CellerBazeFloor2.CanCollide = true
- CellerBazeFloor2.Position = Vector3.new(129.427, 1666, 153.559)
- CellerBazeFloor2.Material = "Concrete"
- local SoundCeller = Instance.new("Sound")
- local Id = "9039981149"
- SoundCeller.Parent = CellerBazeFloor2
- SoundCeller.SoundId = "rbxassetid://"..Id
- SoundCeller.Playing = true
- SoundCeller.Looped = true
- SoundCeller.Volume = 1
- local CharacterPart2= Instance.new("Part")
- CharacterPart2.Parent = workspace
- CharacterPart2.Anchored = true
- CharacterPart2.Size = Vector3.new(30, 1, 18)
- CharacterPart2.CanCollide = false
- CharacterPart2.Position = Vector3.new(117.144, 1666.5, 141.912)
- CharacterPart2.Transparency = 1
- Touched = false
- CharacterPart2.Touched:connect(function(player)
- if Touched == false then
- Touched = true
- CharacterPart2.Position = Vector3.new(9999999999999, 9999999999999, 9999999999999)
- game.StarterGui:SetCore("ChatMakeSystemMessage", {
- Text = "[ERROR_CODE]:hello.";
- Color = Color3.fromRGB(255, 255, 255);
- })
- wait(3)
- game.StarterGui:SetCore("ChatMakeSystemMessage", {
- Text = "[ERROR_CODE]:I'm your friend.";
- Color = Color3.fromRGB(255, 255, 255);
- })
- wait(2)
- game.StarterGui:SetCore("ChatMakeSystemMessage", {
- Text = "[ERROR_CODE]:You're in a coma and I want to help you get out of it.";
- Color = Color3.fromRGB(255, 255, 255);
- })
- wait(3)
- game.StarterGui:SetCore("ChatMakeSystemMessage", {
- Text = "[ERROR_CODE]:Just trust me, you need to end this dream.";
- Color = Color3.fromRGB(255, 255, 255);
- })
- wait(2)
- SoundCeller:Stop()
- HarassmentSound.Playing = true
- game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = CFrame.new(-1561.953, 391.1, 536.761)
- game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = 18
- wait(2)
- SoulsLabelFrame.Visible = true
- game.StarterGui:SetCore("ChatMakeSystemMessage", {
- Text = "[ERROR_CODE]:Find all souls.";
- Color = Color3.fromRGB(255, 255, 255);
- })
- wait(1)
- Touched = false
- end
- end)
- local CellerBazeFloor1 = Instance.new("Part")
- CellerBazeFloor1.Parent = workspace
- CellerBazeFloor1.Anchored = true
- CellerBazeFloor1.Size = Vector3.new(55, 1, 44)
- CellerBazeFloor1.CanCollide = true
- CellerBazeFloor1.Position = Vector3.new(129.427, 1666, 153.559)
- CellerBazeFloor1.Material = "Concrete"
- Touched = false
- CellerBazeFloor1.Touched:connect(function(player)
- if Touched == false then
- Touched = true
- CellerBazeFloor1.Position = Vector3.new(9999999999999, 9999999999999, 9999999999999)
- game.StarterGui:SetCore("ChatMakeSystemMessage", {
- Text = "[ERROR_CODE]:I'm here!";
- Color = Color3.fromRGB(255, 255, 255);
- })
- wait(1)
- Touched = false
- end
- end)
- wait(1)
- game.StarterGui:SetCore("ChatMakeSystemMessage", {
- Text = "[ERROR_CODE]:Oh, You Waked Up.";
- Color = Color3.fromRGB(255, 255, 255);
- })
- wait(2.5)
- game.StarterGui:SetCore("ChatMakeSystemMessage", {
- Text = "["..game.Players.LocalPlayer.DisplayName.."]:Who are you?";
- Color = Color3.fromRGB(255, 255, 255);
- })
- wait(2.5)
- game.StarterGui:SetCore("ChatMakeSystemMessage", {
- Text = "[ERROR_CODE]:Don't worry its your dream.";
- Color = Color3.fromRGB(255, 255, 255);
- })
- wait(2)
- game.StarterGui:SetCore("ChatMakeSystemMessage", {
- Text = "[ERROR_CODE]:I am yours... no matter.";
- Color = Color3.fromRGB(255, 255, 255);
- })
- wait(3)
- game.StarterGui:SetCore("ChatMakeSystemMessage", {
- Text = "[ERROR_CODE]:Soon I'll show yorself.";
- Color = Color3.fromRGB(255, 255, 255);
- })
- local ScreenGui = Instance.new("ScreenGui")
- local LockwalkingFrame = Instance.new("ImageButton")
- local LockwalkingFrame2 = Instance.new("ImageButton")
- local ResumeTextButton = Instance.new("TextButton")
- local WakeUpTextButton = Instance.new("TextButton")
- local me = game.Players.LocalPlayer
- local mouse = me:GetMouse()
- local char = me.Character
- local hum = char:FindFirstChild('Humanoid')
- local hd = char:FindFirstChild('Head')
- local ts = char:FindFirstChild('Torso') or char:FindFirstChild('UpperTorso')
- local ra = char:FindFirstChild('Right Arm') or char:FindFirstChild('RightUpperArm')
- local la = char:FindFirstChild('Left Arm') or char:FindFirstChild('LeftUpperArm')
- local rl = char:FindFirstChild('Right Leg') or char:FindFirstChild('RightUpperLeg')
- local ll = char:FindFirstChild('Left Leg') or char:FindFirstChild('LeftUpperLeg')
- local root = char:FindFirstChild('HumanoidRootPart')
- local rj = root:FindFirstChild('RootJoint')
- local rs = ts:FindFirstChild('Right Shoulder')
- local ls = ts:FindFirstChild('Left Shoulder')
- local rh = ts:FindFirstChild('Right Hip')
- local lh = ts:FindFirstChild('Left Hip')
- local nk = ts:FindFirstChild('Neck')
- local anim = char:FindFirstChild('Animate')
- local base = workspace:FindFirstChild('Baseplate') or workspace:FindFirstChild('Base')
- local cantimestop = true
- local cooldown = false
- local cc = workspace.CurrentCamera
- local cos = math.cos
- local sin = math.sin
- local rad = math.rad
- local rand = math.random
- local cfn = CFrame.new
- local cfa = CFrame.Angles
- local v3 = Vector3.new
- local str = string
- local unfreeze = {}
- local health = {}
- local connect = {}
- local sine = 0
- local effects = nil
- ScreenGui.Parent = game.CoreGui
- LockwalkingFrame.Parent = ScreenGui
- LockwalkingFrame.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
- LockwalkingFrame.BackgroundTransparency = 1
- LockwalkingFrame.Position = UDim2.new(0, 0, 0.3, 0)
- LockwalkingFrame.Size = UDim2.new(0, 500, 0, 500)
- LockwalkingFrame2.Parent = ScreenGui
- LockwalkingFrame2.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
- LockwalkingFrame2.BackgroundTransparency = 1
- LockwalkingFrame2.Position = UDim2.new(0.7, 0, 0.5, 0)
- LockwalkingFrame2.Size = UDim2.new(0, 300, 0, 300)
- LockwalkingFrame.Visible = false
- LockwalkingFrame2.Visible = false
- local CameraPart = Instance.new("Part")
- CameraPart.Parent = workspace
- CameraPart.Anchored = true
- CameraPart.Size = Vector3.new(4, 1, 2)
- CameraPart.CanCollide = false
- CameraPart.Position = Vector3.new(-1597.811, 559, 578)
- CameraPart.Transparency = 1
- local player = game.Players.LocalPlayer
- local character = player.Character
- local cam = workspace.CurrentCamera
- if char:FindFirstChild('Effects') then
- effects = char:FindFirstChild('Effects')
- else
- effects = Instance.new('Folder', char)
- effects.Name = 'Effects'
- end
- ArtificialHB = Instance.new('BindableEvent', script)
- ArtificialHB.Name = 'Heartbeat'
- script:WaitForChild('Heartbeat')
- frame = 1 / 60
- tf = 0
- allowframeloss = false
- tossremainder = false
- lastframe = tick()
- script.Heartbeat:Fire()
- game:GetService('RunService').Heartbeat:connect(function(s, p)
- tf = tf + s
- if tf >= frame then
- if allowframeloss then
- script.Heartbeat:Fire()
- lastframe = tick()
- else
- for i = 1, math.floor(tf / frame) do
- script.Heartbeat:Fire()
- end
- lastframe = tick()
- end
- if tossremainder then
- tf = 0
- else
- tf = tf - frame * math.floor(tf / frame)
- end
- end
- end)
- function swait(t)
- if t == 0 or t == nil then
- script.Heartbeat.Event:Wait()
- else
- for i = 0, t do
- script.Heartbeat.Event:Wait()
- end
- end
- end
- function sound(id, parent, vol, pitch, timepos)
- local s = Instance.new('Sound')
- s.Parent = parent
- s.SoundId = id
- s.Volume = vol
- s.PlaybackSpeed = pitch
- s.TimePosition = timepos
- s:Play()
- game.Debris:AddItem(s, s.PlaybackSpeed + 5)
- end
- function camshake(duration, intensity)
- coroutine.wrap(function()
- for i = 1, duration do
- hum.CameraOffset = hum.CameraOffset:lerp(v3(rand(-1, 1), rand(-1, 1), rand(-1, 1)), 0.1 * intensity)
- swait()
- end
- hum.CameraOffset = v3(0, 0, 0)
- end)()
- end
- function findascendant(obj, class)
- local par = obj
- local ret = nil
- pcall(function()
- repeat
- par = par.Parent
- if par:IsA(class) then
- ret = par
- break
- end
- until par == nil
- end)
- return ret
- end
- function timestop()
- cantimestop = false
- coroutine.wrap(function()
- local effect1 = Instance.new('Part', effects)
- effect1.Shape = 'Ball'
- effect1.Material = 'ForceField'
- effect1.Anchored = true
- effect1.CanCollide = false
- effect1.Size = v3(0, 0, 0)
- effect1.Transparency = 0
- for i,v in pairs(workspace:GetDescendants()) do
- if v:IsA('BasePart') then
- if not v.Anchored and not findascendant(v, 'Tool') and not findascendant(v, 'HopperBin') then
- if not v:IsDescendantOf(char) then
- v.Anchored = true
- table.insert(unfreeze, v)
- end
- end
- end
- if v:IsA('Humanoid') then
- local last = v.Health
- local always = last
- local e = v.HealthChanged:connect(function(hp)
- if last - hp > 0 then
- table.insert(health, {humanoid = v, change = last - hp})
- end
- last = hp
- v.Health = always
- end)
- table.insert(connect, e)
- end
- if v:IsA('BodyVelocity') then
- local lastforce = v.MaxForce
- v.MaxForce = v3(0, 0, 0)
- table.insert(unfreeze, {force = v, change = lastforce})
- end
- if v:IsA('BodyPosition') then
- local lastposition = v.MaxForce
- local lastD = v.D
- local lastP = v.P
- v.MaxForce = v3(0, 0, 0)
- v.D = 0
- v.P = 0
- table.insert(unfreeze, {position = v, change = lastposition, dchange = lastD, pchange = lastP})
- end
- if v:IsA('BodyForce') then
- local lastforce2 = v.Force
- v.Force = v3(0, 0, 0)
- table.insert(unfreeze, {force2 = v, fchange = lastforce2})
- end
- end
- ee = workspace.DescendantAdded:Connect(function(v)
- if v:IsA('BasePart') then
- if not v.Anchored and not findascendant(v, 'Tool') and not findascendant(v, 'HopperBin') then
- if not v:IsDescendantOf(char) then
- v.Anchored = true
- table.insert(unfreeze, v)
- end
- end
- end
- if v:IsA('Sound') then
- if not v:IsDescendantOf(char) then
- if v.IsPlaying then
- v:Pause()
- table.insert(unfreeze, v)
- end
- end
- end
- if v:IsA('Humanoid') then
- local last = v.Health
- local always = last
- local e = v.HealthChanged:connect(function(hp)
- if last - hp > 0 then
- table.insert(health, {humanoid = v, change = last - hp})
- end
- last = hp
- v.Health = always
- end)
- table.insert(connect, e)
- end
- end)
- cce = Instance.new('ColorCorrectionEffect', game.Lighting)
- coroutine.wrap(function()
- for i = 1, 10 do
- camshake(70, 2)
- cce.Saturation = cce.Saturation - 0.1
- cce.Contrast = cce.Contrast + 0.1
- swait(5)
- end
- end)()
- coroutine.wrap(function()
- for i = 1, 1000 do
- effect1.CFrame = ts.CFrame
- effect1.Size = effect1.Size:lerp(v3(50, 50, 50), 0.015)
- effect1.Transparency = effect1.Transparency + 0.010
- if effect1.Transparency >= 1 then
- effect1:Destroy()
- end
- swait()
- end
- end)()
- wait(0.5)
- local effect2 = Instance.new('Part', effects)
- local effect3 = Instance.new('Part', effects)
- effect3.Shape = 'Ball'
- effect3.Material = 'ForceField'
- effect3.Anchored = true
- effect3.CanCollide = false
- effect3.Size = v3(0, 0, 0)
- effect3.Transparency = 0
- effect2.Shape = 'Ball'
- effect2.Material = 'ForceField'
- effect2.Anchored = true
- effect2.CanCollide = false
- effect2.Size = v3(40, 40, 40)
- effect2.Transparency = 1
- coroutine.wrap(function()
- for i = 1, 15 do
- effect2.Transparency = effect2.Transparency - 0.11
- swait()
- end
- end)()
- coroutine.wrap(function()
- for i = 1, 1000 do
- effect3.CFrame = ts.CFrame
- effect3.Size = effect3.Size:lerp(v3(50, 50, 50), 0.015)
- effect3.Transparency = effect3.Transparency + 0.010
- if effect3.Transparency >= 1 then
- effect3:Destroy()
- end
- swait()
- end
- end)()
- for i = 1, 1000 do
- effect2.CFrame = ts.CFrame
- effect2.Size = effect2.Size:lerp(v3(0, 0, 0), 0.015)
- effect2.Transparency = effect2.Transparency + 0.015
- if effect2.Transparency >= 1 then
- effect2:Destroy()
- end
- swait()
- end
- end)()
- wait(1.5)
- cooldown = true
- end
- function timeresume()
- coroutine.wrap(function()
- coroutine.wrap(function()
- for i = 1, 10 do
- camshake(20, 0.3)
- cce.Saturation = cce.Saturation + 0.1
- cce.Contrast = cce.Contrast - 0.1
- swait(5)
- end
- cce:Destroy()
- end)()
- coroutine.wrap(function()
- wait(1.5)
- for i,v in pairs(unfreeze) do
- pcall(function()
- v.Anchored = false
- end)
- pcall(function()
- v:Resume()
- end)
- end
- for i,v in pairs(connect) do
- pcall(function()
- v:Disconnect()
- end)
- end
- for i,v in pairs(health) do
- pcall(function()
- local humanoid = v.humanoid
- humanoid.Health = humanoid.Health - v.change
- if humanoid.Parent:FindFirstChild('Health') then
- pcall(function()
- humanoid.Parent.Health.Disabled = false
- end)
- end
- end)
- end
- pcall(function()
- ee:Disconnect()
- end)
- health = {}
- unfreeze = {}
- end)()
- cantimestop = true
- end)()
- wait(1.5)
- cooldown = false
- end
- local PortalPart1 = Instance.new("Part")
- PortalPart1.Parent = workspace
- PortalPart1.Anchored = true
- PortalPart1.Size = Vector3.new(2.001, 15, 12)
- PortalPart1.CanCollide = true
- PortalPart1.Position = Vector3.new(-1570.681, 555, 602.302)
- PortalPart1.BrickColor = BrickColor.new("Institutional white")
- PortalPart1.Material = "ForceField"
- local PortalPart1Mesh = Instance.new("SpecialMesh", PortalPart1)
- PortalPart1Mesh.MeshType = Enum.MeshType.Sphere
- local PortalPart2 = Instance.new("Part")
- PortalPart2.Parent = workspace
- PortalPart2.Anchored = true
- PortalPart2.Size = Vector3.new(0.001, 15, 12)
- PortalPart2.CanCollide = true
- PortalPart2.Position = Vector3.new(-1570.681, 555, 602.302)
- PortalPart2.BrickColor = BrickColor.new("Institutional white")
- PortalPart2.Material = "Neon"
- local PortalPart2Mesh = Instance.new("SpecialMesh", PortalPart2)
- PortalPart2Mesh.MeshType = Enum.MeshType.Sphere
- local TouchForEnd = Instance.new("Part")
- TouchForEnd.Parent = game.workspace
- TouchForEnd.Anchored = true
- TouchForEnd.Size = Vector3.new(49, 1, 40)
- TouchForEnd.CanCollide = false
- TouchForEnd.Position = Vector3.new(-1597.1, 548.5, 605.666)
- TouchForEnd.Transparency = 1
- Touched = false
- TouchForEnd.Touched:connect(function(player)
- if Touched == false then
- Touched = true
- game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = 5
- lighting.FogEnd = 10000
- LockwalkingFrame.Visible = true
- LockwalkingFrame2.Visible = true
- HarassmentSound:Stop()
- TouchForEnd:Remove()
- cam.CameraSubject = CameraPart
- local TimeStopSound = Instance.new("Sound")
- local Id = "5832251994"
- TimeStopSound.Parent = game.Workspace
- TimeStopSound.SoundId = "rbxassetid://"..Id
- TimeStopSound.Playing = true
- TimeStopSound.Looped = false
- TimeStopSound.Volume = 1
- timestop()
- local EndSound = Instance.new("Sound")
- local Id = "1842572665"
- EndSound.Parent = game.Workspace
- EndSound.SoundId = "rbxassetid://"..Id
- EndSound.Playing = true
- EndSound.Looped = true
- EndSound.Volume = 1
- local WalkAndTouchPart = Instance.new("Part")
- WalkAndTouchPart.Parent = workspace
- WalkAndTouchPart.Anchored = true
- WalkAndTouchPart.Size = Vector3.new(2, 1, 46)
- WalkAndTouchPart.CanCollide = false
- WalkAndTouchPart.Transparency = 1
- WalkAndTouchPart.Position = Vector3.new(-1581.35, 548, 605.662)
- Touched = false
- WalkAndTouchPart.Touched:connect(function(player)
- if Touched == false then
- Touched = true
- WalkAndTouchPart:Remove()
- game.StarterGui:SetCore("ChatMakeSystemMessage", {
- Text = "[ERROR_CODE]:Wait!";
- Color = Color3.fromRGB(255, 255, 255);
- })
- wait(2)
- game.StarterGui:SetCore("ChatMakeSystemMessage", {
- Text = "["..game.Players.LocalPlayer.DisplayName.."]:What?";
- Color = Color3.fromRGB(255, 255, 255);
- })
- wait(2.5)
- game.StarterGui:SetCore("ChatMakeSystemMessage", {
- Text = "[ERROR_CODE]:You need to think before you enter the portal.";
- Color = Color3.fromRGB(255, 255, 255);
- })
- wait(3)
- game.StarterGui:SetCore("ChatMakeSystemMessage", {
- Text = "[ERROR_CODE]:If you enter the portal, you will find out what happened to you. If not, you will just wake up.";
- Color = Color3.fromRGB(255, 255, 255);
- })
- wait(2)
- game.StarterGui:SetCore("ChatMakeSystemMessage", {
- Text = "[ERROR_CODE]:It's up to you.";
- Color = Color3.fromRGB(255, 255, 255);
- })
- wait(1)
- ResumeTextButton.Name = "ResumeTextButton"
- ResumeTextButton.Parent = ScreenGui
- ResumeTextButton.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- ResumeTextButton.Position = UDim2.new(0.1, 0, 0.3, 0)
- ResumeTextButton.Size = UDim2.new(0, 300, 0, 200)
- ResumeTextButton.Font = Enum.Font.GothamBold
- ResumeTextButton.Text = "Resume Adventure"
- ResumeTextButton.TextColor3 = Color3.fromRGB(0, 0, 0)
- ResumeTextButton.TextScaled = true
- ResumeTextButton.TextSize = 14.000
- ResumeTextButton.TextWrapped = true
- ResumeTextButton.MouseButton1Down:connect(function()
- ResumeTextButton:Destroy()
- WakeUpTextButton:Destroy()
- game.Players.LocalPlayer.Character:WaitForChild("Humanoid"):MoveTo(PortalPart2.Position)
- game.Players.LocalPlayer.Character:WaitForChild("Humanoid").MoveToFinished:Wait()
- timeresume()
- wait(2)
- game:FindService("RunService"):Set3dRenderingEnabled(true)
- end)
- WakeUpTextButton.Name = "WakeUpTextButton"
- WakeUpTextButton.Parent = ScreenGui
- WakeUpTextButton.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
- WakeUpTextButton.Position = UDim2.new(0.6, 0, 0.3, 0)
- WakeUpTextButton.Size = UDim2.new(0, 300, 0, 200)
- WakeUpTextButton.Font = Enum.Font.GothamBold
- WakeUpTextButton.Text = "Wake Up"
- WakeUpTextButton.TextColor3 = Color3.fromRGB(255, 255, 255)
- WakeUpTextButton.TextScaled = true
- WakeUpTextButton.TextSize = 14.000
- WakeUpTextButton.TextWrapped = true
- WakeUpTextButton.MouseButton1Down:connect(function()
- LockwalkingFrame2:Destroy()
- LockwalkingFrame:Destroy()
- EndSound:Stop()
- WakeUpTextButton:Destroy()
- ResumeTextButton:Destroy()
- game:FindService("RunService"):Set3dRenderingEnabled(false)
- local WakeUpSound = Instance.new("Sound")
- local Id = "1837093849"
- WakeUpSound.Parent = game.Workspace
- WakeUpSound.SoundId = "rbxassetid://"..Id
- WakeUpSound.Playing = true
- WakeUpSound.Looped = true
- WakeUpSound.Volume = 1
- timeresume()
- game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = CFrame.new(-1612.68, 0.8, 566.899)
- lighting.FogEnd = 20
- wait(5)
- game:FindService("RunService"):Set3dRenderingEnabled(true)
- local Camera = game.Workspace.Camera
- Camera.CameraType = Enum.CameraType.Scriptable
- Camera.CFrame = CFrame.new(459.51, 57.152, 68.027)
- wait(0.05)
- local Camera = game.Workspace.Camera
- Camera.CameraType = Enum.CameraType.Scriptable
- Camera.CFrame = CFrame.new(459.51, 57.152, 67.027)
- wait(0.05)
- local Camera = game.Workspace.Camera
- Camera.CameraType = Enum.CameraType.Scriptable
- Camera.CFrame = CFrame.new(459.51, 57.152, 66.027)
- wait(0.05)
- local Camera = game.Workspace.Camera
- Camera.CameraType = Enum.CameraType.Scriptable
- Camera.CFrame = CFrame.new(459.51, 57.152, 65.027)
- wait(0.05)
- local Camera = game.Workspace.Camera
- Camera.CameraType = Enum.CameraType.Scriptable
- Camera.CFrame = CFrame.new(459.51, 57.152, 64.027)
- wait(0.05)
- local Camera = game.Workspace.Camera
- Camera.CameraType = Enum.CameraType.Scriptable
- Camera.CFrame = CFrame.new(459.51, 57.152, 63.027)
- wait(0.05)
- local Camera = game.Workspace.Camera
- Camera.CameraType = Enum.CameraType.Scriptable
- Camera.CFrame = CFrame.new(459.51, 57.152, 62.027)
- wait(0.05)
- local Camera = game.Workspace.Camera
- Camera.CameraType = Enum.CameraType.Scriptable
- Camera.CFrame = CFrame.new(459.51, 57.152, 61.027)
- wait(0.05)
- local Camera = game.Workspace.Camera
- Camera.CameraType = Enum.CameraType.Scriptable
- Camera.CFrame = CFrame.new(459.51, 57.152, 60.027)
- wait(0.05)
- local Camera = game.Workspace.Camera
- Camera.CameraType = Enum.CameraType.Scriptable
- Camera.CFrame = CFrame.new(459.51, 57.152, 59.027)
- wait(0.05)
- local Camera = game.Workspace.Camera
- Camera.CameraType = Enum.CameraType.Scriptable
- Camera.CFrame = CFrame.new(459.51, 57.152, 58.027)
- wait(0.05)
- local Camera = game.Workspace.Camera
- Camera.CameraType = Enum.CameraType.Scriptable
- Camera.CFrame = CFrame.new(459.51, 57.152, 57.027)
- wait(0.05)
- local Camera = game.Workspace.Camera
- Camera.CameraType = Enum.CameraType.Scriptable
- Camera.CFrame = CFrame.new(459.51, 57.152, 56.027)
- wait(0.05)
- local Camera = game.Workspace.Camera
- Camera.CameraType = Enum.CameraType.Scriptable
- Camera.CFrame = CFrame.new(459.51, 57.152, 55.027)
- wait(0.05)
- local Camera = game.Workspace.Camera
- Camera.CameraType = Enum.CameraType.Scriptable
- Camera.CFrame = CFrame.new(459.51, 57.152, 54.027)
- wait(0.05)
- local Camera = game.Workspace.Camera
- Camera.CameraType = Enum.CameraType.Scriptable
- Camera.CFrame = CFrame.new(459.51, 57.152, 53.027)
- wait(0.05)
- local Camera = game.Workspace.Camera
- Camera.CameraType = Enum.CameraType.Scriptable
- Camera.CFrame = CFrame.new(459.51, 57.152, 52.027)
- wait(0.05)
- local Camera = game.Workspace.Camera
- Camera.CameraType = Enum.CameraType.Scriptable
- Camera.CFrame = CFrame.new(459.51, 57.152, 51.027)
- wait(0.05)
- local Camera = game.Workspace.Camera
- Camera.CameraType = Enum.CameraType.Scriptable
- Camera.CFrame = CFrame.new(459.51, 57.152, 50.027)
- wait(0.05)
- local Camera = game.Workspace.Camera
- Camera.CameraType = Enum.CameraType.Scriptable
- Camera.CFrame = CFrame.new(459.51, 57.152, 49.027)
- wait(0.05)
- local Camera = game.Workspace.Camera
- Camera.CameraType = Enum.CameraType.Scriptable
- Camera.CFrame = CFrame.new(459.51, 57.152, 48.027)
- wait(0.05)
- local Camera = game.Workspace.Camera
- Camera.CameraType = Enum.CameraType.Scriptable
- Camera.CFrame = CFrame.new(459.51, 57.152, 47.027)
- wait(0.05)
- local Camera = game.Workspace.Camera
- Camera.CameraType = Enum.CameraType.Scriptable
- Camera.CFrame = CFrame.new(459.51, 57.152, 46.027)
- wait(0.05)
- local Camera = game.Workspace.Camera
- Camera.CameraType = Enum.CameraType.Scriptable
- Camera.CFrame = CFrame.new(459.51, 57.152, 45.027)
- wait(0.05)
- local Camera = game.Workspace.Camera
- Camera.CameraType = Enum.CameraType.Scriptable
- Camera.CFrame = CFrame.new(459.51, 57.152, 44.027)
- wait(0.05)
- local Camera = game.Workspace.Camera
- Camera.CameraType = Enum.CameraType.Scriptable
- Camera.CFrame = CFrame.new(459.51, 57.152, 43.027)
- wait(0.05)
- local Camera = game.Workspace.Camera
- Camera.CameraType = Enum.CameraType.Scriptable
- Camera.CFrame = CFrame.new(459.51, 57.152, 42.027)
- wait(0.05)
- local Camera = game.Workspace.Camera
- Camera.CameraType = Enum.CameraType.Scriptable
- Camera.CFrame = CFrame.new(459.51, 57.152, 41.027)
- wait(0.05)
- local Camera = game.Workspace.Camera
- Camera.CameraType = Enum.CameraType.Scriptable
- Camera.CFrame = CFrame.new(459.51, 57.152, 40.027)
- wait(0.05)
- local Camera = game.Workspace.Camera
- Camera.CameraType = Enum.CameraType.Scriptable
- Camera.CFrame = CFrame.new(459.51, 57.152, 39.027)
- wait(0.05)
- local Camera = game.Workspace.Camera
- Camera.CameraType = Enum.CameraType.Scriptable
- Camera.CFrame = CFrame.new(459.51, 57.152, 38.027)
- wait(0.05)
- local Camera = game.Workspace.Camera
- Camera.CameraType = Enum.CameraType.Scriptable
- Camera.CFrame = CFrame.new(459.51, 57.152, 37.027)
- wait(0.05)
- local Camera = game.Workspace.Camera
- Camera.CameraType = Enum.CameraType.Scriptable
- Camera.CFrame = CFrame.new(459.51, 57.152, 36.027)
- wait(0.05)
- local Camera = game.Workspace.Camera
- Camera.CameraType = Enum.CameraType.Scriptable
- Camera.CFrame = CFrame.new(459.51, 57.152, 35.027)
- wait(0.05)
- local Camera = game.Workspace.Camera
- Camera.CameraType = Enum.CameraType.Scriptable
- Camera.CFrame = CFrame.new(459.51, 57.152, 34.027)
- wait(0.05)
- local Camera = game.Workspace.Camera
- Camera.CameraType = Enum.CameraType.Scriptable
- Camera.CFrame = CFrame.new(459.51, 57.152, 33.027)
- wait(0.05)
- local Camera = game.Workspace.Camera
- Camera.CameraType = Enum.CameraType.Scriptable
- Camera.CFrame = CFrame.new(459.51, 57.152, 32.027)
- wait(0.05)
- local Camera = game.Workspace.Camera
- Camera.CameraType = Enum.CameraType.Scriptable
- Camera.CFrame = CFrame.new(459.51, 57.152, 31.027)
- wait(0.05)
- local Camera = game.Workspace.Camera
- Camera.CameraType = Enum.CameraType.Scriptable
- Camera.CFrame = CFrame.new(459.51, 57.152, 30.027)
- wait(0.05)
- local Camera = game.Workspace.Camera
- Camera.CameraType = Enum.CameraType.Scriptable
- Camera.CFrame = CFrame.new(459.51, 57.152, 29.027)
- wait(0.05)
- local Camera = game.Workspace.Camera
- Camera.CameraType = Enum.CameraType.Scriptable
- Camera.CFrame = CFrame.new(459.51, 57.152, 28.027)
- wait(0.05)
- local Camera = game.Workspace.Camera
- Camera.CameraType = Enum.CameraType.Scriptable
- Camera.CFrame = CFrame.new(459.51, 57.152, 27.027)
- wait(0.05)
- local Camera = game.Workspace.Camera
- Camera.CameraType = Enum.CameraType.Scriptable
- Camera.CFrame = CFrame.new(459.51, 57.152, 26.027)
- wait(0.05)
- local Camera = game.Workspace.Camera
- Camera.CameraType = Enum.CameraType.Scriptable
- Camera.CFrame = CFrame.new(459.51, 57.152, 25.027)
- wait(0.05)
- local Camera = game.Workspace.Camera
- Camera.CameraType = Enum.CameraType.Scriptable
- Camera.CFrame = CFrame.new(459.51, 57.152, 24.027)
- wait(0.05)
- local Camera = game.Workspace.Camera
- Camera.CameraType = Enum.CameraType.Scriptable
- Camera.CFrame = CFrame.new(459.51, 57.152, 23.027)
- wait(0.05)
- local Camera = game.Workspace.Camera
- Camera.CameraType = Enum.CameraType.Scriptable
- Camera.CFrame = CFrame.new(459.51, 57.152, 22.027)
- wait(0.05)
- local Camera = game.Workspace.Camera
- Camera.CameraType = Enum.CameraType.Scriptable
- Camera.CFrame = CFrame.new(459.51, 57.152, 21.027)
- wait(0.05)
- local Camera = game.Workspace.Camera
- Camera.CameraType = Enum.CameraType.Scriptable
- Camera.CFrame = CFrame.new(459.51, 57.152, 20.027)
- wait(0.05)
- local Camera = game.Workspace.Camera
- Camera.CameraType = Enum.CameraType.Scriptable
- Camera.CFrame = CFrame.new(459.51, 57.152, 19.027)
- wait(0.05)
- local Camera = game.Workspace.Camera
- Camera.CameraType = Enum.CameraType.Scriptable
- Camera.CFrame = CFrame.new(459.51, 57.152, 18.027)
- wait(0.05)
- local Camera = game.Workspace.Camera
- Camera.CameraType = Enum.CameraType.Scriptable
- Camera.CFrame = CFrame.new(459.51, 57.152, 17.027)
- wait(0.05)
- local Camera = game.Workspace.Camera
- Camera.CameraType = Enum.CameraType.Scriptable
- Camera.CFrame = CFrame.new(459.51, 57.152, 16.027)
- wait(0.05)
- local Camera = game.Workspace.Camera
- Camera.CameraType = Enum.CameraType.Scriptable
- Camera.CFrame = CFrame.new(459.51, 57.152, 15.027)
- wait(0.05)
- local Camera = game.Workspace.Camera
- Camera.CameraType = Enum.CameraType.Scriptable
- Camera.CFrame = CFrame.new(459.51, 57.152, 14.027)
- wait(0.05)
- local Camera = game.Workspace.Camera
- Camera.CameraType = Enum.CameraType.Scriptable
- Camera.CFrame = CFrame.new(459.51, 57.152, 13.027)
- wait(0.05)
- local Camera = game.Workspace.Camera
- Camera.CameraType = Enum.CameraType.Scriptable
- Camera.CFrame = CFrame.new(459.51, 57.152, 12.027)
- wait(0.05)
- local Camera = game.Workspace.Camera
- Camera.CameraType = Enum.CameraType.Scriptable
- Camera.CFrame = CFrame.new(459.51, 57.152, 11.027)
- wait(0.05)
- local Camera = game.Workspace.Camera
- Camera.CameraType = Enum.CameraType.Scriptable
- Camera.CFrame = CFrame.new(459.51, 57.152, 10.027)
- wait(0.05)
- local Camera = game.Workspace.Camera
- Camera.CameraType = Enum.CameraType.Scriptable
- Camera.CFrame = CFrame.new(459.51, 57.152, 9.027)
- wait(0.05)
- local Camera = game.Workspace.Camera
- Camera.CameraType = Enum.CameraType.Scriptable
- Camera.CFrame = CFrame.new(459.51, 57.152, 8.027)
- wait(0.05)
- local Camera = game.Workspace.Camera
- Camera.CameraType = Enum.CameraType.Scriptable
- Camera.CFrame = CFrame.new(459.51, 57.152, 7.027)
- wait(0.05)
- local Camera = game.Workspace.Camera
- Camera.CameraType = Enum.CameraType.Scriptable
- Camera.CFrame = CFrame.new(459.51, 57.152, 6.027)
- wait(0.05)
- local Camera = game.Workspace.Camera
- Camera.CameraType = Enum.CameraType.Scriptable
- Camera.CFrame = CFrame.new(459.51, 57.152, 5.027)
- wait(0.05)
- local Camera = game.Workspace.Camera
- Camera.CameraType = Enum.CameraType.Scriptable
- Camera.CFrame = CFrame.new(459.51, 57.152, 4.027)
- wait(0.05)
- local Camera = game.Workspace.Camera
- Camera.CameraType = Enum.CameraType.Scriptable
- Camera.CFrame = CFrame.new(459.51, 57.152, 3.027)
- wait(0.05)
- local Camera = game.Workspace.Camera
- Camera.CameraType = Enum.CameraType.Scriptable
- Camera.CFrame = CFrame.new(459.51, 57.152, 2.027)
- wait(0.05)
- local Camera = game.Workspace.Camera
- Camera.CameraType = Enum.CameraType.Scriptable
- Camera.CFrame = CFrame.new(459.51, 57.152, 1.027)
- wait(0.05)
- local Camera = game.Workspace.Camera
- Camera.CameraType = Enum.CameraType.Scriptable
- Camera.CFrame = CFrame.new(459.51, 57.152, 0.027)
- wait(0.05)
- local Camera = game.Workspace.Camera
- Camera.CameraType = Enum.CameraType.Scriptable
- Camera.CFrame = CFrame.new(459.51, 57.152, -1.027)
- wait(0.05)
- local Camera = game.Workspace.Camera
- Camera.CameraType = Enum.CameraType.Scriptable
- Camera.CFrame = CFrame.new(459.51, 57.152, -2.027)
- wait(0.05)
- local Camera = game.Workspace.Camera
- Camera.CameraType = Enum.CameraType.Scriptable
- Camera.CFrame = CFrame.new(459.51, 57.152, -3.027)
- wait(0.05)
- local Camera = game.Workspace.Camera
- Camera.CameraType = Enum.CameraType.Scriptable
- Camera.CFrame = CFrame.new(459.51, 57.152, -4.027)
- wait(0.05)
- local Camera = game.Workspace.Camera
- Camera.CameraType = Enum.CameraType.Scriptable
- Camera.CFrame = CFrame.new(459.51, 57.152, -5.027)
- wait(0.05)
- local Camera = game.Workspace.Camera
- Camera.CameraType = Enum.CameraType.Scriptable
- Camera.CFrame = CFrame.new(459.51, 57.152, -6.027)
- wait(0.05)
- local Camera = game.Workspace.Camera
- Camera.CameraType = Enum.CameraType.Scriptable
- Camera.CFrame = CFrame.new(459.51, 57.152, -7.027)
- wait(0.05)
- local Camera = game.Workspace.Camera
- Camera.CameraType = Enum.CameraType.Scriptable
- Camera.CFrame = CFrame.new(459.51, 57.152, -8.027)
- wait(0.05)
- local Camera = game.Workspace.Camera
- Camera.CameraType = Enum.CameraType.Scriptable
- Camera.CFrame = CFrame.new(459.51, 57.152, -9.027)
- wait(0.05)
- local Camera = game.Workspace.Camera
- Camera.CameraType = Enum.CameraType.Scriptable
- Camera.CFrame = CFrame.new(459.51, 57.152, -10.027)
- wait(0.05)
- local Camera = game.Workspace.Camera
- Camera.CameraType = Enum.CameraType.Scriptable
- Camera.CFrame = CFrame.new(459.51, 57.152, -11.027)
- wait(0.05)
- local Camera = game.Workspace.Camera
- Camera.CameraType = Enum.CameraType.Scriptable
- Camera.CFrame = CFrame.new(459.51, 57.152, -12.027)
- wait(0.05)
- local Camera = game.Workspace.Camera
- Camera.CameraType = Enum.CameraType.Scriptable
- Camera.CFrame = CFrame.new(459.51, 57.152, -13.027)
- wait(0.05)
- local Camera = game.Workspace.Camera
- Camera.CameraType = Enum.CameraType.Scriptable
- Camera.CFrame = CFrame.new(459.51, 57.152, -14.027)
- wait(0.05)
- local Camera = game.Workspace.Camera
- Camera.CameraType = Enum.CameraType.Scriptable
- Camera.CFrame = CFrame.new(459.51, 57.152, -15.027)
- wait(0.05)
- local Camera = game.Workspace.Camera
- Camera.CameraType = Enum.CameraType.Scriptable
- Camera.CFrame = CFrame.new(459.51, 57.152, -16.027)
- wait(0.05)
- local Camera = game.Workspace.Camera
- Camera.CameraType = Enum.CameraType.Scriptable
- Camera.CFrame = CFrame.new(459.51, 57.152, -17.027)
- wait(0.05)
- local Camera = game.Workspace.Camera
- Camera.CameraType = Enum.CameraType.Scriptable
- Camera.CFrame = CFrame.new(459.51, 57.152, -18.027)
- wait(0.05)
- local Camera = game.Workspace.Camera
- Camera.CameraType = Enum.CameraType.Scriptable
- Camera.CFrame = CFrame.new(459.51, 57.152, -19.027)
- wait(0.05)
- local Camera = game.Workspace.Camera
- Camera.CameraType = Enum.CameraType.Scriptable
- Camera.CFrame = CFrame.new(459.51, 57.152, -20.027)
- wait(0.05)
- local Camera = game.Workspace.Camera
- Camera.CameraType = Enum.CameraType.Scriptable
- Camera.CFrame = CFrame.new(459.51, 57.152, -21.027)
- wait(0.05)
- local Camera = game.Workspace.Camera
- Camera.CameraType = Enum.CameraType.Scriptable
- Camera.CFrame = CFrame.new(459.51, 57.152, -22.027)
- wait(0.05)
- local Camera = game.Workspace.Camera
- Camera.CameraType = Enum.CameraType.Scriptable
- Camera.CFrame = CFrame.new(459.51, 57.152, -23.027)
- wait(0.05)
- local Camera = game.Workspace.Camera
- Camera.CameraType = Enum.CameraType.Scriptable
- Camera.CFrame = CFrame.new(459.51, 57.152, -24.027)
- wait(0.05)
- local Camera = game.Workspace.Camera
- Camera.CameraType = Enum.CameraType.Scriptable
- Camera.CFrame = CFrame.new(459.51, 57.152, -25.027)
- wait(0.05)
- local Camera = game.Workspace.Camera
- Camera.CameraType = Enum.CameraType.Scriptable
- Camera.CFrame = CFrame.new(459.51, 57.152, -26.027)
- wait(0.05)
- local Camera = game.Workspace.Camera
- Camera.CameraType = Enum.CameraType.Scriptable
- Camera.CFrame = CFrame.new(459.51, 57.152, -27.027)
- wait(0.05)
- local Camera = game.Workspace.Camera
- Camera.CameraType = Enum.CameraType.Scriptable
- Camera.CFrame = CFrame.new(459.51, 57.152, -28.027)
- wait(0.05)
- local Camera = game.Workspace.Camera
- Camera.CameraType = Enum.CameraType.Scriptable
- Camera.CFrame = CFrame.new(459.51, 57.152, -29.027)
- wait(0.05)
- local Camera = game.Workspace.Camera
- Camera.CameraType = Enum.CameraType.Scriptable
- Camera.CFrame = CFrame.new(459.51, 57.152, -30.027)
- wait(0.05)
- local Camera = game.Workspace.Camera
- Camera.CameraType = Enum.CameraType.Scriptable
- Camera.CFrame = CFrame.new(459.51, 57.152, -31.027)
- wait(0.05)
- local Camera = game.Workspace.Camera
- Camera.CameraType = Enum.CameraType.Scriptable
- Camera.CFrame = CFrame.new(459.51, 57.152, -32.027)
- wait(0.05)
- local Camera = game.Workspace.Camera
- Camera.CameraType = Enum.CameraType.Scriptable
- Camera.CFrame = CFrame.new(459.51, 57.152, -33.027)
- wait(0.05)
- local Camera = game.Workspace.Camera
- Camera.CameraType = Enum.CameraType.Scriptable
- Camera.CFrame = CFrame.new(459.51, 57.152, -34.027)
- wait(0.05)
- local Camera = game.Workspace.Camera
- Camera.CameraType = Enum.CameraType.Scriptable
- Camera.CFrame = CFrame.new(459.51, 57.152, -35.027)
- wait(0.05)
- local Camera = game.Workspace.Camera
- Camera.CameraType = Enum.CameraType.Scriptable
- Camera.CFrame = CFrame.new(459.51, 57.152, -36.027)
- wait(0.05)
- local Camera = game.Workspace.Camera
- Camera.CameraType = Enum.CameraType.Scriptable
- Camera.CFrame = CFrame.new(459.51, 57.152, -37.027)
- wait(0.05)
- local Camera = game.Workspace.Camera
- Camera.CameraType = Enum.CameraType.Scriptable
- Camera.CFrame = CFrame.new(459.51, 57.152, -38.027)
- wait(0.05)
- local Camera = game.Workspace.Camera
- Camera.CameraType = Enum.CameraType.Scriptable
- Camera.CFrame = CFrame.new(459.51, 57.152, -39.027)
- wait(0.05)
- local Camera = game.Workspace.Camera
- Camera.CameraType = Enum.CameraType.Scriptable
- Camera.CFrame = CFrame.new(459.51, 57.152, -40.027)
- wait(0.05)
- local Camera = game.Workspace.Camera
- Camera.CameraType = Enum.CameraType.Scriptable
- Camera.CFrame = CFrame.new(459.51, 57.152, -41.027)
- wait(0.05)
- local Camera = game.Workspace.Camera
- Camera.CameraType = Enum.CameraType.Scriptable
- Camera.CFrame = CFrame.new(459.51, 57.152, -42.027)
- wait(0.05)
- local Camera = game.Workspace.Camera
- Camera.CameraType = Enum.CameraType.Scriptable
- Camera.CFrame = CFrame.new(459.51, 57.152, -43.027)
- wait(0.05)
- local Camera = game.Workspace.Camera
- Camera.CameraType = Enum.CameraType.Scriptable
- Camera.CFrame = CFrame.new(459.51, 57.152, -44.027)
- wait(0.05)
- local Camera = game.Workspace.Camera
- Camera.CameraType = Enum.CameraType.Scriptable
- Camera.CFrame = CFrame.new(459.51, 57.152, -45.027)
- wait(0.05)
- local Camera = game.Workspace.Camera
- Camera.CameraType = Enum.CameraType.Scriptable
- Camera.CFrame = CFrame.new(459.51, 57.152, -46.027)
- wait(0.05)
- local Camera = game.Workspace.Camera
- Camera.CameraType = Enum.CameraType.Scriptable
- Camera.CFrame = CFrame.new(459.51, 57.152, -47.027)
- wait(0.05)
- local Camera = game.Workspace.Camera
- Camera.CameraType = Enum.CameraType.Scriptable
- Camera.CFrame = CFrame.new(459.51, 57.152, -48.027)
- wait(0.05)
- local Camera = game.Workspace.Camera
- Camera.CameraType = Enum.CameraType.Scriptable
- Camera.CFrame = CFrame.new(459.51, 57.152, -49.027)
- wait(0.05)
- local Camera = game.Workspace.Camera
- Camera.CameraType = Enum.CameraType.Scriptable
- Camera.CFrame = CFrame.new(459.51, 57.152, -50.027)
- wait(0.05)
- local Camera = game.Workspace.Camera
- Camera.CameraType = Enum.CameraType.Scriptable
- Camera.CFrame = CFrame.new(459.51, 57.152, -51.027)
- wait(0.05)
- local Camera = game.Workspace.Camera
- Camera.CameraType = Enum.CameraType.Scriptable
- Camera.CFrame = CFrame.new(459.51, 57.152, -52.027)
- wait(0.05)
- local plr = game.Players.LocalPlayer
- local gui = Instance.new("ScreenGui")
- gui.Parent = plr.PlayerGui
- gui.ResetOnSpawn = false
- local Soon = Instance.new("TextLabel")
- Soon.Parent = gui
- Soon.BackgroundTransparency = 1
- Soon.Size = UDim2.new(1, 0, 1, 0)
- Soon.Position = UDim2.new(0, 0, 0.6 ,-255)
- Soon.TextXAlignment = Enum.TextXAlignment.Center
- Soon.TextScaled = true
- Soon.Text = "Game Over"
- Soon.TextColor3 = Color3.new(255, 255, 255)
- Soon.Font = Enum.Font.IndieFlower
- end)
- end
- end)
- game.Players.LocalPlayer.Character:WaitForChild("Humanoid"):MoveTo(WalkAndTouchPart.Position)
- game.Players.LocalPlayer.Character:WaitForChild("Humanoid").MoveToFinished:Wait()
- Touched = false
- PortalPart1.Touched:connect(function(player)
- if Touched == false then
- Touched = true
- game:FindService("RunService"):Set3dRenderingEnabled(false)
- game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = CFrame.new(-1612.68, 0.8, 566.899)
- wait(4)
- local Camera = game.Workspace.Camera
- Camera.CameraType = Enum.CameraType.Scriptable
- Camera.CFrame = CFrame.new(-1596.789, 552, 645.71)
- wait(0.5)
- PortalPart2:Destroy()
- wait(0.1)
- PortalPart1:Destroy()
- wait(1)
- local SoundBoom = Instance.new("Sound")
- local Id = "8699897760"
- SoundBoom.Parent = screen
- SoundBoom.SoundId = "rbxassetid://"..Id
- SoundBoom.Playing = true
- SoundBoom.Looped = false
- SoundBoom.Volume = 1
- local explosion = Instance.new("Explosion")
- local nuke = Instance.new("Part")
- explosion.Position = Vector3.new(-1597.196, 549, 605.403)
- nuke.Position = explosion.Position
- nuke.Anchored = true
- nuke.Parent = game.Workspace
- explosion.Parent = game.Workspace
- local x, y, z = 5, 5, 5
- nuke.BrickColor = BrickColor.new ("New Yeller")
- nuke.Size = Vector3.new(x, y, z)
- nuke.CanCollide = false
- nuke.Name = "nuke"
- nuke.Shape = "Ball"
- nuke.Transparency = 0.3
- nuke.Material = "Neon"
- nuke.Locked = true
- for i = 1,50 do
- wait()
- x, y, z = x+1, y+1, z+1
- nuke.Size = Vector3.new(x, y, z)
- explosion.BlastPressure = 100000000000000000
- explosion.DestroyJointRadiusPercent = 1000000000000000000000000000000000000000000
- explosion.ExplosionType = "Craters"
- explosion.BlastRadius = x+5000000000
- local explosion2 = Instance.new("Explosion")
- explosion2.BlastPressure = 9999999999999999999999999999999999999999999999999
- explosion2.BlastRadius = x+999999999999999999999999999999999999999999999999999
- explosion2.DestroyJointRadiusPercent = 9999999999999999999999999999999999999999999999
- explosion2.ExplosionType = "Craters"
- explosion2.Parent = nuke
- explosion2.Position = explosion.Position
- end
- nuke:Destroy()
- local plr = game.Players.LocalPlayer
- local gui = Instance.new("ScreenGui")
- gui.Parent = plr.PlayerGui
- gui.ResetOnSpawn = false
- local Soon = Instance.new("TextLabel")
- Soon.Parent = gui
- Soon.BackgroundTransparency = 1
- Soon.Size = UDim2.new(1, 0, 1, 0)
- Soon.Position = UDim2.new(0, 0, 0.6 ,-255)
- Soon.TextXAlignment = Enum.TextXAlignment.Center
- Soon.TextScaled = true
- Soon.Text = "Chapter 3 Coming Soon"
- Soon.TextColor3 = Color3.new(255, 255, 255)
- Soon.Font = Enum.Font.IndieFlower
- end
- end)
- Touched = false
- end
- end)
- end)
- end)
- --end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement