> For the complete documentation index, see [llms.txt](https://inside-scripts.gitbook.io/documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://inside-scripts.gitbook.io/documentation/paid-scripts/lock-picking/config.md).

# Config

You can check out default config

```lua
config = {}

config.keyToAccept = 'e' -- which key confirms lock picking

config.inventoryType = 'Configure' -- qbcore, esx, oxinventory

-- A function that checks the possession of an item and the taking of an item / Server side
config.doesPlayerHaveItem = function(source, itemName, amount)
    if config.inventoryType == 'esx' then
		
        while ESX == nil do
	    ESX = exports['es_extended']:getSharedObject()
	    Wait(5)
	end
	
	local xPlayer = ESX.GetPlayerFromId(source)
	local itemCount = xPlayer.getInventoryItem(itemName).count
	if itemCount ~= nil and itemCount >= amount then
	    xPlayer.removeInventoryItem(itemName, amount)
	
	    return true
	end
	
	return false

    elseif config.inventoryType == 'qbcore' then

	while QBCore == nil do
	    QBCore = exports['qb-core']:GetCoreObject()
	    Wait(5)
	end
	
	local player = QBCore.Functions.GetPlayer(source)
	local totalAmount = 0
	for _, item in ipairs(player.Functions.GetItemsByName(itemName)) do
	    totalAmount = totalAmount + item.amount
	end
	
	if totalAmount >= amount then
	    player.Functions.RemoveItem(itemName, amount)
	
	    return true
	end
	
	return false

    elseif config.inventoryType == 'oxinventory' then
		
	if exports.ox_inventory:GetItemCount(source, itemName) >= amount then
	    exports.ox_inventory:RemoveItem(source, itemName, amount)
	
	    return true
	end
	
	return false
	
    else
	print("Configure your inventoryType correctly in config.lua.")
	return false
    end
end
```
