is there a way to change custom model data of item with function

if item in somebodys inventory and func is called it changes custom model data
Continue to help post