How to make a script to check if a model is in someones inventory

Hi I recently discovered insert service can only insert models that the owner has in their inventory.

I want to make a script that checks the player’s inventory so it can inform them that they need that model in order for the script to fully function (I got the gui stuff sorted already)

I checked the DevHub and saw a script similar to what I want, but it will only work with assets from the “catalog” and not the “library”

Is their a way to make a script similar like this but for library models? Sorry its just im a bit new with these like model id things

local ASSET_ID = 30331986
local ASSET_NAME = "Midnight Shades"
 
local Players = game:GetService("Players")
local MarketplaceService = game:GetService("MarketplaceService")
local PlayerOwnsAsset = MarketplaceService.PlayerOwnsAsset
 
Players.PlayerAdded:Connect(function (player)
	local success, doesPlayerOwnAsset = pcall(PlayerOwnsAsset, MarketplaceService, player, ASSET_ID)
	if doesPlayerOwnAsset then
		print(player.Name .. " owns " .. ASSET_NAME)
	else
		print(player.Name .. " doesn't own " .. ASSET_NAME)
	end
end)
local Asset = id here
local InsertService = game:GetService("InsertService")
local Success,Model = pcall(InsertService.LoadAsset,InsertService,Asset)
if Success and Model then
      -- model loaded, do whatever with it
else
      -- model failed to load or not owned  
end

Not sure if this is what you wanted, but if you wanted players to load an asset from their inventory upon joining, you can’t do that since the game owner needs to own the model + you can only load assets that are owned by the game owner

Incase you just wanted to check if a player owned a model, I don’t think its possible either because as you said

here, it only works with assets from the catalog

Ahh yes this is perfect thanks!