This is the code for how to send message spams on iMessage to your friends, this could also work on Facebook Messenger or any other messaging app.
#Install pip into terminal (iTerm): curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
#After that add this: python get-pip.py
#Install pyautogui in terminal with: python3 -m pip install pyautogui
#Finally you should run this program and clicked on the messaging app of your choice and the code should run properly.