How to correctly set attributes for block hash and nBits in PIVX Fork?
I found the answer. However please correct me if there's I'm wrong in explaining this.

Basically, once we have inputs for the block, we hash the data. This hashing can be achieved using multiple techniques viz. SHA256, scrypt, X11, etc. 

The issue with generating a hash for the genesis was I used scrypt algorithm to generate the hash. You may come across paste bin links with this method scrypt_1024_1_1_256_sp_sse2. 

So in my case, I replaced this with the method offered by uint256 class. You can find this genesis creation logic at this pastebin.

Feel free to add anything or correct me if I'm wrong.