- local plr = game.Players.LocalPlayer
- local Char = plr.Character or workspace.Chars:WaitForChild(plr.Name)
- local Events = script.Events
- local Values = script.Values
- local ReplicatedStorage = game.ReplicatedStorage
- local UI = game:GetService("UserInputService")
- local TweenService = game:GetService("TweenService")
- local Torso:BasePart = Char:WaitForChild("Torso",1)
- local Head:BasePart = Char:WaitForChild("Head",1)
- local iswon = false
- local cs = false
- local str = false
- local vhslinedb = false
- local camanSpawned = false
- local camandb = false
- local camanCurCam:BasePart
- local camanCurCamID
- local camanpart:BasePart
- local inMinigame = false
- local MinigameEvent:RemoteEvent
- local MinigameSound:Sound
- local MinigameValue = 0
- local MinigameValue2 = 0
- local MinigameValue3 = 0
- repeat task.wait() until Char
- local Neck:Motor6D = Torso:WaitForChild('Neck')
- local Rleg:Motor6D = Torso:WaitForChild('Right Hip')
- local Lleg:Motor6D = Torso:WaitForChild('Left Hip')
- local RootJoint:Motor6D = Char:WaitForChild("HumanoidRootPart"):WaitForChild("RootJoint")
- local prompt = game:GetService("ProximityPromptService")
- local NeckC0 = Neck.C0
- local RootJointC0 = RootJoint.C0
- local RlegC0 = Rleg.C0
- local LlegC0 = Lleg.C0
- local Cam = workspace.Camera
- local ComputerPart:BasePart
- local oldcampos
- local oldcampos2
- local oldcampos3
- local screamer_chance = 1
- local Wifi = workspace.WifiState
- local InCams = false
- local CurCamId = 1
- local HidePart:BasePart
- local light2 = ReplicatedStorage.Storage.lightsofflight:Clone()
- light2.Parent = Torso
- local lowsan = 40
- local san = 100
- local ene = 100
- local coffegives = 50
- local coffetip = true
- local cfdb = false
- local StarterGUI = game:GetService("StarterGui")
- repeat
- local success = pcall(function()
- StarterGUI:SetCore("ResetButtonCallback", false)
- end)
- task.wait(1)
- until success
- local hiden = false
- local killed = false
- local Humanoid:Humanoid = Char:WaitForChild("Humanoid")
- local GUI = script.Parent:WaitForChild("ScreenGui")
- local vhsdb = false
- local Svdb = false
- local watchingTip = false
- local TipPart:BasePart
- local ComputerAnim
- local Mouse = plr:GetMouse()
- local LightPart= Instance.new("Part",workspace)
- local Light= Instance.new("SurfaceLight",LightPart)
- GUI.BlackScreen.BackgroundTransparency = 0
- GUI.readyornot.TextLabel.Visible = true
- repeat until game.Loaded
- wait(1)
- TweenService:Create(GUI.BlackScreen,TweenInfo.new(0.5),{BackgroundTransparency = 1}):Play()
- local GlitchImages = {
- [1] = "rbxassetid://434633166";
- [2] = "rbxassetid://7851707548";
- [3] = "rbxassetid://2270890360";
- [4] = "rbxassetid://264610929";
- }
- local Obectives = {}
- local InstancesToCheck =
- {
- plr,
- Char,
- Head,
- Torso,
- Neck,
- RootJoint,
- Rleg,
- Lleg,
- Values,
- Events
- }
- CheckForInstances = function()
- local Checked = 0
- for i , inst in ipairs(InstancesToCheck) do
- local typ = typeof(inst)
- if (typ == "Instance") then
- Checked += 1
- end
- end
- if (Checked == #InstancesToCheck) then
- return true
- else
- return false
- end
- end
- for i ,cam:BasePart in ipairs(workspace.Cams:GetChildren()) do
- local temp = GUI.CAMTemplate:Clone()
- temp.CAMID.Text = "["..i.."]"
- temp.TextLabel.Text = cam:GetAttribute("RoomName")
- temp.Parent = GUI.Cameras
- temp.Name = temp.TextLabel.Text
- temp.Visible = true
- end
- function San_D()
- end
- GUI.readyornot.Visible = true
- function Scremer()
- if (not killed) then
- GUI.energy.Visible = false
- ReplicatedStorage.Events.sv_Scremer:FireServer()
- GUI.Sanity.Visible = false
- GUI.Screamer.Visible = true
- local head = ReplicatedStorage.Storage.Head:Clone()
- head.Parent = workspace
- head.Anchored = true
- head.CanCollide = false
- killed = true
- workspace.Sounds.Static:Play()
- game.Lighting.ColorCorrection.Contrast = 4
- workspace.Sounds.Static.Volume = 0
- local t = 3
- function update()
- head.Position = Cam.CFrame.Position + Cam.CFrame.LookVector * t
- head.CFrame = CFrame.lookAt(head.Position,Cam.CFrame.Position)
- InCams = false
- UI.MouseDeltaSensitivity = 0
- UI.MouseIconEnabled = false
- Values.WalkSpeed.Value = 0
- end
- TweenService:Create(workspace.Sounds.Static,TweenInfo.new(4),{Volume =80}):Play()
- game["Run Service"]:BindToRenderStep("head",2,update)
- wait(3)
- t = 1
- wait(2)
- GUI.Screamer.ImageLabel.BackgroundTransparency = 0
- GUI.Screamer.eye.Visible = true
- workspace.Sounds.Static.Volume = 0
- wait(3)
- GUI.Screamer.ImageLabel.BackgroundTransparency = 1
- workspace.Sounds.Static.Volume = 20
- workspace.Sounds.error.Volume = 5
- wait(0.2)
- local text = ""
- local letteers = "qwertyuiopasdfghjklzxcvbnm"
- local sym = "What a loser?"
- for i = 1, 10,1 do
- local ram = math.random(1,2)
- if (ram == 1) then
- local letter = math.random(1,#letteers)
- text = text..string.sub(letteers,letter,letter)
- elseif (ram == 2) then
- local letter = math.random(1,#sym)
- text = text..string.sub(sym,letter,letter)
- end
- end
- plr:Kick(text)
- end
- end
- function Hide(bool)
- if (HidePart) then
- if (bool) then
- oldcampos = Cam.CFrame
- repeat
- Cam.CameraType = Enum.CameraType.Scriptable
- until Cam.CameraType == Enum.CameraType.Scriptable
- hiden = true
- TweenService:Create(Cam,TweenInfo.new(0.3),{CFrame = HidePart.CFrame}):Play()
- wait(0.3)
- function update()
- local curtime = tick()
- local wave = math.sin(curtime * 5) * .0025
- local wave2 = math.sin(curtime * 10) * .005
- local wave3 = math.sin(curtime * 2.5) * .0015
- Cam.CFrame = HidePart.CFrame * CFrame.Angles(wave,wave2,wave3)
- Values.BlackScreenTransparency.Value = 0
- prompt.Enabled = false
- end
- game["Run Service"]:BindToRenderStep("hidecam",1,update)
- else
- prompt.Enabled = true
- hiden = false
- game["Run Service"]:UnbindFromRenderStep("hidecam")
- TweenService:Create(Cam,TweenInfo.new(0.3),{CFrame = oldcampos}):Play()
- wait(0.3)
- Cam.CameraType = Enum.CameraType.Custom
- end
- end
- end
- function minigame(event,bool)
- if bool then
- inMinigame = true
- MinigameValue = 0
- MinigameValue3 = 0
- MinigameEvent = event
- MinigameValue2 = math.random(2,5) / 10
- prompt.Enabled = false
- GUI.TextButton.Modal = true
- if (MinigameSound) then
- MinigameSound:Play()
- end
- else
- inMinigame = false
- prompt.Enabled = true
- GUI.TextButton.Modal = false
- if (MinigameSound) then
- MinigameSound:Stop()
- MinigameSound:Destroy()
- end
- end
- end
- ReplicatedStorage.Events.Hide.OnClientEvent:Connect(function(prt)
- if (not iswon) then
- HidePart = prt
- Hide(true)
- end
- end)
- GUI.Unhiged.EXIT.MouseButton1Down:Connect(function()
- Hide(false)
- end)
- ReplicatedStorage.Events.Scremer.OnClientEvent:Connect(Scremer)
- function glitch()
- GUI.BlackScreen.ImageLabel1.Image = GlitchImages[math.random(1,#GlitchImages)]
- GUI.BlackScreen.BackgroundTransparency = 0
- GUI.BlackScreen.ImageLabel1.ImageTransparency = 0.5
- GUI.BlackScreen.ImageLabel1.TileSize = UDim2.new(1,0,1,0)
- if (InCams) then
- GUI.Loading.Visible = true
- end
- TweenService:Create(GUI.BlackScreen.ImageLabel1,TweenInfo.new(0.4),{TileSize = UDim2.new(2,0,1,0)}):Play()
- workspace.Sounds.hum:Play()
- if (GUI.CamerasControl.Visible) then
- workspace.Sounds.hum.Volume = 0.1
- end
- wait(0.2)
- GUI.Loading.Visible = false
- TweenService:Create(workspace.Sounds.hum,TweenInfo.new(0.5),{Volume = 0}):Play()
- TweenService:Create(GUI.BlackScreen,TweenInfo.new(0.3),{BackgroundTransparency = 1}):Play()
- TweenService:Create(GUI.BlackScreen.ImageLabel1,TweenInfo.new(0.3),{ImageTransparency = 1}):Play()
- end
- function Nextcam()
- if (CurCamId < #workspace.Cams:GetChildren() and not Svdb) then
- Svdb = true
- CurCamId += 1
- glitch()
- wait(0.2)
- Svdb = false
- end
- end
- function Prevcam()
- if (CurCamId > 1 and not Svdb) then
- Svdb = true
- CurCamId -= 1
- glitch()
- wait(0.2)
- Svdb = false
- end
- end
- GUI.CamerasControl.Prev.MouseButton1Down:Connect(function()
- Prevcam()
- end)
- GUI.CamerasControl.Next.MouseButton1Down:Connect(function()
- Nextcam()
- end)
- GUI.CamerasControl.EXIT.MouseButton1Down:Connect(function()
- local chance = math.random(1,100)
- if (chance <= screamer_chance) then
- local decal:Decal = ReplicatedStorage.Storage.screamerdecals:GetChildren()[math.random(1,#ReplicatedStorage.Storage.screamerdecals:GetChildren())]:Clone()
- if (ComputerPart) then
- decal.Parent = ComputerPart
- game.Debris:AddItem(decal,0.25)
- workspace.Sounds.metalpipe:Play()
- end
- end
- InCams = false
- Values.BlackScreenTransparency.Value = 0
- repeat
- Cam.CameraType = Enum.CameraType.Scriptable
- until Cam.CameraType == Enum.CameraType.Scriptable
- Cam.CFrame = CFrame.new(ComputerPart.Position + ComputerPart.CFrame.LookVector * 2)
- TweenService:Create(Cam,TweenInfo.new(1),{CFrame =oldcampos2}):Play()
- wait(1)
- Cam.CameraType = Enum.CameraType.Custom
- prompt.Enabled = true
- ReplicatedStorage.Events.cl_leftcams:FireServer()
- end)
- local drinkAnim
- function wld(a1,a2)
- local weld = Instance.new("Motor6D",a1)
- weld.Part0 = a1
- weld.Part1 = a2
- return weld
- end
- local drinking =false
- local curecup
- local bg = Instance.new("BodyGyro",Torso)
- function drink()
- if (not cfdb) then
- cfdb =true
- workspace.Sounds.Drink:Play()
- local cup = ReplicatedStorage.Storage.Paper_coffee_cup:Clone()
- cup.Parent = Char
- curecup = cup
- cup.LocalTransparencyModifier = 0
- drinking = true
- if (not drinkAnim) then
- drinkAnim = Humanoid:LoadAnimation(script.DrinkAnim)
- end
- if (drinkAnim) then
- drinkAnim:Play(0.4)
- end
- cup.Positi Arm").Position
- wld(Char:WaitForChild("Right Arm"),cup)
- wait(2)
- drinking = false
- cup:Destroy()
- Char:WaitForChild("Right Arm").LocalTransparencyModifier = 1
- if (san + 10 <= 100) then
- san += 10
- elseif (san + 10 > 100) then
- san = 100
- end
- if (ene + coffegives <= 100) then
- ene += coffegives
- elseif (ene + coffegives > 100) then
- ene = 100
- end
- wait(1)
- cfdb =false
- end
- end
- ReplicatedStorage.Events.cl_cofe.OnClientEvent:Connect(function()
- drink()
- end)
- function newObjective(self,Name:string,DescText:string)
- local NewTemp = GUI.OBJtemplate:Clone()
- NewTemp.Name = Name
- NewTemp.TextLabel.Text = DescText
- NewTemp.Parent = GUI.OBJlist
- NewTemp.Visible = true
- table.insert(self,NewTemp)
- NewTemp.TextLabel.TextTransparency = 1
- TweenService:Create(NewTemp.TextLabel,TweenInfo.new(0.1),{TextTransparency = 0}):Play()
- end
- function ObjectComplete(self,Name)
- for i ,Fram:Frame in self do
- if (Fram.Name == Name) then
- local tmp:Frame = Fram
- tmp.IsComp.Text = "[✅]"
- TweenService:Create(tmp.IsComp,TweenInfo.new(0.3),{TextColor3 = Color3.fromRGB(0, 170, 0)}):Play()
- TweenService:Create(tmp.IsComp,TweenInfo.new(0.3),{Size = tmp.IsComp.Size + UDim2.fromOffset(10,10),Position = tmp.IsComp.Position - UDim2.fromOffset(5,5)}):Play()
- wait(1)
- TweenService:Create(tmp.IsComp,TweenInfo.new(1),{TextTransparency = 1}):Play()
- table.remove(self,i)
- TweenService:Create(tmp,TweenInfo.new(0.3),{Transparency = 1}):Play()
- TweenService:Create(tmp.IsComp,TweenInfo.new(0.1),{TextTransparency = 1}):Play()
- TweenService:Create(tmp.TextLabel,TweenInfo.new(0.1),{TextTransparency = 1}):Play()
- wait(0.3)
- tmp:Destroy()
- end
- end
- end
- function viewList(self)
- for i ,inst in self do
- print(inst)
- end
- end
- ReplicatedStorage.Events.NewObj.OnClientEvent:Connect(function(name,text)
- newObjective(Obectives,name,text)
- viewList(Obectives)
- end)
- ReplicatedStorage.Events.ComObj.OnClientEvent:Connect(function(name)
- ObjectComplete(Obectives,name)
- viewList(Obectives)
- end)
- local sounds = workspace.Sounds
- local sanHead = ReplicatedStorage.Storage.Head:Clone()
- sanHead.Transparency = 1
- sanHead.CanCollide = false
- sanHead.Anchored = true
- sanHead.Parent = workspace
- local sanhddb = false
- local sanhdDelay = 0
- local sanhdlen = 3
- game["Run Service"].RenderStepped:Connect(function()
- if (san < lowsan and not sanhddb) then
- sanhddb = true
- wait(math.random(4,8))
- sanHead.Transparency = 0
- Values.BlackScreenTransparency.Value = 0
- sanhdlen = 3
- game.Lighting.ColorCorrection.Brightness = 0.1
- task.wait(0.1)
- sanhdlen = 2
- task.wait(0.05)
- game.Lighting.ColorCorrection.Brightness = 0
- sanHead.Transparency = 1
- wait(math.random(4,6))
- sanhddb = false
- end
- end)
- function Cuscene(Canpart:BasePart,Animation:Animation,pos,LookingPos)
- local model = ReplicatedStorage:WaitForChild("Viewmodel"):Clone()
- cs = true
- model.Parent = workspace
- oldcampos3 = Cam.CFrame
- model:MoveTo(pos or Char.PrimaryPart.Position)
- local function update()
- TweenService:Create(Cam,TweenInfo.new(0.2),{CFrame = model:WaitForChild("CameraPart").CFrame}):Play()
- end
- game["Run Service"]:BindToRenderStep("cutsc",1,update)
- for i ,v in ipairs(Char:GetChildren()) do
- if (v:IsA("Shirt")) then
- v:Clone().Parent = model
- end
- if (v:IsA("Pants")) then
- v:Clone().Parent = model
- end
- end
- model.Torso.CFrame = CFrame.lookAt(model.Torso.CFrame.Position,LookingPos - Vector3.new(0,1,0) or Char.PrimaryPart.Position - Vector3.new(0,1,0))
- local anim = model.Humanoid:LoadAnimation(Animation)
- repeat
- Cam.CameraType = Enum.CameraType.Scriptable
- until Cam.CameraType == Enum.CameraType.Scriptable
- if (anim) then
- anim:Play()
- end
- anim.Stopped:Connect(function()
- cs = false
- game["Run Service"]:UnbindFromRenderStep("cutsc")
- model:Destroy()
- TweenService:Create(Cam,TweenInfo.new(1),{CFrame = oldcampos3}):Play()
- wait(0.3)
- repeat
- Cam.CameraType = Enum.CameraType.Custom
- until Cam.CameraType == Enum.CameraType.Custom
- end)
- end
- ReplicatedStorage.Events.cl_cutscene.OnClientEvent:Connect(function(prt,pos,look,anim)
- Cuscene(prt,anim,pos,look)
- end)
- function endg()
- GUI.WonScreen.BackgroundTransparency = 0
- workspace.Sounds.doorbre:Play()
- wait(2)
- workspace.Sounds["Creature Roar Mix Of Animals Gate Creaks 1 (SFX)"]:Play()
- wait(2)
- workspace.Sounds.gor:Play()
- wait(0.9)
- workspace.Sounds["Wilhelm Scream"]:Play()
- wait(2)
- plr:Kick("congrats?")
- end
- ReplicatedStorage.Events.cl_end.OnClientEvent:Connect(function()
- endg()
- end)
- function won()
- ReplicatedStorage.Events.cl_won:FireServer()
- TweenService:Create(GUI.Sanity.Bar,TweenInfo.new(1),{BackgroundTransparency = 1}):Play()
- TweenService:Create(GUI.Sanity,TweenInfo.new(1),{BackgroundTransparency = 1}):Play()
- TweenService:Create(GUI.Sanity.TextLabel,TweenInfo.new(1),{TextTransparency = 1}):Play()
- TweenService:Create(GUI.Sanity.UIStroke,TweenInfo.new(1),{Thickness = 0}):Play()
- GUI.Sanity.ImageLabel.Visible = false
- TweenService:Create(GUI.energy.Bar,TweenInfo.new(1),{BackgroundTransparency = 1}):Play()
- TweenService:Create(GUI.energy,TweenInfo.new(1),{BackgroundTransparency = 1}):Play()
- TweenService:Create(GUI.energy.TextLabel,TweenInfo.new(1),{TextTransparency = 1}):Play()
- TweenService:Create(GUI.energy.UIStroke,TweenInfo.new(1),{Thickness = 0}):Play()
- GUI.energy.ImageLabel.Visible = false
- isw
- TweenService:Create(workspace.Sounds["troll cut"],TweenInfo.new(0.5),{Volume = 0.2}):Play()
- workspace.Sounds["troll cut"]:Play()
- TweenService:Create(GUI.WonScreen,TweenInfo.new(0.5),{BackgroundTransparency = 0}):Play()
- wait(1)
- TweenService:Create(GUI.WonScreen.TextLabel,TweenInfo.new(0.5),{TextTransparency = 0}):Play()
- GUI.WonScreen.TextLabel.Position -= UDim2.new(0,0,0,100)
- wait(0.3)
- TweenService:Create(GUI.WonScreen.TextLabel,TweenInfo.new(2,Enum.EasingStyle.Back,Enum.EasingDirection.Out),{Positi + UDim2.new(0,0,0,100) }):Play()
- wait(1.5)
- workspace.Sounds.clock:Play()
- TweenService:Create(GUI.WonScreen.am,TweenInfo.new(0.5),{TextTransparency = 0}):Play()
- TweenService:Create(GUI.WonScreen.am,TweenInfo.new(0.5),{TextColor3 = Color3.fromRGB(255, 255, 255)}):Play()
- wait(4)
- workspace.Sounds.clock:Play()
- wait(4)
- workspace.Sounds.clock:Play()
- TweenService:Create(workspace.Sounds.clock,TweenInfo.new(3),{Volume = 0}):Play()
- TweenService:Create(GUI.WonScreen,TweenInfo.new(4),{BackgroundTransparency = 1}):Play()
- TweenService:Create(GUI.WonScreen.TextLabel,TweenInfo.new(4),{TextTransparency = 1}):Play()
- TweenService:Create(GUI.WonScreen.am,TweenInfo.new(4),{TextTransparency = 1}):Play()
- newObjective(Obectives,"phone","answer the phone")
- wait(3)
- TweenService:Create(workspace.Sounds["troll cut"],TweenInfo.new(3),{Volume = 0}):Play()
- InCams = false
- Hide(false)
- end
- ReplicatedStorage.Events.sv_won.OnClientEvent:Connect(function()
- won()
- end)
- local gldbcm = false
- game["Run Service"].RenderStepped:Connect(function()
- light2.Enabled = not workspace.LightsOn.Value
- if (not camandb and camanSpawned == false) then
- camandb = true
- camanSpawned = true
- if (not camanpart) then
- camanpart = ReplicatedStorage.Storage:WaitForChild("CameraScremer")
- end
- local random = math.random(1,#workspace.Cams:GetChildren())
- camanCurCam = workspace.Cams:GetChildren()[random]
- camanpart.Parent = workspace
- camanCurCamID = random
- if (camanpart and camanCurCam) then
- camanpart.CFrame = camanCurCam.CFrame
- camanpart.Position += camanpart.CFrame.LookVector * 1.5 +camanpart.CFrame.RightVector * 2.7
- camanpart.CFrame = CFrame.lookAt(camanpart.Position,camanCurCam.Position) * CFrame.Angles(0,math.rad(-90),0)
- end
- wait(math.random(40,60))
- camandb = false
- end
- GUI.Minigame.Visible = inMinigame
- GUI.Minigame.TextLabel.Text = string.sub(tostring(MinigameValue3),1,3).."/2"
- if (inMinigame and MinigameValue < MinigameValue2 + 0.12 and MinigameValue > MinigameValue2 - 0.12) then
- MinigameValue3 += 0.01
- if (MinigameEvent and MinigameValue3 > 2) then
- MinigameEvent:FireServer()
- minigame(MinigameEvent,false)
- end
- end
- --Torso.LocalTransparencyModifier = 0
- if (drinking) then
- Char:WaitForChild('Right Arm').LocalTransparencyModifier = 0
- else
- Char:WaitForChild('Right Arm').LocalTransparencyModifier = 1
- end
- if (curecup) then
- curecup.LocalTransparencyModifier = 0
- end
- if (workspace.LightsOn.Value == false) then
- san -= 0.03
- end
- --Char:WaitForChild('Right Arm').LocalTransparencyModifier = 0
- --Char:WaitForChild('Left Arm').LocalTransparencyModifier = 0
- --Char:WaitForChild('Right Leg').LocalTransparencyModifier = 0
- --Char:WaitForChild('Left Leg').LocalTransparencyModifier = 0
- if (ene < 30) then
- TweenService:Create(Cam,TweenInfo.new(6),{FieldOfView = 50} ):Play()
- Values.slowdown.Value = 4
- Values.BlackScreenTransparency.Value = 0
- else
- TweenService:Create(Cam,TweenInfo.new(4),{FieldOfView = 70} ):Play()
- Values.slowdown.Value = 0
- end
- if (ene < 50 and coffetip) then
- coffetip = false
- GUI.coffetip.Visible = true
- wait(3)
- GUI.coffetip.Visible = false
- end
- LightPart.CFrame = Cam.CFrame
- LightPart.Anchored = true
- LightPart.Transparency = 1
- LightPart.CanCollide = false
- LightPart.CanQuery = false
- GUI.readyornot.ImageLabel.Rotation += 180
- GUI.Minigame.Plrpos.Positi 0,MinigameValue,0)
- GUI.Minigame.endpos.Positi 0,MinigameValue2,0)
- Light.Shadows = true
- Light.Range = 60
- Light.Brightness = 0.13
- sanHead.Positi + Cam.CFrame.LookVector * sanhdlen
- sanHead.CFrame = CFrame.lookAt(sanHead.Position,Cam.CFrame.Position)
- if (san < 10) then
- Scremer()
- end
- if UI:IsKeyDown(Enum.KeyCode.F) then
- minigame(MinigameEvent,false)
- end
- if (san < lowsan) then
- TweenService:Create(sounds.LowSanityEffects.loop2,TweenInfo.new(8),{Volume = 1}):Play()
- TweenService:Create(sounds.LowSanityEffects.loop,TweenInfo.new(8),{Volume = 0.1}):Play()
- Cam.CFrame *= CFrame.Angles(math.rad(math.random(-1,1) / 7),math.rad(math.random(-1,1) / 7),0)
- if (not killed) then
- game.Lighting.ColorCorrection.C / 10
- end
- TweenService:Create(sounds.LowSanityEffects.breathing,TweenInfo.new(7),{Volume = 0.3}):Play()
- else
- TweenService:Create(sounds.LowSanityEffects.loop2,TweenInfo.new(3),{Volume = 0}):Play()
- if (not killed) then
- TweenService:Create(game.Lighting.ColorCorrection,TweenInfo.new(8),{C
- end
- TweenService:Create(sounds.LowSanityEffects.loop,TweenInfo.new(3),{Volume = 0}):Play()
- TweenService:Create(sounds.LowSanityEffects.breathing,TweenInfo.new(3),{Volume = 0}):Play()
- end
- TweenService:Create(GUI.Sanity.Bar,TweenInfo.new(0.1),{Size = UDim2.new(1,0,san/100,0)}):Play()
- TweenService:Create(GUI.energy.Bar,TweenInfo.new(0.1),{Size = UDim2.new(1,0,ene/100,0)}):Play()
- if (hiden and not iswon) then
- GUI.Unhiged.Visible = true
- GUI.Unhiged.EXIT.Modal = true
- san -= 0.02
- else
- GUI.Unhiged.EXIT.Modal = false
- GUI.Unhiged.Visible = false
- end
- if (MinigameValue < 0.9) then
- MinigameValue += 0.1
- end
- if (UI:IsKeyDown(Enum.KeyCode.Space) and MinigameValue > 0.12) then
- MinigameValue -= 0.12
- end
- if (ene > 0 and not iswon and str) then
- ene -= 0.005
- end
- GUI.readyornot.playercount.Text = workspace.playersready.Value.."/"..#game.Players:GetPlayers()
- if (CheckForInstances()) then
- if (not vhslinedb) then
- vhslinedb = true
- GUI.vhsline.Position = UDim2.new(0,0,-2,0)
- wait(10)
- TweenService:Create(GUI.vhsline,TweenInfo.new(10),{Position = UDim2.new(0,0,2,0)}):Play()
- vhslinedb = false
- end
- local curtime = tick()
- local Yboble = 0
- local VHSboble = math.cos(curtime * 20) * .3
- local CameraSway = math.sin(curtime * 0.3) * .25
- local MouseVc = UI:GetMouseDelta()
- plr.CameraMode = Enum.CameraMode.LockFirstPerson
- if (InCams) then
- if (not ComputerAnim) then
- ComputerAnim = Humanoid:LoadAnimation(script.compAnim)
- end
- if (ComputerAnim and ComputerAnim.IsPlaying == false) then
- ComputerAnim:Play()
- end
- GUI.Cameffects.Visible = true
- if (Wifi.Value >= 1 and Wifi.Value <= 2) then
- GUI.Cameffects.absent.Visible = false
- GUI.Cameffects.okay.Visible = false
- GUI.Cameffects.okay2.Visible = false
- GUI.CamerasControl.wifisttus.Text = "CONNECTION Lv | ?"
- elseif (Wifi.Value >= 2 and Wifi.Value <= 3) then
- GUI.Cameffects.okay.Visible = true
- GUI.Cameffects.okay2.Visible = true
- GUI.Cameffects.okay.ImageTransparency = 0.9
- GUI.Cameffects.okay2.ImageTransparency = 0.9
- GUI.CamerasControl.wifisttus.Text = "CONNECTION Lv | ?"
- elseif (Wifi.Value >= 3 and Wifi.Value <= 4) then
- GUI.CamerasControl.wifisttus.Text = "CONNECTION Lv | ?"
- GUI.Cameffects.okay.ImageTransparency = 0.5
- GUI.Cameffects.okay2.ImageTransparency = 0.6
- GUI.Cameffects.absent.Visible = false
- if (not gldbcm) then
- gldbcm = true
- GUI.Cameffects.bad.BackgroundTransparency = 0
- wait(1)
- GUI.Cameffects.bad.BackgroundTransparency = 1
- wait(math.random(1,2))
- gldbcm = false
- end
- elseif (Wifi.Value >= 4 or Wifi.Value > 3.9) then
- GUI.CamerasControl.wifisttus.Text = "CONNECTION Lv | ⬛"
- GUI.Cameffects.absent.Visible = true
- if (not gldbcm) then
- gldbcm = true
- workspace.Sounds.Error:Play()
- wait(1)
- workspace.Sounds.Error:Play()
- wait(1)
- gldbcm = false
- end
- end
- game.Lighting.ColorCorrection.Saturation = -1
- GUI.VHS.Visible = true
- Humanoid.WalkSpeed = 0
- GUI.CamerasControl.Visible = true
- local roomname = workspace.Cams:GetChildren()[CurCamId]:GetAttribute("RoomName") or "[REDACTED]"
- GUI.CamerasControl.TextLabel.Text = roomname.." | "..CurCamId
- GUI.Cameras.Visible = true
- local CF = workspace.Cams:GetChildren()[CurCamId].CFrame or CFrame.new(0,0,0)
- GUI.BlackScreen.Visible = true
- Cam.CFrame = CF * CFrame.Angles(0,CameraSway,0)
- Cam.CameraType = Enum.CameraType.Scriptable
- workspace.Sounds["Amp Static Hum 1 (SFX)"].Volume = 0.014
- Light.Enabled = true
- if (ComputerPart) then
- bg.CFrame = CFrame.lookAt(Torso.Position,ComputerPart.Position)
- end
- bg.MaxTorque = Vector3.new(0,1000,0)
- GUI.vhsline.Visible = true
- if (san > 0 and not iswon) then
- san -= 0.02
- end
- Humanoid.AutoRotate = false
- else
- GUI.Cameffects.Visible = false
- if (ComputerAnim and ComputerAnim.IsPlaying == true) then
- ComputerAnim:Stop()
- end
- GUI.vhsline.Visible = false
- game.Lighting.ColorCorrection.Saturation = 0
- Light.Enabled = false
- GUI.Cameras.Visible = false
- if (not hiden and not cs) then
- Cam.CameraType = Enum.CameraType.Custom
- end
- bg.MaxTorque = Vector3.new(0,0,0)
- Humanoid.WalkSpeed = Values.WalkSpeed.Value + Values.RunSpeed.Value - Values.slowdown.Value
- GUI.VHS.Visible = false
- GUI.CamerasControl.Visible = false
- GUI.BlackScreen.Visible = false
- workspace.Sounds["Amp Static Hum 1 (SFX)"].Volume = 0
- if (san <99 and not hiden) then
- san += 0.03
- end
- Humanoid.AutoRotate = true
- end
- GUI.Loading.ImageLabel.Rotation += 12
- GUI.BlackScreen.ImageLabel1.Rotation += 180
- Cam.CFrame *= Values.Bobble.Value
- GUI.VHS.ImageLabel.Rotation += 180
- GUI.VHS.ImageLabel1.Rotation += 180
- GUI.readyornot.ImageLabel2.Positi
- GUI.readyornot.ImageLabel2.Rotation += 180
- GUI.readyornot.ImageLabel2.Size = UDim2.new(1,math.random(-30,30),1,math.random(-30,30))
- Humanoid.Jump = false
- for i ,v in ipairs(GUI.Cameras:GetChildren()) do
- if (v.Name == workspace.Cams:GetChildren()[CurCamId]:GetAttribute("RoomName")) then
- TweenService:Create(v,TweenInfo.new(0.13),{BackgroundTransparency = 0.7}):Play()
- else
- if (v:IsA("Frame")) then
- TweenService:Create(v,TweenInfo.new(0.1),{BackgroundTransparency = 1}):Play()
- end
- end
- end
- Values.BlackScreenTransparency.Value -= math.rad(MouseVc.Magnitude) / 100
- TweenService:Create(GUI.Circle,TweenInfo.new(0.3),{ImageTransparency = Values.BlackScreenTransparency.Value}):Play()
- if (not killed) then
- UI.MouseDeltaSensitivity = 0.5 + MouseVc.Magnitude / 70
- end
- local vec = Cam.CFrame:VectorToObjectSpace(Char:WaitForChild("HumanoidRootPart").Velocity)
- Events.Server:FireServer(Torso,Head,NeckC0,RootJointC0,Neck,RootJoint,Mouse.Hit,Lleg,Rleg,LlegC0,RlegC0,hiden,HidePart or workspace.HidePart,oldcampos or workspace.HidePart.CFrame * CFrame.new(0,3,0))
- local LookingSway = CFrame.Angles(0,0,(MouseVc.X / 100) * MouseVc.Magnitude / 170)
- local wave2 = math.sin(curtime * 20 + Torso.Velocity.Magnitude) * .02
- if (Humanoid.MoveDirection.Magnitude > 0.1 and not hiden and not InCams) then
- if (ene > 0 and not iswon) then
- ene -= 0.01
- end
- if (UI:IsKeyDown(Enum.KeyCode.LeftShift) and ene > 10) then
- Values.RunSpeed.Value = 4
- ene -= 0.09
- else
- Values.RunSpeed.Value = 0
- end
- TweenService:Create(Values.Bobble,TweenInfo.new(0.6),{Value = CFrame.new(0,VHSboble,0)* LookingSway * CFrame.Angles(0,0,wave2 + -math.rad(vec.X))}):Play()
- else
- TweenService:Create(Values.Bobble,TweenInfo.new(0.6),{Value = CFrame.new(0,0,0) * LookingSway}):Play()
- end
- if (watchingTip) then
- if (TipPart) then
- TipPart.Position = Cam.CFrame.Position + Cam.CFrame.LookVector *1.2
- TipPart.CFrame = CFrame.lookAt(TipPart.Position,Cam.CFrame.p) * CFrame.Angles(-math.rad(90),math.rad(90),0)
- GUI.tiptip.Visible = true
- end
- else
- GUI.tiptip.Visible = false
- end
- else
- end
- end)
- Values.BlackScreenTransparency.Changed:Connect(function()
- TweenService:Create(Values.BlackScreenTransparency,TweenInfo.new(0.5),{Value = 0.6}):Play()
- end)
- ReplicatedStorage.Events.Glitch.OnClientEvent:Connect(function()
- glitch()
- end)
- ReplicatedStorage.Events.Cams.OnClientEvent:Connect(function(part:BasePart)
- if (not InCams and not iswon) then
- prompt.Enabled = false
- oldcampos2 = Cam.CFrame
- repeat
- Cam.CameraType = Enum.CameraType.Scriptable
- until Cam.CameraType == Enum.CameraType.Scriptable
- TweenService:Create(Cam,TweenInfo.new(1),{CFrame =CFrame.new( part.Position + part.CFrame.LookVector * 2)}):Play()
- wait(0.9)
- InCams = true
- ComputerPart = part
- ReplicatedStorage.Events.cl_joinedcams:FireServer()
- glitch()
- end
- end)
- wait(2)
- GUI["UI Click"]:Play()
- wait(1)
- GUI["UI Click"]:Play()
- GUI.readyornot.TextButton.Visible = true
- GUI.readyornot.TextButton.Modal = true
- wait(1)
- GUI.readyornot.playercount.Visible = true
- GUI["UI Click"]:Play()
- GUI.readyornot.TextButton.MouseButton1Down:Connect(function()
- ReplicatedStorage.Events.cl_ready:FireServer()
- GUI.readyornot.TextButton.Visible = false
- GUI["UI Click"]:Play()
- wait(1)
- GUI["UI Click"]:Play()
- GUI.readyornot.TextLabel.Visible = false
- GUI.readyornot.TextButton.Modal = false
- wait(1)
- GUI.readyornot.playercount.Visible = false
- GUI["UI Click"]:Play()
- end)
- ReplicatedStorage.Events.sv_gamestart.OnClientEvent:Connect(function()
- wait(2.4)
- GUI.readyornot.Visible = false
- GUI.BlackScreen2.BackgroundTransparency = 0
- TweenService:Create(GUI.BlackScreen2,TweenInfo.new(2),{BackgroundTransparency = 1}):Play()
- wait(1)
- str = true
- end)
- ReplicatedStorage.Events.cl_tip.OnClientEvent:Connect(function(part:BasePart)
- watchingTip = true
- TipPart = part:Clone()
- TipPart.Parent = workspace
- prompt.Enabled = false
- workspace.Sounds.Paper:Play()
- end)
- Mouse.Button1Down:Connect(function()
- if (watchingTip == true) then
- watchingTip = false
- TipPart:Destroy()
- prompt.Enabled = true
- workspace.Sounds.Paper:Play()
- end
- end)
- ReplicatedStorage.Events.cl_Minigame.OnClientEvent:Connect(function(event,sound)
- if (not inMinigame) then
- MinigameSound = sound:Clone()
- MinigameSound.Parent = workspace
- minigame(event,true)
- end
- end)