Auto fill a multiselect field (that is also filtered) based on another fields selection

Auto fill a multiselect field (that is also filtered) based on another fields selection

In my form (Add a Students Financial Information), I have a lookup field called "Students Name". 

I would like another field called "All Teams" that is on the same form to auto-fill based on the selection from "Students Name".

I want it to auto fill with the "Enrolled Classes" listed for that Student (from the Add a Student form), but ONLY any classes that have a "Type of Class" field (from the Add a Class form) listed as Competition Cheer Team, Competition Dance Team or Cheer Fun Team.

Is this possible? If yes, is someone able to help with how I would write this script as I have absolutely no idea.