Figured out a way to do it using the code below.
local getItemInfo = game:GetService('MarketplaceService');
local creator = getItemInfo:GetProductInfo(scanOrgin).Creator.Id;
local assetT = getItemInfo:GetProductInfo(scanOrgin).AssetTypeId;
if assetT == 13 then
scanOrgin = scanOrgin -1
until getItemInfo:GetProductInfo(scanOrgin).Creator.Id == creator and getItemInfo:GetProductInfo(scanOrgin).AssetTypeId == 1
result = scanOrgin
result = 'Not a decal!'
Original code belongs to J_J - made some changes.
How it works:
Whenever you upload a decal to Roblox, it first uploads an image, then a decal. This script loops (using repeat) backward through IDs uploaded to Roblox and looks for any made by the same creator as the decal. Images and decals are uploaded milliseconds apart, so you don’t have to worry about accidentally getting a different decal from the same creator.
Input a decal ID as an int and since the image is uploaded before the decal, looping backward and finding an asset by the same creator will give you the image id.
*Again, credit to J_J for figuring the logic out!