Wrote pigscriptgenerator