Yes. We have a JS API that you can turn on for your domain. This will provide you with a JS object that contains each consent category and whether or not the user has consented. You can use this in your JS code to determine whether to run a line/lines of code.
You can also turn off Automatic Blocking should you wish to purely use the JS API and/or Google Tag Manager events.