Registration form how to add roles instead of replace role in updating users?

Hi, I have a site in which I am selling access to different games (if they sign up for the games). So I have set up a role for each game. This works great except for people who sign up for more than one game. If someone signs up for more than one, game, the user registration plugin replaces their role with the latest one instead of adding the role. I figured this out when I, as admin, reset my own role to subscriber after submitting the form for testing; oops. Is there any way to change this so people can have more than one role assigned by the same form and also have the update form add another role instead of replacing the role?

Hi Paolo. I think I would set the Update User registration feed for Role to “Preserve Current Role”. Then, you can use this code to ADD an additional role after the user is registered:

Thanks Chris,
i suppose I have to set the right number of the form in the script. Is it correct? I think also I should repeat the script for each form I want to customize. Is it correct?
Is it possible to fix the script for working with a specific “user registration feed”?
thanks a lot.