Betting using Bitcoin Blockchain User1 bet the hash of Block 999,000 that hash(block(999,000) = even
user2 bet the hash of Block 999,000 that hash(block(999,000) = odd
Both users pay/sign 1 BTC in a CoinJoin for that bet to a P2SH. The winner will win 1.99BTC and 0.01 BTC is the tx fee.
How to make the scripts that can perform such action?

Script1 that perform the betting section.(that specify the criteria for redemption).

Script2. Redeem script (based on the output of block 999,000) that transfers the fund to the winner new PubKey Hash.
You can't.
Bitcoin Scripts have no access to the block hash, and cannot determine if it is odd or even. You would need an external oracle for this.