Advertisement
munciseek

Untitled

Feb 11th, 2025
19
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.13 KB | None | 0 0
  1. local Players = game:GetService("Players")
  2. local ReplicatedStorage = game:GetService("ReplicatedStorage")
  3. local RunService = game:GetService("RunService")
  4. local Workspace = game:GetService("Workspace")
  5.  
  6. -- 加载外部工具
  7. HookHelper = loadstring(game:HttpGet("https://raw.githubusercontent.com/ChronoAcceleration/Comet-Development/refs/heads/main/Doors/Utility/DoorsScriptUtility.lua"))()
  8. SyncHelper = loadstring(game:HttpGet("https://github.com/ChronoAcceleration/Comet-Development/raw/refs/heads/main/Doors/Utility/SyncHelper.lua"))()
  9.  
  10. local player = Players.LocalPlayer
  11. local character = player.Character or player.CharacterAdded:Wait()
  12. local roomHook = HookHelper.RoomHook:New()
  13.  
  14. -- 全局变量
  15. local isRunning = false
  16. local isRoomLocked = false
  17. local speedsterChance = 5
  18.  
  19. -- 初始化音效和灯光
  20. local sound = Instance.new("Sound", Workspace)
  21. sound.SoundId = "rbxassetid://101724323124983"
  22. sound.Looped = true
  23. sound.Volume = 0.01
  24. sound:Play()
  25.  
  26. game.Lighting.FogEnd = 50
  27. game.Lighting.FogStart = 10
  28. game.Lighting.OutdoorAmbient = Color3.fromRGB(60, 60, 60)
  29.  
  30. -- 显示初始文本
  31. local function executeText()
  32. local messages = {
  33. "Misfortune has snuck up on to you, and you have been dragged down to hell.",
  34. "As you make your way through the reception room, you wonder if you are alone.",
  35. "You soon realize you are not.",
  36. "There are hungry beings in this hellscape. Hide, defend, and run until door 100.",
  37. "Goodluck."
  38. }
  39.  
  40. for _, text in messages do
  41. require(player.PlayerGui.MainUI.Initiator.Main_Game).caption(text, true)
  42. task.wait(4)
  43. end
  44. end
  45.  
  46. -- 创建难度选择界面
  47. local screenGui = Instance.new("ScreenGui", player.PlayerGui)
  48. local frame = Instance.new("Frame", screenGui)
  49. frame.Size = UDim2.new(0.5, 0, 0.5, 0)
  50. frame.Position = UDim2.new(0.25, 0, 0.25, 0)
  51.  
  52. local function createButton(text, position, callback)
  53. local button = Instance.new("TextButton", frame)
  54. button.Size = UDim2.new(0.3, 0, 0.2, 0)
  55. button.Position = position
  56. button.Text = text
  57. button.MouseButton1Click:Connect(callback)
  58. return button
  59. end
  60.  
  61. createButton("Intermediate", UDim2.new(0.1, 0, 0.1, 0), function()
  62. speedsterChance = 10
  63. screenGui:Destroy()
  64. executeText()
  65. end)
  66.  
  67. createButton("Medium", UDim2.new(0.1, 0, 0.4, 0), function()
  68. speedsterChance = 5
  69. isRunning = true
  70. screenGui:Destroy()
  71. executeText()
  72. end)
  73.  
  74. createButton("Hard", UDim2.new(0.1, 0, 0.7, 0), function()
  75. speedsterChance = 3
  76. isRunning = true
  77. screenGui:Destroy()
  78. executeText()
  79. end)
  80.  
  81. -- 处理房间变化
  82. roomHook:On("ServerRoomChanged", function(roomModel)
  83. if roomModel.Name == "10" then
  84. isRunning = false
  85. -- 成就提示
  86. local achievementGiver = loadstring(game:HttpGet("https://raw.githubusercontent.com/RegularVynixu/Utilities/main/Doors/Custom%20Achievements/Source.lua"))()
  87. achievementGiver({
  88. Title = "Cant Keep My Eyes Off You",
  89. Desc = "And stay out!",
  90. Reason = "Survive the Gatekeeper.",
  91. Image = "rbxassetid://13769107799"
  92. })
  93. end
  94.  
  95. -- 生成随机事件
  96. local randomNumber = SyncHelper:generateFullRandom(1, speedsterChance, tonumber(roomModel.Name))
  97. if randomNumber == 1 and not (roomModel.Name == "1" or roomModel.Name == "2" or roomModel.Name == "3" or roomModel.Name == "4" or roomModel.Name == "5") then
  98. spawnEntity(roomModel, "Speedster", "rbxassetid://9125351901", "http://www.roblox.com/asset/?id=12001502218", 5, 45)
  99. end
  100. end)
  101.  
  102. -- 生成实体
  103. local function spawnEntity(roomModel, entityName, soundId, imageId, tweenDuration, damageRange)
  104. local part = Instance.new("Part", Workspace)
  105. part.Anchored = true
  106. part.Transparency = 1
  107.  
  108. local sound = Instance.new("Sound", part)
  109. sound.SoundId = soundId
  110. sound.Looped = true
  111. sound.Volume = 10
  112. sound:Play()
  113.  
  114. local billboardGui = Instance.new("BillboardGui", part)
  115. local imageLabel = Instance.new("ImageLabel", billboardGui)
  116. imageLabel.Image = imageId
  117. imageLabel.Size = UDim2.new(1, 0, 1, 0)
  118.  
  119. local oldestRoom = Workspace.CurrentRooms:GetChildren()[1]
  120. part:PivotTo(oldestRoom.Door:GetPivot())
  121.  
  122. local tween = game:GetService("TweenService"):Create(part, TweenInfo.new(tweenDuration), {Position = roomModel.Door:GetPivot().Position})
  123. tween:Play()
  124.  
  125. RunService.Heartbeat:Connect(function()
  126. if character and character:FindFirstChild("Humanoid") then
  127. local distance = (part.Position - character.HumanoidRootPart.Position).Magnitude
  128. if distance <= damageRange and not character:GetAttribute("Hiding") then
  129. character.Humanoid:TakeDamage(character.Humanoid.Health)
  130. end
  131. end
  132. end)
  133.  
  134. tween.Completed:Connect(function()
  135. part:Destroy()
  136. end)
  137. end
  138.  
  139. -- 锁定房间事件
  140. roomHook:On("LockedRoom", function()
  141. isRoomLocked = true
  142. end)
  143.  
  144. -- 持续伤害逻辑
  145. while true do
  146. task.wait(1)
  147. if isRoomLocked == false and isRunning == true then
  148. player.Character.Humanoid:TakeDamage(3)
  149. end
  150. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement