remote spy but incomplete
Key RequiredUniversal

remote spy but incomplete

Universal ScriptPerfectusPerfectus 6.5K views 10 executesUpdated Nov 1, 2024
Unrated
00
Lua Script•250 lines (7770 chars)
-- Fluent UI settings
local Fluent = loadstring(game:HttpGet("https://github.com/dawid-scripts/Fluent/releases/latest/download/main.lua"))()
local name = game:GetService("MarketplaceService"):GetProductInfo(game.PlaceId).Name

local Window = Fluent:CreateWindow({
    Title = "PerfectusSpy Remote Copy",
    SubTitle = name,
    TabWidth = 160,
    Size = UDim2.fromOffset(580, 460),
    Acrylic = true,
    Theme = "Darkest",
    MinimizeKey = Enum.KeyCode.LeftControl
})

local Tabs = {
    Main = Window:AddTab({ Title = "Remotes", Icon = "http://www.roblox.com/asset/?id=18589602613" }),
}

-- Default settings
local MAX_REMOTES = 30
local ADD_REMOTE_DELAY = 0.5 -- Delay in seconds
local isUIActive = true -- UI activity tracker

local remoteList = {} -- Stores remotes here
local ignoreList = {} -- List of remotes to ignore
local debounceList = {} -- Debounce for each remote to avoid frequent processing
local Output = setclipboard

-- Function to clear all remotes in the Fluent UI without stopping remote processing
local function ClearAllRemotes()
    for _, remote in pairs(remoteList) do
        if remote.Button then remote.Button:Destroy() end
        if remote.DoNotShowButton then remote.DoNotShowButton:Destroy() end
    end
    remoteList = {} -- Clear the list of current remotes in the UI
    Fluent:Notify({
        Title = "Cleared",
        Content = "All remotes and buttons have been cleared from the UI.",
        Duration = 3
    })
end

-- Add Stop and Restart buttons, Clear All button, and sliders for Controls
Tabs.Main:AddSection("Controls")

-- Stop All Processes button
Tabs.Main:AddButton({
    Title = "Stop All Processes",
    Description = "Pauses all remote processing",
    Callback = function()
        isUIActive = false
        Fluent:Notify({
            Title = "Processes Stopped",
            Content = "All processes have been stopped.",
            Duration = 3
        })
    end
})

-- Restart All Processes button
Tabs.Main:AddButton({
    Title = "Restart All Processes",
    Description = "Resumes all remote processing",
    Callback = function()
        isUIActive = true
        Fluent:Notify({
            Title = "Processes Resumed",
            Content = "All processes have been resumed.",
            Duration = 3
        })
    end
})

-- Slider to adjust MAX_REMOTES
Tabs.Main:AddSlider("MaxRemotes", {
    Title = "Max Remotes",
    Min = 10,
    Max = 50,
    Default = MAX_REMOTES,
    Rounding = 0.1,
    Callback = function(value)
        MAX_REMOTES = value
        Fluent:Notify({
            Title = "Max Remotes Updated",
            Content = "Max remotes set to " .. tostring(MAX_REMOTES),
            Duration = 2
        })
    end
})

-- Slider to adjust ADD_REMOTE_DELAY
Tabs.Main:AddSlider("AddRemoteDelay", {
    Title = "Remote Drop Rate (Seconds)",
    Min = 0.1,
    Max = 2,
    Default = ADD_REMOTE_DELAY,
    Rounding = 1,
    Callback = function(value)
        ADD_REMOTE_DELAY = value
        Fluent:Notify({
            Title = "Remote Drop Rate Updated",
            Content = "Remote drop rate set to " .. tostring(ADD_REMOTE_DELAY) .. " seconds",
            Duration = 2
        })
    end
})

-- Clear All button to remove all remotes and buttons from UI without stopping new ones
Tabs.Main:AddButton({
    Title = "Clear All",
    Description = "Removes all remotes and buttons from Fluent UI",
    Callback = ClearAllRemotes
})

Tabs.Main:AddSection("Remote Buttons") -- Separate section for remote buttons

