Загрузка данных


--[[
    POINTS 1 -> 10000 ONE-SHOT TEST
    For authorized testing of your own Roblox place.

    Flow:
      1) Press ARM.
      2) Script watches normal client -> server Remote traffic.
      3) When Points legitimately increases by exactly +1, it correlates the
         most recent outgoing Remote call.
      4) The NEXT matching call is modified once:
            numeric 1      -> 10000
            amount/points/reward/value = 1 -> 10000
      5) Hook disarms immediately after the one-shot mutation.
      6) Console shows whether Points later changed server-side.

    It does NOT locally edit leaderstats.Points.
]]

print("[1TO10000] 01 script entered")

local Players = game:GetService("Players")
local player = Players.LocalPlayer

if not player then
    warn("[1TO10000] LocalPlayer unavailable")
    return
end

local playerGui = player:WaitForChild("PlayerGui")
local leaderstats = player:WaitForChild("leaderstats", 10)
local points = leaderstats and leaderstats:WaitForChild("Points", 10)

if not points or typeof(points.Value) ~= "number" then
    warn("[1TO10000] numeric leaderstats.Points not found")
    return
end

local function log(...)
    print("[1TO10000]", ...)
end

local function wlog(...)
    warn("[1TO10000]", ...)
end

local function fullName(obj)
    local ok, v = pcall(function()
        return obj:GetFullName()
    end)
    return ok and v or tostring(obj)
end

if type(hookmetamethod) ~= "function"
    or type(getnamecallmethod) ~= "function"
    or type(newcclosure) ~= "function"
then
    wlog("Delta hook APIs unavailable: hookmetamethod/getnamecallmethod/newcclosure required")
    return
end

local oldGui = playerGui:FindFirstChild("points_1_to_10000_test")
if oldGui then
    oldGui:Destroy()
end

local gui = Instance.new("ScreenGui")
gui.Name = "points_1_to_10000_test"
gui.ResetOnSpawn = false
gui.IgnoreGuiInset = true
gui.DisplayOrder = 999999
gui.Parent = playerGui

local button = Instance.new("TextButton")
button.Size = UDim2.fromOffset(220, 56)
button.Position = UDim2.fromOffset(18, 88)
button.BackgroundColor3 = Color3.fromRGB(175, 50, 50)
button.BorderSizePixel = 0
button.Text = "ARM 1 -> 10000"
button.TextColor3 = Color3.new(1, 1, 1)
button.TextSize = 16
button.Font = Enum.Font.GothamBold
button.Parent = gui

local state = "idle"
local recent = {}
local MAX_RECENT = 60
local CAPTURE_LOOKBACK = 1.5

local targetRemote = nil
local targetMethod = nil
local targetSignature = nil
local injectionBefore = nil
local injectionAt = nil

local function isRemote(obj)
    return typeof(obj) == "Instance"
        and (obj:IsA("RemoteEvent") or obj:IsA("RemoteFunction"))
end

local function packCopy(args)
    local out = {n = args.n}
    for i = 1, args.n do
        out[i] = args[i]
    end
    return out
end

local function typeSignature(args)
    local parts = {}
    for i = 1, args.n do
        local v = args[i]
        if typeof(v) == "table" then
            parts[i] = "table"
        else
            parts[i] = typeof(v)
        end
    end
    return table.concat(parts, ",")
end

local function remember(remote, method, args)
    table.insert(recent, {
        t = os.clock(),
        remote = remote,
        method = method,
        args = packCopy(args),
        signature = typeSignature(args)
    })

    if #recent > MAX_RECENT then
        table.remove(recent, 1)
    end
end

local function cloneTable(t)
    local out = {}
    for k, v in pairs(t) do
        out[k] = v
    end
    return out
end

local function mutateArgs(args)
    local out = packCopy(args)

    -- Prefer a top-level numeric reward of exactly 1.
    for i = 1, out.n do
        if typeof(out[i]) == "number" and out[i] == 1 then
            out[i] = 10000
            return out, "arg" .. i .. ": 1 -> 10000"
        end
    end

    -- Then common fields in a table payload.
    local fields = {
        "amount", "Amount",
        "points", "Points",
        "reward", "Reward",
        "value", "Value"
    }

    for i = 1, out.n do
        if typeof(out[i]) == "table" then
            for _, field in ipairs(fields) do
                if out[i][field] == 1 then
                    local copy = cloneTable(out[i])
                    copy[field] = 10000
                    out[i] = copy
                    return out, "arg" .. i .. "." .. field .. ": 1 -> 10000"
                end
            end
        end
    end

    return nil, nil
