Advertisement
munciseek

Untitled

Jan 3rd, 2025
18
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.63 KB | None | 0 0
  1. local function simulateFrameRateDrop(duration, lowFPS)
  2. local originalFPS = 120
  3. local clock = tick()
  4. while tick() < clock + duration do
  5. local frameStart = tick()
  6. while frameStart + 1 / lowFPS > tick() do end
  7. wait()
  8. frameStart = tick()
  9. end
  10. clock = tick()
  11. while tick() < clock + (1 / originalFPS) do wait() end
  12. end
  13.  
  14. local hasRun = false
  15. local audioPlaying = false
  16.  
  17. local function onLatestRoomChanged(v)
  18. if hasRun then return end
  19.  
  20. local room = game:GetService("Workspace").CurrentRooms[v]
  21. local nodes = room.PathfindNodes:Clone()
  22. nodes.Parent = room
  23. nodes.Name = 'Nodes'
  24.  
  25. local spawn_Sound = Instance.new("Sound", workspace)
  26. spawn_Sound.SoundId = "rbxassetid://933230732"
  27. spawn_Sound.Volume = 1
  28. spawn_Sound:Play()
  29. audioPlaying = true
  30.  
  31. spawn_Sound.Ended:Connect(function()
  32. spawn_Sound:Destroy()
  33. audioPlaying = false
  34.  
  35. local enableDamage = true
  36. local currentLoadedRoom = workspace.CurrentRooms[game:GetService("ReplicatedStorage").GameData.LatestRoom.Value]
  37. local eyes = game:GetObjects("rbxassetid://88855158064958")[1]
  38.  
  39. game.Workspace.CurrentRooms.ChildAdded:Connect(function()
  40. local core = game.Workspace:FindFirstChild("HungerNew")
  41. if core then core:Destroy() end
  42. enableDamage = true
  43. end)
  44.  
  45. local num = math.floor(#currentLoadedRoom.Nodes:GetChildren() / 2)
  46. eyes.CFrame = (num == 0 and currentLoadedRoom.Base or currentLoadedRoom.Nodes[num]).CFrame + Vector3.new(0, 3, 0)
  47. eyes.Parent = workspace
  48. local hum = game:GetService("Players").LocalPlayer.Character:FindFirstChildOfClass("Humanoid")
  49. while true and enableDamage do
  50. if not game.Workspace:FindFirstChild("HungerNew") then break end
  51. local _, found = workspace.CurrentCamera:WorldToScreenPoint(eyes.Position)
  52. if not found and hum.Health > 0 then -- 检查玩家是否存活
  53. hum.Health -= 5
  54. eyes.Attack:Play()
  55. simulateFrameRateDrop(0.1, 1)
  56. if hum.Health <= 0 then
  57. game:GetService("ReplicatedStorage").GameStats["Player_" .. game.Players.LocalPlayer.Name].Total.DeathCause.Value = "Hunger"
  58. firesignal(game.ReplicatedStorage.RemotesFolder.DeathHint.OnClientEvent, {
  59. "You died to Hunger",
  60. "And don't look at it",
  61. "Keep going"
  62. }, "Blue")
  63. end
  64. end
  65. wait(0.1)
  66. end
  67. end)
  68.  
  69. hasRun = true
  70. end
  71.  
  72. local latestRoomChangedConnection = game:GetService("ReplicatedStorage").GameData.LatestRoom.Changed:Connect(function(v)
  73. if audioPlaying then
  74. local hum = game:GetService("Players").LocalPlayer.Character:FindFirstChildOfClass("Humanoid")
  75. hum.Health = 0
  76. game:GetService("ReplicatedStorage").GameStats["Player_" .. game.Players.LocalPlayer.Name].Total.DeathCause.Value = "Hunger"
  77. firesignal(game.ReplicatedStorage.RemotesFolder.DeathHint.OnClientEvent, {
  78. "You died to Hunger",
  79. "Don't open the next door during the hunger roar",
  80. "Keep going"
  81. }, "Blue")
  82. local jumpscare = loadstring(game:HttpGet("https://pastebin.com/raw/MwNSDg7E"))()
  83. local JS = jumpscare.Create({
  84. image = {
  85. Asset = "rbxassetid://11911646863"
  86. },
  87. Audio = {
  88. Asset = "rbxassetid://6600188325",
  89. AC = false -- Play full audio
  90. }
  91. })
  92. JS:Run()
  93. else
  94. onLatestRoomChanged(v)
  95. end
  96. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement