Jump to content

Check Trial Date


Recommended Posts

Posted (edited)

Ok so I do a lot of private scripts and local testing for SDN scripts sometimes. To prevent people from stealing the script or not buying it, due to having a local test copy, you can place this into your main.java in run() or whatever your start method is; it checks their username and if the date of the trial has passed:

DateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
try {
if(sdf.parse("2001-9-11").after(new Date()) && getClient().getUsername().equalsIgnoreCase("Maldesto")){
log("Welcome " + getClient().getUsername().toString() +  "! " + "You are authorized to use this script until: 9/11/2001");

//normal start methods

} else {
log("Welcome " + getClient().getUsername().toString() +  "! " +  "You're not authorized to use this script!");
stop();
}
} catch (ParseException e) {

}
Edited by LoudPacks
  • Like 2

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...