A group of four boys committed “hate crimes” when they allegedly used a gay dating app to lure men to meet and were armed with crowbars, pepper spray and knives, a Perth court is told.