On EARTH ENGINE, if u want to check a pixel for cloud, you can use the QA60 band of the Sentinel-2 image.
The QA60 band is meant to be read in binary form. In its binary form, the 10th bit( 0 or 1 ) represents whether the pixel has cloud or not, whereas the 11th bit ( 0 or 1 ) represents whether the pixel has cirrus clouds or not.
The below code will return you a raster image of the same footprint as your original image with pixel values 1 or 0, where 1 denotes that the pixel contains cloud and 0 otherwise.
function cloudPixels(image) {
var qa = image.select('QA60');
var cloudBitMask = Math.pow(2, 10);
var cirrusBitMask = Math.pow(2, 11); //for cirrus clouds
var cloudMask = qa.bitwiseAnd(cloudBitMask);
var cirrusMask = qa.bitwiseAnd(cirrusBitMask); //return this variable to get cirrus cloud pixels
return cloudMask;
}