Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local names = {} -- Enter names of objects to match here.
- local classes = { -- Enter classes of objects to match here.
- "RemoteFunction",
- "BindableEvent",
- "BindableFunction",
- "RemoteEvent"
- }
- local caseSensitive = true -- Whether names are case sensitive. Includes names, ignore, and ignoreDescendants.
- local outputParents = true -- Whether to output the parents of matches.
- local outputFullLocations = false -- Whether to output each individual match and their locations.
- local handler = function (match)
- -- Your code here. Do anything to each match. Example: "match:Destroy()." or "match.SoundId = []"
- end
- local ignore = {} -- Enter names of matching objects to ignore.
- local ignoreDescendants = { -- Enter names of objects whose descendants will be ignored.
- "DefaultChatSystemChatEvents"
- }
- ----------------------------------------------------------------------------------------------------
- local m = {}
- local executions = 0
- local cs = caseSensitive
- local shouldIgnore = function (comp, desc)
- for i, e in ipairs(desc and ignoreDescendants or ignore) do if ((cs and comp or string.lower(comp)) == (cs and e or string.lower(e))) then return true end end
- return false
- end
- local analyse = function (ch)
- executions = executions + 1
- if executions % 1000 == 0 then wait() end
- local nm, cm = #names == 0 and true or false, #classes == 0 and true or false
- for i, e in ipairs(names) do if ((cs and ch.Name or string.lower(ch.Name)) == (ch and e or string.lower(e))) then nm = true break end end
- for i, e in ipairs(classes) do if ch.ClassName and ch:IsA(e) then cm = true break end end
- if nm and cm and not shouldIgnore(ch.Name, false) then m[#m + 1] = ch end
- if not shouldIgnore(ch.Name, true) and #ch:GetChildren() > 0 then r(ch) end
- end
- r = function (main)
- for i, e in ipairs(main:GetChildren()) do pcall(analyse, e) end
- end
- r(game)
- warn("Your search returned " .. #m .. " results.")
- if #m > 0 then
- if outputParents or outputFullLocations then
- local p = {}
- for i, e in ipairs(m) do
- if outputFullLocations then print(e.ClassName .. " \"" .. e.Name .. "\" found with address: " .. e:GetFullName()) end
- if outputParents then
- if not p[e.Parent] then p[e.Parent] = {classes = {[e.ClassName] = 1}, classSize = 1}
- elseif not p[e.Parent].classes[e.ClassName] then p[e.Parent].classes[e.ClassName] = 1 p[e.Parent].classSize = p[e.Parent].classSize + 1
- else p[e.Parent].classes[e.ClassName] = p[e.Parent].classes[e.ClassName] + 1 end
- end
- end
- if outputParents then
- for i, e in pairs(p) do
- local msg = ""
- local runs = 0
- for className, v in pairs(e.classes) do
- runs = runs + 1
- msg = msg .. v .. " " .. className .. "(s)" .. (runs + 1 < e.classSize and ", " or (runs + 1 == e.classSize and ((e.classSize > 2 and "," or "") .. " and ") or " "))
- end
- warn(msg .. "found in: " .. i:GetFullName())
- end
- end
- end
- for i, e in ipairs(m) do handler(e) end
- end
- -- OBJECT FINDER - EXPLOIT TOOL. BY RGEENEUS
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement