So you'd have to buy the equipment, which is a gradual process, would be extremely expensive and would be noticed.
Indeed, back-of-the-napkin calculation with an order randomly picked from NiceHash[1] for Bitcoin mining and the same methodology gives:
Cost (PH/HR): 0.0002625 BTC
Bitcoin Network Hashrate (PH/HR): 9M
51% attack for one hour: 4.6M PH => 4.6M * 0.0002625 ~= 1200 BTC
So a one-hour long 51% on the bitcoin network would cost $43,200,000 at $36K per BTC, as per a NiceHash rate I randomly selected.
You real costs are going to be much higher, it would probably take you more than an hour to spin it all up and execute the attack. I feel realistic number is 10x to 100x higher