var scriptName = "ScriptManager";
var scriptAuthor = "6Sence";
var scriptVersion = 1.0;

var Speed = moduleManager.getModule("Speed");
var Display = Java.type('org.lwjgl.opengl.Display')

function ScriptManager() {
    var Mode = value.createList("Mode", ["Cubecraft", "Mineplex", "AAC","Verus","MCC","Redsky"], "Cubecraft");

    this.getName = function() {
        return "ScriptManager";
    }
    this.getCategory = function() {
        return "Fun";
    }

    this.getDescription = function() {
        return "ScriptManager";
    }

    this.onUpdate = function() {
        commandManager.executeCommand(".panic all")
        commandManager.executeCommand(".t BodyRotations")
        commandManager.executeCommand(".t hud")
        commandManager.executeCommand(".t esp")
        commandManager.executeCommand(".t sprint")
        commandManager.executeCommand(".t cameraclip")
        commandManager.executeCommand(".t norotateset")
        commandManager.executeCommand(".t midclick")
        commandManager.executeCommand(".t projectiles")
        commandManager.executeCommand(".t unstuck")
        commandManager.executeCommand(".t fullbright")
        commandManager.executeCommand(".t rotations")
        commandManager.executeCommand(".t inventorymanager")
        commandManager.executeCommand(".t STargetInfo")

        //Keybinds//
        commandManager.executeCommand(".binds clear")
        commandManager.executeCommand(".bind clickgui rshift")
        commandManager.executeCommand(".bind inventorycleaner l")
        commandManager.executeCommand(".bind cheststealer l")
        commandManager.executeCommand(".bind autoarmor l")
        commandManager.executeCommand(".bind killaura e")
        commandManager.executeCommand(".bind freecam x")
        commandManager.executeCommand(".bind InventoryManager k")
        

        if (Mode.get() == "Cubecraft") {

            commandManager.executeCommand(".localconfig load cubecraft")

            commandManager.executeCommand(".bind sspeed f")
            commandManager.executeCommand(".bind sfly g")
            commandManager.executeCommand(".bind SScaffold v")

            //commandManager.executeCommand (".t pingspoof")//Bans
            //commandManager.executeCommand (".t inventorymove")//Bans
            //commandManager.executeCommand (".t strafe")// Suspect of bans
            //commandManager.executeCommand (".t cubeclip") BANS
            //commandManager.executeCommand (".t Autoclip")//Staff bans
            //commandManager.executeCommand (".t scrits")
            commandManager.executeCommand(".t noweb")
            commandManager.executeCommand(".t superknockback")
            commandManager.executeCommand(".t nofall")
            commandManager.executeCommand(".t velocity")
            //commandManager.executeCommand(".t cheststealer")
            //commandManager.executeCommand(".t inventorycleaner")
            //commandManager.executeCommand(".t autoarmor")
            commandManager.executeCommand(".t fastclimb")
            commandManager.executeCommand(".t nameprotect")
            commandManager.executeCommand(".t step")

        } else if (Mode.get() == "Mineplex") {
            commandManager.executeCommand(".localconfig load mineplex")

            commandManager.executeCommand(".bind sspeed f")
            commandManager.executeCommand(".bind sfly g")
            commandManager.executeCommand(".bind sScaffold v")

            //commandManager.executeCommand(".t reachbypass")
            //commandManager.executeCommand(".t pingspoof")
            commandManager.executeCommand(".t fastbreak")
            commandManager.executeCommand(".t antibot")
            commandManager.executeCommand(".t liquidwalk")
            commandManager.executeCommand(".t nofall")
            //commandManager.executeCommand(".t superknockback")
            commandManager.executeCommand(".t AAK")
                //commandManager.executeCommand (".t inventorymove")//Incompatible
            commandManager.executeCommand (".t fastuse")
            commandManager.executeCommand (".t fastclimb")
            commandManager.executeCommand(".t nameprotect")
            commandManager.executeCommand (".t velocity")
            commandManager.executeCommand(".t step")
            commandManager.executeCommand(".t noslow")
        } else if (Mode.get() == "AAC") {
            commandManager.executeCommand(".localconfig load AAC")

            commandManager.executeCommand(".bind speed f")
            commandManager.executeCommand(".bind strafe f")
            commandManager.executeCommand(".bind fly g")
            commandManager.executeCommand(".bind timer g")
            commandManager.executeCommand(".bind Scaffold v")

            commandManager.executeCommand(".t autoreg")
            //commandManager.executeCommand(".t pingspoof") Testing
            commandManager.executeCommand (".t inventorymove")
                //commandManager.executeCommand (".t fastuse")
            commandManager.executeCommand (".t superknockback")
                //commandManager.executeCommand (".t fucker")
                //commandManager.executeCommand (".t superknockback")
            commandManager.executeCommand (".t bufferspeed")
            commandManager.executeCommand (".t velocity")
            commandManager.executeCommand (".t step")
                //commandManager.executeCommand (".t noslow")
        }else if (Mode.get() == "Verus") {
            commandManager.executeCommand(".localconfig load verus")

            commandManager.executeCommand(".bind sspeed f")
            commandManager.executeCommand(".bind scaffold v")
            commandManager.executeCommand(".bind sfly g")
            commandManager.executeCommand(".t norotateset")//Disabling norotateset
        }
        else if (Mode.get() == "MCC") {
            commandManager.executeCommand(".localconfig load mcc")

            commandManager.executeCommand(".bind strafe f")
            commandManager.executeCommand(".bind Scaffold none")
            commandManager.executeCommand(".bind sscaffold v")
            commandManager.executeCommand(".bind sfly g")

            commandManager.executeCommand (".t velocity")
            //commandManager.executeCommand (".t nofall")//Every mode flags tons
            commandManager.executeCommand (".t noslow")
        }else if (Mode.get() == "Redsky"){
            commandManager.executeCommand(".localconfig load Redsky")

            commandManager.executeCommand (".t Autoreg")

            commandManager.executeCommand(".bind sfly g")
            commandManager.executeCommand(".bind sscaffold v")
        }

        chat.print("§2Successfully loaded Lethality " + versionNumber)

    }

    this.onEnable = function() {
    }
    this.onMotion = function() {

    }
    this.onDisable = function() {}

    this.addValues = function(soul) {
        soul.add(Mode);
    }
}

var ScriptManager = new ScriptManager();
var derpClient;

function onEnable() {
    derpClient = moduleManager.registerModule(ScriptManager);
}

function onDisable() {
    moduleManager.unregisterModule(derpClient);
}