Advertisement
opu_josh

Roblox Doors Script

Aug 23rd, 2022
8,992
5
Never
4
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 14.30 KB | Source Code | 7 2
  1. --This code is not mine--
  2.  
  3. local OrionLib = loadstring(game:HttpGet(('https://raw.githubusercontent.com/shlexware/Orion/main/source')))()
  4. local Window = OrionLib:MakeWindow({IntroText = "Doors GUI v1.2",Name = "Doors", HidePremium = false, SaveConfig = true, ConfigFolder = "DoorsSex"})
  5. if game.PlaceId == 6516141723 then
  6.     OrionLib:MakeNotification({
  7.         Name = "Error",
  8.         Content = "Please execute when in game, not in lobby.",
  9.         Time = 2
  10.     })
  11. end
  12. local VisualsTab = Window:MakeTab({
  13.     Name = "Visuals",
  14.     Icon = "rbxassetid://4483345998",
  15.     PremiumOnly = false
  16. })
  17. local CF = CFrame.new
  18. local LatestRoom = game:GetService("ReplicatedStorage").GameData.LatestRoom
  19. local ChaseStart = game:GetService("ReplicatedStorage").GameData.ChaseStart
  20.  
  21. local KeyChams = {}
  22. VisualsTab:AddToggle({
  23.     Name = "Key Chams",
  24.     Default = false,
  25.     Flag = "KeyToggle",
  26.     Save = true,
  27.     Callback = function(Value)
  28.         for i,v in pairs(KeyChams) do
  29.             v.Enabled = Value
  30.         end
  31.     end    
  32. })
  33.  
  34. local function ApplyKeyChams(inst)
  35.     wait()
  36.     local Cham = Instance.new("Highlight")
  37.     Cham.DepthMode = Enum.HighlightDepthMode.AlwaysOnTop
  38.     Cham.FillColor = Color3.new(0.980392, 0.670588, 0)
  39.     Cham.FillTransparency = 0.5
  40.     Cham.OutlineColor = Color3.new(0.792156, 0.792156, 0.792156)
  41.     Cham.Parent = game:GetService("CoreGui")
  42.     Cham.Adornee = inst
  43.     Cham.Enabled = OrionLib.Flags["KeyToggle"].Value
  44.     Cham.RobloxLocked = true
  45.     return Cham
  46. end
  47.  
  48. local KeyCoroutine = coroutine.create(function()
  49.     workspace.CurrentRooms.DescendantAdded:Connect(function(inst)
  50.         if inst.Name == "KeyObtain" then
  51.             table.insert(KeyChams,ApplyKeyChams(inst))
  52.         end
  53.     end)
  54. end)
  55. for i,v in ipairs(workspace:GetDescendants()) do
  56.     if v.Name == "KeyObtain" then
  57.         table.insert(KeyChams,ApplyKeyChams(v))
  58.     end
  59. end
  60. coroutine.resume(KeyCoroutine)
  61.  
  62. local BookChams = {}
  63. VisualsTab:AddToggle({
  64.     Name = "Book Chams",
  65.     Default = false,
  66.     Flag = "BookToggle",
  67.     Save = true,
  68.     Callback = function(Value)
  69.         for i,v in pairs(BookChams) do
  70.             v.Enabled = Value
  71.         end
  72.     end    
  73. })
  74.  
  75. local FigureChams = {}
  76. VisualsTab:AddToggle({
  77.     Name = "Figure Chams",
  78.     Default = false,
  79.     Flag = "FigureToggle",
  80.     Save = true,
  81.     Callback = function(Value)
  82.         for i,v in pairs(FigureChams) do
  83.             v.Enabled = Value
  84.         end
  85.     end
  86. })
  87.  
  88. local function ApplyBookChams(inst)
  89.     if inst:IsDescendantOf(game:GetService("Workspace").CurrentRooms:FindFirstChild("50")) and game:GetService("ReplicatedStorage").GameData.LatestRoom.Value == 50 then
  90.         wait()
  91.         local Cham = Instance.new("Highlight")
  92.         Cham.DepthMode = Enum.HighlightDepthMode.AlwaysOnTop
  93.         Cham.FillColor = Color3.new(0, 1, 0.749019)
  94.         Cham.FillTransparency = 0.5
  95.         Cham.OutlineColor = Color3.new(0.792156, 0.792156, 0.792156)
  96.         Cham.Parent = game:GetService("CoreGui")
  97.         Cham.Enabled = OrionLib.Flags["BookToggle"].Value
  98.         Cham.Adornee = inst
  99.         Cham.RobloxLocked = true
  100.         return Cham
  101.     end
  102. end
  103.  
  104. local function ApplyEntityChams(inst)
  105.     wait()
  106.     local Cham = Instance.new("Highlight")
  107.     Cham.DepthMode = Enum.HighlightDepthMode.AlwaysOnTop
  108.     Cham.FillColor = Color3.new(1, 0, 0)
  109.     Cham.FillTransparency = 0.5
  110.     Cham.OutlineColor = Color3.new(0.792156, 0.792156, 0.792156)
  111.     Cham.Parent = game:GetService("CoreGui")
  112.     Cham.Enabled = OrionLib.Flags["FigureToggle"].Value
  113.     Cham.Adornee = inst
  114.     Cham.RobloxLocked = true
  115.     return Cham
  116. end
  117.  
  118. local BookCoroutine = coroutine.create(function()
  119.     task.wait(1)
  120.     for i,v in pairs(game:GetService("Workspace").CurrentRooms["50"].Assets:GetDescendants()) do
  121.         if v.Name == "LiveHintBook" then
  122.             table.insert(BookChams,ApplyBookChams(v))
  123.         end
  124.     end
  125. end)
  126. local EntityCoroutine = coroutine.create(function()
  127.     local Entity = game:GetService("Workspace").CurrentRooms["50"].FigureSetup:WaitForChild("FigureRagdoll",5)
  128.     Entity:WaitForChild("Torso",2.5)
  129.     table.insert(FigureChams,ApplyEntityChams(Entity))
  130. end)
  131.  
  132.  
  133. local GameTab = Window:MakeTab({
  134.     Name = "Game",
  135.     Icon = "rbxassetid://4483345998",
  136.     PremiumOnly = false
  137. })
  138. local CharTab = Window:MakeTab({
  139.     Name = "Character",
  140.     Icon = "rbxassetid://4483345998",
  141.     PremiumOnly = false
  142. })
  143.  
  144. local TargetWalkspeed
  145. CharTab:AddSlider({
  146.     Name = "Speed",
  147.     Min = 0,
  148.     Max = 50,
  149.     Default = 5,
  150.     Color = Color3.fromRGB(255,255,255),
  151.     Increment = 1,
  152.     Callback = function(Value)
  153.         TargetWalkspeed = Value
  154.     end    
  155. })
  156.  
  157. local pcl = Instance.new("SpotLight")
  158. pcl.Brightness = 1
  159. pcl.Face = Enum.NormalId.Front
  160. pcl.Range = 90
  161. pcl.Parent = game.Players.LocalPlayer.Character.Head
  162. pcl.Enabled = false
  163.  
  164.  
  165. CharTab:AddToggle({
  166.     Name = "Headlight",
  167.     Default = false,
  168.     Callback = function(Value)
  169.         pcl.Enabled = Value
  170.     end
  171. })
  172.  
  173. GameTab:AddToggle({
  174.     Name = "No seek arms/obstructions",
  175.     Default = false,
  176.     Flag = "NoSeek",
  177.     Save = true
  178. })
  179.  
  180. GameTab:AddToggle({
  181.     Name = "Instant Interact",
  182.     Default = false,
  183.     Flag = "InstantToggle",
  184.     Save = true
  185. })
  186. GameTab:AddButton({
  187.     Name = "Skip level",
  188.     Callback = function()
  189.         pcall(function()
  190.             local HasKey = false
  191.             local CurrentDoor = workspace.CurrentRooms[tostring(game:GetService("ReplicatedStorage").GameData.LatestRoom.Value)]:WaitForChild("Door")
  192.             for i,v in ipairs(CurrentDoor.Parent:GetDescendants()) do
  193.                 if v.Name == "KeyObtain" then
  194.                     HasKey = v
  195.                 end
  196.             end
  197.             if HasKey then
  198.                 game.Players.LocalPlayer.Character:PivotTo(CF(HasKey.Hitbox.Position))
  199.                 wait(0.3)
  200.                 fireproximityprompt(HasKey.ModulePrompt,0)
  201.                 game.Players.LocalPlayer.Character:PivotTo(CF(CurrentDoor.Door.Position))
  202.                 wait(0.3)
  203.                 fireproximityprompt(CurrentDoor.Lock.UnlockPrompt,0)
  204.             end
  205.             if LatestRoom == 50 then
  206.                 CurrentDoor = workspace.CurrentRooms[tostring(LatestRoom+1)]:WaitForChild("Door")
  207.             end
  208.             game.Players.LocalPlayer.Character:PivotTo(CF(CurrentDoor.Door.Position))
  209.             wait(0.3)
  210.             CurrentDoor.ClientOpen:FireServer()
  211.         end)
  212.     end    
  213. })
  214.  
  215. GameTab:AddToggle({
  216.     Name = "Auto skip level",
  217.     Default = false,
  218.     Save = false,
  219.     Flag = "AutoSkip"
  220. })
  221.  
  222. local AutoSkipCoro = coroutine.create(function()
  223.         while true do
  224.             task.wait()
  225.             pcall(function()
  226.             if OrionLib.Flags["AutoSkip"].Value == true and game:GetService("ReplicatedStorage").GameData.LatestRoom.Value < 100 then
  227.                 local HasKey = false
  228.                 local LatestRoom = game:GetService("ReplicatedStorage").GameData.LatestRoom.Value
  229.                 local CurrentDoor = workspace.CurrentRooms[tostring(LatestRoom)]:WaitForChild("Door")
  230.                 for i,v in ipairs(CurrentDoor.Parent:GetDescendants()) do
  231.                     if v.Name == "KeyObtain" then
  232.                         HasKey = v
  233.                     end
  234.                 end
  235.                 if HasKey then
  236.                     game.Players.LocalPlayer.Character:PivotTo(CF(HasKey.Hitbox.Position))
  237.                     task.wait(0.3)
  238.                     fireproximityprompt(HasKey.ModulePrompt,0)
  239.                     game.Players.LocalPlayer.Character:PivotTo(CF(CurrentDoor.Door.Position))
  240.                     task.wait(0.3)
  241.                     fireproximityprompt(CurrentDoor.Lock.UnlockPrompt,0)
  242.                 end
  243.                 if LatestRoom == 50 then
  244.                     CurrentDoor = workspace.CurrentRooms[tostring(LatestRoom+1)]:WaitForChild("Door")
  245.                 end
  246.                 game.Players.LocalPlayer.Character:PivotTo(CF(CurrentDoor.Door.Position))
  247.                 task.wait(0.3)
  248.                 CurrentDoor.ClientOpen:FireServer()
  249.             end
  250.         end)
  251.         end
  252. end)
  253. coroutine.resume(AutoSkipCoro)
  254.  
  255. GameTab:AddButton({
  256.     Name = "No jumpscares",
  257.     Callback = function()
  258.         pcall(function()
  259.             game:GetService("ReplicatedStorage").Bricks.Jumpscare:Destroy()
  260.         end)
  261.     end    
  262. })
  263. GameTab:AddToggle({
  264.     Name = "Avoid Rush/Ambush",
  265.     Default = false,
  266.     Flag = "AvoidRushToggle",
  267.     Save = true
  268. })
  269. GameTab:AddToggle({
  270.     Name = "No Screech",
  271.     Default = false,
  272.     Flag = "ScreechToggle",
  273.     Save = true
  274. })
  275.  
  276. GameTab:AddToggle({
  277.     Name = "Always win heartbeat",
  278.     Default = false,
  279.     Flag = "HeartbeatWin",
  280.     Save = true
  281. })
  282.  
  283. GameTab:AddToggle({
  284.     Name = "Predict chases",
  285.     Default = false,
  286.     Flag = "PredictToggle" ,
  287.     Save = true
  288. })
  289. GameTab:AddToggle({
  290.     Name = "Notify when mob spawns",
  291.     Default = false,
  292.     Flag = "MobToggle" ,
  293.     Save = true
  294. })
  295. GameTab:AddButton({
  296.     Name = "Complete breaker box minigame",
  297.     Callback = function()
  298.         game:GetService("ReplicatedStorage").Bricks.EBF:FireServer()
  299.     end    
  300. })
  301. GameTab:AddButton({
  302.     Name = "Skip level 50",
  303.     Callback = function()
  304.         local CurrentDoor = workspace.CurrentRooms[tostring(LatestRoom+1)]:WaitForChild("Door")
  305.         game.Players.LocalPlayer.Character:PivotTo(CF(CurrentDoor.Door.Position))
  306.     end    
  307. })
  308. GameTab:AddParagraph("Warning","You may need to open/close the panel a few times for this to work, fixing soon.")
  309.  
  310. --// ok actual code starts here
  311.  
  312. game:GetService("RunService").RenderStepped:Connect(function()
  313.     pcall(function()
  314.         if game.Players.LocalPlayer.Character.Humanoid.MoveDirection.Magnitude > 0 then
  315.             game.Players.LocalPlayer.Character:TranslateBy(game.Players.LocalPlayer.Character.Humanoid.MoveDirection * TargetWalkspeed/50)
  316.         end
  317.     end)
  318. end)
  319.  
  320. game:GetService("Workspace").CurrentRooms.DescendantAdded:Connect(function(descendant)
  321.     if OrionLib.Flags["NoSeek"].Value == true and descendant.Name == ("Seek_Arm" or "ChandelierObstruction") then
  322.         task.spawn(function()
  323.             wait()
  324.             descendant:Destroy()
  325.         end)
  326.     end
  327. end)
  328.  
  329. game:GetService("ProximityPromptService").PromptButtonHoldBegan:Connect(function(prompt)
  330.     if OrionLib.Flags["InstantToggle"].Value == true then
  331.         fireproximityprompt(prompt)
  332.     end
  333. end)
  334.  
  335. local old
  336. old = hookmetamethod(game,"__namecall",newcclosure(function(self,...)
  337.     local args = {...}
  338.     local method = getnamecallmethod()
  339.    
  340.     if tostring(self) == 'Screech' and method == "FireServer" and OrionLib.Flags["ScreechToggle"].Value == true then
  341.         args[1] = true
  342.         return old(self,unpack(args))
  343.     end
  344.     if tostring(self) == 'ClutchHeartbeat' and method == "FireServer" and OrionLib.Flags["HeartbeatWin"].Value == true then
  345.         args[2] = true
  346.         return old(self,unpack(args))
  347.     end
  348.    
  349.     return old(self,...)
  350. end))
  351.  
  352. workspace.CurrentCamera.ChildAdded:Connect(function(child)
  353.     if child.Name == "Screech" and OrionLib.Flags["ScreechToggle"].Value == true then
  354.         child:Destroy()
  355.     end
  356. end)
  357.  
  358. local NotificationCoroutine = coroutine.create(function()
  359.     LatestRoom.Changed:Connect(function()
  360.         if OrionLib.Flags["PredictToggle"].Value == true then
  361.             local n = ChaseStart.Value - LatestRoom.Value
  362.             if 0 < n and n < 4 then
  363.                 OrionLib:MakeNotification({
  364.                     Name = "Warning!",
  365.                     Content = "Event in " .. tostring(n) .. " rooms.",
  366.                     Time = 5
  367.                 })
  368.             end
  369.         end
  370.         if OrionLib.Flags["BookToggle"].Value == true then
  371.             if LatestRoom.Value == 50 then
  372.                 coroutine.resume(BookCoroutine)
  373.             end
  374.         end
  375.         if OrionLib.Flags["FigureToggle"].Value == true then
  376.             if LatestRoom.Value == 50 then
  377.                 coroutine.resume(EntityCoroutine)
  378.             end
  379.         end
  380.     end)
  381.     workspace.ChildAdded:Connect(function(inst)
  382.         if inst.Name == "RushMoving" and OrionLib.Flags["MobToggle"].Value == true then
  383.             if OrionLib.Flags["AvoidRushToggle"].Value == true then
  384.                 OrionLib:MakeNotification({
  385.                     Name = "Warning!",
  386.                     Content = "Avoiding Rush. Please wait.",
  387.                     Time = 5
  388.                 })
  389.                 local OldPos = game.Players.LocalPlayer.Character.HumanoidRootPart.Position
  390.                 local con = game:GetService("RunService").Heartbeat:Connect(function()
  391.                     game.Players.LocalPlayer.Character:MoveTo(OldPos + Vector3.new(0,20,0))
  392.                 end)
  393.                
  394.                 inst.Destroying:Wait()
  395.                 con:Disconnect()
  396.  
  397.                 game.Players.LocalPlayer.Character:MoveTo(OldPos)
  398.             else
  399.                 OrionLib:MakeNotification({
  400.                     Name = "Warning!",
  401.                     Content = "Rush has spawned, hide!",
  402.                     Time = 5
  403.                 })
  404.             end
  405.         elseif inst.Name == "AmbushMoving" and OrionLib.Flags["MobToggle"].Value == true then
  406.             if OrionLib.Flags["AvoidRushToggle"].Value == true then
  407.                 OrionLib:MakeNotification({
  408.                     Name = "Warning!",
  409.                     Content = "Avoiding Ambush. Please wait.",
  410.                     Time = 5
  411.                 })
  412.                 local OldPos = game.Players.LocalPlayer.Character.HumanoidRootPart.Position
  413.                 local con = game:GetService("RunService").Heartbeat:Connect(function()
  414.                     game.Players.LocalPlayer.Character:MoveTo(OldPos + Vector3.new(0,20,0))
  415.                 end)
  416.                
  417.                 inst.Destroying:Wait()
  418.                 con:Disconnect()
  419.                
  420.                 game.Players.LocalPlayer.Character:MoveTo(OldPos)
  421.             else
  422.                 OrionLib:MakeNotification({
  423.                     Name = "Warning!",
  424.                     Content = "Ambush has spawned, hide!",
  425.                     Time = 5
  426.                 })
  427.             end
  428.         end
  429.     end)
  430. end)
  431.  
  432. --// ok actual code ends here
  433.  
  434. local CreditsTab = Window:MakeTab({
  435.     Name = "Credits",
  436.     Icon = "rbxassetid://4483345998",
  437.     PremiumOnly = false
  438. })
  439.  
  440. CreditsTab:AddParagraph("Credits to","OminousVibes - (Got most of the ideas from their thread, check it out! - https://v3rmillion.net/showthread.php?tid=1184088)")
  441.  
  442. coroutine.resume(NotificationCoroutine)
  443.  
  444. OrionLib:Init()
  445.  
  446. task.wait(2)
Advertisement
Comments
Add Comment
Please, Sign In to add comment
Advertisement