Doors super hard mode script - Pastebin.com (2024)

  1. -- Constants

  2. local REMOVE_BANANA_PEELS = false -- if true it will make banana peel was invisible

  3. local REMOVE_JEFFTHEKILLER_HITBOX = true -- makes jeff unable to deal damage but he still able to deal damage if you enter the closest

  4. local REMOVE_GREED_RISK = true -- makes you unable to collect gold when you risk taking damage from greed

  5. local REMOVE_AMBIENCE_SOUNDS = false -- not that necessary but if you want to hear better keep it

  6. local REMOVE_EYES_DAMAGE = true -- makes eyes deal no damage, it deal damage if you get laggy when opening a door

  7. local REMOVE_SCREECH = true

  8. local REMOVE_LIGHT_SHATTER = true -- makes lights not shatter from any entity moving (screech will still appear unless removed)

  9. local REMOVE_LIBRARY_DOOR = true -- you can just go past it without doing the padlock

  10. local COMPLETE_ELEVATOR_MINIGAME = true -- elevator breaker (be ready to run)

  11. -- creates a guiding light so you know where to go

  12. local MARK_NEXT_DOOR = true

  13. local MARK_KEY_PICKUP = true

  14. local MARK_GATE_LEVER = true

  15. local MARK_HINT_BOOKS = true

  16. local MARK_ELEVATOR_BREAKER_POLES = true -- for room 100

  17. local SPEED_BOOST_ENABLED = true

  18. local BOOST_EXTRA_WALKSPEED = 6 -- above makes you teleport back by anticheat

  19. local CREATE_ENTITY_HINTS = true -- watch your topbar for hints when entities spawn

  20. --- don't touch below (you can however change light properties, color is (red, green, blue) up to 255)

  21. -- Services

  22. local PlayersService = game:GetService("Players")

  23. local ReplicatedStorage = game:GetService("ReplicatedStorage")

  24. -- Vars

  25. local CurrentRooms = workspace:WaitForChild("CurrentRooms")

  26. local LocalPlayer = PlayersService.LocalPlayer

  27. --

  28. local Hint, OnRemovalConnection

  29. local function HandleModels(model)

  30. task.wait()

  31. local modelIdentifier = model.Name

  32. if modelIdentifier == "BananaPeel" and REMOVE_BANANA_PEELS then

  33. model:Destroy()

  34. elseif modelIdentifier == "JeffTheKiller" and REMOVE_JEFFTHEKILLER_HITBOX then

  35. local knife = model:WaitForChild("Knife", 10)

  36. if not knife then

  37. return

  38. end

  39. for _, descendant in ipairs(model:GetDescendants()) do

  40. if descendant:IsA("BasePart") then

  41. descendant.CanTouch = false

  42. descendant.CanQuery = false

  43. end

  44. end

  45. elseif (modelIdentifier == "RushMoving" or modelIdentifier == "AmbushMoving") and CREATE_ENTITY_HINTS then

  46. local function formatIdentifier(primaryPart)

  47. local entityIdentifier = primaryPart.Name

  48. return entityIdentifier == "RushNew" and string.gsub(model.Name, "Moving", "") or entityIdentifier

  49. end

  50. local function onRemovalFunction()

  51. Hint:Destroy()

  52. Hint = nil

  53. OnRemovalConnection = nil

  54. end

  55. local primaryPart = model.PrimaryPart or model:FindFirstChildWhichIsA("BasePart")

  56. if not primaryPart or primaryPart.Position.Y < -1000 then -- ignore fake ones

  57. return

  58. end

  59. local entityIdentifier = formatIdentifier(primaryPart)

  60. if Hint and OnRemovalConnection then

  61. OnRemovalConnection:Disconnect()

  62. -- let the player know there is another entity coming right after

  63. Hint.Text = entityIdentifier.. " is coming right after! hide!!!!!"

  64. -- clear stuff up later

  65. OnRemovalConnection = model:GetPropertyChangedSignal("Parent"):Once(onRemovalFunction)

  66. return

  67. end

  68. Hint = Instance.new("Hint")

  69. Hint.Text = entityIdentifier.. " is coming! hide!!!"

  70. Hint.Parent = workspace

  71. -- clear stuff up

  72. OnRemovalConnection = model:GetPropertyChangedSignal("Parent"):Once(onRemovalFunction)

  73. end

  74. end

  75. local function HandleRooms(room)

  76. local currentRoomId = tonumber(room.Name)

  77. local nextRoomId = currentRoomId + 1

  78. local nextRoomNumber = string.rep("0", 4 - #tostring(nextRoomId))..nextRoomId

  79. local isLibrary = currentRoomId == 50

  80. local isTheEnd = not isLibrary and currentRoomId == 100

  81. local function waitForAttribute(instance, attribute, expectedValue)

  82. local function isValid()

  83. local currentValue = instance:GetAttribute(attribute)

  84. return currentValue == expectedValue

  85. end

  86. if isValid() then

  87. return true

  88. end

  89. instance:GetAttributeChangedSignal(attribute):Wait()

  90. return isValid()

  91. end

  92. local function handleDescendant(descendant)

  93. local guidingLight = Instance.new("PointLight")

  94. if MARK_NEXT_DOOR and descendant.Name == "Door" and waitForAttribute(descendant, "RoomID", nextRoomId) then

  95. guidingLight.Range = 40

  96. guidingLight.Color = Color3.fromRGB(255, 255, 255)

  97. guidingLight.Shadows = false

  98. guidingLight.Parent = descendant:WaitForChild("Door", 5)

  99. elseif MARK_KEY_PICKUP and descendant.Name == "KeyObtain" and waitForAttribute(descendant, "LockID", nextRoomNumber) then

  100. local hitbox = descendant:WaitForChild("Hitbox", 5)

  101. local keyBase = hitbox and hitbox:WaitForChild("Key", 5)

  102. if keyBase then

  103. local hintAttachment = keyBase:WaitForChild("Attachment", 5)

  104. local hintLight = hintAttachment and hintAttachment:WaitForChild("PointLight", 5)

  105. if hintLight then

  106. hintLight.Enabled = true

  107. hintLight.Shadows = true

  108. hintLight.Range = 60

  109. hintLight.Brightness = 2

  110. end

  111. end

  112. elseif MARK_GATE_LEVER and descendant.Name == "LeverForGate" then

  113. guidingLight.Range = 60

  114. guidingLight.Color = Color3.fromRGB(0, 255, 255)

  115. guidingLight.Shadows = true

  116. guidingLight.Parent = descendant:WaitForChild("Main", 5)

  117. elseif MARK_HINT_BOOKS and descendant.Name == "LiveHintBook" then

  118. guidingLight.Range = 20

  119. guidingLight.Color = Color3.fromRGB(255, 0, 255)

  120. guidingLight.Shadows = false

  121. guidingLight.Parent = descendant:WaitForChild("Base", 5)

  122. elseif MARK_ELEVATOR_BREAKER_POLES and isTheEnd and descendant.Name == "LiveBreakerPolePickup" then

  123. local base = descendant:WaitForChild("Base", 5)

  124. local hintAttachment = base and base:WaitForChild("Attachment", 5)

  125. if hintAttachment then

  126. local hintParticle = hintAttachment:WaitForChild("HintParticle", 5)

  127. local hintLight = hintAttachment:WaitForChild("HintLight", 5)

  128. if hintParticle then

  129. hintParticle.Enabled = true

  130. end

  131. if hintLight then

  132. hintLight.Enabled = true

  133. end

  134. end

  135. end

  136. end

  137. if REMOVE_LIBRARY_DOOR and isLibrary then

  138. task.wait()

  139. local door = room:WaitForChild("Door", 60)

  140. if door then

  141. door:Destroy()

  142. end

  143. end

  144. for _, descendant in ipairs(room:GetDescendants()) do

  145. task.spawn(handleDescendant, descendant)

  146. end

  147. room.DescendantAdded:Connect(handleDescendant)

  148. end

  149. local function HandleLoot(prompt)

  150. if not REMOVE_GREED_RISK then

  151. return

  152. end

  153. if prompt.Name ~= "LootPrompt" or prompt.ActionText ~= "Collect" then

  154. return

  155. end

  156. -- if this isn't done script won't be able to use holdbegan signal to prevent collecting

  157. prompt.HoldDuration = 0.05

  158. local holdBeganConnection

  159. local ancestryChangedConnection

  160. holdBeganConnection = prompt.PromptButtonHoldBegan:Connect(function(playerWhoTriggered)

  161. if LocalPlayer ~= playerWhoTriggered or LocalPlayer:GetAttribute("Greed") ~= 6 or prompt.HoldDuration == 999999 then

  162. return

  163. end

  164. prompt.HoldDuration = 999999

  165. -- yield until greed level changes

  166. LocalPlayer:GetAttributeChangedSignal("Greed"):Wait()

  167. prompt.HoldDuration = 0.05

  168. end)

  169. ancestryChangedConnection = game.AncestryChanged:Connect(function()

  170. if prompt:IsDescendantOf(CurrentRooms) then

  171. return

  172. end

  173. -- prompt was removed from workspace; these connections will only take memory

  174. holdBeganConnection:Disconnect()

  175. ancestryChangedConnection:Disconnect()

  176. holdBeganConnection = nil

  177. ancestryChangedConnection = nil

  178. end)

  179. end

  180. local function HandleEntities()

  181. local entitiesFolder = ReplicatedStorage:WaitForChild("Entities", 5)

  182. if not entitiesFolder then

  183. return

  184. end

  185. if REMOVE_SCREECH then

  186. local screechModel = entitiesFolder:WaitForChild("Screech", 5)

  187. if not screechModel then

  188. return

  189. end

  190. screechModel:Destroy()

  191. end

  192. end

  193. local function HandleAmbience()

  194. if not REMOVE_AMBIENCE_SOUNDS then

  195. return

  196. end

  197. local ambience_dark = workspace:WaitForChild("Ambience_Dark", 5)

  198. if ambience_dark then

  199. ambience_dark.Volume = 0

  200. end

  201. local ambienceFolder = workspace:WaitForChild("Ambience", 5)

  202. if not ambienceFolder then

  203. return

  204. end

  205. for _, descendant in ipairs(ambienceFolder:GetDescendants()) do

  206. if descendant.ClassName == "Sound" then

  207. descendant.Volume = 0

  208. end

  209. end

  210. end

  211. local function HandleSpeedBoost()

  212. if not SPEED_BOOST_ENABLED then

  213. return

  214. end

  215. local function handleCharacter(character)

  216. local humanoid = character:WaitForChild("Humanoid")

  217. local updating = false

  218. local function updateSpeedBoost()

  219. if updating then

  220. return

  221. end

  222. -- basic debounce

  223. updating = true

  224. humanoid:SetAttribute("SpeedBoostBehind", BOOST_EXTRA_WALKSPEED)

  225. updating = false

  226. end

  227. humanoid:GetAttributeChangedSignal("SpeedBoostBehind"):Connect(updateSpeedBoost)

  228. updateSpeedBoost()

  229. end

  230. -- on revive

  231. LocalPlayer.CharacterAdded:Connect(handleCharacter)

  232. handleCharacter(LocalPlayer.Character)

  233. end

  234. local function HandleGameEvents()

  235. local function isValid(func)

  236. return type(func) == "function" and islclosure(func) and not is_synapse_function(func)

  237. end

  238. local gc = getgc()

  239. if REMOVE_LIGHT_SHATTER then

  240. for _, value in pairs(gc) do

  241. if isValid(value) then

  242. local info = debug.getinfo(value)

  243. if info.currentline == 14 and string.find(info.short_src, "Module_Events") then

  244. local functionEnvironment = getfenv(value)

  245. -- remove luau optimizations (thats necessary)

  246. setuntouched(functionEnvironment, false)

  247. -- overwrite spawn

  248. functionEnvironment.spawn = function()end

  249. break

  250. end

  251. end

  252. end

  253. end

  254. end

  255. local function HandleRemotes()

  256. local entityInfo = ReplicatedStorage:WaitForChild("EntityInfo", 5)

  257. if not entityInfo then

  258. return

  259. end

  260. if REMOVE_EYES_DAMAGE then

  261. local motorReplicationEvent = entityInfo:WaitForChild("MotorReplication", 5)

  262. if not motorReplicationEvent then

  263. return

  264. end

  265. local findFirstChild = game.FindFirstChild

  266. local originalNC

  267. originalNC = hookmetamethod(game, "__namecall", function(self, ...)

  268. if self and rawequal(self, motorReplicationEvent) then

  269. if findFirstChild(workspace, "Eyes") then

  270. local function filter(x, y, ...) -- x, y, z, crouching

  271. return x, -89 - math.random(), ...

  272. end

  273. return originalNC(self, filter(...))

  274. end

  275. end

  276. return originalNC(self, ...)

  277. end, true)

  278. end

  279. if COMPLETE_ELEVATOR_MINIGAME then

  280. local engageMinigame = entityInfo:WaitForChild("EngageMinigame", 5)

  281. local elevatorBreakerFinished = entityInfo:WaitForChild("EBF", 5)

  282. if not engageMinigame or not elevatorBreakerFinished then

  283. return

  284. end

  285. local minigameFunction

  286. for _, connection in ipairs(getconnections(engageMinigame.OnClientEvent)) do

  287. local func = connection.Function

  288. if not func then

  289. return -- ???

  290. end

  291. local minigame = debug.getupvalue(func, 1)

  292. -- grab minigame func

  293. if not minigameFunction and type(minigame) == "function" then

  294. minigameFunction = minigame

  295. end

  296. connection:Disable()

  297. end

  298. -- create our own handler (i dont want to use hookfunction that much)

  299. engageMinigame.OnClientEvent:Connect(function(minigame, ...)

  300. if minigame == "ElevatorBreaker" then

  301. task.wait(20)

  302. -- mark as completed

  303. elevatorBreakerFinished:FireServer()

  304. return

  305. end

  306. if not minigameFunction then

  307. return

  308. end

  309. task.spawn(minigameFunction, minigame, ...)

  310. end)

  311. end

  312. end

  313. local function SetUp()

  314. workspace.ChildAdded:Connect(HandleModels)

  315. for _, child in ipairs(workspace:GetChildren()) do

  316. task.spawn(HandleModels, child)

  317. end

  318. --

  319. CurrentRooms.ChildAdded:Connect(HandleRooms)

  320. for _, room in ipairs(CurrentRooms:GetChildren()) do

  321. task.spawn(HandleRooms, room)

  322. end

  323. --

  324. game.DescendantAdded:Connect(HandleLoot)

  325. for _, descendant in ipairs(game:GetDescendants()) do

  326. task.spawn(HandleLoot, descendant)

  327. end

  328. --

  329. task.spawn(HandleEntities)

  330. task.spawn(HandleAmbience)

  331. task.spawn(HandleSpeedBoost)

  332. task.spawn(HandleGameEvents)

  333. task.spawn(HandleRemotes)

  334. end

  335. SetUp()

Doors super hard mode script - Pastebin.com (2024)

References

Top Articles
Latest Posts
Article information

Author: Gregorio Kreiger

Last Updated:

Views: 5824

Rating: 4.7 / 5 (57 voted)

Reviews: 80% of readers found this page helpful

Author information

Name: Gregorio Kreiger

Birthday: 1994-12-18

Address: 89212 Tracey Ramp, Sunside, MT 08453-0951

Phone: +9014805370218

Job: Customer Designer

Hobby: Mountain biking, Orienteering, Hiking, Sewing, Backpacking, Mushroom hunting, Backpacking

Introduction: My name is Gregorio Kreiger, I am a tender, brainy, enthusiastic, combative, agreeable, gentle, gentle person who loves writing and wants to share my knowledge and understanding with you.