local encodedInput = [[]] -- enter the whole encoded id here
local function decodeAssetId(input)
local clean = input:gsub("%s+", "")
clean = clean:gsub(" ", "")
clean = clean:gsub("âŸ", "")
clean = clean:gsub("ã€", "")
clean = clean:gsub("%%(%x%x)", function(hex)
return string.char(tonumber(hex, 16))
end)
local hexPart = clean:match("[0][xX](%x+)")
if not hexPart then
local decimalFallback = clean:match("id=(%d+)")
if decimalFallback then return decimalFallback end
warn("no pattern omg")
return nil
end
local decimalId = tonumber(hexPart, 16)
if decimalId then
return string.format("%.0f", decimalId)
else
warn("Hex conversion failed for: " .. tostring(hexPart))
return nil
end
end
local decodedId = decodeAssetId(encodedInput)
if decodedId then
setclipboard(decodedId)
print("Decoded ID: " .. decodedId .. " Copied to clipboard")
else
print("Decoding failed")
end
Comments
No comments yet
Be the first to share your thoughts!