The way these kind of menus are created is by using Message objects in the CK. You need to create a new message, set it up with the "Message Box" flag ticked, and then add some "Menu Buttons" to the list. You can give each button a custom name, and the names you enter here will be the names that show up as your clickable options in the menu in-game. The index of each button that you see will be the return value given to the script when that button is clicked.
So in order to reverse-engineer any mod, you'll want to look at its Message objects in particular, and then probably you will want to look at their script source if they've included it. To use them in an actual script, you usually just include a line like:
int menuChoice = myCustomMenu.show()
This will cause the menu to pop-up in game, and whatever choice the player selects will send its index number into the variable menuChoice (the same index number that each choice had listed next to it in the Message object you made in the CK). Thus, you'll be able to respond to the player's choice by doing whatever you like--you can show another Message box menu with more specific options related to the button they've clicked, for instance, or have your script make adjustments to the follower based on that option.
A simple, slightly longer example:
Spoiler ;this could be a referenceAlias script linked to your followerEvent onActivate() int choice1 = message1.show() if choice1 == 0 ;respond to button one by showing another menu int first = sub1message.show() if first == 0 ;do stuff elseif first == 1 ;do other stuff elseif first == 2 ;do more stuff endif elseif choice1 == 1 ;respond to button two by showing a second sub-menu int second = sub2message.show() if second == 0 ;do fancy stuff elseif second == 1 ;do other fancy stuff endif endif;finished showing the menus!EndEvent