The boxes '????' representing spaces/tab, are part of the query being copied over, get rid of them and your query will execute OK.
For instance, "????SELECT role_principal_id, member_principal_id FROM sys.database_role_members"
Delete the ????, it may not show in your query window, but just delete tab or space of line inside for it to look like "SELECT role_principal_id, member_principal_id FROM sys.database_role_members".
Do this for the rest of the line and you should be OK.