local o=game:GetService("\082\101\112\108\105\099\097\116\101\100\083\116\111\114\097\103\101")local i=o:WaitForChild("\099\111\109\109\111\110")local u=require(i:WaitForChild("\065\115\115\101\116\067\097\116\097\103\111\114\105\101\115"))local b=require(i:WaitForChild("\065\115\115\101\116\115"))local Q=require(script.Parent.getPlayerState)return function(o,i,c)local U=b.byId[c]if not U then return false end local C=u.byId[U.type]if not C then return false end local A=(Q(o,i)).equipped local V=A[U.type]for o,i in pairs(V)do if i==c then return true end end return false end
local ReplicatedStorage = game:GetService("ReplicatedStorage")

local common = ReplicatedStorage:WaitForChild("common")

local AssetCatagories = require(common:WaitForChild("AssetCatagories"))
local Assets = require(common:WaitForChild("Assets"))

local getPlayerState = require(script.Parent.getPlayerState)

return function(state, player, assetId)

    local asset = Assets.byId[assetId]
    if not asset then return false end
    local catagory = AssetCatagories.byId[asset.type]
    if not catagory then return false end

    local equipment = getPlayerState(state,player).equipped

    local equipmentCatagory = equipment[asset.type]

    for _,equippedAssetId in pairs(equipmentCatagory) do
        if equippedAssetId == assetId then
            return true
        end
    end
    return false
end