Chosen Solution

bought an iphone 2nd hand and it had icloud lock so, I was wondering if you replace the motherboard and home button will it remove icloud?

Changing the logic board is basically the same thing as changing the phone itself . If you have access to a logic board then go for it but in most cases its as dear to buy a good logic board as it is to by a whole phone