Advertisement
DeezBigNuts

Hunted

Jun 29th, 2025
313
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 6.12 KB | None | 0 0
  1. -------------------->> Services <<--------------------
  2.  
  3. local cloneref = cloneref or function (...)
  4.     return ...
  5. end
  6.  
  7. local Services = setmetatable({}, {
  8.     __index = function(self, service)
  9.         return cloneref(game:FindService(service)) or cloneref(game:GetService(service)) or cloneref(game:service(service))
  10.     end
  11. })
  12.  
  13. local WorkSpace = Services.Workspace
  14. local Players = Services.Players
  15.  
  16. -------------------->> Variables <<--------------------
  17.  
  18. local Player = Players.LocalPlayer
  19. local PlayerGui = Player.PlayerGui
  20. local NotificationStack = PlayerGui.Notifications.NotificationStack
  21.  
  22. local Character = Player.Character
  23. local HumanoidRootPart = Character.HumanoidRootPart
  24.  
  25. local Shards = WorkSpace.Shards
  26. local Hotel = WorkSpace.Hotel
  27. local Portals = WorkSpace.Portals
  28.  
  29. local EntrancePortal = Portals.EntrancePortal
  30.  
  31. local Elevator = Hotel.Elevator
  32. local InsideElevator = Elevator.ElevatorInside
  33.  
  34. -------------------->> Main <<--------------------
  35.  
  36. getgenv().TPAlready = getgenv().TPAlready or false
  37. getgenv().BoardsBroke = getgenv(). BoardsBroke or false
  38. getgenv().CollectedAll = getgenv().CollectedAll or false
  39. getgenv().ReturnedToAlt = getgenv().ReturnedToAlt or false
  40. getgenv().ReturnedToPort = getgenv().ReturnedToPort or false
  41.  
  42. if workspace:GetAttribute("GameStarted") == nil and getgenv().TPAlready == false then
  43.     HumanoidRootPart.CFrame = InsideElevator.CFrame
  44. end
  45.  
  46. repeat task.wait() until Hotel:FindFirstChild("Maze") ~= nil
  47.  
  48. local Maze = Hotel.Maze
  49. local Interactable = Maze.Interactable
  50. local RingAltarModel = Maze.Rooms.Main.RingAltar
  51. local RingAltar = RingAltarModel.Parts.RingAltar
  52.  
  53. if workspace:GetAttribute("GameStarted") == nil and getgenv().TPAlready == false then
  54.     HumanoidRootPart.CFrame = RingAltar.CFrame
  55.     getgenv().TPAlready = true
  56. end
  57.  
  58. if WorkSpace:GetAttribute("Skipped") == nil then
  59.     local Button:TextButton = nil
  60.     for i, v in pairs(NotificationStack:GetChildren()) do
  61.         if v:IsA("Frame") and v:FindFirstChild("Buttons") ~= nil then
  62.             if v.Buttons:FindFirstChild("Button1_Clone") == nil then continue end
  63.             Button = v.Buttons.Button1_Clone
  64.             firesignal(Button.MouseButton1Click)
  65.         end
  66.     end
  67.    
  68.     if Button == nil then
  69.         local Connection
  70.         Connection = NotificationStack.ChildAdded:Connect(function(Child:Frame)
  71.             if Child:IsA("Frame") and Child:FindFirstChild("Buttons") ~= nil then
  72.                 if Child.Buttons:FindFirstChild("Button1_Clone") == nil then return end
  73.                 Button = Child.Buttons.Button1_Clone
  74.                 firesignal(Button.MouseButton1Click)
  75.                 Connection:Disconnect()
  76.                 Connection = nil
  77.             end
  78.         end)
  79.     end
  80. end
  81.  
  82. repeat print("waiting for game to start") task.wait() until WorkSpace:GetAttribute("GameStarted") == true
  83. repeat task.wait() until WorkSpace:GetAttribute("CurrentQuest") ~= nil
  84. repeat print("waiting for current quest: BREAK THE BOARDS") task.wait() until string.lower(WorkSpace:GetAttribute("CurrentQuest")) == "break the boards" or getgenv().BoardsBroke == true
  85.  
  86. for _, v in pairs(Interactable:GetDescendants()) do
  87.     if v.Name == "Interact" and v:FindFirstChildOfClass("RemoteEvent") ~= nil then
  88.         v:FindFirstChildOfClass("RemoteEvent"):FireServer()
  89.         task.wait(0.5)
  90.     end
  91. end
  92.  
  93. getgenv().BoardsBroke = true
  94.  
  95. local function getClosestShard(objects)
  96.     local closestShard = nil
  97.     local shortestDistance = math.huge
  98.  
  99.     for _, object in ipairs(objects) do
  100.         if object:IsA("BasePart") then
  101.             local distance = (object.Position - HumanoidRootPart.Position).Magnitude
  102.             if distance < shortestDistance then
  103.                 shortestDistance = distance
  104.                 closestShard = object
  105.             end
  106.         end
  107.     end
  108.  
  109.     return closestShard
  110. end
  111.  
  112. for i, v in pairs(Shards:GetChildren()) do
  113.     if i >= 4 then break end
  114.     local closest = getClosestShard(Shards:GetChildren())
  115.     HumanoidRootPart.CFrame = closest.CFrame
  116.     task.wait(1)
  117. end
  118.  
  119. repeat task.wait() print("waiting for current quest: COLLECT ALL SHARDS") until string.lower(WorkSpace:GetAttribute("CurrentQuest")) == "collect all shards" or getgenv().CollectedAll == true
  120.  
  121. for _, v in pairs(Shards:GetChildren()) do
  122.     if v:FindFirstChild("TouchInterest") ~= nil then
  123.         firetouchinterest(HumanoidRootPart, v, 0)
  124.         firetouchinterest(HumanoidRootPart, v, 1)
  125.     end
  126. end
  127.  
  128. getgenv().CollectedAll = true
  129.  
  130. repeat task.wait() print("waiting for current quest: GET BACK TO THE RING ALTAR") until string.lower(WorkSpace:GetAttribute("CurrentQuest")) == "get back to the ring altar" or getgenv().ReturnedToAlt == true
  131.  
  132. if getgenv().ReturnedToAlt ~= true then
  133.     for i = 1, 5 do
  134.         HumanoidRootPart.CFrame = RingAltar.CFrame
  135.         task.wait(0.6)
  136.     end
  137.     getgenv().ReturnedToAlt = true
  138. end
  139.  
  140. repeat
  141.     task.wait()
  142.     if RingAltarModel:FindFirstChild("Interact") ~= nil then
  143.         if RingAltarModel.Interact:FindFirstChildOfClass("RemoteEvent") ~= nil then
  144.             RingAltarModel.Interact:FindFirstChildOfClass("RemoteEvent"):FireServer()
  145.         end
  146.     end
  147.  
  148.     if WorkSpace:GetAttribute("RingPieceCollected") ~= true then
  149.         if RingAltarModel:FindFirstChild("Interact") ~= nil then
  150.             if RingAltarModel.Interact:FindFirstChildOfClass("RemoteEvent") ~= nil then
  151.                 RingAltarModel.Interact:FindFirstChildOfClass("RemoteEvent"):FireServer()
  152.             end
  153.         end
  154.         RingAltar.Attachment:Destroy()
  155.         WorkSpace:SetAttribute("RingPieceCollected", true)
  156.     end
  157.     print("waiting for current quest: RETURN TO PORTAL")
  158. until string.lower(WorkSpace:GetAttribute("CurrentQuest")) == "return to the portal" or getgenv().ReturnedToPort == true
  159.  
  160. if getgenv().ReturnedToPort ~= true then
  161.     task.wait(2)
  162.     repeat task.wait() HumanoidRootPart.CFrame = InsideElevator.CFrame until Hotel:FindFirstChild("Entrance") ~= nil and (HumanoidRootPart.Position - Hotel.Entrance.Lobby.MiddleCarpet.Position).Magnitude <= 100
  163.     repeat task.wait() HumanoidRootPart.CFrame = Hotel.Events.MonkeysSpawn.Object.CFrame until #WorkSpace.Terrain.Enemies:GetChildren() > 2
  164.     repeat task.wait() HumanoidRootPart.CFrame = Hotel.Events.MonkeyJumpReception.Object.CFrame until EntrancePortal.Portal.Locked.Visible ~= true
  165.     repeat task.wait() HumanoidRootPart.CFrame = EntrancePortal.Zone.CFrame until Player:GetAttribute("BeingChased") ~= true
  166.     getgenv().ReturnedToPort = true
  167. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement