Jump to content

Check Trial Date


LoudPacks

Recommended Posts

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
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

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