The man stood on his balcony and inside his apartment complex threatening police with a replica gun