@name DrawBrush by Scriptis
@persist Color:vector On Supercrate:entity Rainbow OColor:vector
runOnTick(1)
runOnChat(1)
entity():setAlpha(0)
if (first()) {Color=vec(256,256,256)}
if (chatClk(owner()) & owner():lastSaid()=="-brush") {
    hideChat(1)
    On=!On
    if (On) {hint("Brush turned on",5)} else {hint("Brush turned off",5)}
}
if (chatClk(owner()) & owner():lastSaid()=="-rainbow") {hideChat(1) Rainbow=!Rainbow if (Rainbow) {hint("RandColor On",5) OColor=Color} else {hint("RandColor off",5) Color=OColor}}
if (chatClk(owner()) & owner():lastSaid():sub(1,7)=="-color ") {
    hideChat(1)
    A=owner():lastSaid():sub(8)
    Args=A:explode(" ")
    Color=vec(Args[1,string]:toNumber(),Args[2,string]:toNumber(),Args[3,string]:toNumber())
    hint("Color set to "+Color:x()+", "+Color:y()+", "+Color:z(),5)
}
if (chatClk(owner()) & owner():lastSaid()=="-colorall") {
    hideChat(1)
    hint("Coloring all props",5)
    #findIncludePlayerProps(owner():name())
    #findByClass("prop_physics")
    #Stuff=findToArray()
    #print(Stuff:count())
    #for (I=1, Stuff:count()) {
    #    Stuff[I,entity]:setMaterial("debug/debugdrawflat") Stuff[I,entity]:setColor(Color)
    #}
}
if (owner():keyUse() & On) {owner():aimEntity():setMaterial("debug/debugdrawflat") owner():aimEntity():setColor(Color)}


if (Rainbow) {Color=vec(randint(1,255),randint(1,255),randint(1,255))}