-- Function to add a remote to the list
local function AddRemoteToList(remoteType, fullData)
    if not isUIActive or ignoreList[remoteType] then return end  -- Skip if in ignore list or processes are stopped

    -- Remove the oldest remote if the limit is exceeded
    if #remoteList >= MAX_REMOTES then
        local removedRemote = table.remove(remoteList, 1)
        if removedRemote.Button then
            removedRemote.Button:Destroy() -- Remove the oldest remote from Fluent UI
        end
        if removedRemote.DoNotShowButton then
            removedRemote.DoNotShowButton:Destroy() -- Remove the "Do not show again" button for the oldest remote
        end
    end

    -- Add new remote
    local remoteData = {
        Type = remoteType,
        Data = fullData
    }

    -- Button to display in Fluent UI
    local button = Tabs.Main:AddButton({
        Title = remoteData.Type,
        Description = remoteData.Data,
        Callback = function()
            Output(remoteData.Data)
            Fluent:Notify({
                Title = "Copied",
                Content = "Remote successfully copied",
                Duration = 3
            })
        end
    })

    -- "Do not show this remote again" option
    local doNotShowAgain = Tabs.Main:AddButton({
        Title = "Do not show this remote again",
        Callback = function()
            ignoreList[remoteData.Type] = true -- Add to ignore list
            if button then button:Destroy() end -- Remove the button from the UI
            if doNotShowAgain then doNotShowAgain:Destroy() end -- Remove "Do not show again" button
        end
    })

    remoteData.Button = button
    remoteData.DoNotShowButton = doNotShowAgain
    table.insert(remoteList, remoteData)
end

-- GetFullName function to retrieve the full path of an instance
local function GetFullName(instance)
    local path = {}
    while instance and instance.Parent do
        table.insert(path, 1, instance.Name)
        instance = instance.Parent
    end
    return table.concat(path, ".")
end

-- Processing Remote Events with debounce
function EventMain(Event)
    if Event:IsA("RemoteEvent") and Event.OnClientEvent then
        Event.OnClientEvent:Connect(function(...)
            if debounceList[Event] and (tick() - debounceList[Event] < ADD_REMOTE_DELAY) then
                return -- Skip if triggered within delay period
            end
            debounceList[Event] = tick() -- Set new time

            if isUIActive then
                local FullData = GetFullName(Event)
                AddRemoteToList(Event.ClassName, FullData)
            end
        end)
    end
end

-- Processing Remote Functions with debounce
function FunctionMain(Func)
    if Func:IsA("RemoteFunction") and Func.OnClientInvoke then
        Func.OnClientInvoke = function(...)
            if debounceList[Func] and (tick() - debounceList[Func] < ADD_REMOTE_DELAY) then
                return -- Skip if triggered within delay period
            end
            debounceList[Func] = tick() -- Set new time

            if isUIActive then
                local FullData = GetFullName(Func)
                AddRemoteToList(Func.ClassName, FullData)
            end
            return '1'
        end
    end
end

-- Function to find all RemoteEvent instances
function GetEvents()
    local events = {}
    for _, v in ipairs(game:GetDescendants()) do
        if v:IsA("RemoteEvent") then
            table.insert(events, v)
        end
    end
    return events
end

-- Function to find all RemoteFunction instances
function GetFunctions()
    local functions = {}
    for _, v in ipairs(game:GetDescendants()) do
        if v:IsA("RemoteFunction") then
            table.insert(functions, v)
        end
    end
    return functions
end

-- Process found RemoteEvents and RemoteFunctions
for _, event in pairs(GetEvents()) do
    EventMain(event)
end

for _, func in pairs(GetFunctions()) do
    FunctionMain(func)
end

-- Event to detect when Fluent UI is closed
Window.OnClose = function()
    isUIActive = false
    ClearAllRemotes() -- Clear all remotes from UI when it is closed
    print("PerfectusSpy stopped as Fluent UI was closed.")
end

print("PerfectusSpy successfully started and integrated with Fluent UI.")

Features & Information

Maybe someone can make it better, don't write that this code is too bad.
#remote#spy

Community Comments (1)

PerfectusPerfectusNov 1, 2024(edited)

change the max remotes slider. it will start working like that

More Scripts for Universal Scripts