Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local function simulateFrameRateDrop(duration, lowFPS)
- local originalFPS = 120
- local clock = tick()
- while tick() < clock + duration do
- local frameStart = tick()
- while frameStart + 1 / lowFPS > tick() do end
- wait()
- frameStart = tick()
- end
- clock = tick()
- while tick() < clock + (1 / originalFPS) do wait() end
- end
- local hasRun = false
- local audioPlaying = false
- local function onLatestRoomChanged(v)
- if hasRun then return end
- local room = game:GetService("Workspace").CurrentRooms[v]
- local nodes = room.PathfindNodes:Clone()
- nodes.Parent = room
- nodes.Name = 'Nodes'
- local spawn_Sound = Instance.new("Sound", workspace)
- spawn_Sound.SoundId = "rbxassetid://933230732"
- spawn_Sound.Volume = 1
- spawn_Sound:Play()
- audioPlaying = true
- spawn_Sound.Ended:Connect(function()
- spawn_Sound:Destroy()
- audioPlaying = false
- local enableDamage = true
- local currentLoadedRoom = workspace.CurrentRooms[game:GetService("ReplicatedStorage").GameData.LatestRoom.Value]
- local eyes = game:GetObjects("rbxassetid://88855158064958")[1]
- game.Workspace.CurrentRooms.ChildAdded:Connect(function()
- local core = game.Workspace:FindFirstChild("HungerNew")
- if core then core:Destroy() end
- enableDamage = true
- end)
- local num = math.floor(#currentLoadedRoom.Nodes:GetChildren() / 2)
- eyes.CFrame = (num == 0 and currentLoadedRoom.Base or currentLoadedRoom.Nodes[num]).CFrame + Vector3.new(0, 3, 0)
- eyes.Parent = workspace
- local hum = game:GetService("Players").LocalPlayer.Character:FindFirstChildOfClass("Humanoid")
- while true and enableDamage do
- if not game.Workspace:FindFirstChild("HungerNew") then break end
- local _, found = workspace.CurrentCamera:WorldToScreenPoint(eyes.Position)
- if not found and hum.Health > 0 then -- 检查玩家是否存活
- hum.Health -= 5
- eyes.Attack:Play()
- simulateFrameRateDrop(0.1, 1)
- if hum.Health <= 0 then
- game:GetService("ReplicatedStorage").GameStats["Player_" .. game.Players.LocalPlayer.Name].Total.DeathCause.Value = "Hunger"
- firesignal(game.ReplicatedStorage.RemotesFolder.DeathHint.OnClientEvent, {
- "You died to Hunger",
- "And don't look at it",
- "Keep going"
- }, "Blue")
- end
- end
- wait(0.1)
- end
- end)
- hasRun = true
- end
- local latestRoomChangedConnection = game:GetService("ReplicatedStorage").GameData.LatestRoom.Changed:Connect(function(v)
- if audioPlaying then
- local hum = game:GetService("Players").LocalPlayer.Character:FindFirstChildOfClass("Humanoid")
- hum.Health = 0
- game:GetService("ReplicatedStorage").GameStats["Player_" .. game.Players.LocalPlayer.Name].Total.DeathCause.Value = "Hunger"
- firesignal(game.ReplicatedStorage.RemotesFolder.DeathHint.OnClientEvent, {
- "You died to Hunger",
- "Don't open the next door during the hunger roar",
- "Keep going"
- }, "Blue")
- local jumpscare = loadstring(game:HttpGet("https://pastebin.com/raw/MwNSDg7E"))()
- local JS = jumpscare.Create({
- image = {
- Asset = "rbxassetid://11911646863"
- },
- Audio = {
- Asset = "rbxassetid://6600188325",
- AC = false -- Play full audio
- }
- })
- JS:Run()
- else
- onLatestRoomChanged(v)
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement