csrutil disable
Restart computer
In the terminal, type
sudo open /Applications/TextEdit.app /System/Library/LaunchDaemons/com.apple.ManagedClient.enroll.plist
change
<key>com.apple.ManagedClient.enroll</key>
<true/>
to
<key>com.apple.ManagedClient.enroll</key>
<false/>
So that the changes take effect
The script is buggy. It does not recognize the volume where your Mac OS has been installed. It assumes you have a default installation with volumes mounted with their default names, such as "Volumes/Macintosh HD". I have seen installations where the "Macintosh HD" is NOT the name of the volume. Thus, this script would fail miserably. The author would tell you to wipe all your data and reinstall the OS instead of making the script smarter... bad bad.
Here is a command that will tell you the name of your boot volume:
If this command returns anything other than "Macitonsh HD" then the script is likely going to throw errors.
PM me if you need help getting this MDM check disabled.