Help with script for change MAC address

Can you write script?

If yes you can refer to

and

You can combine the two