@name Wire Chat 1.0
@inputs Memory Memory2 Memory3 WL1:wirelink WL2:wirelink WL3:wirelink User:entity User2:entity User3:entity On
@outputs Kick Kick2 Kick3 
@persist Power I Mutelist:array Name:string Chat:array Text:string Text2:string Text3:string 
@trigger Memory Memory2 Memory3 On User User2 User3

###########################################
##########Created by: Holywiremod##########
###########################################
#   Wire Chat 1.0 allows communication    #
#  between three different users without  #
#   worry of being monitored by admins.   #
###########################################

if(first()|duped()) {
    print("Welcome to Wire Chat 1.0 by Holywiremod! 
Use the ignition key to turn this device on. 
Type /cmd in the chatroom for a command list.")
}

if(Power == 0 & On){
    Power = 1
    Name = owner():name():sub(1,10)+"'s Chatroom"
    soundPlay(1,0,"/buttons/button19.wav")
    
    WL1:egpBox(1,vec2(256,256),vec2(512,512))    #Background Color
    WL1:egpColor(1,vec(0,0,100))
    
    WL1:egpBox(2,vec2(258,250),vec2(475,450))    #Chat Program Layout
    WL1:egpColor(2,vec(100,100,100))
    WL1:egpBox(3,vec2(258,35),vec2(475,20))
    WL1:egpColor(3,vec(0,0,200))
    WL1:egpBox(4,vec2(485,35),vec2(20,20))
    WL1:egpColor(4,vec(200,0,0))
    
    WL1:egpBox(5,vec2(258,230),vec2(455,350))    ##Chat Program Layout: Text Boxes
    WL1:egpColor(5,vec(0,0,0))
    WL1:egpBox(6,vec2(258,440),vec2(455,50))    
    WL1:egpColor(6,vec(0,0,0))
    WL1:egpBox(7,vec2(455,428),vec2(60,25))    
    WL1:egpColor(7,vec(0,255,0))
    WL1:egpBox(8,vec2(455,453),vec2(60,25))    
    WL1:egpColor(8,vec(255,0,0))
    
    WL1:egpText(9,"ENTER",vec2(432,418))         ##Chat Program Layout: Text
    WL1:egpColor(9,vec(0,55,0))
    WL1:egpText(10,"DELETE",vec2(428,443))
    WL1:egpColor(10,vec(55,0,0))
    WL1:egpText(11,"Wire Chat 1.0 -                                                                             -   o   x",vec2(22,25))
    WL1:egpColor(11,vec(255,255,255))
    
    WL1:egpText(12,"",vec2(33,418))                #User Text Initiation
    WL1:egpText(13,"Online: ",vec2(33,60))
    WL1:egpText(14,"",vec2(33,80))
    WL1:egpText(15,"",vec2(33,100))
    WL1:egpText(16,"",vec2(33,120))
    WL1:egpText(17,"",vec2(33,140))
    WL1:egpText(18,"",vec2(33,160))
    WL1:egpText(19,"",vec2(33,180))
    WL1:egpText(20,"",vec2(33,200))
    WL1:egpText(21,"",vec2(33,220))
    WL1:egpText(22,"",vec2(33,240))
    WL1:egpText(23,"",vec2(33,260))
    WL1:egpText(24,"",vec2(33,280))
    WL1:egpText(25,"",vec2(33,300))
    WL1:egpText(26,"",vec2(33,320))
    WL1:egpText(27,"",vec2(33,340))
    WL1:egpText(28,"",vec2(33,360))
    WL1:egpText(29,"",vec2(33,380))
    
    WL1:egpColor(12,vec(0,255,0))                  #User Text Colors
    WL1:egpColor(13,vec(0,255,0))
    WL1:egpColor(14,vec(0,255,0))
    WL1:egpColor(15,vec(0,255,0))
    WL1:egpColor(16,vec(0,255,0))
    WL1:egpColor(17,vec(0,255,0))
    WL1:egpColor(18,vec(0,255,0))
    WL1:egpColor(19,vec(0,255,0))
    WL1:egpColor(20,vec(0,255,0))
    WL1:egpColor(21,vec(0,255,0))
    WL1:egpColor(22,vec(0,255,0))
    WL1:egpColor(23,vec(0,255,0))
    WL1:egpColor(24,vec(0,255,0))
    WL1:egpColor(25,vec(0,255,0))
    WL1:egpColor(26,vec(0,255,0))
    WL1:egpColor(27,vec(0,255,0))
    WL1:egpColor(28,vec(0,255,0))
    WL1:egpColor(29,vec(0,255,0))
    
    WL1:egpText(30,"Characters: "+Text:length()+"/25",vec2(42,438))  #Max characters
    WL1:egpColor(30,vec(0,255,0))
    
    WL1:egpText(31,Name,vec2(142,25))  #Chatroom name    
    
    
    
    WL2:egpBox(1,vec2(256,256),vec2(512,512))    #Background Color
    WL2:egpColor(1,vec(0,0,100))
    
    WL2:egpBox(2,vec2(258,250),vec2(475,450))    #Chat Program Layout
    WL2:egpColor(2,vec(100,100,100))
    WL2:egpBox(3,vec2(258,35),vec2(475,20))
    WL2:egpColor(3,vec(0,0,200))
    WL2:egpBox(4,vec2(485,35),vec2(20,20))
    WL2:egpColor(4,vec(200,0,0))
    
    WL2:egpBox(5,vec2(258,230),vec2(455,350))    ##Chat Program Layout: Text Boxes
    WL2:egpColor(5,vec(0,0,0))
    WL2:egpBox(6,vec2(258,440),vec2(455,50))    
    WL2:egpColor(6,vec(0,0,0))
    WL2:egpBox(7,vec2(455,428),vec2(60,25))    
    WL2:egpColor(7,vec(0,255,0))
    WL2:egpBox(8,vec2(455,453),vec2(60,25))    
    WL2:egpColor(8,vec(255,0,0))
    
    WL2:egpText(9,"ENTER",vec2(432,418))         ##Chat Program Layout: Text
    WL2:egpColor(9,vec(0,55,0))
    WL2:egpText(10,"DELETE",vec2(428,443))
    WL2:egpColor(10,vec(55,0,0))
    WL2:egpText(11,"Wire Chat 1.0 -                                                                             -   o   x",vec2(22,25))
    WL2:egpColor(11,vec(255,255,255))
    
    WL2:egpText(12,"",vec2(33,418))                #User Text Initiation
    WL2:egpText(13,"Online: ",vec2(33,60))
    WL2:egpText(14,"",vec2(33,80))
    WL2:egpText(15,"",vec2(33,100))
    WL2:egpText(16,"",vec2(33,120))
    WL2:egpText(17,"",vec2(33,140))
    WL2:egpText(18,"",vec2(33,160))
    WL2:egpText(19,"",vec2(33,180))
    WL2:egpText(20,"",vec2(33,200))
    WL2:egpText(21,"",vec2(33,220))
    WL2:egpText(22,"",vec2(33,240))
    WL2:egpText(23,"",vec2(33,260))
    WL2:egpText(24,"",vec2(33,280))
    WL2:egpText(25,"",vec2(33,300))
    WL2:egpText(26,"",vec2(33,320))
    WL2:egpText(27,"",vec2(33,340))
    WL2:egpText(28,"",vec2(33,360))
    WL2:egpText(29,"",vec2(33,380))
    
    WL2:egpColor(12,vec(0,255,0))                  #User Text Colors
    WL2:egpColor(13,vec(0,255,0))
    WL2:egpColor(14,vec(0,255,0))
    WL2:egpColor(15,vec(0,255,0))
    WL2:egpColor(16,vec(0,255,0))
    WL2:egpColor(17,vec(0,255,0))
    WL2:egpColor(18,vec(0,255,0))
    WL2:egpColor(19,vec(0,255,0))
    WL2:egpColor(20,vec(0,255,0))
    WL2:egpColor(21,vec(0,255,0))
    WL2:egpColor(22,vec(0,255,0))
    WL2:egpColor(23,vec(0,255,0))
    WL2:egpColor(24,vec(0,255,0))
    WL2:egpColor(25,vec(0,255,0))
    WL2:egpColor(26,vec(0,255,0))
    WL2:egpColor(27,vec(0,255,0))
    WL2:egpColor(28,vec(0,255,0))
    WL2:egpColor(29,vec(0,255,0))
    
    WL2:egpText(30,"Characters: "+Text2:length()+"/25",vec2(42,438))   #Max characters
    WL2:egpColor(30,vec(0,255,0))
    
    WL2:egpText(31,Name,vec2(142,25))  #Chatroom name  
    
    
    
    WL3:egpBox(1,vec2(256,256),vec2(512,512))    #Background Color
    WL3:egpColor(1,vec(0,0,100))
    
    WL3:egpBox(2,vec2(258,250),vec2(475,450))    #Chat Program Layout
    WL3:egpColor(2,vec(100,100,100))
    WL3:egpBox(3,vec2(258,35),vec2(475,20))
    WL3:egpColor(3,vec(0,0,200))
    WL3:egpBox(4,vec2(485,35),vec2(20,20))
    WL3:egpColor(4,vec(200,0,0))
    
    WL3:egpBox(5,vec2(258,230),vec2(455,350))    ##Chat Program Layout: Text Boxes
    WL3:egpColor(5,vec(0,0,0))
    WL3:egpBox(6,vec2(258,440),vec2(455,50))    
    WL3:egpColor(6,vec(0,0,0))
    WL3:egpBox(7,vec2(455,428),vec2(60,25))    
    WL3:egpColor(7,vec(0,255,0))
    WL3:egpBox(8,vec2(455,453),vec2(60,25))    
    WL3:egpColor(8,vec(255,0,0))
    
    WL3:egpText(9,"ENTER",vec2(432,418))         ##Chat Program Layout: Text
    WL3:egpColor(9,vec(0,55,0))
    WL3:egpText(10,"DELETE",vec2(428,443))
    WL3:egpColor(10,vec(55,0,0))
    WL3:egpText(11,"Wire Chat 1.0 -                                                                             -   o   x",vec2(22,25))
    WL3:egpColor(11,vec(255,255,255))
    
    WL3:egpText(12,"",vec2(33,418))                #User Text Initiation
    WL3:egpText(13,"Online: ",vec2(33,60))
    WL3:egpText(14,"",vec2(33,80))
    WL3:egpText(15,"",vec2(33,100))
    WL3:egpText(16,"",vec2(33,120))
    WL3:egpText(17,"",vec2(33,140))
    WL3:egpText(18,"",vec2(33,160))
    WL3:egpText(19,"",vec2(33,180))
    WL3:egpText(20,"",vec2(33,200))
    WL3:egpText(21,"",vec2(33,220))
    WL3:egpText(22,"",vec2(33,240))
    WL3:egpText(23,"",vec2(33,260))
    WL3:egpText(24,"",vec2(33,280))
    WL3:egpText(25,"",vec2(33,300))
    WL3:egpText(26,"",vec2(33,320))
    WL3:egpText(27,"",vec2(33,340))
    WL3:egpText(28,"",vec2(33,360))
    WL3:egpText(29,"",vec2(33,380))
    
    WL3:egpColor(12,vec(0,255,0))                  #User Text Colors
    WL3:egpColor(13,vec(0,255,0))
    WL3:egpColor(14,vec(0,255,0))
    WL3:egpColor(15,vec(0,255,0))
    WL3:egpColor(16,vec(0,255,0))
    WL3:egpColor(17,vec(0,255,0))
    WL3:egpColor(18,vec(0,255,0))
    WL3:egpColor(19,vec(0,255,0))
    WL3:egpColor(20,vec(0,255,0))
    WL3:egpColor(21,vec(0,255,0))
    WL3:egpColor(22,vec(0,255,0))
    WL3:egpColor(23,vec(0,255,0))
    WL3:egpColor(24,vec(0,255,0))
    WL3:egpColor(25,vec(0,255,0))
    WL3:egpColor(26,vec(0,255,0))
    WL3:egpColor(27,vec(0,255,0))
    WL3:egpColor(28,vec(0,255,0))
    WL3:egpColor(29,vec(0,255,0))
    
    WL3:egpText(30,"Characters: "+Text3:length()+"/25",vec2(42,438))   #Max characters
    WL3:egpColor(30,vec(0,255,0))
    
    WL3:egpText(31,Name,vec2(142,25))  #Chatroom name  
}
elseif(Power == 1) {
    #Screen 1
    if(Memory > 32 & Memory < 127 & Text:length() < 25) {
        if(Mutelist:concat():find(User:steamID()) == 1) {
            Text = "You have been muted!"
        }
        else {
            Text = Text + toChar(Memory)
        }
    }
    elseif(Memory == 32 & Text:length() < 25) {
        Text = Text + " "
    }
    elseif(Memory == 127) {
        Text = Text:sub(1,Text:length()-1)
    }
    elseif(Memory == 148) {
        Text = ""
    }
    elseif(Memory == 13) {
        T = Text:explode(" ")
        if(T[1,string] == "/cmd" & User == owner()) {
            print("/cmd - Opens command list
/clr - Clear chatbox
/kick # - Kick player #
/mute # - Mute player #
/unmute # - Unmute player #
/name [name] - Renames chatroom to [name]")
        }
        elseif(T[1,string] == "/clr"& User == owner()) {
            Chat = array()
        }
        elseif(T[1,string] == "/name"& User == owner()) {
            Name = Text:sub(6,Text:length())
        }
        elseif(T[1,string] == "/kick"& User == owner()) {
            if(T[2,string] == "1" & User:name() != "") {
                Kick = !Kick
                Chat:insertString(1,User:name():sub(1,23)+" has been kicked!")
            }
            elseif(T[2,string] == "2" & User2:name() != "") {
                Kick2 = !Kick2
                Chat:insertString(1,User2:name():sub(1,23)+" has been kicked!")
            }
            elseif(T[2,string] == "3" & User3:name() != "") {
                Kick3 = !Kick3
                Chat:insertString(1,User3:name():sub(1,23)+" has been kicked!")
            }
            else {
                hint("Error: Invalid user or user number. Pick a number from 1-3.",5)
            }
        }
        elseif(T[1,string] == "/mute"& User == owner()) {
            if(T[2,string] == "1") {
                if(Mutelist:concat():find(User:steamID()) != 1 & User != owner()) {
                    Mutelist:insertString(1,User:steamID())
                    print(User:name()+" has been added to the mute list.")
                }
                elseif(User == owner()) {
                    hint("Error: "+User:name()+" cannot be muted!",5)
                }
                else {
                    hint("Error: "+User:name()+" is already on the mute list!",5)
                }
            }
            elseif(T[2,string] == "2") {
                if(Mutelist:concat():find(User2:steamID()) != 1 & User2 != owner()) {
                    Mutelist:insertString(1,User2:steamID())
                    print(User2:name()+" has been added to the mute list.")
                }
                elseif(User2 == owner()) {
                    hint("Error: "+User2:name()+" cannot be muted!",5)
                }
                else {
                    hint("Error: "+User2:name()+" is already on the mute list!",5)
                }
            }
            elseif(T[2,string] == "3") {
                if(Mutelist:concat():find(User3:steamID()) != 1 & User3 != owner()) {
                    Mutelist:insertString(1,User3:steamID())
                    print(User3:name()+" has been added to the mute list.")
                }
                elseif(User3 == owner()) {
                    hint("Error: "+User3:name()+" cannot be muted!",5)
                }
                else {
                    hint("Error: "+User3:name()+" is already on the mute list!",5)
                }
            }
            else {
                hint("Error: Invalid user number. Pick a value from 1-3.",5)
            }
        }
        elseif(T[1,string] == "/unmute"& User == owner()) {
            I = 0
            if(T[2,string] == "1") {
                while(I <= Mutelist:count()) {
                    if(Mutelist[I,string] == User:steamID()){
                        Mutelist:remove(I)
                        print(User:name()+" has been unmuted!")
                    }
                    I++
                }
            }
            elseif(T[2,string] == "2") {
                while(I <= Mutelist:count()) {
                    if(Mutelist[I,string] == User2:steamID()){
                        Mutelist:remove(I)
                        print(User2:name()+" has been unmuted!")
                    }
                    I++
                }
            }
            elseif(T[2,string] == "3") {
                while(I <= Mutelist:count()) {
                    if(Mutelist[I,string] == User3:steamID()){
                        Mutelist:remove(I)
                        print(User3:name()+" has been unmuted!")
                    }
                    I++
                }
            }
            else {
                hint("Error: Invalid user number. Pick a value from 1-3.",5)
            }
        }
        else {
            if(Mutelist:concat():find(User:steamID()) != 1) {
                Chat:insertString(1,"("+time("hour")+":"+time("min")+") 1: "+Text)
            }
            User2:soundPlay(2,0,"buttons/button17.wav")
            User3:soundPlay(3,0,"buttons/button17.wav")
        }
        Text = ""
        if(Chat[17,string] != "") {
            Chat:popString()
        }
        User:soundPlay(1,0,"buttons/button17.wav")
    }
    
    #Screen 2
    if(Memory2 > 32 & Memory2 < 127 & Text2:length() < 25) {
        if(Mutelist:concat():find(User2:steamID()) == 1) {
            Text2 = "You have been muted!"
        }
        else {
            Text2 = Text2 + toChar(Memory2)
        }
    }
    elseif(Memory2 == 32 & Text2:length() < 25) {
        Text2 = Text2 + " "
    }
    elseif(Memory2 == 127) {
        Text2 = Text2:sub(1,Text2:length()-1)
    }
    elseif(Memory2 == 148) {
        Text2 = ""
    }
    elseif(Memory2 == 13) {
        T2 = Text2:explode(" ")
        if(T2[1,string] == "/cmd" & User2 == owner()) {
            print("/cmd - Opens command list
/clr - Clear chatbox
/kick # - Kick player #
/mute # - Mute player #
/unmute # - Unmute player #
/name [name] - Renames chatroom to [name]")
        }
        elseif(T2[1,string] == "/clr"& User2 == owner()) {
            Chat = array()
        }
        elseif(T2[1,string] == "/name"& User2 == owner()) {
            Name = Text2:sub(6,Text2:length())
        }
        elseif(T2[1,string] == "/kick"& User2 == owner()) {
            if(T2[2,string] == "1" & User:name() != "") {
                Kick = !Kick
                Chat:insertString(1,User:name():sub(1,23)+" has been kicked!")
            }
            elseif(T2[2,string] == "2" & User2:name() != "") {
                Kick2 = !Kick2
                Chat:insertString(1,User2:name():sub(1,23)+" has been kicked!")
            }
            elseif(T2[2,string] == "3" & User3:name() != "") {
                Kick3 = !Kick3
                Chat:insertString(1,User3:name():sub(1,23)+" has been kicked!")
            }
            else {
                hint("Error: Invalid user or user number. Pick a number from 1-3.",5)
            }
        }
        elseif(T2[1,string] == "/mute"& User2 == owner()) {
            if(T2[2,string] == "1") {
                if(Mutelist:concat():find(User:steamID()) != 1 & User != owner()) {
                    Mutelist:insertString(1,User:steamID())
                    print(User:name()+" has been added to the mute list.")
                }
                elseif(User == owner()) {
                    hint("Error: "+User:name()+" cannot be muted!",5)
                }
                else {
                    hint("Error: "+User:name()+" is already on the mute list!",5)
                }
            }
            elseif(T2[2,string] == "2") {
                if(Mutelist:concat():find(User2:steamID()) != 1 & User2 != owner()) {
                    Mutelist:insertString(1,User2:steamID())
                    print(User2:name()+" has been added to the mute list.")
                }
                elseif(User2 == owner()) {
                    hint("Error: "+User2:name()+" cannot be muted!",5)
                }
                else {
                    hint("Error: "+User2:name()+" is already on the mute list!",5)
                }
            }
            elseif(T2[2,string] == "3") {
                if(Mutelist:concat():find(User3:steamID()) != 1 & User3 != owner()) {
                    Mutelist:insertString(1,User3:steamID())
                    print(User3:name()+" has been added to the mute list.")
                }
                elseif(User3 == owner()) {
                    hint("Error: "+User3:name()+" cannot be muted!",5)
                }
                else {
                    hint("Error: "+User3:name()+" is already on the mute list!",5)
                }
            }
            else {
                hint("Error: Invalid user number. Pick a value from 1-3.",5)
            }
        }
        elseif(T2[1,string] == "/unmute"& User2 == owner()) {
            I = 0
            if(T2[2,string] == "1") {
                while(I <= Mutelist:count()) {
                    if(Mutelist[I,string] == User:steamID()){
                        Mutelist:remove(I)
                        print(User:name()+" has been unmuted!")
                    }
                    I++
                }
            }
            elseif(T2[2,string] == "2") {
                while(I <= Mutelist:count()) {
                    if(Mutelist[I,string] == User2:steamID()){
                        Mutelist:remove(I)
                        print(User2:name()+" has been unmuted!")
                    }
                    I++
                }
            }
            elseif(T2[2,string] == "3") {
                while(I <= Mutelist:count()) {
                    if(Mutelist[I,string] == User3:steamID()){
                        Mutelist:remove(I)
                        print(User3:name()+" has been unmuted!")
                    }
                    I++
                }
            }
            else {
                hint("Error: Invalid user number. Pick a value from 1-3.",5)
            }
        }
        else {
            if(Mutelist:concat():find(User2:steamID()) != 1) {
                Chat:insertString(1,"("+time("hour")+":"+time("min")+") 2: "+Text2)
            }
            User:soundPlay(2,0,"buttons/button17.wav")
            User3:soundPlay(3,0,"buttons/button17.wav")
        }
        Text2 = ""
        if(Chat[17,string] != "") {
            Chat:popString()
        }
        User2:soundPlay(1,0,"buttons/button17.wav")
    }
    
    #Screen 3
    if(Memory3 > 32 & Memory3 < 127 & Text3:length() < 25) {
        if(Mutelist:concat():find(User3:steamID()) == 1) {
            Text3 = "You have been muted!"
        }
        else {
            Text3 = Text3 + toChar(Memory3)
        }
    }
    elseif(Memory3 == 32 & Text3:length() < 25) {
        Text3 = Text3 + " "
    }
    elseif(Memory3 == 127) {
        Text3 = Text3:sub(1,Text3:length()-1)
    }
    elseif(Memory3 == 148) {
        Text3 = ""
    }
    elseif(Memory3 == 13) {
        T3 = Text3:explode(" ")
        if(T3[1,string] == "/cmd" & User3 == owner()) {
            print("/cmd - Opens command list
/clr - Clear chatbox
/kick # - Kick player #
/mute # - Mute player #
/unmute # - Unmute player #
/name [name] - Renames chatroom to [name]")
        }
        elseif(T3[1,string] == "/clr"& User3 == owner()) {
            Chat = array()
        }
        elseif(T3[1,string] == "/name"& User3 == owner()) {
            Name = Text3:sub(6,Text3:length())
        }
        elseif(T3[1,string] == "/kick"& User3 == owner()) {
            if(T3[2,string] == "1" & User:name() != "") {
                Kick = !Kick
                Chat:insertString(1,User:name():sub(1,23)+" has been kicked!")
            }
            elseif(T3[2,string] == "2" & User2:name() != "") {
                Kick2 = !Kick2
                Chat:insertString(1,User2:name():sub(1,23)+" has been kicked!")
            }
            elseif(T3[2,string] == "3" & User3:name() != "") {
                Kick3 = !Kick3
                Chat:insertString(1,User3:name():sub(1,23)+" has been kicked!")
            }
            else {
                hint("Error: Invalid user or user number. Pick a number from 1-3.",5)
            }
        }
        elseif(T3[1,string] == "/mute"& User3 == owner()) {
            if(T3[2,string] == "1") {
                if(Mutelist:concat():find(User:steamID()) != 1 & User != owner()) {
                    Mutelist:insertString(1,User:steamID())
                    print(User:name()+" has been added to the mute list.")
                }
                elseif(User == owner()) {
                    hint("Error: "+User:name()+" cannot be muted!",5)
                }
                else {
                    hint("Error: "+User:name()+" is already on the mute list!",5)
                }
            }
            elseif(T3[2,string] == "2") {
                if(Mutelist:concat():find(User2:steamID()) != 1 & User2 != owner()) {
                    Mutelist:insertString(1,User2:steamID())
                    print(User2:name()+" has been added to the mute list.")
                }
                elseif(User2 == owner()) {
                    hint("Error: "+User2:name()+" cannot be muted!",5)
                }
                else {
                    hint("Error: "+User2:name()+" is already on the mute list!",5)
                }
            }
            elseif(T3[2,string] == "3") {
                if(Mutelist:concat():find(User3:steamID()) != 1 & User3 != owner()) {
                    Mutelist:insertString(1,User3:steamID())
                    print(User3:name()+" has been added to the mute list.")
                }
                elseif(User3 == owner()) {
                    hint("Error: "+User3:name()+" cannot be muted!",5)
                }
                else {
                    hint("Error: "+User3:name()+" is already on the mute list!",5)
                }
            }
            else {
                hint("Error: Invalid user number. Pick a value from 1-3.",5)
            }
        }
        elseif(T3[1,string] == "/unmute"& User3 == owner()) {
            I = 0
            if(T3[2,string] == "1") {
                while(I <= Mutelist:count()) {
                    if(Mutelist[I,string] == User:steamID()){
                        Mutelist:remove(I)
                        print(User:name()+" has been unmuted!")
                    }
                    I++
                }
            }
            elseif(T3[2,string] == "2") {
                while(I <= Mutelist:count()) {
                    if(Mutelist[I,string] == User2:steamID()){
                        Mutelist:remove(I)
                        print(User2:name()+" has been unmuted!")
                    }
                    I++
                }
            }
            elseif(T3[2,string] == "3") {
                while(I <= Mutelist:count()) {
                    if(Mutelist[I,string] == User3:steamID()){
                        Mutelist:remove(I)
                        print(User3:name()+" has been unmuted!")
                    }
                    I++
                }
            }
            else {
                hint("Error: Invalid user number. Pick a value from 1-3.",5)
            }
        }
        else {
            if(Mutelist:concat():find(User3:steamID()) != 1) {
                Chat:insertString(1,"("+time("hour")+":"+time("min")+") 3: "+Text3)
            }
            User2:soundPlay(2,0,"buttons/button17.wav")
            User:soundPlay(3,0,"buttons/button17.wav")
        }
        Text3 = ""
        if(Chat[17,string] != "") {
            Chat:popString()
        }
        User3:soundPlay(1,0,"buttons/button17.wav")
    }
    
    #All screens
    
    if(~User | ~User2 | ~User3) {
        if(User:name() != "") {
            Chat:insertString(1,User:name():sub(1,23)+" (1) joined!")
            Text = ""
            User:soundPlay(1,0,"garrysmod/save_load4.wav")
            User2:soundPlay(2,0,"garrysmod/save_load4.wav")
            User3:soundPlay(3,0,"garrysmod/save_load4.wav")
        }
        elseif(User2:name() != "") {
            Chat:insertString(1,User2:name():sub(1,23)+" (2) joined!")
            Text2 = ""
            User:soundPlay(1,0,"garrysmod/save_load4.wav")
            User2:soundPlay(2,0,"garrysmod/save_load4.wav")
            User3:soundPlay(3,0,"garrysmod/save_load4.wav")
        }
        elseif(User3:name() != "") {
            Chat:insertString(1,User3:name():sub(1,23)+" (3) joined!")
            Text3 = ""
            User:soundPlay(1,0,"garrysmod/save_load4.wav")
            User2:soundPlay(2,0,"garrysmod/save_load4.wav")
            User3:soundPlay(3,0,"garrysmod/save_load4.wav")
        }
        else {
            Chat:insertString(1,User:name():sub(1,23)+"Player disconnected.")
            Kick = 0
            Kick2 = 0
            Kick3 = 0
            User:soundPlay(1,0,"buttons/latchunlocked2.wav")
            User2:soundPlay(2,0,"buttons/latchunlocked2.wav")
            User3:soundPlay(2,0,"buttons/latchunlocked2.wav")
        }
    }
    
    WL1:egpText(12,Text,vec2(33,418))
    WL1:egpText(13,"Online: "+User:name():sub(1,10)+","+User2:name():sub(1,10)+","+User3:name():sub(1,10),vec2(33,60))
    WL1:egpText(14,Chat[16,string],vec2(33,80))
    WL1:egpText(15,Chat[15,string],vec2(33,100))
    WL1:egpText(16,Chat[14,string],vec2(33,120))
    WL1:egpText(17,Chat[13,string],vec2(33,140))
    WL1:egpText(18,Chat[12,string],vec2(33,160))
    WL1:egpText(19,Chat[11,string],vec2(33,180))
    WL1:egpText(20,Chat[10,string],vec2(33,200))
    WL1:egpText(21,Chat[9,string],vec2(33,220))
    WL1:egpText(22,Chat[8,string],vec2(33,240))
    WL1:egpText(23,Chat[7,string],vec2(33,260))
    WL1:egpText(24,Chat[6,string],vec2(33,280))
    WL1:egpText(25,Chat[5,string],vec2(33,300))
    WL1:egpText(26,Chat[4,string],vec2(33,320))
    WL1:egpText(27,Chat[3,string],vec2(33,340))
    WL1:egpText(28,Chat[2,string],vec2(33,360))
    WL1:egpText(29,Chat[1,string],vec2(33,380))
    WL1:egpText(30,"Characters: "+Text:length()+"/25",vec2(33,443))
    WL1:egpText(31,Name,vec2(142,25))
    
    WL2:egpText(12,Text2,vec2(33,418))
    WL2:egpText(13,"Online: "+User:name():sub(1,10)+","+User2:name():sub(1,10)+","+User3:name():sub(1,10),vec2(33,60))
    WL2:egpText(14,Chat[16,string],vec2(33,80))
    WL2:egpText(15,Chat[15,string],vec2(33,100))
    WL2:egpText(16,Chat[14,string],vec2(33,120))
    WL2:egpText(17,Chat[13,string],vec2(33,140))
    WL2:egpText(18,Chat[12,string],vec2(33,160))
    WL2:egpText(19,Chat[11,string],vec2(33,180))
    WL2:egpText(20,Chat[10,string],vec2(33,200))
    WL2:egpText(21,Chat[9,string],vec2(33,220))
    WL2:egpText(22,Chat[8,string],vec2(33,240))
    WL2:egpText(23,Chat[7,string],vec2(33,260))
    WL2:egpText(24,Chat[6,string],vec2(33,280))
    WL2:egpText(25,Chat[5,string],vec2(33,300))
    WL2:egpText(26,Chat[4,string],vec2(33,320))
    WL2:egpText(27,Chat[3,string],vec2(33,340))
    WL2:egpText(28,Chat[2,string],vec2(33,360))
    WL2:egpText(29,Chat[1,string],vec2(33,380))
    WL2:egpText(30,"Characters: "+Text2:length()+"/25",vec2(33,443))
    WL2:egpText(31,Name,vec2(142,25))
    
    WL3:egpText(12,Text3,vec2(33,418))
    WL3:egpText(13,"Online: "+User:name():sub(1,10)+","+User2:name():sub(1,10)+","+User3:name():sub(1,10),vec2(33,60))
    WL3:egpText(14,Chat[16,string],vec2(33,80))
    WL3:egpText(15,Chat[15,string],vec2(33,100))
    WL3:egpText(16,Chat[14,string],vec2(33,120))
    WL3:egpText(17,Chat[13,string],vec2(33,140))
    WL3:egpText(18,Chat[12,string],vec2(33,160))
    WL3:egpText(19,Chat[11,string],vec2(33,180))
    WL3:egpText(20,Chat[10,string],vec2(33,200))
    WL3:egpText(21,Chat[9,string],vec2(33,220))
    WL3:egpText(22,Chat[8,string],vec2(33,240))
    WL3:egpText(23,Chat[7,string],vec2(33,260))
    WL3:egpText(24,Chat[6,string],vec2(33,280))
    WL3:egpText(25,Chat[5,string],vec2(33,300))
    WL3:egpText(26,Chat[4,string],vec2(33,320))
    WL3:egpText(27,Chat[3,string],vec2(33,340))
    WL3:egpText(28,Chat[2,string],vec2(33,360))
    WL3:egpText(29,Chat[1,string],vec2(33,380))
    WL3:egpText(30,"Characters: "+Text3:length()+"/25",vec2(33,443))
    WL3:egpText(31,Name,vec2(142,25))
}
