-- [[ Rscripts Risk Notice ]] -- This script is not verified by rscripts.net. Deal with caution. -- -- Stay safe: -- • Never log in on unofficial Roblox sites or lookalike domains. -- • Real Roblox links use roblox.com (check the .com ending). -- • Treat fake Roblox login / "claim reward" pages as phishing. -- [[ End Rscripts Risk Notice ]] -- Full V4 installer: seeds the complete script for realm hops. local source=[========[ --!nocheck -- Cobalt / Find the Markers (universe 3056160040) -- CHANGED_BRANCH=gravity_killbrick_prerequisites_v4_4 -- CHANGED_FIELD=activator_chain_trap_sequence_v4_4 local SINGLETON_KEY = "__COBALT_FIND_THE_MARKERS_GUI_V4" local BOOT_KEY = "__COBALT_FIND_THE_MARKERS_BOOT_V4" local GUI_REGISTRY_KEY = "__COBALT_FIND_THE_MARKERS_GUI_REGISTRY_V4" local TARGET_MEMORY_KEY = "__COBALT_FIND_THE_MARKERS_LAST_TARGET_V2" local AUTO_RUN_KEY = "__COBALT_FIND_THE_MARKERS_AUTO_UNIVERSE_V4" local AUTOLOAD_FILE = "cobalt_find_the_markers_v4.lua" local SESSION_FILE = "cobalt_find_the_markers_v4_session.json" local SOURCE_SIGNATURE = "CHANGED_BRANCH=gravity_killbrick_prerequisites_v4_4" local LEGACY_SINGLETON_KEY = "__COBALT_FIND_THE_MARKERS_GUI_V3" local LEGACY_TARGET_MEMORY_KEY = "__COBALT_FIND_THE_MARKERS_LAST_TARGET_V1" local GUI_NAME = "CobaltFindTheMarkersV4" local LEGACY_GUI_NAME = "CobaltFindTheMarkersV3" local MAINLAND_PLACE_ID = 7896264844 local EXPECTED_GAME_ID = 3056160040 local PRE_FIRE_HOLD_SECONDS = 2.4 local POST_FIRE_HOLD_SECONDS = 1.2 local CONFIRM_TIMEOUT_SECONDS = 10 local BADGE_CONFIRM_TIMEOUT_SECONDS = 12 local DARKNESS_BADGE_ID = 2124933917 local DARKNESS_SHOT_INTERVAL_SECONDS = 0.45 local DARKNESS_FIGHT_TIMEOUT_SECONDS = 180 local DARKNESS_STANDOFF_DISTANCE = 22 local DARKNESS_DAMAGE_STALL_SECONDS = 2.4 local MAX_MARKER_ATTEMPTS = 1 -- one bounded workflow, no repeated blind requests local MAX_CHALLENGE_ATTEMPTS = 1 local MAX_COLLECTION_PASSES = 1 local RETRY_BASE_SECONDS = 1.35 local INTER_MARKER_COOLDOWN_SECONDS = 3.0 local CLIENT_COLLECT_WINDOW_SECONDS = 4 local TOUCH_PULSE_COUNT = 1 local TOUCH_PULSE_INTERVAL_SECONDS = 0.16 local CHALLENGE_SETTLE_SECONDS = 2.5 local PLACE_IDS = { MAINLAND = 7896264844, DC = 8246417300, WASHABLE = 8506260179, DARKNESS = 8954347485, SCENTED = 9273236872, CHOMIK_REALM = 9353059905, FORBIDDEN = 10026123355, CORNBREAD = 8004336756, CHOMIK_MARKER = 7031179594, } local COLLECTION_REALMS = { { name = "Mainland", placeId = PLACE_IDS.MAINLAND }, { name = "Scented", placeId = PLACE_IDS.SCENTED }, { name = "Washable", placeId = PLACE_IDS.WASHABLE }, { name = "DC", placeId = PLACE_IDS.DC }, { name = "Chomik realm", placeId = PLACE_IDS.CHOMIK_REALM }, { name = "Forbidden", placeId = PLACE_IDS.FORBIDDEN }, { name = "Cornbread", placeId = PLACE_IDS.CORNBREAD }, { name = "Chomik marker", placeId = PLACE_IDS.CHOMIK_MARKER }, { name = "Darkness", placeId = PLACE_IDS.DARKNESS }, } local OFFSITE_BADGE_TARGETS = { [PLACE_IDS.CORNBREAD] = { markerName = "Cornbread Marker", badgeId = 2124883651, path = { "Areas", "Misc", "CornbreadMarker", "Marker", "Hitbox" }, }, [PLACE_IDS.CHOMIK_MARKER] = { markerName = "Chomik Marker", badgeId = 2125817410, path = { "CHOMIKMARKERBadgeGiver" }, }, } local environment = (type(getgenv) == "function" and getgenv()) or _G local guiRegistry = environment[GUI_REGISTRY_KEY] if type(guiRegistry) ~= "table" then guiRegistry = {} environment[GUI_REGISTRY_KEY] = guiRegistry end local bootToken = {} environment[BOOT_KEY] = bootToken local previous = environment[SINGLETON_KEY] if type(previous) == "table" and type(previous.Destroy) == "function" then pcall(function() previous:Destroy(true) end) end local legacyPrevious = environment[LEGACY_SINGLETON_KEY] if type(legacyPrevious) == "table" and type(legacyPrevious.Destroy) == "function" then pcall(function() legacyPrevious:Destroy(true) end) end environment[LEGACY_SINGLETON_KEY] = nil local Players = game:GetService("Players") local ReplicatedStorage = game:GetService("ReplicatedStorage") local RunService = game:GetService("RunService") local TeleportService = game:GetService("TeleportService") local UserInputService = game:GetService("UserInputService") local BadgeService = game:GetService("BadgeService") local HttpService = game:GetService("HttpService") local LocalPlayer = Players.LocalPlayer if not LocalPlayer then return end local PlayerGui = LocalPlayer:FindFirstChild("PlayerGui") or LocalPlayer:WaitForChild("PlayerGui", 8) if not PlayerGui then warn("FTM bootstrap: PlayerGui missing after 8s; rerun after character loads") return end local connections = {} local api = {} local rememberedTarget = environment[TARGET_MEMORY_KEY] or environment[LEGACY_TARGET_MEMORY_KEY] local state = { running = false, destroyed = false, generation = 0, current = "Idle", completed = 0, failed = 0, lastResult = "not run", restorePivot = nil, owned = {}, ownedSource = "not scanned", attempts = {}, deferred = {}, passes = 0, totalAttempts = 0, verifiedTouches = 0, retries = 0, serverAck = {}, verifiedSession = {}, remoteFallbacks = 0, prepared = {}, challengeAuthorized = {}, challengeRuns = 0, exhausted = {}, validatorFrameUses = 0, universeMode = false, realmHops = 0, globalRemaining = nil, eventRemaining = nil, seasonalLocked = 0, seasonalLockedNames = {}, activeEvent = "None", darknessShots = 0, darknessHits = 0, darknessDamage = 0, darknessInsideArena = false, selectedMarkerName = type(rememberedTarget) == "table" and rememberedTarget.Name or nil, selectedMarkerIsEvent = type(rememberedTarget) == "table" and rememberedTarget.IsEvent == true or false, selectionSource = type(rememberedTarget) == "table" and "persistent memory" or "none", targetKind = "none", dispatcher = "shared_collect_target_v1", standardOwned = {}, eventOwned = {}, } local function sessionFileRecord(session) local visited = {} for placeId, wasVisited in pairs(session and session.Visited or {}) do if wasVisited == true then visited[tostring(placeId)] = true end end return { Version = 2, Enabled = session and session.Enabled == true or false, SessionId = session and tostring(session.SessionId or "") or "", Hops = math.max(0, tonumber(session and session.Hops) or 0), StartedAt = math.max(0, tonumber(session and session.StartedAt) or os.time()), FinalReturn = session and session.FinalReturn == true or false, Phase = session and tostring(session.Phase or "idle") or "idle", Mode = session and tostring(session.Mode or "All") or "All", RequestedMarker = session and tostring(session.RequestedMarker or "") or "", OneCollected = session and session.OneCollected == true or false, Results = type(session and session.Results) == "table" and session.Results or {}, Visited = visited, } end local function writeUniverseSessionFile(session) local writeFile = environment.writefile if type(writeFile) ~= "function" then return false, "writefile unavailable" end local ok, reason = pcall(function() writeFile(SESSION_FILE, HttpService:JSONEncode(sessionFileRecord(session))) end) return ok, ok and "session persisted" or tostring(reason) end local function readUniverseSessionFile() local readFile = environment.readfile if type(readFile) ~= "function" then return nil end local ok, decoded = pcall(function() return HttpService:JSONDecode(readFile(SESSION_FILE)) end) if not ok or type(decoded) ~= "table" or decoded.Version ~= 2 then return nil end decoded.Visited = type(decoded.Visited) == "table" and decoded.Visited or {} return decoded end local function disableUniverseSession(reason) local session = environment[AUTO_RUN_KEY] if type(session) ~= "table" then session = readUniverseSessionFile() or { Version = 2, Visited = {} } end session.Enabled = false session.Phase = reason or "stopped" writeUniverseSessionFile(session) environment[AUTO_RUN_KEY] = nil state.universeMode = false end local function track(connection) table.insert(connections, connection) return connection end local function make(className, properties, parent) local object = Instance.new(className) for property, value in pairs(properties or {}) do object[property] = value end object.Parent = parent return object end for _, guiName in ipairs({ GUI_NAME, LEGACY_GUI_NAME }) do local oldGui = PlayerGui:FindFirstChild(guiName) if oldGui then local registeredOwner = guiRegistry[oldGui] if type(registeredOwner) == "table" and type(registeredOwner.Destroy) == "function" then pcall(function() registeredOwner:Destroy(true) end) else oldGui:Destroy() end end end local screen = make("ScreenGui", { Name = GUI_NAME, ResetOnSpawn = false, IgnoreGuiInset = false, ZIndexBehavior = Enum.ZIndexBehavior.Sibling, DisplayOrder = 900, }, PlayerGui) -- A delayed V1 execution cannot destroy or replace the V2 owner. Remove only -- the obsolete UI if an old queued payload materializes after this release. track(PlayerGui.ChildAdded:Connect(function(child) if child.Name == LEGACY_GUI_NAME then task.defer(function() if child.Parent and not state.destroyed then child:Destroy() end end) end end)) local COLLAPSED_GUI_SIZE = Vector2.new(390, 232) local EXPANDED_GUI_SIZE = Vector2.new(390, 430) local main = make("Frame", { Name = "Main", Size = UDim2.fromOffset(COLLAPSED_GUI_SIZE.X, COLLAPSED_GUI_SIZE.Y), Position = UDim2.new(0.5, -195, 0.5, -116), BackgroundColor3 = Color3.fromRGB(18, 20, 27), BorderSizePixel = 0, Active = true, }, screen) make("UICorner", { CornerRadius = UDim.new(0, 10) }, main) make("UIStroke", { Color = Color3.fromRGB(79, 112, 206), Thickness = 1, Transparency = 0.18, }, main) local header = make("Frame", { Name = "Header", Size = UDim2.new(1, 0, 0, 42), BackgroundColor3 = Color3.fromRGB(29, 35, 50), BorderSizePixel = 0, Active = true, }, main) make("UICorner", { CornerRadius = UDim.new(0, 10) }, header) make("Frame", { Name = "SquareBottom", Position = UDim2.new(0, 0, 1, -12), Size = UDim2.new(1, 0, 0, 12), BackgroundColor3 = header.BackgroundColor3, BorderSizePixel = 0, }, header) make("UIGradient", { Color = ColorSequence.new(Color3.fromRGB(35, 44, 65), Color3.fromRGB(26, 31, 44)), Rotation = 0, }, header) make("TextLabel", { Name = "Title", Position = UDim2.fromOffset(12, 0), Size = UDim2.new(1, -58, 1, 0), BackgroundTransparency = 1, Text = "COBALT / FIND THE MARKERS", TextColor3 = Color3.fromRGB(235, 240, 255), TextSize = 14, Font = Enum.Font.GothamBold, TextXAlignment = Enum.TextXAlignment.Left, }, header) local closeButton = make("TextButton", { Name = "Close", Position = UDim2.new(1, -36, 0, 7), Size = UDim2.fromOffset(28, 28), BackgroundColor3 = Color3.fromRGB(68, 38, 48), BorderSizePixel = 0, Text = "X", TextColor3 = Color3.fromRGB(255, 220, 225), TextSize = 17, Font = Enum.Font.GothamBold, }, header) make("UICorner", { CornerRadius = UDim.new(0, 7) }, closeButton) local statusLabel = make("TextLabel", { Name = "Status", Position = UDim2.fromOffset(12, 52), Size = UDim2.new(1, -24, 0, 86), BackgroundColor3 = Color3.fromRGB(12, 14, 20), BorderSizePixel = 0, Text = "Initializing...", TextColor3 = Color3.fromRGB(215, 225, 245), TextSize = 12, Font = Enum.Font.Code, TextWrapped = true, TextXAlignment = Enum.TextXAlignment.Left, TextYAlignment = Enum.TextYAlignment.Top, }, main) make("UICorner", { CornerRadius = UDim.new(0, 7) }, statusLabel) make("UIPadding", { PaddingTop = UDim.new(0, 7), PaddingBottom = UDim.new(0, 7), PaddingLeft = UDim.new(0, 8), PaddingRight = UDim.new(0, 8), }, statusLabel) local controls = make("Frame", { Name = "Controls", Position = UDim2.fromOffset(12, 148), Size = UDim2.new(1, -24, 0, 34), BackgroundTransparency = 1, }, main) local controlsLayout = make("UIListLayout", { FillDirection = Enum.FillDirection.Horizontal, HorizontalAlignment = Enum.HorizontalAlignment.Center, Padding = UDim.new(0, 6), }, controls) local function makeButton(name, text, color, parent) local button = make("TextButton", { Name = name, Size = UDim2.new(0, 112, 1, 0), BackgroundColor3 = color, BorderSizePixel = 0, Text = text, TextColor3 = Color3.fromRGB(245, 247, 255), TextSize = 12, Font = Enum.Font.GothamSemibold, AutoButtonColor = true, }, parent) make("UICorner", { CornerRadius = UDim.new(0, 7) }, button) return button end local collectAllButton = makeButton("CollectAll", "COLLECT ALL", Color3.fromRGB(54, 101, 177), controls) local collectCurrentButton = makeButton("CollectCurrent", "COLLECT ONE", Color3.fromRGB(49, 124, 97), controls) local stopButton = makeButton("Stop", "STOP", Color3.fromRGB(151, 59, 71), controls) collectAllButton.Size = UDim2.new(1 / 3, -6, 1, 0) collectCurrentButton.Size = UDim2.new(1 / 3, -6, 1, 0) stopButton.Size = UDim2.new(1 / 3, -6, 1, 0) local realmToggle = make("TextButton", { Name = "RealmTitle", Position = UDim2.fromOffset(12, 190), Size = UDim2.new(1, -24, 0, 30), BackgroundColor3 = Color3.fromRGB(26, 30, 41), BorderSizePixel = 0, Text = "REALMS [+]", TextColor3 = Color3.fromRGB(160, 183, 235), TextSize = 12, Font = Enum.Font.GothamBold, AutoButtonColor = true, }, main) make("UICorner", { CornerRadius = UDim.new(0, 7) }, realmToggle) local realmScroll = make("ScrollingFrame", { Name = "Realms", Position = UDim2.fromOffset(12, 226), Size = UDim2.new(1, -24, 0, 192), BackgroundColor3 = Color3.fromRGB(12, 14, 20), BorderSizePixel = 0, ScrollBarThickness = 4, ScrollBarImageColor3 = Color3.fromRGB(82, 111, 187), CanvasSize = UDim2.fromOffset(0, 0), AutomaticCanvasSize = Enum.AutomaticSize.None, Visible = false, }, main) make("UICorner", { CornerRadius = UDim.new(0, 7) }, realmScroll) make("UIPadding", { PaddingTop = UDim.new(0, 6), PaddingBottom = UDim.new(0, 6), PaddingLeft = UDim.new(0, 6), PaddingRight = UDim.new(0, 6), }, realmScroll) local realmLayout = make("UIListLayout", { Padding = UDim.new(0, 4), SortOrder = Enum.SortOrder.LayoutOrder, }, realmScroll) local function setStatus(text) state.current = text if statusLabel and statusLabel.Parent then local c = state.catalog if c then local extreme = c.ByDifficulty.Extreme or {Owned=0,Total=0} local markerous = c.ByDifficulty.Markerous or {Owned=0,Total=0} text ..= string.format("\nCatalog %d/%d | Extreme %d/%d | Markerous %d/%d", c.StandardOwned, c.StandardTotal, extreme.Owned, extreme.Total, markerous.Owned, markerous.Total) end statusLabel.Text = text end end local dragging = false local dragInput = nil local dragStart = nil local startAbsolutePosition = nil local function clampMainToViewport(position) local camera = workspace.CurrentCamera local viewport = camera and camera.ViewportSize or Vector2.new(1920, 1080) local size = main.AbsoluteSize return Vector2.new( math.clamp(position.X, 6, math.max(6, viewport.X - size.X - 6)), math.clamp(position.Y, 6, math.max(6, viewport.Y - size.Y - 6)) ) end track(header.InputBegan:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then dragging = true dragStart = input.Position startAbsolutePosition = main.AbsolutePosition dragInput = input end end)) track(header.InputEnded:Connect(function(input) if input == dragInput then dragging = false dragInput = nil end end)) track(UserInputService.InputChanged:Connect(function(input) if dragging and dragStart and startAbsolutePosition and (input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch) then local delta = input.Position - dragStart local clamped = clampMainToViewport(startAbsolutePosition + Vector2.new(delta.X, delta.Y)) main.Position = UDim2.fromOffset(clamped.X, clamped.Y) end end)) local realmExpanded = false local realmButtonCount = 0 track(realmToggle.Activated:Connect(function() realmExpanded = not realmExpanded realmScroll.Visible = realmExpanded realmToggle.Text = string.format("REALMS (%d) %s", realmButtonCount, realmExpanded and "[-]" or "[+]") local targetSize = realmExpanded and EXPANDED_GUI_SIZE or COLLAPSED_GUI_SIZE main.Size = UDim2.fromOffset(targetSize.X, targetSize.Y) task.defer(function() local clamped = clampMainToViewport(main.AbsolutePosition) main.Position = UDim2.fromOffset(clamped.X, clamped.Y) end) end)) -- INIT_V4_BOUNDED_BEGIN api._PendingCalls = {} api._PendingCallCount = 0 state.dependencyErrors = {} state.dependencyStatus = "discovering" state.ownedError = nil function api:_BoundedCall(key, label, timeoutSeconds, callback) if state.destroyed then return false, label .. ": destroyed" end local entry = self._PendingCalls[key] if entry and not entry.done then return false, label .. ": previous call pending (circuit open)" end if not entry then if self._PendingCallCount >= 8 then return false, label .. ": pending-call limit (8)" end entry = { done = false } self._PendingCalls[key] = entry self._PendingCallCount += 1 entry.thread = task.spawn(function() entry.result = table.pack(pcall(callback)) entry.done = true self._PendingCallCount = math.max(0, self._PendingCallCount - 1) end) end local generation = state.generation local deadline = os.clock() + math.max(0, tonumber(timeoutSeconds) or 0.3) while not entry.done and not state.destroyed and state.generation == generation and os.clock() < deadline do task.wait(math.min(0.025, math.max(0, deadline - os.clock()))) end if state.destroyed or state.generation ~= generation then return false, label .. ": cancelled" end if not entry.done then -- Keep the in-flight slot: repeated polls never spawn another Invoke. return false, label .. ": timeout; call still pending" end self._PendingCalls[key] = nil return table.unpack(entry.result, 1, entry.result.n) end -- INIT_V4_BOUNDED_END -- Discovery never yields; late replication is retried by the existing watcher. local PackagedRepStorage, PackagedEvents, Markers, EventMarkers, Get, EventGet, GetMarkerdexData, AwardSpecial local PlaceSpecific = nil local validSpecial = {} local noGenericCollect = {} api._DependencyBindings = {} api._ModuleLoads = {} function api:_ReadModule(module, label) if not module or not module:IsA("ModuleScript") then state.dependencyErrors[label] = label .. " module not replicated in this realm" return nil end local record = self._ModuleLoads[module] if not record then record = { startedAt = os.clock(), pending = true } self._ModuleLoads[module] = record task.defer(function() local ok, result = self:_BoundedCall(module, label .. " require", 0.5, function() return require(module) end) if state.destroyed then return end record.pending = false if ok and type(result) == "table" then record.value = result state.dependencyErrors[label] = nil else record.error = tostring(result) state.dependencyErrors[label] = record.error end end) end -- Consume a completed timeout without creating an additional require. local pending = self._PendingCalls[module] if not record.value and pending and pending.done then self._PendingCalls[module] = nil if pending.result[1] and type(pending.result[2]) == "table" then record.value = pending.result[2] state.dependencyErrors[label] = nil else state.dependencyErrors[label] = tostring(pending.result[2]) end end return record.value end function api:_RefreshDependencies() if state.destroyed then return end PackagedRepStorage = ReplicatedStorage:FindFirstChild("PackagedRepStorage") PackagedEvents = PackagedRepStorage and PackagedRepStorage:FindFirstChild("PackagedEvents") Markers = ReplicatedStorage:FindFirstChild("Markers") EventMarkers = PackagedRepStorage and PackagedRepStorage:FindFirstChild("EventMarkers") Get = ReplicatedStorage:FindFirstChild("Get") EventGet = ReplicatedStorage:FindFirstChild("EventGet") GetMarkerdexData = PackagedEvents and PackagedEvents:FindFirstChild("GetMarkerdexData") AwardSpecial = PackagedEvents and PackagedEvents:FindFirstChild("AwardSpecial") for _, field in ipairs({ "Get", "EventGet" }) do local remote = Get if field == "EventGet" then remote = EventGet end local binding = self._DependencyBindings[field] if binding and binding.instance ~= remote then binding.connection:Disconnect() self._DependencyBindings[field] = nil binding = nil end if not binding and remote and remote:IsA("RemoteEvent") then local connection = track(remote.OnClientEvent:Connect(function(markerName) if not state.destroyed and type(markerName) == "string" then state.serverAck[markerName] = os.clock() -- Keep genuine late replies even after the attempt timeout. state.verifiedSession[markerName] = true state.owned[markerName] = true state.exhausted[markerName] = nil state.deferred[markerName] = nil end end)) self._DependencyBindings[field] = { instance = remote, connection = connection } end end state.dependencyStatus = string.format("Markers=%s | ownership=%s | Get=%s", tostring(Markers ~= nil), tostring(GetMarkerdexData ~= nil), tostring(Get ~= nil)) local database = self:_ReadModule((PackagedRepStorage and PackagedRepStorage:FindFirstChild("Database")) or ReplicatedStorage:FindFirstChild("Database"), "Database") if database then state.database = database end local placeData = self:_ReadModule(ReplicatedStorage:FindFirstChild("PlaceSpecific"), "PlaceSpecific") if placeData and PlaceSpecific ~= placeData then PlaceSpecific = placeData state.dependencyErrors.PlaceSpecific = nil table.clear(validSpecial) table.clear(noGenericCollect) if type(PlaceSpecific.validMarkersList) == "table" then for _, markerName in ipairs(PlaceSpecific.validMarkersList) do if type(markerName) == "string" then validSpecial[markerName] = true end end end if type(PlaceSpecific.no) == "table" then for key, value in pairs(PlaceSpecific.no) do for _, candidate in ipairs({ key, value }) do if typeof(candidate) == "Instance" then noGenericCollect[candidate] = true noGenericCollect[candidate.Name] = true elseif type(candidate) == "string" then noGenericCollect[candidate] = true end end end end end end api:_RefreshDependencies() local function addOwnedValues(source, destination) if type(source) ~= "table" then return end for key, value in pairs(source) do if type(value) == "string" then destination[value] = true elseif type(key) == "string" and value == true then destination[key] = true end end end local function guiOwnedFallback(destination) local packagedGui = PlayerGui:FindFirstChild("PackagedGui") local menu = packagedGui and packagedGui:FindFirstChild("Menu") local allMarkers = menu and menu:FindFirstChild("AllMarkers") local cards = allMarkers and allMarkers:FindFirstChild("Markers") if not cards then return false end local cardCount = 0 for _, card in ipairs(cards:GetChildren()) do if card:IsA("TextButton") then cardCount += 1 if card:GetAttribute("Got") == true then destination[card.Name] = true end end end return cardCount > 0 end local function refreshOwned() api:_RefreshDependencies() if state.destroyed then return state.owned, false end local fresh = {} local freshStandard = {} local freshEvent = {} local refreshed = false if GetMarkerdexData and GetMarkerdexData:IsA("BindableFunction") then local binding = GetMarkerdexData local ok, standardOwned, _, eventOwned = api:_BoundedCall(binding, "GetMarkerdexData", 0.3, function() return binding:Invoke() end) if ok and type(standardOwned) == "table" then addOwnedValues(standardOwned, freshStandard) -- Offsite clients sometimes return only the standard list. -- A missing event return is unknown, not a reason to discard standard data. addOwnedValues(type(eventOwned) == "table" and eventOwned or state.eventOwned, freshEvent) addOwnedValues(freshStandard, fresh) addOwnedValues(freshEvent, fresh) state.standardOwned = freshStandard state.eventOwned = freshEvent state.ownedSource = type(eventOwned) == "table" and "GetMarkerdexData" or "GetMarkerdexData (standard; event cache retained)" state.ownedError = nil state.dependencyErrors.GetMarkerdexData = nil refreshed = true else state.ownedError = ok and "GetMarkerdexData: standard ownership return is not a table" or tostring(standardOwned) state.dependencyErrors.GetMarkerdexData = state.ownedError end else state.ownedError = "GetMarkerdexData not replicated in this realm" end if not refreshed and guiOwnedFallback(freshStandard) then addOwnedValues(freshStandard, fresh) addOwnedValues(state.eventOwned, fresh) state.standardOwned = freshStandard state.ownedSource = "GUI Got cache" refreshed = true end if refreshed then -- Only previously verified acknowledgements survive datasource refreshes. for markerName, isOwned in pairs(state.verifiedSession) do if isOwned then fresh[markerName] = true end end state.owned = fresh else state.ownedSource = "cached; " .. tostring(state.ownedError or "ownership unavailable") end return state.owned, refreshed end local function ownedCount() local count = 0 for _ in pairs(state.owned) do count += 1 end return count end local function mapCount(values) local count = 0 for _ in pairs(values or {}) do count += 1 end return count end local function refreshSeasonalEventState() local globalEvent = workspace:FindFirstChild("GlobalEventVar") state.activeEvent = globalEvent and tostring(globalEvent.Value) or "None" local lockedNames = {} if EventMarkers then for _, objectValue in ipairs(EventMarkers:GetChildren()) do if objectValue:IsA("ObjectValue") and not state.owned[objectValue.Name] then local model = objectValue.Value local colorOne = model and model:FindFirstChild("Color 1") local eligible = model ~= nil and model:IsDescendantOf(workspace) and colorOne ~= nil and colorOne:IsA("BasePart") if not eligible then table.insert(lockedNames, objectValue.Name) end end end end table.sort(lockedNames) state.seasonalLockedNames = lockedNames state.seasonalLocked = #lockedNames return lockedNames end local function leaderMarkerCount() local leaderstats = LocalPlayer:FindFirstChild("leaderstats") local markerValue = leaderstats and leaderstats:FindFirstChild("Markers") if markerValue and markerValue:IsA("IntValue") then return markerValue.Value end return nil end local function active(generation) return not state.destroyed and state.running and state.generation == generation end local function characterRoot(timeoutSeconds) local deadline = os.clock() + (timeoutSeconds or 0) repeat local character = LocalPlayer.Character local humanoid = character and character:FindFirstChildOfClass("Humanoid") local root = character and character:FindFirstChild("HumanoidRootPart") if humanoid and root and humanoid.Health > 0 then return character, root end if os.clock() >= deadline then break end task.wait(0.1) until os.clock() >= deadline return nil, nil end local function restoreCharacter() if state.collectionContactCleanup then state.collectionContactCleanup() end if state.darknessHoverCleanup then state.darknessHoverCleanup() end local pivot = state.restorePivot state.restorePivot = nil if not pivot then return end local character = LocalPlayer.Character if character and character.Parent then pcall(function() character:PivotTo(pivot) end) end end local function stopRun(reason) disableUniverseSession(reason or "stopped") state.generation += 1 state.running = false state.lastResult = reason or "Stopped" restoreCharacter() setStatus(reason or "Stopped") end local function resolveWorkspacePath(path) local current = workspace for _, childName in ipairs(path) do current = current and current:FindFirstChild(childName) if not current then return nil end end return current end local function firstBasePart(instance) if not instance then return nil end if instance:IsA("BasePart") then return instance end return instance:FindFirstChildWhichIsA("BasePart", true) end local function badgeOwned(badgeId) local ok, hasBadge = api:_BoundedCall("BadgeService:" .. tostring(badgeId), "BadgeService.UserHasBadgeAsync", 0.3, function() return BadgeService:UserHasBadgeAsync(LocalPlayer.UserId, badgeId) end) if not ok then return false, tostring(hasBadge) end return hasBadge == true, nil end local function holdRootOnPart(part, seconds, generation, forcedCFrame) local held = 0 local lastCFrame = forcedCFrame or part.CFrame local missingSince = nil while held < seconds do if not active(generation) then return false, "stopped" end if not forcedCFrame and part and part.Parent then lastCFrame = part.CFrame end local _, root = characterRoot(0) if root then missingSince = nil root.AssemblyLinearVelocity = Vector3.zero root.AssemblyAngularVelocity = Vector3.zero root.CFrame = lastCFrame local deltaTime = RunService.Heartbeat:Wait() held += math.min(deltaTime, 0.1) else missingSince = missingSince or os.clock() if os.clock() - missingSince > 8 then return false, "character unavailable" end task.wait(0.1) end end return true end local function executorFunction(name) local ok, value = pcall(function() return environment[name] end) if ok and type(value) == "function" then return value end return nil end local function waitForClientCollectWindow(generation) local deadline = os.clock() + CLIENT_COLLECT_WINDOW_SECONDS repeat if not active(generation) then return false, "stopped" end local lastCollect = tonumber(LocalPlayer:GetAttribute("LastCollect")) or 0 if time() > lastCollect then return true end task.wait(math.min(0.20, math.max(0.03, lastCollect - time()))) until os.clock() >= deadline return false, "client collect cooldown timeout" end local function markerCollectability(objectValue) if not objectValue or not objectValue:IsA("ObjectValue") then return false, "invalid ObjectValue", nil, nil, nil end local model = objectValue.Value local part = model and model:FindFirstChild("Color 1") if not model or not part or not part:IsA("BasePart") then return false, "target model unavailable in this realm", model, part, nil end if part.Position.Y <= workspace.FallenPartsDestroyHeight + 8 then return false, "target below character destruction plane", model, part, nil end return true, model:IsDescendantOf(workspace) and "live target" or "replicated target", model, part, nil end local function touchPulse(part, root) local fireTouch = executorFunction("firetouchinterest") if fireTouch then local ok = pcall(function() fireTouch(root, part, 0) task.wait(TOUCH_PULSE_INTERVAL_SECONDS) fireTouch(root, part, 1) end) return ok and 1 or 0 end local fireSignal = executorFunction("firesignal") if fireSignal then local ok = pcall(function() fireSignal(part.Touched, root) end) return ok and 1 or 0 end return 0 end local function waitPredicate(seconds, generation, predicate) local deadline = os.clock() + seconds repeat if not active(generation) then return false, "stopped" end local ok, result = pcall(predicate) if ok and result then return true, "verified" end task.wait(0.12) until os.clock() >= deadline return false, "predicate timeout" end local function compatibleClick(clickDetector) if not clickDetector or not clickDetector:IsA("ClickDetector") then return false, "ClickDetector unavailable" end -- Prefer the real ClickDetector route. A number of challenges only have a -- server MouseClick listener; their local CompatibleEvent is intentionally -- empty and therefore cannot advance the award state. local fireClick = executorFunction("fireclickdetector") if fireClick then local clicked, clickReason = pcall(fireClick, clickDetector) if clicked then return true, "fireclickdetector" end warn("Cobalt ClickDetector route failed: " .. tostring(clickReason)) end local compatible = clickDetector:FindFirstChild("CompatibleEvent") if compatible and compatible:IsA("BindableEvent") then compatible:Fire() return true, "CompatibleEvent" end return false, "CompatibleEvent unavailable" end local function promptOnce(prompt) if not prompt or not prompt:IsA("ProximityPrompt") or not prompt.Enabled then return false, "ProximityPrompt unavailable/not enabled" end local firePrompt = executorFunction("fireproximityprompt") if not firePrompt then return false, "fireproximityprompt unavailable" end local host = prompt.Parent if host and host:IsA("BasePart") then local generation = state.generation local held, reason = holdRootOnPart(host, 0.25, generation) if not held then return false, reason end end local ok, reason = pcall(firePrompt, prompt, math.max(0, prompt.HoldDuration)) return ok, ok and "prompt fired" or tostring(reason) end local function touchPartOnce(part, generation) if not part or not part:IsA("BasePart") then return false, "touch part unavailable" end local held, reason = holdRootOnPart(part, 0.28, generation) if not held then return false, reason end local _, root = characterRoot(2) if not root then return false, "character unavailable" end touchPulse(part, root) task.wait(0.16) return true, "touched" end local function solveKeyboardCode(code, enterCount, generation) local Keyboard = workspace:FindFirstChild("Keyboard") local Keys = Keyboard and Keyboard:FindFirstChild("Keys") if not Keyboard or not Keys then return false, "Keyboard unavailable" end local Enter = Keyboard:FindFirstChild("Enter") local enterClick = Enter and Enter:FindFirstChildWhichIsA("ClickDetector", true) local backspace = Keyboard:FindFirstChild("BACKSPACE") local backClick = backspace and backspace:FindFirstChildWhichIsA("ClickDetector", true) for submission = 1, (enterCount or 1) do for _ = 1, 20 do if backClick then compatibleClick(backClick) end end for index = 1, #code do if not active(generation) then return false, "stopped" end local key = Keys:FindFirstChild(string.sub(code, index, index)) local clickDetector = key and key:FindFirstChildWhichIsA("ClickDetector", true) local clicked, reason = compatibleClick(clickDetector) if not clicked then return false, "key " .. tostring(index) .. ": " .. tostring(reason) end task.wait(0.14) end local clicked, reason = compatibleClick(enterClick) if not clicked then return false, reason end if submission < (enterCount or 1) then task.wait(1.2) end end return true, "keyboard sequence submitted" end local function sendChallengeChat(message) local TextChatService = game:GetService("TextChatService") local channels = TextChatService:FindFirstChild("TextChannels") local channel = channels and (channels:FindFirstChild("RBXGeneral") or channels:FindFirstChildWhichIsA("TextChannel")) if not channel then return false, "TextChannel unavailable" end local completed = false local sent = false local sendReason = "not completed" task.spawn(function() local ok, reason = pcall(function() channel:SendAsync(message) end) sent = ok sendReason = ok and "TextChannel submitted" or tostring(reason) completed = true end) local deadline = os.clock() + 6 repeat task.wait(0.10) until completed or os.clock() >= deadline if not completed then local legacyEvents = ReplicatedStorage:FindFirstChild("DefaultChatSystemChatEvents") local legacySend = legacyEvents and legacyEvents:FindFirstChild("SayMessageRequest") if legacySend and legacySend:IsA("RemoteEvent") then local fallbackOk, fallbackReason = pcall(function() legacySend:FireServer(message, "All") end) sent = fallbackOk sendReason = fallbackOk and "legacy chat submitted after TextChannel timeout" or tostring(fallbackReason) else return false, "TextChannel SendAsync timeout" end end if sent then task.wait(1.2) end return sent, sendReason end local function dreamValue(name) local references = workspace:FindFirstChild("DreamFolderReferences") or ReplicatedStorage:FindFirstChild("DreamFolderReferences") local reference = references and references:FindFirstChild(name) if reference and reference:IsA("ObjectValue") then return reference.Value end return nil end local function guiButtonVisible(button) if not button or not button:IsA("GuiButton") or not button:IsDescendantOf(PlayerGui) then return false end local current = button while current and current ~= PlayerGui do if current:IsA("GuiObject") and not current.Visible then return false end if current:IsA("ScreenGui") and not current.Enabled then return false end current = current.Parent end return current == PlayerGui end local function activateGuiButton(button) if not guiButtonVisible(button) then return false, "GUI button unavailable/not visible" end local fireSignal = executorFunction("firesignal") if fireSignal then local ok, reason = pcall(function() fireSignal(button.Activated) end) return ok, ok and "Activated" or tostring(reason) end local VirtualInputManager = game:GetService("VirtualInputManager") local center = button.AbsolutePosition + (button.AbsoluteSize / 2) local ok, reason = pcall(function() VirtualInputManager:SendMouseButtonEvent(center.X, center.Y, 0, true, game, 0) VirtualInputManager:SendMouseButtonEvent(center.X, center.Y, 0, false, game, 0) end) return ok, ok and "mouse input" or tostring(reason) end local function microwavePrompt() for _, descendant in ipairs(workspace:GetDescendants()) do if descendant:IsA("ProximityPrompt") then local current = descendant while current and current ~= workspace do if string.find(string.lower(current.Name), "microwave", 1, true) then return descendant end current = current.Parent end end end return nil end local function microwaveButtons() local gui = PlayerGui:FindFirstChild("Microwave") local frame = gui and gui:FindFirstChild("Frame") local buttons = frame and frame:FindFirstChild("Buttons") if not buttons then return nil, nil end local digits = {} for digit = 0, 9 do local button = buttons:FindFirstChild(tostring(digit)) if button and button:IsA("GuiButton") then digits[tostring(digit)] = button end end local enter = buttons:FindFirstChild("Enter") if not enter or not enter:IsA("GuiButton") then enter = nil end return digits, enter end local CHALLENGE_SOLVERS = {} CHALLENGE_SOLVERS["Noob Marker"] = function(generation) local door = workspace:FindFirstChild("Microwave Door") if not door or not door.Parent then return true, "Microwave Door already open" end local opener = workspace:FindFirstChild("Microwave Opener") local prompt = opener and opener:FindFirstChild("ProximityPrompt") or microwavePrompt() local opened, openReason = promptOnce(prompt) if not opened then local microwave = ReplicatedStorage:FindFirstChild("Microwave") local fireSignal = executorFunction("firesignal") if microwave and microwave:IsA("RemoteEvent") and fireSignal then opened = pcall(function() fireSignal(microwave.OnClientEvent) end) end if not opened then return false, "Microwave opener: " .. tostring(openReason) end end local keypadReady = waitPredicate(4, generation, function() local digits, enter = microwaveButtons() return digits and enter and guiButtonVisible(enter) end) if not keypadReady then return false, "Microwave keypad did not open" end local digits, enter = microwaveButtons() local code = tostring(LocalPlayer.UserId) for index = 1, #code do if not active(generation) then return false, "stopped" end local digit = string.sub(code, index, index) local pressed, pressReason = activateGuiButton(digits[digit]) if not pressed then return false, "Microwave digit " .. tostring(index) .. ": " .. tostring(pressReason) end task.wait(0.12) end local submitted, submitReason = activateGuiButton(enter) if not submitted then return false, "Microwave Enter: " .. tostring(submitReason) end local accepted = waitPredicate(5, generation, function() local currentDoor = workspace:FindFirstChild("Microwave Door") local currentOpener = workspace:FindFirstChild("Microwave Opener") local currentPrompt = currentOpener and currentOpener:FindFirstChild("ProximityPrompt") local gui = PlayerGui:FindFirstChild("Microwave") local frame = gui and gui:FindFirstChild("Frame") local input = frame and frame:FindFirstChild("Input") return not currentDoor or not currentDoor.Parent or (currentPrompt and not currentPrompt.Enabled) or (input and input.Text == "SUCCESS") end) if accepted then local currentDoor = workspace:FindFirstChild("Microwave Door") if currentDoor and currentDoor.Parent then -- The official GUI normally destroys this local gate after its SUCCESS -- tween. Complete that same post-predicate state if replication restored it. currentDoor:Destroy() end local cleared = select(1, waitPredicate(2, generation, function() local current = workspace:FindFirstChild("Microwave Door") return not current or not current.Parent end)) return cleared, cleared and "Microwave UserId accepted; door removed" or "Microwave SUCCESS but door remained" end return false, "Microwave did not reach SUCCESS" end CHALLENGE_SOLVERS["Big Orange Marker"] = function(generation) -- The official PlaceSpecific route unlocks Big Orange only after Baby Marker: -- rename the dialog prompt, then invoke SetupMarkerTouchLogic for this ObjectValue. refreshOwned() if not state.owned["Baby Marker"] then local babyObjectValue = Markers and Markers:FindFirstChild("Baby Marker") local babyModel = babyObjectValue and babyObjectValue.Value local babyPart = babyModel and babyModel:FindFirstChild("Color 1") setStatus("Big Orange prerequisite\nCollecting Baby Marker through physical contact...") local babyTouched, babyReason = touchPartOnce(babyPart, generation) if not babyTouched then return false, "Baby Marker prerequisite: " .. tostring(babyReason) end local babyConfirmed = select(1, waitPredicate(CONFIRM_TIMEOUT_SECONDS, generation, function() refreshOwned() return state.owned["Baby Marker"] == true end)) if not babyConfirmed then return false, "Baby Marker prerequisite was not server-confirmed" end end local bigObjectValue = Markers and Markers:FindFirstChild("Big Orange Marker") local bigModel = bigObjectValue and bigObjectValue.Value local colorOne = bigModel and bigModel:FindFirstChild("Color 1") local dialogStuff = bigModel and bigModel:FindFirstChild("DialogStuff") local proxPart = dialogStuff and dialogStuff:FindFirstChild("ProxPart") local prompt = proxPart and proxPart:FindFirstChildWhichIsA("ProximityPrompt") local setupTouch = PackagedEvents and PackagedEvents:FindFirstChild("SetupMarkerTouchLogic") if not bigObjectValue or not colorOne or not colorOne:IsA("BasePart") then return false, "Big Orange model/Color 1 unavailable" end if not prompt or not prompt:IsA("ProximityPrompt") then return false, "Big Orange FoundBaby prompt unavailable" end if not setupTouch or not setupTouch:IsA("BindableFunction") then return false, "SetupMarkerTouchLogic unavailable" end local getConnections = executorFunction("getconnections") local function enabledTouchHandlerCount() if not getConnections then return nil end local ok, handlers = pcall(getConnections, colorOne.Touched) if not ok or type(handlers) ~= "table" then return nil end local count = 0 for _, handler in ipairs(handlers) do local enabled = true pcall(function() if handler.Enabled == false then enabled = false end end) if enabled then count += 1 end end return count end local handlerCount = enabledTouchHandlerCount() if prompt.Name ~= "FoundBaby" or handlerCount == 0 then prompt.Name = "FoundBaby" local invoked, invokeReason = api:_BoundedCall(setupTouch, "SetupMarkerTouchLogic", 0.75, function() return setupTouch:Invoke(bigObjectValue) end) if not invoked then return false, "SetupMarkerTouchLogic: " .. tostring(invokeReason) end end if getConnections then local handlerReady = select(1, waitPredicate(2, generation, function() local currentCount = enabledTouchHandlerCount() return currentCount and currentCount > 0 end)) if not handlerReady then return false, "official OnMarkerPartTouched handler unavailable" end end state.challengeAuthorized["Big Orange Marker"] = true setStatus("Big Orange challenge\nBaby Marker confirmed; official touch logic verified") return true, "Baby prerequisite + FoundBaby + official touch handler" end CHALLENGE_SOLVERS["Jalapeño Marker"] = function(generation) -- Official Jalapeno LocalScript state machine: touch the pepper, then enter -- real Terrain water while JalapenoState is true. Its observed Swimming -- callback performs the validated ObjectValue request and clears the heat. local objectValue = Markers and Markers:FindFirstChild("Jalapeño Marker") local hotModel = workspace:FindFirstChild("Jalapeno Marker") or (objectValue and objectValue.Value) local hotPart = hotModel and hotModel:FindFirstChild("Color 1") if not hotPart or not hotPart:IsA("BasePart") then return false, "Jalapeno Color 1 unavailable" end setStatus("Jalapeno challenge\nTouching pepper and waiting for official heat state...") local touched, touchReason = touchPartOnce(hotPart, generation) if not touched then return false, "pepper touch: " .. tostring(touchReason) end local heated = select(1, waitPredicate(3, generation, function() return LocalPlayer:GetAttribute("JalapenoState") == true end)) if not heated then return false, "JalapenoState did not activate" end local waterCFrame = CFrame.new(62, 6, -78) local swimDeadline = os.clock() + 8 local observedSwimming = false setStatus("Jalapeno challenge\nHeat active; entering verified Terrain water...") repeat if not active(generation) then return false, "stopped" end local character, root = characterRoot(0) local humanoid = character and character:FindFirstChildOfClass("Humanoid") if humanoid and root then humanoid.Sit = false root.AssemblyLinearVelocity = Vector3.zero root.AssemblyAngularVelocity = Vector3.zero root.CFrame = waterCFrame if humanoid:GetState() == Enum.HumanoidStateType.Swimming then observedSwimming = true break end end RunService.Heartbeat:Wait() until os.clock() >= swimDeadline if not observedSwimming then return false, "real Terrain water did not produce Swimming" end local confirmed = select(1, waitPredicate(CONFIRM_TIMEOUT_SECONDS, generation, function() refreshOwned() return state.owned["Jalapeño Marker"] == true end)) return confirmed, confirmed and "pepper touch + real water + official Swimming callback + server ownership" or "Jalapeno ownership timeout" end CHALLENGE_SOLVERS["Evil Marker"] = function(generation) return solveKeyboardCode("INVERT", 1, generation) end CHALLENGE_SOLVERS["Teapot Marker"] = function(generation) return solveKeyboardCode("MRMARKERMAKER", 1, generation) end CHALLENGE_SOLVERS["Difficulty Chart Marker"] = function(generation) return solveKeyboardCode("DIFFICULTY", 1, generation) end CHALLENGE_SOLVERS["Cough Drop Marker"] = function(generation) return solveKeyboardCode("HILLROCK", 3, generation) end CHALLENGE_SOLVERS["Explode Marker"] = function() local model = workspace:FindFirstChild("ExplodeButton") local button = model and model:FindFirstChild("Button", true) return compatibleClick(button and button:FindFirstChildWhichIsA("ClickDetector", true)) end CHALLENGE_SOLVERS["Winning Marker"] = function(generation) -- Skip the clone search maze: select the one head that satisfies the -- official LocalScript predicate, then touch the final marker. local clones = workspace:FindFirstChild("Evil Developer Clones") local winningHead = nil if clones then for _, descendant in ipairs(clones:GetDescendants()) do if descendant:IsA("BasePart") and descendant.Name == "Head" then local face = descendant:FindFirstChild("face") or descendant:FindFirstChildWhichIsA("Decal") if face and face.Texture == "rbxassetid://616395480" then winningHead = descendant break end end end end if not winningHead then return false, "winning clone predicate unavailable" end setStatus("Winning challenge\nApplying the exact clone predicate...") local cloneTouched, cloneReason = touchPartOnce(winningHead, generation) if not cloneTouched then return false, "winning clone: " .. tostring(cloneReason) end local faceReady = select(1, waitPredicate(3, generation, function() local character = LocalPlayer.Character local head = character and character:FindFirstChild("Head") local face = head and (head:FindFirstChild("face") or head:FindFirstChildWhichIsA("Decal")) return face and face.Texture == "rbxassetid://616395480" end)) if not faceReady then return false, "winning face predicate did not activate" end local windowOk, windowReason = waitForClientCollectWindow(generation) if not windowOk then return false, windowReason end local objectValue = Markers and Markers:FindFirstChild("Winning Marker") local model = objectValue and objectValue.Value local colorOne = model and model:FindFirstChild("Color 1") local markerTouched, markerReason = touchPartOnce(colorOne, generation) if not markerTouched then return false, "winning marker: " .. tostring(markerReason) end local confirmed = select(1, waitPredicate(CONFIRM_TIMEOUT_SECONDS, generation, function() refreshOwned() return state.owned["Winning Marker"] == true end)) return confirmed, confirmed and "winning clone predicate + final touch + server ownership" or "Winning ownership timeout" end -- CATZO_ROOM_ROUTE_V43_BEGIN -- Catzo must not use the generic direct-first collector. Let the game's chat -- command move the character, then approach normally and wait for real ownership. local function collectCatzoMarker(objectValue, generation, progressText) local markerName = "Catzo Marker" if not active(generation) then return false, "stopped" end if game.PlaceId ~= PLACE_IDS.MAINLAND then return false, "Catzo requires Mainland" end if not objectValue or objectValue.Name ~= markerName then return false, "Catzo ObjectValue unavailable" end if state.owned[markerName] then return true, "already owned" end local character = LocalPlayer.Character local root = character and character:FindFirstChild("HumanoidRootPart") local humanoid = character and character:FindFirstChildOfClass("Humanoid") if not root or not humanoid or humanoid.Health <= 0 then return false, "Catzo character unavailable" end if state.collectionContactCleanup then state.collectionContactCleanup() end -- Preserve game-driven room entry instead of restoring a pre-command pivot. state.restorePivot = nil state.challengeRuns += 1 local startedAt, origin = os.clock(), root.Position local sender, moving local function phase(name, message) state.catzoPhase = name setStatus((progressText or markerName) .. "\nCatzo: " .. message) end local function confirmed() if state.owned[markerName] then return true end local ack = state.serverAck[markerName] if ack and ack >= startedAt then state.verifiedSession[markerName], state.owned[markerName] = true, true return true end return false end local function sameCharacter() return LocalPlayer.Character == character and humanoid.Health > 0 and character:FindFirstChild("HumanoidRootPart") == root end local function targetPart() local model = objectValue.Value if not model or not model:IsDescendantOf(workspace) then return nil end local part = model:FindFirstChild("Color 1") if not part or not part:IsA("BasePart") then return nil end local gate = model:FindFirstChild("ThisMustBeGone") if gate and gate:IsA("ObjectValue") and gate.Value and gate.Value.Parent then return nil end return part end local initialPart = targetPart() local beganNearRoom = initialPart and (root.Position - initialPart.Position).Magnitude <= 40 local function work() phase("command", "sending /e laugh once; no direct collection request") local service = game:GetService("TextChatService") local channels = service:FindFirstChild("TextChannels") local channel = channels and channels:FindFirstChild("RBXGeneral") local completed, submitted, sendReason = false, false, "RBXGeneral unavailable" if channel and channel:IsA("TextChannel") then sender = task.spawn(function() local ok, reply = pcall(function() return channel:SendAsync("/e laugh") end) submitted = ok sendReason = ok and "chat call completed; room entry still required" or tostring(reply) completed = true end) local deadline = os.clock() + 6 while not completed and active(generation) and os.clock() < deadline do task.wait(0.1) end if not completed then pcall(task.cancel, sender) sendReason = "chat timeout; no duplicate legacy submission" end sender = nil end if not active(generation) then return false, "stopped" end -- A successful SendAsync call is NOT evidence that the command was accepted. -- Never fall through to Get or force a teleport if chat delivery fails. phase("entry", "waiting for game room entry; type /e laugh in chat if needed") local deadline, nearSince, part = os.clock() + 12, nil, nil repeat if not active(generation) then return false, "stopped" end refreshOwned() if not active(generation) then return false, "stopped" end if confirmed() then return true, "Catzo ownership confirmed after command" end if not sameCharacter() then return false, "Catzo character changed during entry" end part = targetPart() local near = part and (root.Position - part.Position).Magnitude <= 40 local arrived = near and ((root.Position - origin).Magnitude >= 6 or (beganNearRoom and submitted)) if arrived then nearSince = nearSince or os.clock() if os.clock() - nearSince >= 0.75 then break end else nearSince = nil end task.wait(0.1) until os.clock() >= deadline if not nearSince or os.clock() - nearSince < 0.75 or not part then return false, "Catzo room entry unconfirmed: " .. sendReason .. "; no direct fallback" end if not active(generation) or not sameCharacter() then return false, "stopped or character changed" end phase("walk", "room arrival observed; walking to marker, waiting for ownership") moving = true humanoid:MoveTo(part.Position) deadline = os.clock() + 12 repeat if not active(generation) then return false, "stopped" end refreshOwned() if not active(generation) then return false, "stopped" end if confirmed() then return true, "Catzo room entry + native touch ownership" end if not sameCharacter() then return false, "Catzo character changed during approach" end local currentPart = targetPart() if currentPart ~= part or (root.Position - part.Position).Magnitude > 60 then return false, "Catzo target/character relocated; approach released" end task.wait(0.2) until os.clock() >= deadline return false, "Catzo native touch unconfirmed; no manual Get retry" end local ran, ok, reason = xpcall(work, debug.traceback) if sender then pcall(task.cancel, sender) end if moving and sameCharacter() then pcall(function() humanoid:MoveTo(root.Position) end) end if not ran then ok, reason = false, "Catzo route error: " .. tostring(ok) end state.catzoPhase = ok and "confirmed" or "unconfirmed" return ok, reason end CHALLENGE_SOLVERS["Catzo Marker"] = function(generation) return collectCatzoMarker(Markers and Markers:FindFirstChild("Catzo Marker"), generation, "Catzo Marker") end -- CATZO_ROOM_ROUTE_V43_END CHALLENGE_SOLVERS["Forgorker"] = function() return sendChallengeChat(utf8.char(0x1F480)) end CHALLENGE_SOLVERS["Wild Marker"] = function() return sendChallengeChat("i love wild card") end CHALLENGE_SOLVERS["Chalk Marker"] = function(generation) local beta = dreamValue("Beta FTM") local hitboxes = beta and beta:FindFirstChild("Hopscotch hitboxes") if not hitboxes then return false, "Beta FTM hopscotch unavailable" end for index = 1, 10 do local hitbox = hitboxes:FindFirstChild(tostring(index)) local part = firstBasePart(hitbox) local ok, reason = touchPartOnce(part, generation) if not ok then return false, "hopscotch " .. tostring(index) .. ": " .. tostring(reason) end task.wait(0.18) end local marker = beta:FindFirstChild("Chalk Marker") return touchPartOnce(marker and marker:FindFirstChild("Color 1"), generation) end CHALLENGE_SOLVERS["Whale Marker"] = function(generation) local depths = dreamValue("The Depths") local Bubble = depths and depths:FindFirstChild("Bubble") local Rings = depths and depths:FindFirstChild("whale rings") if not Bubble or not Rings then return false, "Whale challenge unavailable" end local ok, reason = touchPartOnce(firstBasePart(Bubble), generation) if not ok then return false, reason end for _, ring in ipairs(Rings:GetChildren()) do local touchMe = ring:FindFirstChild("touchme", true) if touchMe and touchMe:IsA("BasePart") then local ringOk, ringReason = touchPartOnce(touchMe, generation) if not ringOk then return false, ringReason end end end local marker = depths:FindFirstChild("Whale Marker") return touchPartOnce(marker and marker:FindFirstChild("Color 1"), generation) end CHALLENGE_SOLVERS["Jellyfish Marker"] = function(generation) local depths = dreamValue("The Depths") local Circles = depths and depths:FindFirstChild("Jellyfish circles") local solution = { 4, 2, 3, 4, 5, 1, 2, 5, 3, 1, 2, 3, 4, 1, 5 } if not Circles then return false, "Jellyfish circles unavailable" end for index, count in ipairs(solution) do local circle = Circles:FindFirstChild(tostring(index)) local clickDetector = circle and circle:FindFirstChildWhichIsA("ClickDetector", true) for _ = 1, count do if not active(generation) then return false, "stopped" end local clicked, reason = compatibleClick(clickDetector) if not clicked then return false, "circle " .. tostring(index) .. ": " .. tostring(reason) end task.wait(0.12) end end if not active(generation) then return false, "stopped" end return true, "Jellyfish sequence complete" end CHALLENGE_SOLVERS["Shape Marker"] = function(generation) local mess = dreamValue("The Mess") local Shapes = mess and mess:FindFirstChild("ShapesForShapeMarker") if not Shapes then return false, "Shape puzzle unavailable" end local count = 0 for _, shape in ipairs(Shapes:GetChildren()) do local hitbox = shape:FindFirstChild("Hitbox", true) if hitbox and hitbox:IsA("BasePart") then local ok, reason = touchPartOnce(hitbox, generation) if not ok then return false, reason end count += 1 end end return count >= 7, "Shape hitboxes: " .. tostring(count) end CHALLENGE_SOLVERS["Spaghetti Marker"] = function(generation) local unspaghetti = workspace:FindFirstChild("Unspaghetti Marker") local promptA = unspaghetti and unspaghetti:FindFirstChild("Color 4", true) promptA = promptA and promptA:FindFirstChildWhichIsA("ProximityPrompt", true) local ok, reason = promptOnce(promptA) if not ok then return false, reason end local mess = dreamValue("The Mess") local place = mess and mess:FindFirstChild("UnspaghettiPlace") local promptB = place and place:FindFirstChild("Prox", true) if promptB and not promptB:IsA("ProximityPrompt") then promptB = promptB:FindFirstChildWhichIsA("ProximityPrompt", true) end ok, reason = promptOnce(promptB) if not ok then return false, reason end local ready = waitPredicate(12, generation, function() local objectValue = Markers and Markers:FindFirstChild("Spaghetti Marker") local model = objectValue and objectValue:IsA("ObjectValue") and objectValue.Value if model and model:IsDescendantOf(workspace) then return true end model = workspace:FindFirstChild("Spaghetti Marker", true) return model ~= nil and model:IsDescendantOf(workspace) end) return ready, ready and "Spaghetti materialized" or "Spaghetti timer incomplete" end local CHALLENGE_SOLVER_PLACE_IDS = { ["Noob Marker"] = { [PLACE_IDS.MAINLAND] = true }, ["Big Orange Marker"] = { [PLACE_IDS.MAINLAND] = true }, ["Jalapeño Marker"] = { [PLACE_IDS.MAINLAND] = true }, ["Viridian Marker"] = { [PLACE_IDS.MAINLAND] = true }, ["Vitellary Marker"] = { [PLACE_IDS.MAINLAND] = true }, ["Evil Marker"] = { [PLACE_IDS.MAINLAND] = true }, ["Teapot Marker"] = { [PLACE_IDS.MAINLAND] = true }, ["Cough Drop Marker"] = { [PLACE_IDS.MAINLAND] = true }, ["Explode Marker"] = { [PLACE_IDS.MAINLAND] = true }, ["Winning Marker"] = { [PLACE_IDS.MAINLAND] = true }, ["Catzo Marker"] = { [PLACE_IDS.MAINLAND] = true }, ["Forgorker"] = { [PLACE_IDS.MAINLAND] = true }, ["Wild Marker"] = { [PLACE_IDS.MAINLAND] = true }, ["Difficulty Chart Marker"] = { [PLACE_IDS.DC] = true }, ["Chalk Marker"] = { [PLACE_IDS.SCENTED] = true }, ["Whale Marker"] = { [PLACE_IDS.SCENTED] = true }, ["Jellyfish Marker"] = { [PLACE_IDS.SCENTED] = true }, ["Shape Marker"] = { [PLACE_IDS.SCENTED] = true }, ["Spaghetti Marker"] = { [PLACE_IDS.SCENTED] = true }, } -- SPECIFIC_TARGETS_V41_BEGIN CHALLENGE_SOLVER_PLACE_IDS["Tip Jar Marker"] = { [PLACE_IDS.WASHABLE] = true } CHALLENGE_SOLVERS["Tip Jar Marker"] = function(generation) local target = ReplicatedStorage:FindFirstChild("Tip Jar Marker") or workspace:FindFirstChild("Tip Jar Marker") if target and target:IsDescendantOf(workspace) then return true, "Tip Jar materialized" end local jar = workspace:FindFirstChild("JarForTips") local proxPart = jar and jar:FindFirstChild("ProxPart") local prompt = proxPart and proxPart:FindFirstChildWhichIsA("ProximityPrompt") if not prompt then return false, "Tip Jar prompt unavailable" end if not prompt.Enabled then local coins = workspace:FindFirstChild("Coins") if not coins then local dialog = PackagedEvents and PackagedEvents:FindFirstChild("Dialog") if not dialog or not dialog:IsA("BindableEvent") then return false, "Merchant dialog not ready" end -- Observed Merchant LocalScript entry; only the silver coin is needed, -- not the ten gold coins for the separate Merchant badge. if not active(generation) then return false, "stopped" end dialog:Fire("merchantmarkerstart") local ready, why = waitPredicate(4, generation, function() coins = workspace:FindFirstChild("Coins") return coins ~= nil end) if not ready then return false, "Merchant coins: " .. tostring(why) end end local coin = coins:FindFirstChild("TipJarCoin") if not coin or not coin:IsA("BasePart") then return false, "silver TipJarCoin unavailable" end local touched, why = touchPartOnce(coin, generation) if not touched then return false, why end local enabled, whyEnabled = waitPredicate(4, generation, function() return prompt.Enabled end) if not enabled then return false, "silver coin not confirmed: " .. tostring(whyEnabled) end end if not active(generation) then return false, "stopped" end local offered, why = promptOnce(prompt) if not offered then return false, why end local ready, whyReady = waitPredicate(5, generation, function() local ov = Markers and Markers:FindFirstChild("Tip Jar Marker") local model = ov and ov.Value return model ~= nil and model:IsDescendantOf(workspace) end) return ready, ready and "silver coin offered; Tip Jar materialized" or tostring(whyReady) end -- SPECIFIC_TARGETS_V41_END local function solverAllowedHere(markerName) local places = CHALLENGE_SOLVER_PLACE_IDS[markerName] return places and places[game.PlaceId] == true or false end local function runChallengeSolver(markerName, generation) local solver = CHALLENGE_SOLVERS[markerName] if not solver then return false, "no dedicated challenge handler" end state.challengeRuns += 1 setStatus("Challenge fallback\n" .. markerName .. "\nDirect attempt unconfirmed; solver timeout 60s") local completed, result = false, nil local worker = task.spawn(function() result = table.pack(pcall(solver, generation)) completed = true end) local deadline = os.clock() + 60 while not completed and active(generation) and os.clock() < deadline do task.wait(0.1) end if not completed then pcall(task.cancel, worker) return false, active(generation) and "challenge timeout (60s)" or "stopped" end if not active(generation) then return false, "stopped" end if not result[1] then return false, "challenge error: " .. tostring(result[2]) end return result[2] == true, tostring(result[3]) end local function collectionValidatorCFrame(_markerName, _colorOne) -- No stale OGpos pinning: nil makes the hold follow the live part each frame. -- The inspected client checks OGpos only for already-owned feedback. return nil end -- KILLBRICK_PREREQUISITE_V44_BEGIN local function prepareKillbrick(generation) if game.PlaceId ~= PLACE_IDS.DC then return false, "Killbrick requires DC" end local barrier = workspace:FindFirstChild("canttouchthis") local trigger = workspace:FindFirstChild("killbrickhitbox") local checkpoints = workspace:FindFirstChild("checkpoints") local checkpoint = checkpoints and checkpoints:FindFirstChild("checkpoint1") if not barrier or not trigger or not checkpoint then return false, "Killbrick prerequisite objects unavailable" end local function opened() return barrier.CanTouch == false and barrier.CanCollide == false end if opened() then return true, "Killbrick barrier already open" end -- Killbricks.trollTouch has two stages. Stage one resets CanTouch after 5s; -- stage two opens canttouchthis after 1s. Never edit these fields ourselves. for stage = 1, 2 do if not active(generation) then return false, "stopped" end if opened() then return true, "Killbrick barrier opened" end setStatus("Killbrick prerequisite\nTrap stage " .. stage .. "/2; waiting for native callback") local ready = select(1, waitPredicate(7, generation, function() return opened() or trigger.CanTouch == true end)) if not ready then return false, "Killbrick trap reset timeout" end if opened() then return true, "Killbrick barrier opened" end if not active(generation) then return false, "stopped" end local character, root = characterRoot(2) if not root then return false, "Killbrick character unavailable" end root.AssemblyLinearVelocity, root.AssemblyAngularVelocity = Vector3.zero, Vector3.zero root.CFrame = trigger.CFrame local fired = select(1, waitPredicate(1.5, generation, function() return opened() or trigger.CanTouch == false end)) if not active(generation) then return false, "stopped" end if not fired then return false, "Killbrick trap contact not observed" end local currentCharacter, currentRoot = characterRoot(0) if currentCharacter ~= character or currentRoot ~= root then return false, "Killbrick character changed" end -- Leave the trigger while its timer runs; do not pin the player over a -- checkpoint teleport or generate synthetic Touched pulses. root.CFrame = checkpoint.CFrame + Vector3.new(0, 3, 0) local cleared = select(1, waitPredicate(1.4, generation, opened)) if cleared then return true, "Killbrick two-stage barrier confirmed open" end end return false, "Killbrick barrier still active; direct collection withheld" end CHALLENGE_SOLVERS["Killbrick Marker"] = prepareKillbrick CHALLENGE_SOLVER_PLACE_IDS["Killbrick Marker"] = { [PLACE_IDS.DC] = true } -- KILLBRICK_PREREQUISITE_V44_END local function gravityInFlight() local scripts = LocalPlayer:FindFirstChild("PlayerScripts") local scriptObject = scripts and scripts:FindFirstChild("Virdian") local inFlight = scriptObject and scriptObject:FindFirstChild("InFlight") if not inFlight or not inFlight:IsA("BindableFunction") then state.dependencyErrors.InFlight = "gravity status callback unavailable" return nil end local ok, value = api:_BoundedCall(inFlight, "Virdian.InFlight", 0.2, function() return inFlight:Invoke() end) if not ok then state.dependencyErrors.InFlight = tostring(value) return nil end if type(value) ~= "boolean" then state.dependencyErrors.InFlight = "gravity status not boolean" return nil end state.dependencyErrors.InFlight = nil return value end local function normalizeViridianGravity(generation) local solar = workspace:FindFirstChild("Solar System") local warp = solar and solar:FindFirstChild("viridianwarp") local base = warp and warp:FindFirstChild("Base") local prompt = base and base:FindFirstChild("prox") local fireSignal = executorFunction("firesignal") if not prompt or not prompt:IsA("ProximityPrompt") or not fireSignal then return false, "Viridian reset callback unavailable" end local fired, fireReason = pcall(fireSignal, prompt.Triggered, LocalPlayer) if not fired then return false, "Viridian reset: " .. tostring(fireReason) end local resetStartedAt = os.clock() local sawFlight = false local ready = select(1, waitPredicate(9, generation, function() local inFlight = gravityInFlight() sawFlight = sawFlight or inFlight return inFlight == false and os.clock() - resetStartedAt >= 3.25 end)) return ready, ready and "gravity reset A" or "gravity reset timeout" end local function findViridianGravitySwitch(targetSet, requiredGravity) local functionality = workspace:FindFirstChild("viridianfunctionality") local switches = functionality and functionality:FindFirstChild("switches") if not switches then return nil, nil end for _, candidate in ipairs(switches:GetChildren()) do local switchSet = candidate:FindFirstChild("SwitchSet") local switchGravity = candidate:FindFirstChild("SwitchGrav") local prompt = candidate:FindFirstChildWhichIsA("ProximityPrompt", true) if switchSet and switchGravity and prompt and switchSet.Value == targetSet and switchGravity.Value == requiredGravity then return candidate, prompt end end return nil, nil end -- VIRIDIAN_ACTIVATOR_ROUTE_V44_BEGIN local function planViridianSwitches(targetSet) local functionality = workspace:FindFirstChild("viridianfunctionality") local folder = functionality and functionality:FindFirstChild("switches") if not folder then return nil, "gravity switches unavailable" end local switches = folder:GetChildren() local queue = { { gravity = "A", last = nil, path = {} } } local visited = {} local head = 1 while head <= #queue do local current = queue[head] head += 1 for _, switch in ipairs(switches) do local from = switch:FindFirstChild("SwitchGrav") local to = switch:FindFirstChild("SwitchSet") local activator = switch:FindFirstChild("Activator") local prompt = switch:FindFirstChildWhichIsA("ProximityPrompt", true) if not visited[switch] and from and to and prompt and from.Value == current.gravity and (not activator or (activator.Value ~= nil and activator.Value == current.last)) then visited[switch] = true local path = table.clone(current.path) table.insert(path, switch) if to.Value == targetSet and switch:FindFirstChild("Legit") then return path end table.insert(queue, {gravity=to.Value, last=switch, path=path}) end end end return nil, "no reachable legitimate gravity route to " .. tostring(targetSet) end local function triggerViridianFinalSwitch(targetSet, generation) local route, routeReason = planViridianSwitches(targetSet) if not route then return false, routeReason end local fireSignal = executorFunction("firesignal") if not fireSignal then return false, "gravity prompt callback unavailable" end for index, switch in ipairs(route) do if not active(generation) then return false, "stopped" end state.gravityStep = tostring(index) .. "/" .. tostring(#route) setStatus("Gravity prerequisite\n" .. state.gravityStep .. " | " .. switch.SwitchGrav.Value .. " -> " .. switch.SwitchSet.Value) local prompt = switch:FindFirstChildWhichIsA("ProximityPrompt", true) local ready = select(1, waitPredicate(8, generation, function() return gravityInFlight() == false and prompt and prompt.Enabled == true end)) if not ready then return false, "gravity switch not enabled after preceding activator" end if not active(generation) then return false, "stopped" end local button = prompt.Parent if not button or not button:IsA("BasePart") then return false, "gravity switch host unavailable" end local positioned, why = holdRootOnPart(button, 0.22, generation, button.CFrame * CFrame.new(0, 3, 0)) if not positioned then return false, why end if not active(generation) or not prompt.Enabled then return false, "gravity switch changed before activation" end local fired, fireReason = pcall(fireSignal, prompt.Triggered, LocalPlayer) if not fired then return false, "gravity switch error: " .. tostring(fireReason) end local startedAt = os.clock() local settled = select(1, waitPredicate(9, generation, function() -- InFlight spans the two-second tween PLUS the delayed three-second -- release. nil/error/missing callback is never treated as settled. return os.clock() - startedAt >= 3.25 and gravityInFlight() == false end)) if not settled then return false, "gravity tween/release not confirmed" end end return true, "gravity activator chain to " .. targetSet .. " confirmed" end -- VIRIDIAN_ACTIVATOR_ROUTE_V44_END local function collectViridianGoal(markerName, targetSet, generation) local objectValue = Markers and Markers:FindFirstChild(markerName) local model = objectValue and objectValue.Value local colorOne = model and model:FindFirstChild("Color 1") if not colorOne or not colorOne:IsA("BasePart") then return false, markerName .. " live Color 1 unavailable" end local reset, resetReason = normalizeViridianGravity(generation) if not reset then return false, resetReason end local startPosition = colorOne.Position local switched, switchReason = triggerViridianFinalSwitch(targetSet, generation) if not switched then return false, switchReason end local original = colorOne:GetAttribute("OGpos") local goalReady = select(1, waitPredicate(8, generation, function() if not colorOne.Parent or not colorOne.CanTouch then return false end if typeof(original) == "Vector3" then return (colorOne.Position - original).Magnitude < 2.5 end return (colorOne.Position - startPosition).Magnitude > 15 end)) if not goalReady then return false, markerName .. " final gravity goal did not materialize" end local windowOk, windowReason = waitForClientCollectWindow(generation) if not windowOk then return false, windowReason end local touched, touchReason if markerName == "Vitellary Marker" then -- The old 0.28s pulse left this moving goal before its native request -- could be confirmed. Use the same settled-contact duration as V4.2. touched, touchReason = holdRootOnPart(colorOne, PRE_FIRE_HOLD_SECONDS, generation) else touched, touchReason = touchPartOnce(colorOne, generation) end if not touched then return false, touchReason end local confirmed = select(1, waitPredicate(CONFIRM_TIMEOUT_SECONDS, generation, function() refreshOwned() return state.owned[markerName] == true end)) return confirmed, confirmed and ("final gravity " .. targetSet .. " + live touch + server ownership") or (markerName .. " ownership timeout") end CHALLENGE_SOLVERS["Viridian Marker"] = function(generation) return collectViridianGoal("Viridian Marker", "E", generation) end CHALLENGE_SOLVERS["Vitellary Marker"] = function(generation) return collectViridianGoal("Vitellary Marker", "B", generation) end local function waitForBadge(badgeId, generation) local deadline = os.clock() + BADGE_CONFIRM_TIMEOUT_SECONDS repeat if not active(generation) then return false, "stopped" end local hasBadge, badgeError = badgeOwned(badgeId) if hasBadge then return true, "badge " .. tostring(badgeId) end if badgeError then state.current = "Badge check retry: " .. badgeError end task.wait(0.35) until os.clock() >= deadline return false, "badge verification timeout: " .. tostring(badgeId) end local function collectOffsiteBadge(config, generation) local existing = badgeOwned(config.badgeId) if existing then return true, "badge already owned" end local target = resolveWorkspacePath(config.path) local touchPart = firstBasePart(target) if not touchPart then return false, "offsite target unavailable" end local _, root = characterRoot(8) if not root then return false, "character unavailable" end setStatus(string.format("Offsite badge\n%s\nPhysical touch hold %.1fs", config.markerName, PRE_FIRE_HOLD_SECONDS)) local preOk, preReason = holdRootOnPart(touchPart, PRE_FIRE_HOLD_SECONDS, generation) if not preOk then return false, preReason end _, root = characterRoot(2) if not active(generation) then return false, "stopped" end if not root then return false, "character unavailable after hold" end local fireTouch = environment.firetouchinterest if type(fireTouch) ~= "function" and type(firetouchinterest) == "function" then fireTouch = firetouchinterest end if type(fireTouch) ~= "function" then return false, "firetouchinterest unavailable" end local touched, touchError = pcall(function() -- Repeat the actual contact pulse while the root is held inside the -- replicated giver. Both offsite awards were observed on server Touched -- handlers, so this keeps the physical server contact authoritative. for _ = 1, math.max(1, TOUCH_PULSE_COUNT) do if not active(generation) then break end root.CFrame = touchPart.CFrame fireTouch(root, touchPart, 0) task.wait(TOUCH_PULSE_INTERVAL_SECONDS) fireTouch(root, touchPart, 1) end end) if not touched then return false, "firetouchinterest failed: " .. tostring(touchError) end setStatus(string.format("Offsite badge\n%s\nTouch sent; holding %.1fs", config.markerName, POST_FIRE_HOLD_SECONDS)) local postOk, postReason = holdRootOnPart(touchPart, POST_FIRE_HOLD_SECONDS, generation) if not postOk then return false, postReason end return waitForBadge(config.badgeId, generation) end local function findLaserPistol() local character = LocalPlayer.Character local backpack = LocalPlayer:FindFirstChild("Backpack") local Tool = character and character:FindFirstChild("LaserPistol") if not Tool and backpack then Tool = backpack:FindFirstChild("LaserPistol") end if Tool and Tool:IsA("Tool") then return Tool end return nil end local function playEnded(Play, observedActive) if not Play or not Play.Parent then return observedActive, observedActive end if Play:IsA("BoolValue") then if Play.Value then observedActive = true elseif observedActive then return true, observedActive end elseif Play:IsA("IntValue") or Play:IsA("NumberValue") then if Play.Value > 0 then observedActive = true elseif observedActive then return true, observedActive end elseif Play:IsA("StringValue") then local value = string.lower(Play.Value) if value == "play" or value == "playing" or value == "true" then observedActive = true elseif observedActive and (value == "end" or value == "ended" or value == "done" or value == "false") then return true, observedActive end elseif Play:IsA("Sound") then if Play.IsPlaying then observedActive = true elseif observedActive then return true, observedActive end else observedActive = true end return false, observedActive end local function darknessDialogProgressButton() local packagedGui = PlayerGui:FindFirstChild("PackagedGui") local dialog = packagedGui and packagedGui:FindFirstChild("Dialog") local outline = dialog and dialog:FindFirstChild("Outline") local progress = outline and outline:FindFirstChild("Progress") if progress and progress:IsA("GuiButton") then return progress end return nil end local function advanceDarknessDialogUntil(seconds, generation, predicate) local deadline = os.clock() + seconds local clicks = 0 repeat if not active(generation) then return false, "stopped", clicks end local predicateOk, complete = pcall(predicate) if predicateOk and complete then return true, "dialog predicate", clicks end local progress = darknessDialogProgressButton() if progress and guiButtonVisible(progress) then local clicked = activateGuiButton(progress) if clicked then clicks += 1 end end task.wait(0.38) until os.clock() >= deadline return false, "dialog predicate timeout", clicks end local function darknessArenaCenter() local arena = workspace:FindFirstChild("OH NO WATCH OUT MARKER OH GOD") if not arena then return nil end local center = arena:FindFirstChild("Center", true) if center and center:IsA("BasePart") then return center.Position end -- Derive a center from actual horizontal arena geometry, never old place coordinates. local largest, area = nil, 0 for _, part in ipairs(arena:GetDescendants()) do if part:IsA("BasePart") and part.CanCollide and part.CFrame.UpVector.Y > 0.9 then local candidateArea = part.Size.X * part.Size.Z if part.Size.Y <= math.min(part.Size.X, part.Size.Z) * 0.6 and candidateArea > area then largest, area = part, candidateArea end end end return largest and largest.Position or nil end local function darknessAimPart(boss) local cap = boss and boss:FindFirstChild("ummm") local colorOne = cap and cap:FindFirstChild("Color 1") return (colorOne and colorOne:IsA("BasePart") and colorOne) or (boss and boss:FindFirstChild("Head", true)) or (boss and boss:FindFirstChild("HumanoidRootPart", true)) end local function darknessQueryParams(character, boss) local downFilter, losFilter = {}, {} -- pairs intentionally tolerates absent optional folders/character (ipairs stops at a hole). for _, instance in pairs({ character, workspace:FindFirstChild("pew"), workspace:FindFirstChild("throws"), workspace:FindFirstChild("indicators"), workspace:FindFirstChild("fly") }) do table.insert(downFilter, instance) table.insert(losFilter, instance) end if boss then table.insert(downFilter, boss) end local down = RaycastParams.new() down.FilterType = Enum.RaycastFilterType.Exclude down.FilterDescendantsInstances = downFilter down.IgnoreWater = true local los = RaycastParams.new() los.FilterType = Enum.RaycastFilterType.Exclude los.FilterDescendantsInstances = losFilter los.IgnoreWater = true local overlap = OverlapParams.new() overlap.FilterType = Enum.RaycastFilterType.Exclude overlap.FilterDescendantsInstances = downFilter return down, los, overlap end local function darknessFloorAt(position, arena, params, referenceY) local first = nil -- All four edges must have arena floor under them, not only the root center. for _, offset in ipairs({ Vector3.zero, Vector3.new(3, 0, 0), Vector3.new(-3, 0, 0), Vector3.new(0, 0, 3), Vector3.new(0, 0, -3) }) do -- Start below the roof (live arena roof begins at Y31, center at Y11.55). local origin = Vector3.new(position.X + offset.X, referenceY + 6, position.Z + offset.Z) local hit = workspace:Raycast(origin, Vector3.new(0, -180, 0), params) if not hit or hit.Position.Y > referenceY + 6 or hit.Normal.Y < 0.6 or not hit.Instance.CanCollide or not hit.Instance:IsDescendantOf(arena) then return nil end if first and math.abs(hit.Position.Y - first.Position.Y) > 4 then return nil end first = first or hit end return first end local function darknessHoverCandidate(point, aim, arena, down, los, overlap, referenceY, height, boss) local floorHit = darknessFloorAt(point, arena, down, referenceY) if not floorHit then return nil end local position = Vector3.new(point.X, floorHit.Position.Y + height, point.Z) for _, part in ipairs(workspace:GetPartBoundsInBox(CFrame.new(position), Vector3.new(4, 6, 4), overlap)) do if part.CanCollide then return nil end end local lineHit = workspace:Raycast(position, aim.Position - position, los) -- A nil hit is an unobstructed ray (e.g. a non-queryable boss), not failed LOS. if lineHit and not lineHit.Instance:IsDescendantOf(boss or aim.Parent) then return nil end local facing = Vector3.new(aim.Position.X, position.Y, aim.Position.Z) if (facing - position).Magnitude < 0.1 then facing = position + Vector3.xAxis end return CFrame.lookAt(position, facing) end local function darknessCenterFallback(aim, root, stallLane) local arena = workspace:FindFirstChild("OH NO WATCH OUT MARKER OH GOD") local center = darknessArenaCenter() if not aim or not arena or not center then return nil, false end local boss = workspace:FindFirstChild("Dark Markery") or aim.Parent local down, los, overlap = darknessQueryParams(root and root.Parent, boss) local height = 12 + math.clamp(stallLane or 0, 0, 2) * 2 local candidate = darknessHoverCandidate(center, aim, arena, down, los, overlap, center.Y, height, boss) return candidate, candidate ~= nil end local function darknessFiringCFrame(boss, character, root, stallLane) local aim = darknessAimPart(boss) local arena = workspace:FindFirstChild("OH NO WATCH OUT MARKER OH GOD") local center = darknessArenaCenter() if not aim or not aim:IsA("BasePart") or not arena or not center then return nil, false, "aim/arena geometry missing" end local down, los, overlap = darknessQueryParams(character, boss) local height = 12 + math.clamp(stallLane or 0, 0, 2) * 2 local referenceY = center.Y local preferredAngle = os.clock() * 0.65 + (stallLane or 0) * math.pi * 0.65 local best, bestScore = nil, nil for _, radius in ipairs({ 18, 14, DARKNESS_STANDOFF_DISTANCE }) do for index = 0, 23 do local angle = preferredAngle + (2 * math.pi * index) / 24 local point = aim.Position + Vector3.new(math.cos(angle) * radius, 0, math.sin(angle) * radius) local angularCost = math.min(index, 24 - index) * 2 local movementCost = root and (point - root.Position).Magnitude * 0.04 or 0 local score = angularCost + math.abs(radius - 18) * 0.8 + movementCost if not bestScore or score < bestScore then local candidate = darknessHoverCandidate(point, aim, arena, down, los, overlap, referenceY, height, boss) if candidate then best, bestScore = candidate, score end end end end if best then return best, true, "hover 12-16 studs above verified arena floor; LOS clear" end local fallback, inside = darknessCenterFallback(aim, root, stallLane) return fallback, inside, inside and "geometry-verified center hover" or "no supported interior hover position" end local function darknessStartHover(generation, deadline) if state.darknessHoverCleanup then state.darknessHoverCleanup() end local controller = { ended = false } local connection, character, root, humanoid, target, aim local previousAutoRotate, camera, previousCameraCFrame local function clearTarget() if humanoid and previousAutoRotate ~= nil then pcall(function() humanoid.AutoRotate = previousAutoRotate end) end if root and root.Parent then pcall(function() root.AssemblyLinearVelocity = Vector3.zero root.AssemblyAngularVelocity = Vector3.zero end) end if camera and previousCameraCFrame and workspace.CurrentCamera == camera then pcall(function() camera.CFrame = previousCameraCFrame end) end character, root, humanoid, target, aim = nil, nil, nil, nil, nil previousAutoRotate, camera, previousCameraCFrame = nil, nil, nil state.darknessInsideArena = false end local cleanup cleanup = function() if controller.ended then return end controller.ended = true if connection then connection:Disconnect(); connection = nil end clearTarget() if state.darknessHoverCleanup == cleanup then state.darknessHoverCleanup = nil end end controller.stop = cleanup controller.clearTarget = clearTarget function controller:setTarget(cf, nextCharacter, nextRoot, nextHumanoid, nextAim) if self.ended or not cf or not nextRoot or not nextHumanoid or nextHumanoid.Health <= 0 then return false end if root ~= nextRoot then clearTarget() character, root, humanoid = nextCharacter, nextRoot, nextHumanoid previousAutoRotate = humanoid.AutoRotate camera = workspace.CurrentCamera previousCameraCFrame = camera and camera.CFrame end target, aim = cf, nextAim state.darknessInsideArena = true return true end state.darknessHoverCleanup = cleanup -- Keep the selected airborne transform through every physics step; resampling -- and firing have their own cadence and cannot drop the character between shots. connection = RunService.PreSimulation:Connect(function() if not active(generation) or os.clock() >= deadline then cleanup(); return end if not target then return end if LocalPlayer.Character ~= character or not root.Parent or not humanoid.Parent or humanoid.Health <= 0 then cleanup(); return end local ok = pcall(function() humanoid.AutoRotate = false root.AssemblyLinearVelocity = Vector3.zero root.AssemblyAngularVelocity = Vector3.zero root.CFrame = target if camera and camera == workspace.CurrentCamera and aim and aim.Parent then camera.CFrame = CFrame.lookAt(target.Position + Vector3.new(0, 2, 0), aim.Position) end end) if not ok then cleanup() end end) return controller end local function collectDarknessBadge(generation) local alreadyOwned = badgeOwned(DARKNESS_BADGE_ID) if alreadyOwned then return true, "badge already owned" end state.darknessShots = 0 state.darknessHits = 0 state.darknessDamage = 0 state.darknessInsideArena = false local Play = ReplicatedStorage:FindFirstChild("Play") local Finish = ReplicatedStorage:FindFirstChild("Finish") local Dialogue = ReplicatedStorage:FindFirstChild("Dialogue") local finishObserved = LocalPlayer:GetAttribute("AreYaWinning") == true local hover = nil local finishConnection = nil if Finish and Finish:IsA("RemoteEvent") then finishConnection = Finish.OnClientEvent:Connect(function() finishObserved = true if hover then hover:stop() end end) end local function done(ok, reason) if hover then hover:stop() end if finishConnection then finishConnection:Disconnect() finishConnection = nil end return ok, reason end local function playIsActive() return Play and Play:IsA("BoolValue") and Play.Value == true end if not playIsActive() then setStatus("Darkness\nAdvancing the real intro dialog before combat...") local progress = darknessDialogProgressButton() if (not progress or not guiButtonVisible(progress)) and Dialogue and Dialogue:IsA("RemoteEvent") then pcall(function() Dialogue:FireServer() end) end local started, startReason, introClicks = advanceDarknessDialogUntil(20, generation, playIsActive) if not started then return done(false, tostring(startReason) .. "; intro clicks: " .. tostring(introClicks)) end end local boss = workspace:FindFirstChild("Dark Markery") local Tool = findLaserPistol() local setupDeadline = os.clock() + 25 repeat if not active(generation) then return done(false, "stopped") end boss = workspace:FindFirstChild("Dark Markery") or boss Tool = findLaserPistol() or Tool if boss and Tool then break end task.wait(0.2) until os.clock() >= setupDeadline if not boss then return done(false, "Dark Markery unavailable") end if not Tool then return done(false, "LaserPistol unavailable in Character/Backpack") end local fightDeadline = os.clock() + DARKNESS_FIGHT_TIMEOUT_SECONDS hover = darknessStartHover(generation, fightDeadline) local nextPositionSample = 0 local nextStatusUpdate = 0 local nextShot = 0 local lastDamageAt = os.clock() local lastHealth = nil local lastPhase = nil local fightEndReason = "Finish event timeout" while active(generation) and os.clock() < fightDeadline do if finishObserved or LocalPlayer:GetAttribute("AreYaWinning") == true then finishObserved = true fightEndReason = "Finish.OnClientEvent" break end boss = workspace:FindFirstChild("Dark Markery") if not boss then task.wait(0.1) continue end local bossAim = darknessAimPart(boss) local Humanoid = boss:FindFirstChildWhichIsA("Humanoid", true) local phaseValue = ReplicatedStorage:FindFirstChild("Phase") local phase = phaseValue and phaseValue.Value or 0 if Humanoid then if lastPhase == phase and lastHealth and Humanoid.Health < lastHealth then local damage = lastHealth - Humanoid.Health state.darknessDamage += damage state.darknessHits += math.max(1, math.floor((damage / 2) + 0.5)) lastDamageAt = os.clock() end lastHealth = Humanoid.Health lastPhase = phase end local character, root = characterRoot(0) local playerHumanoid = character and character:FindFirstChildOfClass("Humanoid") if not root or not playerHumanoid or playerHumanoid.Health <= 0 then return done(false, "player died/character unavailable; fight retry required") end if hover.ended then return done(false, "hover controller ended; fight retry required") end Tool = findLaserPistol() or Tool if Tool and Tool.Parent ~= character and playerHumanoid then pcall(function() playerHumanoid:EquipTool(Tool) end) end local stallLane = 0 if os.clock() - lastDamageAt >= DARKNESS_DAMAGE_STALL_SECONDS then stallLane = (math.floor((os.clock() - lastDamageAt) / DARKNESS_DAMAGE_STALL_SECONDS) % 2) + 1 end if root and bossAim and bossAim:IsA("BasePart") and (not Humanoid or Humanoid.Health > 0) and os.clock() >= nextPositionSample then nextPositionSample = os.clock() + 0.30 local firingCFrame, insideArena, positionReason = darknessFiringCFrame(boss, character, root, stallLane) state.darknessPositionReason = positionReason if firingCFrame and insideArena then hover:setTarget(firingCFrame, character, root, playerHumanoid, bossAim) else hover:clearTarget() return done(false, "no interior hover position: " .. tostring(positionReason)) end end if state.darknessInsideArena and playerHumanoid.Health > 0 and Tool and Tool.Parent == character and bossAim and bossAim:IsA("BasePart") and Humanoid and Humanoid.Health > 0 and playIsActive() and os.clock() >= nextShot then local Activation = Tool:FindFirstChild("Activation") local Shoot = Tool:FindFirstChild("Shoot") if Activation and Activation:IsA("BindableEvent") and Shoot and Shoot:IsA("RemoteEvent") and Tool:GetAttribute("Enabled") ~= false then nextShot = os.clock() + DARKNESS_SHOT_INTERVAL_SECONDS local shotOk = pcall(function() -- Exact official client route from ShootGun: local cooldown/cursor -- event followed by one Vector3 server shot. Activation:Fire(LocalPlayer:GetMouse()) Shoot:FireServer(bossAim.Position) end) if shotOk then state.darknessShots += 1 end end end if os.clock() >= nextStatusUpdate then nextStatusUpdate = os.clock() + 0.25 setStatus(string.format( "Darkness fight\nOfficial shots: %d | hits: %d | damage: %.0f | inside arena: %s\nPhase: %s | Humanoid: %s | Finish: %s", state.darknessShots, state.darknessHits, state.darknessDamage, tostring(state.darknessInsideArena), tostring(phase), tostring(Humanoid and Humanoid.Health or "missing"), tostring(finishObserved) )) end RunService.Heartbeat:Wait() end if not active(generation) then return done(false, "stopped") end if not finishObserved then return done(false, "fight did not receive Finish.OnClientEvent; no badge remote sent") end if hover then hover:stop() end setStatus("Darkness victory\nAdvancing the real victory dialog to its badge action...") local verified, verifyReason, victoryClicks = advanceDarknessDialogUntil(35, generation, function() return select(1, badgeOwned(DARKNESS_BADGE_ID)) end) if not verified then return done(false, fightEndReason .. "; " .. tostring(verifyReason) .. "; victory clicks: " .. tostring(victoryClicks)) end return done(true, string.format("%s; official shots %d; verified hits %d; damage %.0f; victory clicks %d; badge %d", fightEndReason, state.darknessShots, state.darknessHits, state.darknessDamage, victoryClicks, DARKNESS_BADGE_ID)) end local function waitForConfirmation(markerName, _leaderBefore, generation, attemptStartedAt, holdPart, holdCFrame) local deadline = os.clock() + CONFIRM_TIMEOUT_SECONDS repeat if not active(generation) then return false, "stopped" end if holdPart and holdPart.Parent then local _, root = characterRoot(0) if root then root.AssemblyLinearVelocity = Vector3.zero root.AssemblyAngularVelocity = Vector3.zero root.CFrame = holdCFrame or holdPart.CFrame end end refreshOwned() if state.owned[markerName] then return true, "ownership cache" end local acknowledgement = state.serverAck[markerName] if acknowledgement and acknowledgement >= (attemptStartedAt or 0) then state.verifiedSession[markerName] = true state.owned[markerName] = true return true, "server OnClientEvent" end task.wait(0.2) until os.clock() >= deadline return false, "confirmation timeout" end -- ADAPTIVE_CONTACT_V41_BEGIN -- PACED_CONTACT_V42: preserve the collection route, pace work and suppress duplicate requests. local pacingKey = "__COBALT_FIND_THE_MARKERS_PACING_V42" if type(environment[pacingKey]) ~= "table" then environment[pacingKey] = {} end local collectionTiming = environment[pacingKey] local function waitCollectionSlot(slot, spacing, generation) while active(generation) do local remaining = (collectionTiming[slot] or 0) - os.clock() if remaining <= 0 then collectionTiming[slot] = os.clock() + spacing return true end task.wait(math.min(0.1, remaining)) end return false, "stopped" end local function collectionAttemptProfile(attempt) local index = math.clamp(tonumber(attempt) or 1, 1, 3) -- Pulses are no longer generated by direct collection; the normal Touched -- callback gets time to finish before a single manual fallback is considered. return { name = "paced contact", hold = PRE_FIRE_HOLD_SECONDS + (index == 3 and 0.5 or 0), pulse = false } end local function collectionContact(objectValue, generation) if state.collectionContactCleanup then state.collectionContactCleanup() end local controller = { ended = false, ready = false, reason = "waiting for target", writes = 0 } local connection local deadline = os.clock() + 35 local cleanup cleanup = function() if controller.ended then return end controller.ended, controller.ready = true, false if connection then connection:Disconnect(); connection = nil end if state.collectionContactCleanup == cleanup then state.collectionContactCleanup = nil end end controller.stop = cleanup local function pause(reason) controller.reason = reason cleanup() state.collectionPauseReason = objectValue.Name .. ": " .. reason -- A relocation/death may be intentional game logic or a server correction. -- Release control instead of repeatedly undoing it or snapping to the old pivot. state.restorePivot = nil stopRun("Paused: " .. state.collectionPauseReason) end function controller:step() if self.ended then return end if not active(generation) or os.clock() >= deadline then self.reason = active(generation) and "contact deadline" or "stopped" cleanup(); return end if state.owned[objectValue.Name] then self.ready = true; return end self.ready = false local ok, err = pcall(function() local valid, reason, _, part = markerCollectability(objectValue) if not valid then self.reason = reason; return end local character = LocalPlayer.Character local humanoid = character and character:FindFirstChildOfClass("Humanoid") local root = character and character:FindFirstChild("HumanoidRootPart") if not root or not humanoid or humanoid.Health <= 0 then if self.root then pause("character changed during contact") else self.reason = "character unavailable" end return end local distance = (root.CFrame.Position - part.CFrame.Position).Magnitude if self.root and (self.root ~= root or self.part ~= part or distance > 12) then pause("target/character relocated; collection released") return end root.AssemblyLinearVelocity = Vector3.zero root.AssemblyAngularVelocity = Vector3.zero if not self.root or (distance > 0.35 and os.clock() >= (self.nextWrite or 0)) then root.CFrame = pa