Set Attribute not working

I need help with this script. when the player has the Gamepass it sets the attribute but when the BoolValue is true it does not set the attribute. Heres the script

	passPurchases = {


	[premprods.Gamepasses.FasterAutoClicker or player.Other.FasterAuto.Value == true] = function(plr)
		plr:SetAttribute("FasterAutoClick", true)
	end,
	[premprods.Gamepasses.DoubleTaps or player.Other.DoubleClicks.Value == true] = function(plr)
		plr:SetAttribute("DoubleTaps", true)
	end,
	[premprods.Gamepasses.DoubleGems or player.Other.DoubleGems.Value == true] = function(plr)
		plr:SetAttribute("DoubleGems", true)
	end,
	[premprods.Gamepasses.SuperLuck or player.Other.SuperLuck.Value == true] = function(plr)
		plr:SetAttribute("SuperLuck", true)
	end,
	[premprods.Gamepasses.MoreInventory or player.Other.MoreInventory.Value == true] = function(plr)
		plr:SetAttribute("MoreInventory", true)
	end,
	[premprods.Gamepasses.PlusSixPets or player.Other.Pet6Equip.Value == true] = function(plr)
		plr:SetAttribute("6Pets", true)
	end,
	[premprods.Gamepasses.PlusThreePets or player.Other.Pet3Equip.Value == true] = function(plr)
		plr:SetAttribute("3Pets", true)
	end,
	[premprods.Gamepasses.VIP] = function(plr)
		plr:SetAttribute("VIP", true)
	end,
	[premprods.Gamepasses.TripleHatch] = function(plr)
		plr:SetAttribute("TripleHatch", true)
	end,
	[premprods.Gamepasses.AutoHatch or 662583100] = function(plr)
		plr:SetAttribute("AutoHatch", true)
	end,
}

end)

I think you have a misconception about how Boolean expressions work. I am assuming that all your gamepass values (i.e. premprods.Gampeasses.FasterAutoClicker) are the asset-ID of the gamepass or a string. However, if we perform an or operation on a string and a Boolean, the output is a Boolean. I think you should instead just have a table of tables.

Also I do not know if this is intentional, but you use plr and player in your code. If these mean two different things, then it’s probably better to make the variable name more explicit so there is no confusion if you ever look back at this code years in the future.

On another note, maybe it’s just easier to run these conditions on your own through traditional code.

-- format: [attributeName] = conditionCheckingFunction
passPurchases = {
    FasterAutoClick = function(plr)
        return plr.Other.DoubleClicks.FasterAuto.Value == true
            or MarketplaceService:UserOwnsGamePassAsync(
                plr.UserId,
                premprods.Gamepasses.DoubleGems
            )
    end
}

Im think im just gonna learn more scripting…