ADVERTISEMENTREMOVE ADS

SignalSpy

Universal scriptβ€’
3 months ago
Script preview thumbnail
Script Preview

Description

signalspy is a cool clientside logger by me ofc that hooks into metamethods to log remote calls and whatever blah blah discord.gg/getparadise (i plug my discord everywhere 😭)

ADVERTISEMENTREMOVE ADS
78 Lines β€’ 2.2 KiB
Raw
-- please give credits if you use in projects | discord: faded.cold
local settings = {
copytoclipboard = true,
logfireserver = true,
loginvokeserver = true,
logonclientevent = false,
logonclientinvoke = true,
logindexing = true,
}
print("[signalspy] loaded")
local mt = getrawmetatable(game)
setreadonly(mt, false)
local onc = mt.__namecall
local oix = mt.__index
------------------------------------------------
local function tts(tbl)
local str = ""
for i, v in ipairs(tbl) do
str = str .. "Arg[" .. i .. "] = " .. tostring(v) .. "\n"
end
return str
end
local function log(where, remote, method, ...)
local args = {...}
local out = "["..where.."] " .. remote:GetFullName() .. ":" .. method .. "\n" .. tts(args)
print(out)
if settings.copytoclipboard and setclipboard then setclipboard(out) end
end
------------------------------------------------
mt.__namecall = newcclosure(function(self, ...)
local method = getnamecallmethod()
if method == "FireServer" and settings.logfireserver then
log("client β†’ server", self, method, ...)
elseif method == "InvokeServer" and settings.loginvokeserver then
log("client β†’ server", self, method, ...)
end
return onc(self, ...)
end)
mt.__index = newcclosure(function(self, key)
if settings.logindexing and typeof(self)=="Instance" and (key=="FireServer" or key=="InvokeServer") then
print("[signalspy] accessed: " .. self:GetFullName() .. "." .. key)
end
if key=="OnClientInvoke" and settings.logonclientinvoke and self:IsA("RemoteFunction") then
return function(...)
log("server β†’ client", self, "OnClientInvoke", ...)
end
end
return oix(self, key)
end)
setreadonly(mt, true)
if settings.logonclientevent then
for _, r in ipairs(game:GetDescendants()) do
if r:IsA("RemoteEvent") then
pcall(function()
r.OnClientEvent:Connect(function(...)
log("server β†’ client", r, "OnClientEvent", ...)
end)
end)
end
end
game.DescendantAdded:Connect(function(obj)
if obj:IsA("RemoteEvent") then
wait(0.1)
pcall(function()
obj.OnClientEvent:Connect(function(...)
log("server β†’ client", obj, "OnClientEvent", ...)
end)
end)
end
end)
end
--faded was here
ADVERTISEMENTREMOVE ADS

Comments

1 comment
to add a comment
st

coolio project

0
0
ADVERTISEMENTREMOVE ADS