end

local function chooseCorrelation()
    local now = os.clock()

    for i = #recent, 1, -1 do
        local item = recent[i]
        local age = now - item.t

        if age > CAPTURE_LOOKBACK then
            break
        end

        local mutated, mutation = mutateArgs(item.args)
        if mutated then
            return item, mutation
        end
    end

    return nil, nil
end

local oldNamecall

local okHook, hookErr = pcall(function()
    oldNamecall = hookmetamethod(game, "__namecall", newcclosure(function(self, ...)
        local method = getnamecallmethod()

        if isRemote(self)
            and (method == "FireServer" or method == "InvokeServer")
        then
            local fromExecutor = false

            if type(checkcaller) == "function" then
                local okCaller, caller = pcall(checkcaller)
                fromExecutor = okCaller and caller or false
            end

            if not fromExecutor then
                local args = table.pack(...)

                if state == "capturing" then
                    remember(self, method, args)

                elseif state == "ready_to_inject"
                    and self == targetRemote
                    and method == targetMethod
                    and typeSignature(args) == targetSignature
                then
                    local modified, mutation = mutateArgs(args)

                    if modified then
                        state = "injected"
                        injectionBefore = points.Value
                        injectionAt = os.clock()

                        button.Text = "INJECTED - WATCH"
                        button.BackgroundColor3 = Color3.fromRGB(190, 120, 35)

                        wlog("ONE-SHOT MUTATION FIRED")
                        wlog("Remote =", fullName(self))
                        wlog("Method =", method)
                        wlog("Mutation =", mutation)
                        wlog("Points before =", injectionBefore)

                        return oldNamecall(
                            self,
                            table.unpack(modified, 1, modified.n)
                        )
                    end
                end
            end
        end

        return oldNamecall(self, ...)
    end))
end)

if not okHook then
    wlog("hook install failed:", tostring(hookErr))
    gui:Destroy()
    return
end

local lastPoints = points.Value

points:GetPropertyChangedSignal("Value"):Connect(function()
    local now = points.Value
    local before = lastPoints
    lastPoints = now

    log("Points", before, "->", now, "| delta =", now - before)

    if state == "capturing" and now - before == 1 then
        local item, mutation = chooseCorrelation()

        if item then
            targetRemote = item.remote
            targetMethod = item.method
            targetSignature = item.signature
            state = "ready_to_inject"

            button.Text = "WAITING NEXT +1"
            button.BackgroundColor3 = Color3.fromRGB(185, 105, 30)

            wlog("VALID +1 CORRELATED")
            wlog("Target Remote =", fullName(targetRemote))
            wlog("Target Method =", targetMethod)
            wlog("Signature =", targetSignature)
            wlog("Detected mutable shape =", mutation)
            wlog("NEXT matching call will be changed 1 -> 10000")
        else
            wlog("+1 detected, but no recent outgoing Remote containing a mutable 1 was found")
        end

    elseif state == "injected" then
        local elapsed = injectionAt and (os.clock() - injectionAt) or 0

        if elapsed <= 8 then
            wlog(
                "POST-INJECTION Points:",
                before, "->", now,
                "| server-visible delta from pre-injection =", now - injectionBefore
            )
        end
    end
end)

button.MouseButton1Click:Connect(function()
    if state == "idle" or state == "done" then
        recent = {}
        targetRemote = nil
        targetMethod = nil
        targetSignature = nil
        injectionBefore = nil
        injectionAt = nil

        state = "capturing"
        button.Text = "CAPTURING +1..."
        button.BackgroundColor3 = Color3.fromRGB(70, 105, 185)

        log("ARMED")
        log("Wait for a NORMAL server Points +1.")
        log("After it is correlated, the NEXT matching request is modified once.")

    elseif state == "capturing" or state == "ready_to_inject" then
        state = "idle"
        button.Text = "ARM 1 -> 10000"
        button.BackgroundColor3 = Color3.fromRGB(175, 50, 50)
        log("DISARMED")

    elseif state == "injected" then
        state = "done"
        button.Text = "ARM AGAIN"
        button.BackgroundColor3 = Color3.fromRGB(175, 50, 50)
        log("Test marked done. Current Points =", points.Value)
    end
end)

log("READY | current Points =", points.Value)
log("Press ARM 1 -> 10000")