Exclude Database from Analysis

Hey there, I am working on setting up a way to detect Active/Passive nodes on sql. I found the below script here. which has been a huge help. But i need to remove 2 or 3 listings that show up as running. is there anyway to exlude DB1, DB2, and DB3 from appearing in the output?

if (exists service “clussvc”) then (item 0 of item 0 of it, item 1 of item 0 of it, item 1 of item 1 of it) of (((substring between “%22” of item 0 of it, substring between “%22” of item 1 of it) of (string value of property “PartComponent” of it, string value of property “GroupComponent” of it ) of select objects “PartComponent, GroupComponent from MSCluster_NodeToActiveGroup” of wmi “root\MSCluster”),((string value of property “Name” of it, ((if (it="-1") then “StateUnknown” else if (it=“0”) then “Up” else if (it=“1”) then “Down” else if (it=“2”) then “Paused” else if (it=“3”) then “Joining” else “relevance unknown”) of (string value of property “State” of it))) of select objects “Name, State from MSCluster_Node” of wmi “root\MSCluster”)) whose (item 1 of item 0 of it = item 0 of item 1 of it) as string else “”