For this question, you can store your groovy scripts in Managed Files and pass the parameters to the groovy script through Extended Choice Parameters Plugin.
Or else you can download the Scriptler plugin source code and add it to your /var/lib/jenkins/plugin folder and start Jenkins server. It will work fine.