Here is all the exports for the script that you can incorporate into your own scripts
-- Client
exports['Renewed-Vehiclekeys']:hasKey(plate) -- Returns true/false if player has keys
exports['Renewed-Vehiclekeys']:addKey(plate) -- Adds a key to the specified player
exports['Renewed-Vehiclekeys']:removeKey(plate) -- Removes the key from a player
-- Server
-- Removes the key from a player
exports['Renewed-Vehiclekeys']:removeKey(source, plate)
-- returns true/false if the player has the key
exports['Renewed-Vehiclekeys']:hasKey(source, plate)
-- Adds a key to the specified player
exports['Renewed-Vehiclekeys']:addKey(source, plate)
-- statebag
-- Sets the vehicle locked or unlocked
Entity(entity).state:set('vehicleLock', {
lock = 1 -- 1 | unlocked | 2 locked
sound = true -- true | false
}, true)