command /skcreator [<text>] [<text>] [<text>] [<text>] [<integer>]:
    permission: skcreator.use 
    permission message: &cYou do not have the required permission to use this!
    trigger:
        if arg 1 is not set:
            send "&9SkCreator> &7/skcreator help <1|2|3>"
        if arg 1 is "help":
            if arg 2 is "1":
                send "&7&m&l---------------------------"
                send "       &eSkCreator &7&o[32AE] (1/3)"
                send ""
                send "&b/skcreator create [name] &8- &dCreates a skript"
                send "&b/skcreator delete [name] &8- &dDeletes a skript"
                send "&b/skcreator reload [name] &8- &dReloads a skript"
                send "&b/skcreator cmd [name] [file name] &8- &dAdds a cmd to a skript"
                send "&b/skcreator cmdperm [permission] [file name] &8- &dAdds a perm to a cmd"
                send "&b/skcreator cmdnoperm [noperms msg] [file name] &8- &dAdds a perm msg to a cmd"
                send "&b/skcreator addtrigger [file name] &8- &dAdds a trigger movement"
                send "&b/skcreator msg [file name] [msg] &8- &dAdds a msg to a cmd"
                send "&b/skcreator bc [file name] [msg] &8- &dAdds a broadcast to a cmd"
                send ""
                send "    &e<> Optional &c[] Required"
                send "&7&m&l---------------------------"
            if arg 2 is "2":
                send "&7&m&l---------------------------"
                send "       &eSkCreator &7&o[32AE] (2/3)"
                send ""
                send "&b/skcreator gui [file name] [name] [title] [rows] &8- &dCreates a gui"
                send "&b/skcreator guiopen [file name] [name] &8- &dLets you open the gui"
                send "&b/skcreator guiitem [gui name] [item] [file name] [slot] &8- &dLets you set a gui item"
                send "&b/skcreator cancelguiclicks [gui name] [file name] &8- &dCancels inventory cicks with in a gui"
                send "&b/skcreator guiclick [file name] [slot] &8- &dLets you setup inventory clicking methods"
                send ""
                send "    &e<> Optional &c[] Required"
                send "&7&m&l---------------------------"
            if arg 2 is "3":
                send "&7&m&l---------------------------"
                send "       &eSkCreator &7&o[32AE] (3/3)"
                send ""
                send "&b/skcreator joinevent [filename] &8- &dSets up the join event"
                send "&b/skcreator setjoinmsg [filename] [message] &8- &dSets the join message"
                send "&b/skcreator leaveevent [filename] &8- &dSets up the leave event"
                send "&b/skcreator setleavemsg [filename] [message] &8- &dSets the leave message"
                send "&b/skcreator cancelevent [filename] &8- &dAdds the cancel event movement"
                send "&b/skcreator deathevent [filename] &8- &dSets up the death event"
                send "&b/skcreator setdeathmsg [filename] [message] &8- &dSets the death message"
                send ""
                send "    &e<> Optional &c[] Required"
                send "&7&m&l---------------------------"
        else if arg 1 is "setdeathmsg":
            if arg 2 is not set:
                send "&cUnknown usage! Did you mean /skcreator setdeathmsg <file name> <msg>?"
            else:
                if arg 3 is not set:
                    send "&cUnknown usage! Did you mean /skcreator setdeathmsg <file name> <msg>?"
                else:
                    send "&9SkCreator> &7Building the death message..."
                    wait 2 seconds 
                    send "&9SkCreator> &7Adding the final touches..."
                    append "    set death message to ""%arg-3% %arg-4%""" to file path "plugins/Skript/scripts/%arg-2%.sk"
                    send "&9SkCreator> &7Successfully built the death message!"
        else if arg 1 is "deathevent":
            if arg 2 is not set:
                send "&cUnknown usage! Did you mean /skcreator deathevent <file name>?"
            else:
                send "&9SkCreator> &7Building the on death event..."
                append " " to file path "plugins/Skript/scripts/%arg-2%.sk"
                append " " to file path "plugins/Skript/scripts/%arg-2%.sk"
                wait 2 seconds 
                send "&9SkCreator> &7Adding the final touches..."
                append "on death:" to file path "plugins/Skript/scripts/%arg-2%.sk"
                send "&9SkCreator> &7Successfully built the on death event!"
        else if arg 1 is "cancelevent":
            if arg 2 is not set:
                send "&cUnknown usage! Did you mean /skcreator cancelevent <file name>?"
            else:
                send "&9SkCreator> &7Adding the cancel event movement..."
                append "    cancel event" to file path "plugins/Skript/scripts/%arg-2%.sk"
                send "&9SkCreator> &7Successfully added the cancel event movement!"
        else if arg 1 is "setleavemsg":
            if arg 2 is not set:
                send "&cUnknown usage! Did you mean /skcreator setleavemsg <file name> <msg>?"
            else:
                if arg 3 is not set:
                    send "&cUnknown usage! Did you mean /skcreator setleavemsg <file name> <msg>?"
                else:
                    send "&9SkCreator> &7Building the leave message..."
                    wait 2 seconds 
                    send "&9SkCreator> &7Adding the final touches..."
                    append "    set leave message to ""%arg-3% %arg-4%""" to file path "plugins/Skript/scripts/%arg-2%.sk"
                    send "&9SkCreator> &7Successfully built the leave message!"
        else if arg 1 is "leaveevent":
            if arg 2 is not set:
                send "&cUnknown usage! Did you mean /skcreator leaveevent <file name>?"
            else:
                send "&9SkCreator> &7Building the on disconnect event..."
                append " " to file path "plugins/Skript/scripts/%arg-2%.sk"
                append " " to file path "plugins/Skript/scripts/%arg-2%.sk"
                wait 2 seconds 
                send "&9SkCreator> &7Adding the final touches..."
                append "on disconnect:" to file path "plugins/Skript/scripts/%arg-2%.sk"
                send "&9SkCreator> &7Successfully built the on disconnect event!"
        else if arg 1 is "setjoinmsg":
            if arg 2 is not set:
                send "&cUnknown usage! Did you mean /skcreator setjoinmsg <file name> <msg>?"
            else:
                if arg 3 is not set:
                    send "&cUnknown usage! Did you mean /skcreator setjoinmsg <file name> <msg>?"
                else:
                    send "&9SkCreator> &7Building the join message..."
                    wait 2 seconds 
                    send "&9SkCreator> &7Adding the final touches..."
                    append "    set join message to ""%arg-3% %arg-4%""" to file path "plugins/Skript/scripts/%arg-2%.sk"
                    send "&9SkCreator> &7Successfully built the join message!"
        else if arg 1 is "joinevent":
            if arg 2 is not set:
                send "&cUnknown usage! Did you mean /skcreator joinevent <file name>?"
            else:
                send "&9SkCreator> &7Building the on join event..."
                append " " to file path "plugins/Skript/scripts/%arg-2%.sk"
                append " " to file path "plugins/Skript/scripts/%arg-2%.sk"
                wait 2 seconds 
                send "&9SkCreator> &7Adding the final touches..."
                append "on join:" to file path "plugins/Skript/scripts/%arg-2%.sk"
                send "&9SkCreator> &7Successfully built the on join event!" 
        else if arg 1 is "guiclick":
            if arg 2 is not set:
                send "&cUnknown usage! Did you mean /skcreator guiclick <file name> <slot>?"
            else:
                send "&9SkCreator> &7Building the inventory click event..."
                wait 2 seconds 
                send "&9SkCreator> &7Adding the final touches..."
                append "        if index of event-slot is %arg-3%:" to file path "plugins/Skript/scripts/%arg-2%.sk"
                send "&9SkCreator> &7Successfully built the inventory click event!" 
        else if arg 1 is "cancelguiclicks":
            if arg 2 is not set:
                send "&cUnknown usage! Did you mean /skcreator cancelguiclicks <gui name> <file name>?"
            else:
                send "&9SkCreator> &7Building the inventory click cancellation..."
                wait 2 seconds 
                send "&9SkCreator> &7Adding the final touches..."
                append " " to file path "plugins/Skript/scripts/%arg-3%.sk"
                append " " to file path "plugins/Skript/scripts/%arg-3%.sk"
                wait 2 seconds 
                append "on inventory click:" to file path "plugins/Skript/scripts/%arg-3%.sk"
                append "    if event-inventory = (metadata tag ""%arg-2%"" of player):" to file path "plugins/Skript/scripts/%arg-3%.sk"
                append "        cancel event" to file path "plugins/Skript/scripts/%arg-3%.sk"
                send "&9SkCreator> &7Successfully built the inventory click cancellation!" 
        else if arg 1 is "guiitem":
            if arg 2 is not set:
                send "&cUnknown usage! Did you mean /skcreator guiitem <file name> <item> <name> <slot>?"
            else:
                if arg 3 is not set:
                    send "&cUnknown usage! Did you mean /skcreator guiitem <file name> <item> <name> <slot>?"
                else:
                    if arg 4 is not set:
                        send "&cUnknown usage! Did you mean /skcreator guiitem <file name> <item> <name> <slot>?"
                    else:
                        if arg 5 is not set:
                            send "&cUnknown usage! Did you mean /skcreator guiitem <file name> <item> <name> <slot>?"
                        else:
                            send "&9SkCreator> &7Creating the gui item..."
                            append "        set slot %arg-5% of metadata tag ""%arg-2%"" of player to %arg-3%" to file path "plugins/Skript/scripts/%arg-4%.sk"
                            send "&9SkCreator> &7Set the gui item!" 
        else if arg 1 is "guiopen":
            if arg 2 is not set:
                send "&cUnknown usage! Did you mean /skcreator guiopen <file name> <name>?"
            else:
                if arg 3 is not set:
                    send "&cUnknown usage! Did you mean /skcreator guiopen <file name> <name>?"
                else:
                    send "&9SkCreator> &7Creating the open gui aspects..."
                    append "        open (metadata tag ""%arg-3%"" of player) to player" to file path "plugins/Skript/scripts/%arg-2%.sk"
                    send "&9SkCreator> &7Created the open gui aspects!"      
        else if arg 1 is "gui":
            if arg 2 is not set:
                send "&cUnknown usage! Did you mean /skcreator gui <file name> <name> <title> <rows>?"
            else if arg 2 is not set:
                send "&cUnknown usage! Did you mean /skcreator gui <file name> <name> <title> <rows>?"
            else:
                if arg 3 is not set:
                    send "&cUnknown usage! Did you mean /skcreator gui <file name> <name> <title> <rows>?"
                else:
                    if arg 4 is not set:
                        send "&cUnknown usage! Did you mean /skcreator gui <file name> <name> <title> <rows>?"
                    else:
                        if arg 5 is not set:
                            send "&cUnknown usage! Did you mean /skcreator gui <file name> <name> <title> <rows>?"
                        else:
                            send "&9SkCreator> &7Creating the gui..."
                            append "        set metadata tag ""%arg-3%"" of player to chest inventory with %arg-5% rows named ""%arg-4%""" to file path "plugins/Skript/scripts/%arg-2%.sk"
                            send "&9SkCreator> &7Created the gui %arg-3% with the name %arg-4% with rows %arg-5%"
        else if arg 1 is "create":
            if arg 2 is not set:
                send "&cUnknown usage! Did you mean /skcreator create <name>?"
            else if arg 2 is set:
                if file "plugins/skript/scripts/%arg-2%.sk" doesn't exist:
                    send "&9SkCreator> &7Creating the file: %arg-2%.sk!"
                    create file path "plugins/Skript/scripts/%arg-2%.sk"
                    send "&9SkCreator> &7Created the file: %arg-2%.sk!"
        else if arg 1 is "delete":
            if arg 2 is not set:
                send "&cUnknown usage! Did you mean /skcreator delete <name>?"
            else if arg 2 is set:
                if file "plugins/skript/scripts/%arg-2%.sk" exists:
                    send "&9SkCreator> &7Deleting the file: %arg-2%.sk!"
                    delete file path "plugins/Skript/scripts/%arg-2%.sk"
                    send "&9SkCreator> &7Deleted the file: %arg-2%.sk!"
        else if arg 1 is "reload":
            if arg 2 is not set:
                send "&cUnknown usage! Did you mean /skcreator reload <name>?"
            else if arg 2 is set:
                if file "plugins/skript/scripts/%arg-2%.sk" exists:
                    send "&9SkCreator> &7Reloading the file: %arg-2%.sk!"
                    execute console command "sk reload %arg-2%.sk"
                    send "&9SkCreator> &7Reloaded the file: %arg-2%.sk!"
        else if arg 1 is "cmd":
            if arg 2 is not set:
                send "&cUnknown usage! Did you mean /skcreator cmd <name> <file name>?"
            else:
                if arg 3 is not set:
                    send "&cUnknown usage! Did you mean /skcreator cmd <name> <file name>?"
                else if arg 3 is set:
                    if file "plugins/skript/scripts/%arg-3%.sk" exists:
                        send "&9SkCreator> &7Creating the command %arg-2%!"
                        append " " to file path "plugins/Skript/scripts/%arg-3%.sk"
                        wait 1 second 
                        append "command %arg-2%:" to file path "plugins/Skript/scripts/%arg-3%.sk"
                        send "&9SkCreator> &7Created the command %arg-2%!"
        else if arg 1 is "cmdperm":
            if arg 2 is not set:
                send "&cUnknown usage! Did you mean /skcreator cmdperm <perm> <file name>?"
            else:
                if arg 3 is not set:
                    send "&cUnknown usage! Did you mean /skcreator cmdperm <perm> <file name>?"
                else:
                    if file "plugins/skript/scripts/%arg-3%.sk" exists:
                        send "&9SkCreator> &7Adding the permission %arg-2% to the file %arg-3%.sk!"
                        append "    permission: %arg-2%" to file path "plugins/Skript/scripts/%arg-3%.sk"
                        send "&9SkCreator> &7Added the permission %arg-2% to %arg-3%.sk!"
        else if arg 1 is "cmdnoperm":
            if arg 2 is not set:
                send "&cUnknown usage! Did you mean /skcreator cmdnoperm <noperms msg> <file name>?"
            else:
                if arg 3 is not set:
                    send "&cUnknown usage! Did you mean /skcreator cmdnoperm <noperms msg> <file name>?"
                else:
                    if file "plugins/skript/scripts/%arg-3%.sk" exists:
                        send "&9SkCreator> &7Adding the permission message %arg-2% to the file %arg-3%.sk!"
                        append "    permission message: %arg-2%" to file path "plugins/Skript/scripts/%arg-3%.sk"
                        send "&9SkCreator> &7Added the permission message %arg-2% to the file %arg-3%.sk!"
        else if arg 1 is "addtrigger":
            if arg 2 is not set:
                send "&cUnknown usage! Did you mean /skcreator addtrigger <file name>?"
            else:
                if file "plugins/skript/scripts/%arg-2%.sk" exists:
                    send "&9SkCreator> &7Adding the 'trigger' method to the file %arg-2%.sk!"
                    append "    trigger:" to file path "plugins/Skript/scripts/%arg-2%.sk"
                    send "&9SkCreator> &7Added the 'trigger' method to the file %arg-2%.sk!"
        else if arg 1 is "msg":
            if arg 2 is not set:
                send "&cUnknown usage! Did you mean /skcreator msg <file name> <msg>?"
            else:
                if arg 3 is not set:
                    send "&cUnknown usage! Did you mean /skcreator msg <file name> <msg>?"
                else:
                    if file "plugins/skript/scripts/%arg-2%.sk" exists:
                        send "&9SkCreator> &7Adding the message '%arg-3% %arg-4%' to the file %arg-2%.sk!"
                        append "        send ""%arg-3% %arg-4%""" to file path "plugins/Skript/scripts/%arg-2%.sk"
                        send "&9SkCreator> &7Added the message '%arg-3% %arg-4%' to the file %arg-2%.sk!"
        else if arg 1 is "bc":
            if arg 2 is not set:
                send "&cUnknown usage! Did you mean /skcreator bc <file name> <msg>?"
            else:
                if arg 3 is not set:
                    send "&cUnknown usage! Did you mean /skcreator bc <file name> <msg>?"
                else:
                    if file "plugins/skript/scripts/%arg-2%.sk" exists:
                        send "&9SkCreator> &7Adding the broadcast '%arg-3% %arg-4%' to the file %arg-2%.sk!"
                        append "        broadcast ""%arg-3% %arg-4%""" to file path "plugins/Skript/scripts/%arg-2%.sk"
                        send "&9SkCreator> &7Added the broadcast '%arg-3% %arg-4%' to the file %arg-2%.sk!"


