Resource icon

Premium Item Generator but you can manually claim generated resources and relies on unix time 1.0

loop activator is optional. it's sole purpose is to refresh the value of the hologram.

Dependencies:
- PlaceholderAPI
- Javascript Expansion

javascript files:

javascript_placeholders.yml
Code:
unix_now:
  file: unix_now.js
unix_after5days:
  file: unix_after5days.js
unix_format:
  file: unix_format.js
example:
  file: example.js
unix_now.js
Code:
function main() {
    var x = Math.floor(new Date().getTime() / 1000)
    return x+""
} main()
unix_format.js
Code:
function main() {
    var unixTime = Math.floor(new Date().getTime() / 1000)
    var timeDifference = args[0] - unixTime
    if (args[1] == "d") {
        return Math.floor(timeDifference / (60 * 60 * 24))+"";
    } else if (args[1] == "h") {
        return Math.floor(timeDifference / 3600) % 24 +"";
    } else if (args[1] == "m") {
        return Math.floor(timeDifference / 60) % 60+"";
    } else if (args[1] == "s") {
        return timeDifference % 60+"";
    } else {
        return "NULL"
    }
} main()
Top