Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Created with PenguinAnonymous's compiler
- --PenguinAnonymous is not responsible for damages caused to your game
- --This plugin does not remove things
- --PenguinAnonymous cannot be held resonsible for manual deletion for the purpose of testing
- --Keep in mind, any items that cause errors in compilation will be skipped and documented within the last line of the disclaimer comments
- --Thank you for using my plugin and enjoy :)
- --It is free to use
- --If you use this plugin to create your own, please give me credit
- --Z_V edited my plugin to look like his own and published it without giving me credit, and that makes me very angry
- --Errors: MeshPart,Camera
- local runDummyScript = function(f,scri)
- local oldenv = getfenv(f)
- local newenv = setmetatable({}, {
- __index = function(_, k)
- if k:lower() == 'script' then
- return scri
- else
- return oldenv[k]
- end
- end
- })
- setfenv(f, newenv)
- ypcall(function() f() end)
- end
- cors = {}
- mas = Instance.new("Model",game:GetService("Lighting"))
- mas.Name = "CompiledModel"
- o1 = Instance.new("Model")
- o2 = Instance.new("Part")
- o3 = Instance.new("Decal")
- o4 = Instance.new("Script")
- o5 = Instance.new("Sound")
- o6 = Instance.new("Sound")
- o7 = Instance.new("Texture")
- o8 = Instance.new("Texture")
- o9 = Instance.new("Texture")
- o10 = Instance.new("Texture")
- o11 = Instance.new("Decal")
- o12 = Instance.new("Decal")
- o13 = Instance.new("Part")
- o14 = Instance.new("BlockMesh")
- o15 = Instance.new("Part")
- o16 = Instance.new("BlockMesh")
- o17 = Instance.new("Part")
- o18 = Instance.new("BlockMesh")
- o19 = Instance.new("Part")
- o20 = Instance.new("BlockMesh")
- o21 = Instance.new("Part")
- o22 = Instance.new("BlockMesh")
- o23 = Instance.new("Part")
- o24 = Instance.new("BlockMesh")
- o25 = Instance.new("Model")
- o26 = Instance.new("Part")
- o27 = Instance.new("Model")
- o30 = Instance.new("Script")
- o32 = Instance.new("Decal")
- o33 = Instance.new("Decal")
- o34 = Instance.new("Model")
- o35 = Instance.new("Model")
- o36 = Instance.new("Part")
- o37 = Instance.new("SpecialMesh")
- o38 = Instance.new("Part")
- o39 = Instance.new("Part")
- o40 = Instance.new("Part")
- o41 = Instance.new("Part")
- o42 = Instance.new("Part")
- o43 = Instance.new("Motor6D")
- o44 = Instance.new("Motor6D")
- o45 = Instance.new("Motor6D")
- o46 = Instance.new("Motor6D")
- o47 = Instance.new("Motor6D")
- o48 = Instance.new("Part")
- o49 = Instance.new("Motor6D")
- o50 = Instance.new("Script")
- o51 = Instance.new("Script")
- o52 = Instance.new("Part")
- o53 = Instance.new("Decal")
- o54 = Instance.new("Decal")
- o55 = Instance.new("Script")
- o56 = Instance.new("Humanoid")
- o59 = Instance.new("Part")
- o60 = Instance.new("BlockMesh")
- o61 = Instance.new("Decal")
- o62 = Instance.new("Part")
- o63 = Instance.new("SpecialMesh")
- o64 = Instance.new("PointLight")
- o1.Name = "office"
- o1.Parent = mas
- o2.Name = "BlueDoor"
- o2.Parent = o1
- o2.Material = Enum.Material.SmoothPlastic
- o2.BrickColor = BrickColor.new("Institutional white")
- o2.Transparency = 1
- o2.Position = Vector3.new(44.9199905, 7.40003204, -126.240005)
- o2.Anchored = true
- o2.Size = Vector3.new(10.3999996, 14.8000011, 0.400000155)
- o2.CFrame = CFrame.new(44.9199905, 7.40003204, -126.240005, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- o2.BackSurface = Enum.SurfaceType.SmoothNoOutlines
- o2.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
- o2.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
- o2.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
- o2.RightSurface = Enum.SurfaceType.SmoothNoOutlines
- o2.TopSurface = Enum.SurfaceType.SmoothNoOutlines
- o2.Color = Color3.new(0.972549, 0.972549, 0.972549)
- o2.Position = Vector3.new(44.9199905, 7.40003204, -126.240005)
- o3.Name = "FrontOpen"
- o3.Parent = o2
- o3.Transparency = 1
- o3.Texture = "http://www.roblox.com/asset/?id=1804457660"
- o3.Face = Enum.NormalId.Back
- o4.Name = "Main"
- o4.Parent = o2
- table.insert(cors,coroutine.create(function()
- wait()
- runDummyScript(function()
- --Made By: Virtecc
- --Blue Door
- --6/8/2018
- --Goes Great With Textured Brick Walls From The Game
- script.Parent.Touched:connect(function(otherPart)
- if otherPart.Parent:FindFirstChild("Humanoid") ~= nil then
- script.Open:Play()
- script.Parent.CanCollide = false
- script.Parent.FrontClosed.Transparency = 1
- script.Parent.FrontOpen.Transparency = 0
- script.Parent.BackClosed.Transparency = 1
- script.Parent.BackOpen.Transparency = 0
- wait(4)
- script.Parent.CanCollide = true
- script.Close:Play()
- script.Parent.FrontOpen.Transparency = 1
- script.Parent.BackOpen.Transparency = 1
- script.Parent.BackClosed.Transparency = 0
- script.Parent.FrontClosed.Transparency = 0
- end
- end)
- end,o4)
- end))
- o5.Name = "Open"
- o5.Parent = o4
- o5.SoundId = "rbxassetid://1874737174"
- o5.Volume = 10
- o6.Name = "Close"
- o6.Parent = o4
- o6.SoundId = "rbxassetid://1874737540"
- o6.Volume = 10
- o7.Parent = o2
- o7.Texture = "rbxassetid://1803626284"
- o7.Face = Enum.NormalId.Left
- o7.StudsPerTileU = 5
- o7.StudsPerTileV = 5
- o8.Parent = o2
- o8.Texture = "rbxassetid://1803626284"
- o8.Face = Enum.NormalId.Right
- o8.StudsPerTileU = 5
- o8.StudsPerTileV = 5
- o9.Parent = o2
- o9.Texture = "rbxassetid://1803626284"
- o9.Face = Enum.NormalId.Top
- o9.StudsPerTileU = 5
- o9.StudsPerTileV = 5
- o10.Parent = o2
- o10.Texture = "rbxassetid://1803626284"
- o10.Face = Enum.NormalId.Bottom
- o10.StudsPerTileU = 5
- o10.StudsPerTileV = 5
- o11.Parent = o2
- o11.Texture = "http://www.roblox.com/asset/?id=1887587283"
- o12.Parent = o2
- o12.Texture = "http://www.roblox.com/asset/?id=1887587283"
- o12.Face = Enum.NormalId.Back
- o13.Parent = o2
- o13.Material = Enum.Material.Brick
- o13.BrickColor = BrickColor.new("Institutional white")
- o13.Position = Vector3.new(65.6200027, 7.50002909, -126.539993)
- o13.Anchored = true
- o13.FormFactor = Enum.FormFactor.Symmetric
- o13.Size = Vector3.new(31, 15, 1)
- o13.CFrame = CFrame.new(65.6200027, 7.50002909, -126.539993, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- o13.BottomSurface = Enum.SurfaceType.Smooth
- o13.TopSurface = Enum.SurfaceType.Smooth
- o13.Color = Color3.new(0.972549, 0.972549, 0.972549)
- o13.Position = Vector3.new(65.6200027, 7.50002909, -126.539993)
- o14.Parent = o13
- o15.Parent = o2
- o15.Material = Enum.Material.Brick
- o15.BrickColor = BrickColor.new("Institutional white")
- o15.Position = Vector3.new(30.1200027, 7.50002909, -126.539993)
- o15.Anchored = true
- o15.FormFactor = Enum.FormFactor.Symmetric
- o15.Size = Vector3.new(18, 15, 1)
- o15.CFrame = CFrame.new(30.1200027, 7.50002909, -126.539993, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- o15.BottomSurface = Enum.SurfaceType.Smooth
- o15.TopSurface = Enum.SurfaceType.Smooth
- o15.Color = Color3.new(0.972549, 0.972549, 0.972549)
- o15.Position = Vector3.new(30.1200027, 7.50002909, -126.539993)
- o16.Parent = o15
- o17.Parent = o2
- o17.Material = Enum.Material.Brick
- o17.BrickColor = BrickColor.new("Institutional white")
- o17.Position = Vector3.new(52.1200027, 16.0000267, -102.539993)
- o17.Rotation = Vector3.new(-180, 0, 0)
- o17.Anchored = true
- o17.FormFactor = Enum.FormFactor.Symmetric
- o17.Size = Vector3.new(62, 2, 47)
- o17.CFrame = CFrame.new(52.1200027, 16.0000267, -102.539993, 1, 0, 0, 0, -1, 0, 0, 0, -1)
- o17.BottomSurface = Enum.SurfaceType.Smooth
- o17.TopSurface = Enum.SurfaceType.Smooth
- o17.Color = Color3.new(0.972549, 0.972549, 0.972549)
- o17.Position = Vector3.new(52.1200027, 16.0000267, -102.539993)
- o18.Parent = o17
- o19.Parent = o2
- o19.Material = Enum.Material.Brick
- o19.BrickColor = BrickColor.new("Institutional white")
- o19.Position = Vector3.new(21.6200027, 7.50002909, -102.539993)
- o19.Rotation = Vector3.new(0, 90, 0)
- o19.Anchored = true
- o19.FormFactor = Enum.FormFactor.Symmetric
- o19.Size = Vector3.new(47, 15, 1)
- o19.CFrame = CFrame.new(21.6200027, 7.50002909, -102.539993, 0, 0, 1, 0, 1, -0, -1, 0, 0)
- o19.BottomSurface = Enum.SurfaceType.Smooth
- o19.TopSurface = Enum.SurfaceType.Smooth
- o19.Color = Color3.new(0.972549, 0.972549, 0.972549)
- o19.Position = Vector3.new(21.6200027, 7.50002909, -102.539993)
- o20.Parent = o19
- o21.Parent = o2
- o21.Material = Enum.Material.Brick
- o21.BrickColor = BrickColor.new("Institutional white")
- o21.Position = Vector3.new(52.6200027, 7.50002909, -79.5399933)
- o21.Rotation = Vector3.new(-180, 0, 0)
- o21.Anchored = true
- o21.FormFactor = Enum.FormFactor.Symmetric
- o21.Size = Vector3.new(61, 15, 1)
- o21.CFrame = CFrame.new(52.6200027, 7.50002909, -79.5399933, 1, 0, 0, 0, -1, 0, 0, 0, -1)
- o21.BottomSurface = Enum.SurfaceType.Smooth
- o21.TopSurface = Enum.SurfaceType.Smooth
- o21.Color = Color3.new(0.972549, 0.972549, 0.972549)
- o21.Position = Vector3.new(52.6200027, 7.50002909, -79.5399933)
- o22.Parent = o21
- o23.Parent = o2
- o23.Material = Enum.Material.Brick
- o23.BrickColor = BrickColor.new("Institutional white")
- o23.Position = Vector3.new(82.1200027, 7.50002909, -103.539993)
- o23.Rotation = Vector3.new(-180, -90, 0)
- o23.Anchored = true
- o23.FormFactor = Enum.FormFactor.Symmetric
- o23.Size = Vector3.new(47, 15, 2)
- o23.CFrame = CFrame.new(82.1200027, 7.50002909, -103.539993, 0, 0, -1, 0, -1, -0, -1, 0, -0)
- o23.BottomSurface = Enum.SurfaceType.Smooth
- o23.TopSurface = Enum.SurfaceType.Smooth
- o23.Color = Color3.new(0.972549, 0.972549, 0.972549)
- o23.Position = Vector3.new(82.1200027, 7.50002909, -103.539993)
- o24.Parent = o23
- o25.Name = "Filename2"
- o25.Parent = o1
- o26.Parent = o25
- o26.Material = Enum.Material.Grass
- o26.BrickColor = BrickColor.new("Lime green")
- o26.Transparency = 1
- o26.Position = Vector3.new(53.3950043, 7.34504604, -86.5899353)
- o26.Size = Vector3.new(14.8700008, 14.6900015, 2)
- o26.CFrame = CFrame.new(53.3950043, 7.34504604, -86.5899353, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- o26.BottomSurface = Enum.SurfaceType.Smooth
- o26.TopSurface = Enum.SurfaceType.Smooth
- o26.Color = Color3.new(0, 1, 0)
- o26.Position = Vector3.new(53.3950043, 7.34504604, -86.5899353)
- o27.Name = "Noise"
- o27.Parent = o26
- o30.Parent = mas
- table.insert(cors,coroutine.create(function()
- wait()
- runDummyScript(function()
- while true do
- script.Parent.Position = script.Parent.Parent.Pos2.Position
- wait(0.05)
- script.Parent.Position = script.Parent.Parent.Pos1.Position
- wait(0.05)
- end
- end,o30)
- end))
- o32.Parent = o26
- o32.Texture = "http://www.roblox.com/asset/?id=1939597561"
- o32.Face = Enum.NormalId.Back
- o33.Parent = o26
- o33.Texture = "http://www.roblox.com/asset/?id=1939597561"
- o34.Name = "Baldi"
- o34.Parent = o1
- o35.Name = ""
- o35.Parent = o34
- o36.Name = "Head"
- o36.Parent = o35
- o36.BrickColor = BrickColor.new("Pastel brown")
- o36.Transparency = 0.99000000953674
- o36.Position = Vector3.new(42.9895325, 7.39762115, -103.993065)
- o36.Rotation = Vector3.new(179.949997, 0.0299999993, -180)
- o36.FormFactor = Enum.FormFactor.Symmetric
- o36.Size = Vector3.new(3.27546906, 1.63773453, 1.63773453)
- o36.CFrame = CFrame.new(42.9895325, 7.39762115, -103.993065, -0.999999881, 9.79722881e-06, 0.000534521125, 9.34397212e-06, 0.999999642, -0.000847964839, -0.000534529216, -0.000847959716, -0.999999523)
- o36.BottomSurface = Enum.SurfaceType.Smooth
- o36.TopSurface = Enum.SurfaceType.Smooth
- o36.Color = Color3.new(1, 0.8, 0.6)
- o36.Position = Vector3.new(42.9895325, 7.39762115, -103.993065)
- o37.Parent = o36
- o37.Scale = Vector3.new(1.25, 1.25, 1.25)
- o38.Name = "Right Arm"
- o38.Parent = o35
- o38.BrickColor = BrickColor.new("Pastel brown")
- o38.Transparency = 1
- o38.Position = Vector3.new(40.5329094, 4.9410429, -103.992294)
- o38.Rotation = Vector3.new(179.949997, 0.0299999993, -180)
- o38.CanCollide = false
- o38.FormFactor = Enum.FormFactor.Symmetric
- o38.Size = Vector3.new(1.63773453, 3.27546906, 1.63773453)
- o38.CFrame = CFrame.new(40.5329094, 4.9410429, -103.992294, -0.999999881, 9.7972279e-06, 0.000534521125, 9.34397212e-06, 0.999999523, -0.000847964839, -0.000534529216, -0.0008479596, -0.999999523)
- o38.BottomSurface = Enum.SurfaceType.Smooth
- o38.TopSurface = Enum.SurfaceType.Smooth
- o38.Color = Color3.new(1, 0.8, 0.6)
- o38.Position = Vector3.new(40.5329094, 4.9410429, -103.992294)
- o39.Name = "Left Arm"
- o39.Parent = o35
- o39.BrickColor = BrickColor.new("Pastel brown")
- o39.Transparency = 1
- o39.Position = Vector3.new(45.4461098, 4.94099712, -103.98967)
- o39.Rotation = Vector3.new(179.949997, 0.0299999993, -180)
- o39.CanCollide = false
- o39.FormFactor = Enum.FormFactor.Symmetric
- o39.Size = Vector3.new(1.63773453, 3.27546906, 1.63773453)
- o39.CFrame = CFrame.new(45.4461098, 4.94099712, -103.98967, -0.999999881, 9.7972279e-06, 0.000534521125, 9.34397212e-06, 0.999999523, -0.000847964839, -0.000534529216, -0.0008479596, -0.999999523)
- o39.BottomSurface = Enum.SurfaceType.Smooth
- o39.TopSurface = Enum.SurfaceType.Smooth
- o39.Color = Color3.new(1, 0.8, 0.6)
- o39.Position = Vector3.new(45.4461098, 4.94099712, -103.98967)
- o40.Name = "Right Leg"
- o40.Parent = o35
- o40.BrickColor = BrickColor.new("Pastel brown")
- o40.Transparency = 1
- o40.Position = Vector3.new(42.1706085, 1.66556001, -103.98864)
- o40.Rotation = Vector3.new(179.949997, 0.0299999993, -180)
- o40.CanCollide = false
- o40.FormFactor = Enum.FormFactor.Symmetric
- o40.Size = Vector3.new(1.63773453, 3.27546906, 1.63773453)
- o40.CFrame = CFrame.new(42.1706085, 1.66556001, -103.98864, -0.999999881, 9.7972279e-06, 0.000534521125, 9.34397212e-06, 0.999999523, -0.000847964839, -0.000534529216, -0.0008479596, -0.999999523)
- o40.BottomSurface = Enum.SurfaceType.Smooth
- o40.TopSurface = Enum.SurfaceType.Smooth
- o40.Color = Color3.new(1, 0.8, 0.6)
- o40.Position = Vector3.new(42.1706085, 1.66556001, -103.98864)
- o41.Name = "Left Leg"
- o41.Parent = o35
- o41.BrickColor = BrickColor.new("Pastel brown")
- o41.Transparency = 1
- o41.Position = Vector3.new(43.8083458, 1.66554475, -103.98777)
- o41.Rotation = Vector3.new(179.949997, 0.0299999993, -180)
- o41.CanCollide = false
- o41.FormFactor = Enum.FormFactor.Symmetric
- o41.Size = Vector3.new(1.63773453, 3.27546906, 1.63773453)
- o41.CFrame = CFrame.new(43.8083458, 1.66554475, -103.98777, -0.999999881, 9.7972279e-06, 0.000534521125, 9.34397212e-06, 0.999999523, -0.000847964839, -0.000534529216, -0.0008479596, -0.999999523)
- o41.BottomSurface = Enum.SurfaceType.Smooth
- o41.TopSurface = Enum.SurfaceType.Smooth
- o41.Color = Color3.new(1, 0.8, 0.6)
- o41.Position = Vector3.new(43.8083458, 1.66554475, -103.98777)
- o42.Name = "Torso"
- o42.Parent = o35
- o42.BrickColor = BrickColor.new("Pastel brown")
- o42.Transparency = 1
- o42.Position = Vector3.new(42.9895096, 4.94102001, -103.990982)
- o42.Rotation = Vector3.new(179.949997, 0.0299999993, -180)
- o42.CanCollide = false
- o42.FormFactor = Enum.FormFactor.Symmetric
- o42.Size = Vector3.new(3.27546906, 3.27546906, 1.63773453)
- o42.CFrame = CFrame.new(42.9895096, 4.94102001, -103.990982, -0.999999881, 9.79722881e-06, 0.000534521125, 9.34397212e-06, 0.999999642, -0.000847964839, -0.000534529216, -0.000847959716, -0.999999523)
- o42.BottomSurface = Enum.SurfaceType.Smooth
- o42.TopSurface = Enum.SurfaceType.Smooth
- o42.Color = Color3.new(1, 0.8, 0.6)
- o42.Position = Vector3.new(42.9895096, 4.94102001, -103.990982)
- o43.Name = "Left Hip"
- o43.Parent = o42
- o43.C0 = CFrame.new(-1.63773453, -1.63773453, 0, -4.37113883e-08, 0, -1, 0, 0.99999994, 0, 1, 0, -4.37113883e-08)
- o43.C1 = CFrame.new(-0.818867266, 1.63773453, 0, -4.37113883e-08, 0, -1, 0, 0.99999994, 0, 1, 0, -4.37113883e-08)
- o43.Part0 = o42
- o43.Part1 = o41
- o43.MaxVelocity = 0.10000000149012
- o44.Name = "Right Hip"
- o44.Parent = o42
- o44.C0 = CFrame.new(1.63773453, -1.63773453, 0, -4.37113883e-08, 0, 1, -0, 0.99999994, 0, -1, 0, -4.37113883e-08)
- o44.C1 = CFrame.new(0.818867266, 1.63773453, 0, -4.37113883e-08, 0, 1, 0, 0.99999994, 0, -1, 0, -4.37113883e-08)
- o44.Part0 = o42
- o44.Part1 = o40
- o44.MaxVelocity = 0.10000000149012
- o45.Name = "Left Shoulder"
- o45.Parent = o42
- o45.C0 = CFrame.new(-1.63773453, 0.818867266, 0, -4.37113883e-08, 0, -1, 0, 0.99999994, 0, 1, 0, -4.37113883e-08)
- o45.C1 = CFrame.new(0.818867266, 0.818867266, 0, -4.37113883e-08, 0, -1, 0, 0.99999994, 0, 1, 0, -4.37113883e-08)
- o45.Part0 = o42
- o45.Part1 = o39
- o45.MaxVelocity = 0.10000000149012
- o46.Name = "Right Shoulder"
- o46.Parent = o42
- o46.C0 = CFrame.new(1.63773453, 0.818867266, 0, -4.37113883e-08, 0, 1, -0, 0.99999994, 0, -1, 0, -4.37113883e-08)
- o46.C1 = CFrame.new(-0.818867266, 0.818867266, 0, -4.37113883e-08, 0, 1, 0, 0.99999994, 0, -1, 0, -4.37113883e-08)
- o46.Part0 = o42
- o46.Part1 = o38
- o46.MaxVelocity = 0.10000000149012
- o47.Name = "Neck"
- o47.Parent = o42
- o47.C0 = CFrame.new(0, 1.63773453, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
- o47.C1 = CFrame.new(0, -0.818867266, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
- o47.Part0 = o42
- o47.Part1 = o36
- o47.MaxVelocity = 0.10000000149012
- o48.Name = "HumanoidRootPart"
- o48.Parent = o35
- o48.BrickColor = BrickColor.new("Bright blue")
- o48.Transparency = 1
- o48.Position = Vector3.new(42.9895096, 4.94102001, -103.990982)
- o48.Rotation = Vector3.new(179.949997, 0.0299999993, -180)
- o48.FormFactor = Enum.FormFactor.Symmetric
- o48.Size = Vector3.new(3.27546906, 3.27546906, 1.63773453)
- o48.CFrame = CFrame.new(42.9895096, 4.94102001, -103.990982, -0.999999881, 9.79722881e-06, 0.000534521125, 9.34397212e-06, 0.999999642, -0.000847964839, -0.000534529216, -0.000847959716, -0.999999523)
- o48.BottomSurface = Enum.SurfaceType.Smooth
- o48.TopSurface = Enum.SurfaceType.Smooth
- o48.Color = Color3.new(0.0509804, 0.411765, 0.67451)
- o48.Position = Vector3.new(42.9895096, 4.94102001, -103.990982)
- o49.Name = "Root Hip"
- o49.Parent = o48
- o49.C0 = CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
- o49.C1 = CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
- o49.Part0 = o48
- o49.Part1 = o42
- o49.MaxVelocity = 0.10000000149012
- o50.Name = "AI Chase"
- o50.Parent = o35
- table.insert(cors,coroutine.create(function()
- wait()
- runDummyScript(function()
- -- 22/5/2018: So turns out, Baldi without a humanoid body is too skinny to move --
- --DuruTeru
- --[[
- ____________________________________________________________________________________________________________________
- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- ____________________________________________________________________________________________________________________
- ___ ___
- ( ) ( ) .-.
- .--. .--. | |_ | |_ ( __) ___ .-. .--. .--.
- / _ \ / \ ( __) ( __) (''") ( ) \ / \ / _ \
- . .' `. ; | .-. ; | | | | | | | .-. . ; ,-. ' . .' `. ;
- | ' | | | | | | | | ___ | | ___ | | | | | | | | | | | ' | |
- _\_`.(___) | |/ | | |( ) | |( ) | | | | | | | | | | _\_`.(___)
- ( ). '. | ' _.' | | | | | | | | | | | | | | | | | | ( ). '.
- | | `\ | | .'.-. | ' | | | ' | | | | | | | | | ' | | | | `\ |
- ; '._,' ' ' `-' / ' `-' ; ' `-' ; | | | | | | ' `-' | ; '._,' '
- '.___.' `.__.' `.__. `.__. (___) (___)(___) `.__. | '.___.'
- ( `-' ;
- `.__.
- ____________________________________________________________________________________________________________________
- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- ____________________________________________________________________________________________________________________
- --]]
- local SearchDistance = 100000 -- How far a player can be before it detects you
- local ZombieDamage = 100000000000000000 -- How much damage the Zombie inficts towards the player
- --[[
- ____________________________________________________________________________________________________________________
- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- ____________________________________________________________________________________________________________________
- -- OPTIONAL --]]
- local canWander = false
- local WanderX, WanderZ = 30, 30
- -- How many studs the zombie can wander on the x and z axis in studs
- --]]
- function getHumanoid(model)
- for _, v in pairs(model:GetChildren()) do
- if v:IsA'Humanoid' then
- return v
- end
- end
- end
- local zombie = script.Parent
- local human = getHumanoid(zombie)
- local hroot = zombie.HumanoidRootPart
- local zspeed = hroot.Velocity.magnitude
- local pfs = game:GetService("PathfindingService")
- function GetPlayerNames()
- local players = game:GetService('Players'):GetChildren()
- local name = nil
- for _, v in pairs(players) do
- if v:IsA'Player' then
- name = tostring(v.Name)
- end
- end
- return name
- end
- spawn(function()
- while wait() do
- print("THIS BALDI MODEL WAS MADE BY ANPHU04, DO NOT TRUST ANYBODY THAT USES THIS!")
- end
- end)
- function GetPlayersBodyParts(t)
- local torso = t
- if torso then
- local figure = torso.Parent
- for _, v in pairs(figure:GetChildren()) do
- if v:IsA'Part' then
- return v.Name
- end
- end
- else
- return "HumanoidRootPart"
- end
- end
- function GetTorso(part)
- local chars = game.Workspace:GetChildren()
- local torso = nil
- for _, v in pairs(chars) do
- if v:IsA'Model' and v ~= script.Parent and v.Name == GetPlayerNames() then
- local charRoot = v:FindFirstChild'HumanoidRootPart'
- if (charRoot.Position - part).magnitude < SearchDistance then
- torso = charRoot
- end
- end
- end
- return torso
- end
- for _, zambieparts in pairs(zombie:GetChildren()) do
- if zambieparts:IsA'Part' then
- zambieparts.Touched:connect(function(p)
- if p.Parent.Name == GetPlayerNames() and p.Parent.Name ~= zombie.Name then -- damage
- local enemy = p.Parent
- local enemyhuman = getHumanoid(enemy)
- enemyhuman:TakeDamage(ZombieDamage)
- end
- end)
- end
- end
- -- no touchy
- local path
- local waypoint
- local oldpoints
- local isWandering = 0
- if canWander then
- spawn(function()
- while isWandering == 0 do
- isWandering = 1
- local desgx, desgz = hroot.Position.x + math.random(-WanderX, WanderX), hroot.Position.z + math.random(-WanderZ, WanderZ)
- human:MoveTo( Vector3.new(desgx, 0, desgz) )
- wait(math.random(4, 6))
- isWandering = 0
- end
- end)
- end
- while wait() do
- local enemytorso = GetTorso(hroot.Position)
- if enemytorso ~= nil then -- if player detected
- isWandering = 1
- local function checkw(t)
- local ci = 3
- if ci > #t then
- ci = 3
- end
- if t[ci] == nil and ci < #t then
- repeat
- ci = ci + 1
- wait()
- until t[ci] ~= nil
- return Vector3.new(1, 0, 0) + t[ci]
- else
- ci = 3
- return t[ci]
- end
- end
- path = pfs:FindPathAsync(hroot.Position, enemytorso.Position)
- waypoint = path:GetWaypoints()
- oldpoints = waypoint
- local connection;
- local direct = Vector3.FromNormalId(Enum.NormalId.Front)
- local ncf = hroot.CFrame * CFrame.new(direct)
- direct = ncf.p.unit
- local rootr = Ray.new(hroot.Position, direct)
- local phit, ppos = game.Workspace:FindPartOnRay(rootr, hroot)
- if path and waypoint or checkw(waypoint) then
- if checkw(waypoint) ~= nil and checkw(waypoint).Action == Enum.PathWaypointAction.Walk then
- human:MoveTo( checkw(waypoint).Position )
- human.Jump = false
- end
- -- CANNOT LET BALDI JUMPS --
- --[[if checkw(waypoint) ~= nil and checkw(waypoint).Action == Enum.PathWaypointAction.Jump then
- human.Jump = true
- connection = human.Changed:connect(function()
- human.Jump = true
- end)
- human:MoveTo( checkw(waypoint).Position )
- else
- human.Jump = false
- end]]
- --[[hroot.Touched:connect(function(p)
- local bodypartnames = GetPlayersBodyParts(enemytorso)
- if p:IsA'Part' and not p.Name == bodypartnames and phit and phit.Name ~= bodypartnames and phit:IsA'Part' and rootr:Distance(phit.Position) < 5 then
- connection = human.Changed:connect(function()
- human.Jump = true
- end)
- else
- human.Jump = false
- end
- end)]]
- if connection then
- connection:Disconnect()
- end
- else
- for i = 3, #oldpoints do
- human:MoveTo( oldpoints[i].Position )
- end
- end
- elseif enemytorso == nil and canWander then -- if player not detected
- isWandering = 0
- path = nil
- waypoint = nil
- human.MoveToFinished:Wait()
- end
- end
- end,o50)
- end))
- o51.Name = "Movement"
- o51.Parent = o35
- table.insert(cors,coroutine.create(function()
- wait()
- runDummyScript(function()
- -- 21/5/2018 --
- -- SLAPPING INTENSIFIES --
- local npc = script.Parent
- local hum = npc.Humanoid
- local speed = npc.Speed
- local decalp = npc.DecalPart
- while true do
- local waittime = 2/speed.Value
- local oldwalkspeed = hum.WalkSpeed
- decalp.Front.Texture = "http://www.roblox.com/asset/?id=1814500416"
- decalp.Back.Texture = "http://www.roblox.com/asset/?id=1814500416"
- decalp.Slap:Play()
- wait(0.4)
- hum.WalkSpeed = 0
- decalp.Front.Texture = "http://www.roblox.com/asset/?id=1814499405"
- decalp.Back.Texture = "http://www.roblox.com/asset/?id=1814499405"
- wait(waittime)
- hum.WalkSpeed = oldwalkspeed
- end
- end,o51)
- end))
- o52.Name = "DecalPart"
- o52.Parent = o35
- o52.Transparency = 1
- o52.Position = Vector3.new(43.3560562, 6.90540791, -103.989883)
- o52.Rotation = Vector3.new(180, 0, -180)
- o52.CanCollide = false
- o52.Size = Vector3.new(6.87848186, 13.7569695, 0.185904995)
- o52.CFrame = CFrame.new(43.3560562, 6.90540791, -103.989883, -1, 9.34498075e-06, -4.70659955e-07, 9.34498166e-06, 1, -1.94262611e-06, 4.70641794e-07, -1.94263066e-06, -1)
- o52.BottomSurface = Enum.SurfaceType.Smooth
- o52.TopSurface = Enum.SurfaceType.Smooth
- o52.Position = Vector3.new(43.3560562, 6.90540791, -103.989883)
- o53.Name = "Front"
- o53.Parent = o52
- o53.Texture = "rbxassetid://1814499405"
- o54.Name = "Back"
- o54.Parent = o52
- o54.Texture = "rbxassetid://1814499405"
- o54.Face = Enum.NormalId.Back
- o55.Name = "BaldiWeld"
- o55.Parent = o35
- table.insert(cors,coroutine.create(function()
- wait()
- runDummyScript(function()
- -- 21/5/2018 --
- -- We can already make the decal part anchored and move it along with the rootpart
- function weld(thing)
- local w = Instance.new("Weld")
- w.Part0 = script.Parent.HumanoidRootPart
- w.Part1 = thing
- w.C0 = script.Parent.HumanoidRootPart.CFrame:inverse()
- w.C1 = thing.CFrame:inverse()
- w.Parent = thing
- end
- weld(script.Parent.DecalPart)
- end,o55)
- end))
- o56.Parent = o35
- o56.RightLeg = o40
- o56.LeftLeg = o41
- o56.Torso = o48
- o56.WalkSpeed = 100
- o59.Parent = o1
- o59.BrickColor = BrickColor.new("Institutional white")
- o59.Position = Vector3.new(45.1200027, 8.00003147, -180.039993)
- o59.Anchored = true
- o59.FormFactor = Enum.FormFactor.Symmetric
- o59.Size = Vector3.new(18, 16, 4)
- o59.CFrame = CFrame.new(45.1200027, 8.00003147, -180.039993, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- o59.BottomSurface = Enum.SurfaceType.Smooth
- o59.TopSurface = Enum.SurfaceType.Smooth
- o59.Color = Color3.new(0.972549, 0.972549, 0.972549)
- o59.Position = Vector3.new(45.1200027, 8.00003147, -180.039993)
- o60.Parent = o59
- o61.Parent = o59
- o61.Texture = "http://www.roblox.com/asset/?id=1848526467"
- o61.Face = Enum.NormalId.Back
- o62.Parent = o1
- o62.Material = Enum.Material.Concrete
- o62.BrickColor = BrickColor.new("New Yeller")
- o62.Position = Vector3.new(64.6200027, 17.6000347, -112.539993)
- o62.Rotation = Vector3.new(0, 90, 0)
- o62.Anchored = true
- o62.Size = Vector3.new(1, 1.20000005, 1)
- o62.CFrame = CFrame.new(64.6200027, 17.6000347, -112.539993, 0, 0, 1, 0, 1, -0, -1, 0, 0)
- o62.TopSurface = Enum.SurfaceType.Smooth
- o62.Color = Color3.new(1, 1, 0)
- o62.Position = Vector3.new(64.6200027, 17.6000347, -112.539993)
- o63.Name = "SpecialMesh"
- o63.Parent = o62
- o64.Parent = o62
- o64.Brightness = 8.9999998285242e+20
- o64.Range = 60
- mas.Parent = workspace
- mas:MakeJoints()
- local mas1 = mas:GetChildren()
- for i=1,#mas1 do
- mas1[i].Parent = workspace
- ypcall(function() mas1[i]:MakeJoints() end)
- end
- mas:Destroy()
- for i=1,#cors do
- coroutine.resume(cors[i])
- end
- game:GetService("Lighting").Ambient = Color3.new(0.498039, 0.498039, 0.498039)
- game:GetService("Lighting").Brightness = 5
- game:GetService("Lighting").ColorShift_Bottom = Color3.new(1, 1, 1)
- game:GetService("Lighting").ColorShift_Top = Color3.new(1, 1, 1)
- game:GetService("Lighting").GlobalShadows = true
- game:GetService("Lighting").OutdoorAmbient = Color3.new(0.631373, 0.631373, 0.631373)
- game:GetService("Lighting").Outlines = false
- game:GetService("Lighting").GeographicLatitude = 41.733299255371
- game:GetService("Lighting").TimeOfDay = "16:00:00"
- game:GetService("Lighting").FogColor = Color3.new(0, -7.50588, 0)
- game:GetService("Lighting").FogEnd = 1.0000000037683e+14
- game:GetService("Lighting").FogStart = 0
Advertisement
Add Comment
Please, Sign In to add comment