Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
3.1 kB
3
Indexable
Never
function Decryptify(code) { // very basic and easy to decrypt encryption for NO REASON, I don't want to use hashes and stuff (BORING!)
    let mode;
    let mode2;
    code = code.split("\n").splice(12,code.split("\n").length-4).toString()
    if (code[0] == "A")
        mode = 1
    else if (code[0] == "B")
        mode = -1
    else
        mode = 100

    if (code[1] == "A")
        mode2 = -1
    else if (code[1] == "B")
        mode2 = 1
    else
        mode2 = 100
        
    let mode3 = parseInt(code[2])*2
    let mode4 = parseInt(code[3])*2
    let mode5 = parseInt(code[4])*2
    let mode6 = (mode3+mode4+mode5)
    code = code.substring(5,code.length)
    let NOE = false
    for (let index = 0; index < code.length; index++) {
        if (code[index] != ",")
            if (NOE) {
                code = ReplaceAt(code,index,String.fromCharCode((code[index].charCodeAt(0) - (mode2+(mode6)))/2));
                NOE = false
            }
            else {
                code = ReplaceAt(code,index,String.fromCharCode((code[index].charCodeAt(0) - ((mode6)-mode))/2));
                NOE = true
            }
    }
    return code
}
function Encryptify(code) { // very basic and easy to decrypt encryption for NO REASON, I don't want to use hashes and stuff (BORING!)
    let mode = randomize(0,2)*2
    let mode2 = randomize(0,2)*2
    let mode3 = (randomize(0,5)+1)
    let mode4 = (randomize(0,5)+1)
    let mode5 = (randomize(0,5)+1)
    let mode6 = (mode3*2+mode4*2+mode5*2)
    let NOE = false
    for (let index = 0; index < code.length; index++) {
        if (code[index] != ",")
            if (NOE) {
                code = ReplaceAt(code,index,String.fromCharCode(code[index].charCodeAt(0) * 2 + ((mode2-1)+(mode6))));
                NOE = false
            }
            else {
                code = ReplaceAt(code,index,String.fromCharCode(code[index].charCodeAt(0) * 2 + ((mode6)-mode+1)));
                NOE = true
            }
    }
    code = code.replaceAll(",","\n")
    if (mode)
        mode = "A"
    else
        mode = "B"
    if (mode2)
        mode2 = "B"
    else
        mode2 = "A"
    info = `
    ########################################################################
    ###                                                                  ###
    ###       A Saved Project From Datapack Maker In MCDev Studio        ###
    ###                                                                  ###
    ###  Don't modify anything in this file don't even leave a comment!  ###
    ###    Doing anything in this file can cause the project to break    ###
    ###       Forever and you won't be able to restore it anymore!       ###
    ###        So be careful and have fun with datapack maker! ;D        ###
    ###                                                                  ###
    ########################################################################\n\n`
    ending = `

Datapack Maker: https://mcdev.studio/datapack/
MCDev: https://mcdev.studio/
Good luck and Have Fun!`
    code = info + mode + mode2 + mode3 + mode4 + mode5 + code + ending
    return code
}