// Script that has a chance for the title to change to something creepy out of a list of creepy messages
// vars
const Titles = ["Wake up", "Behind you", "Do you hear it too?"]
const RegularTitle = "Minecraft 1.7.3"
const CreepyTitleChance = 200 // one in X


// Determines wether title will be "creepy" or not
if (Math.floor(Math.random() * CreepyTitleChance) + 1 == 1) {
    console.info("Creepy title")


    // Get random title
    var RandomChance = Math.floor(Math.random() * Titles.length)
    console.info(`Random title number is: ${RandomChance}`)

    var SelectedTitle = Titles[RandomChance]
    console.info(`Selected title is: ${SelectedTitle}`)
    // Set client title
    Client.setTitle(SelectedTitle)
}
else {
    console.info("Regular title")

    Client.setTitle(RegularTitle)
}