I tried doing something like this but it doesn't appear to work very well. I have a feeling :GetPlayerByUserId doesn't work like I think it does.
plr = game:GetService("Players"):GetPlayerByUserId(5804891)
if game:GetService("MarketplaceService"):PlayerOwnsAsset(plr,30331986) then
print(plr.Name .. " owns the Midnight Shades")
else
print(plr.Name .. " doesn't own the Midnight Shades")
end

2 comments
:GetPlayerByUserId() doesn't work for players not in the game.
What should I use to make the bottom part of the script work then?