Even if the 51% attack by itself might not be illegal, using it to double spend almost certainly is. On the civil side I'd expect you to be liable to pay the receiver in order to fulfill the contract you made when you exchanged the coins deposited on the old chain. Plus I'd expect criminal fraud charges.