bucketScript in kibana

Unfortunately, this isn't something currently supported by Kibana. You can add your +1 and feedback to the enhancement requests here: