msg.value is not the money held by the contract like the scrypt equivalent, but the value bringed by the user when he interact with the contract (so I guess you want to transpile to X, and ensure the next output have value Util.value(txpreimage) + X)
msg.value
is not the money held by the contract like the scrypt equivalent, but the value bringed by the user when he interact with the contract (so I guess you want to transpile to X, and ensure the next output have value Util.value(txpreimage) + X)