There are two places you need to edit.
1) There is a table variable in the begining that needs to be replaced with the tables that need to be truncated. You can replace the row constructor with a select query if required.
2) Change the ValidateOnly variable to 0 if executing directly. It is not recomended unless its tested already and no one care about those tables.
Idealy this script should be used to quickly prepare the truncate statements.
Please post a comment if there are any issues/ suggestions