--[[ codex v2 ]] local DEBUG = false local Players = game:GetService("Players") local lp = Players.LocalPlayer -- Name keyword local NAME_KEYS = { "mrouse", "watermark", "water mark" } -- codex local TEXT_KEYS = { "mrouse", "watermark" } local EXACT_TEXTS = { "[codex] Mrouse's Animations", "Mrouse's Animations", "Watermark", "MrouseYT", } local PRECISE_ONLY = false local function log(msg) if DEBUG then pcall(function() print("[WM] " .. msg) end) end end local function lower(s) return tostring(s or ""):lower() end local function hasCJK(s) for _, code in utf8.codes(tostring(s or "")) do if code >= 0x4E00 and code <= 0x9FFF then return true end end return false end local function inList(s, list) s = lower(s) for _, k in ipairs(list) do if s == lower(k) then return true end end return false end local function containsAny(s, keys) s = lower(s) if s == "" then return false end for _, k in ipairs(keys) do if s:find(k, 1, true) then return true end end return false end -- codex local function isCandidate(o) local c = o.ClassName if c == "ScreenGui" or c == "BillboardGui" or c == "SurfaceGui" or c == "Decal" or c == "Texture" then return true end return o:IsA("GuiObject") end local function nameHit(o) return inList(o.Name, NAME_KEYS) or (not PRECISE_ONLY and containsAny(o.Name, NAME_KEYS)) end -- GUI match (PlayerGui / client UI): name + text local function guiHit(o) if nameHit(o) then return true end local text if o:IsA("TextLabel") or o:IsA("TextButton") or o:IsA("TextBox") then text = o.Text elseif o:IsA("ImageLabel") or o:IsA("ImageButton") then text = o.Image end if text then if inList(text, EXACT_TEXTS) then return true end if PRECISE_ONLY then return false end if hasCJK(text) and not containsAny(text, TEXT_KEYS) then return false end return containsAny(text, TEXT_KEYS) end return false end -- codex local function worldHit(o) return nameHit(o) end local function softKill(o) pcall(function() if o:IsA("GuiObject") then o.Visible = false end if o:IsA("ScreenGui") or o:IsA("BillboardGui") or o:IsA("SurfaceGui") then o.Enabled = false end if o:IsA("TextLabel") or o:IsA("TextButton") or o:IsA("TextBox") then o.TextTransparency = 1 o.TextStrokeTransparency = 1 o.BackgroundTransparency = 1 elseif o:IsA("ImageLabel") or o:IsA("ImageButton") then o.ImageTransparency = 1 o.BackgroundTransparency = 1 elseif o:IsA("Frame") then o.BackgroundTransparency = 1 elseif o:IsA("Decal") or o:IsA("Texture") then o.Transparency = 1 elseif o:IsA("SurfaceAppearance") then o.AlphaMode = Enum.AlphaMode.Transparency end end) end local PlayerGui = lp:WaitForChild("PlayerGui") -- Initial sweep: PlayerGui (codex), workspace + CoreGui (world rules) for _, d in ipairs(PlayerGui:GetDescendants()) do if isCandidate(d) and guiHit(d) then log("pg: " .. d:GetFullName() .. " <" .. d.ClassName .. ">") softKill(d) if d:IsA("ScreenGui") and nameHit(d) then pcall(function() d:Destroy() end) end end end for _, d in ipairs(workspace:GetDescendants()) do if isCandidate(d) and worldHit(d) then log("ws: " .. d:GetFullName() .. " <" .. d.ClassName .. ">") softKill(d) end end pcall(function() for _, d in ipairs(game:GetService("CoreGui"):GetDescendants()) do if isCandidate(d) and worldHit(d) then softKill(d) end end end) -- codex local function onPlayerGuiAdded(d) if isCandidate(d) and guiHit(d) then log("pg+: " .. d:GetFullName() .. " <" .. d.ClassName .. ">") softKill(d) if d:IsA("ScreenGui") and nameHit(d) then pcall(function() d:Destroy() end) end end end local function onWorkspaceAdded(d) if isCandidate(d) and worldHit(d) then log("ws+: " .. d:GetFullName() .. " <" .. d.ClassName .. ">") softKill(d) end end pcall(function() PlayerGui.DescendantAdded:Connect(onPlayerGuiAdded) end) pcall(function() workspace.DescendantAdded:Connect(onWorkspaceAdded) end) -- Light loops: PlayerGui fast (codex), workspace slow (large world) task.spawn(function() while task.wait(0.5) do for _, d in ipairs(PlayerGui:GetDescendants()) do if isCandidate(d) and guiHit(d) then softKill(d) if d:IsA("ScreenGui") and nameHit(d) then pcall(function() d:Destroy() end) end end end end end) task.spawn(function() while task.wait(5) do for _, d in ipairs(workspace:GetDescendants()) do if isCandidate(d) and worldHit(d) then softKill(d) end end end end) -- codex local rawNew = Instance.new Instance.new = function(cls, parent) local o = rawNew(cls, parent) if isCandidate(o) and (guiHit(o) or worldHit(o)) then softKill(o) end return o end log("codex - fast mode") print("[WM] Watermark remover active (codex, codex, world-safe).")