I created this script some time ago and have since moved on to NodeMCU. However for the ones still learning this could potentially be useful. For any serious project I do recommend flashing your ESP8266 with NodeMCU.
https://github.com/derkzomer/nrf24l01-esp8266