A loan to buy a cryptocurrency is not the best solution. I would even say that this is a crime against risk management. However, this can be done by following certain safety rules.
1. Borrow only the amount that you can pay off without any problems, even if you lose all your bitcoins.
2. As soon as after the purchase the value doubles, sell half of your bitcoins and repay the loan.