A Python script that gets the pitch of a Minecraft player with a binary tree search
This script will generate a function tree that stores the player's pitch (x rotation) to a score. Normally, this can be done via an NBT check, but using a function tree with x_rotation selectors is an alternative method.
It's slightly less efficient than an NBT check, but I decided to publish this script anyway.