Try something like this:
import System static def GetAttributeValue(Change): Value = false if Change.Assignments.Count > 0: if Change.Assignments.Group != null: AssignedGroup = Change.Assignments.Latest().Group.Title CurrentUserName = Change.GetCurrentUserName.ToLower() AssignedGroupTitle = Change.GetObjectByAttribute("System.Group", "Title", AssignedGroup) for item in AssignedGroupTitle.UserGroups: if item.User.Name.ToLower() == CurrentUserName: Value = true return Value