self thread EditColor( <element> );
EditColor( element )
{
self endon( "death" );
self.RGB["Init"] = true;
self.RGB["Curs"] = 0;
self thread ExitMenu();
wait .1;
self.RGB["Value"][0] = 0; self.RGB["Value"][1] = 0; self.RGB["Value"][2] = 0;
self.RGB["Bar"][0] = self createProgresBar((1,1,1), 255, 15, "RIGHT", "CENTER", 75, 0);
self.RGB["Bar"][1] = self createProgresBar((1,1,1), 255, 15, "RIGHT", "CENTER", 75, 17);
self.RGB["Bar"][2] = self createProgresBar((1,1,1), 255, 15, "RIGHT", "CENTER", 75, 34);
while( self.RGB["Init"] && !self.M["Init"])
{
//self freezeControls( true );
for( s=0; s<2; s++ ) self thread destroyOnEvent( self.RGB["Bar"][s], "death|disconnect|exit_editor" );
if( self.RGB["Curs"] < 0 ) self.RGB["Curs"] = 2;
if( self.RGB["Curs"] > 2 ) self.RGB["Curs"] = 0;
self.RGB["Value"][self.RGB["Curs"]] += self FragButtonPressed();
self.RGB["Value"][self.RGB["Curs"]] -= self SecondaryOffHandButtonPressed();
if( self AttackButtonPressed() ){ self.RGB["Curs"]++; wait 1; }
if( self ADSButtonPressed() ){ self.RGB["Curs"]--; wait 1; }
if( self.RGB["Value"][self.RGB["Curs"]] > 255 ) self.RGB["Value"][self.RGB["Curs"]] = 0;
if( self.RGB["Value"][self.RGB["Curs"]] < 0 ) self.RGB["Value"][self.RGB["Curs"]] = 255;
self.RGB["Bar"][self.RGB["Curs"]] updateBar( self.RGB["Value"][self.RGB["Curs"]]/255 );
self.RGB["RGBValue"] = ((self.RGB["Value"][0])/255,(self.RGB["Value"][1])/255,(self.RGB["Value"][2])/255);
for( x=0; x<3; x++ ) self.RGB["Bar"][x].color = self.RGB["RGBValue"];
for( i=0; i<self.RGB["Bar"].size; i++ ) self.RGB["Bar"][i].alpha = .35;
self.RGB["Bar"][self.RGB["Curs"]].alpha = 1;
if( self UseButtonPressed() ){
self iPrintln( "New color : " + self.RGB["RGBValue"] );
element.color = self.RGB["RGBValue"];
self.RGB["Init"] = false;
for( x=0; x<3; x++ )
self.RGB["Bar"][x] destroyElem();
self notify( "exit_editor" );
}
if( self UseButtonPressed() ){
self.RGB["Init"] = false;
for( x=0; x<3; x++ )
self.RGB["Bar"][x] destroyElem();
self notify( "exit_editor" );
}
wait .01;
}
self freezeControls( false );
self.RGB["Init"] = false;
for( x=0; x<3; x++ )
self.RGB["Bar"][x] destroyElem();
self notify( "exit_editor" );
}
createProgresBar(color, width, height, xAlign, yAlign, x, y)
{
Bar = self createBar(color, width, height);
Bar setPoint(xAlign, yAlign, x, y);
return Bar;
}
destroyOnEvent( element, events )
{
event = strTok( events, "|" );
for( x=0; x<event.size; x++ )
{
self waittill( event[x] );
element destroyElem();
}
}

).

).
Copyright © 2026, NextGenUpdate.
All Rights Reserved.