How to call a function with score as parameters

so eg. score x = 1, y = 2, z = 3 and I want to do function what:ever {"x":x,"y"y,"z":z} or something like that iykwim

Continue to help post