Events
Unit - A unit owned by Player(you) acquires an item
Conditions
(Item being manipulated) Equal to (Item that you buy)
Actions
Unit - Change ownership of Unit(the building) to Player(you) and change color
That would work perfectly, it's simple c:, srry for the not trigger resource used, I'm still learning how to paste triggers directly xD, but its practically the same, good luck!