Код:
void Кнопка(int x ,int y , int w , int h ,int &Var ,char *Button_Text ,LPDIRECT3DDEVICE9 pDevice,LPD3DXFONT pFont)
{
int AA = GREEN;

if(IsInBox(x,y-2,110,h+2))
{AA = RED;
if(GetAsyncKeyState(VK_LBUTTON)&1)
{
if(Var == 1 && Var !=0)
{
Var = 0;
}
else if(Var == 0)
{
Var = 1;
}
}
}
if(Var == 0)
{
DrawBorder(x+100,y,10,10,RED,pDevice);
}
if(Var == 1)
{
DrawBox(x+100,y,w,h,GREEN,pDevice);
}
Draw_Text(x,y-2,AA,Button_Text,pFont);
}




void Ползунок(float x,float y,float w,float h,char *Button_Text,int &GetCurrent ,D3DCOLOR Color,LPDIRECT3DDEVICE9 pDevice,LPD3DXFONT pFont)
{
   POINT mpos; 
   GetCursorPos(&mpos); 
   ScreenToClient(GetForegroundWindow(),&mpos);

if(IsInBox(x,y,w,h-42))
   {
     if(GetAsyncKeyState(VK_LBUTTON))
      {
         GetCurrent = mpos.y-(y);
         Sleep(10);
      }
   }
     char test[MAX_PATH];
    //Draw_Text(x+w+202,y-2,YELLOW,Button_Text,pFont);
    DrawBorder(x,y,w,h,Color,pDevice);
    DrawBox(x+1,y+GetCurrent+2,w-1,38,WHITE,pDevice);
    DrawBorder(x,y+GetCurrent+2,w,38,RED,pDevice);
   
    


}

void PP(float x,float y,float w,float h,LPDIRECT3DDEVICE9 pDevice,LPD3DXFONT pFont)
{
int GC=wh.f20;
Ползунок(x,y,w,h,"",wh.f20,GREY,pDevice,pFont);
int qw;
if(GC>=0){qw=0;}
if(GC>=40){qw=1;}
if(GC>=80){qw=2;}
if(GC>=120){qw=3;}
if(GC>=160){qw=4;}


if(qw==0){
Draw_Text(140,70,RED,"Автор Король™",pFont);
Draw_Text(140,90,YELLOW,"qraqfafaf",pFont);
Draw_Text(140,110,GREEN,"Afagsegshg™",pFont);
Draw_Text(140,130,BLUE,"ZXvqrAFRFA",pFont);
}

if(qw==1){
Кнопка(10,10,10,10,wh.b1,"Заморозка",pDevice,pFont);
Кнопка(10,30,10,10,wh.b2,"Взлом гп",pDevice,pFont);
Кнопка(10,50,10,10,wh.b3,"Выгул собаки",pDevice,pFont);
Кнопка(10,70,10,10,wh.b4,"Радар",pDevice,pFont);
Кнопка(10,90,11,10,wh.b5,"Купоны",pDevice,pFont);
Кнопка(10,110,10,10,wh.b6,"Смена",pDevice,pFont);
Кнопка(10,130,10,10,wh.b7,"Телевизор",pDevice,pFont);
Кнопка(10,150,10,10,wh.b8,"Прицел",pDevice,pFont);
Кнопка(10,170,10,10,wh.b9,"WallHack",pDevice,pFont);
Кнопка(10,190,10,10,wh.b10,"Рэмбо",pDevice,pFont);

Кнопка(170,10,10,10,wh.a1,"Заморозка2",pDevice,pFont);
Кнопка(170,30,10,10,wh.a2,"Взлом гп2",pDevice,pFont);
Кнопка(170,50,10,10,wh.a3,"Выгул собаки2",pDevice,pFont);
Кнопка(170,70,10,10,wh.a4,"Радар2",pDevice,pFont);
Кнопка(170,90,11,10,wh.a5,"Купоны2",pDevice,pFont);
Кнопка(170,110,10,10,wh.a6,"Смена2",pDevice,pFont);
Кнопка(170,130,10,10,wh.a7,"Телевизор2",pDevice,pFont);
Кнопка(170,150,10,10,wh.a8,"Прицел2",pDevice,pFont);
Кнопка(170,170,10,10,wh.a9,"WallHack2",pDevice,pFont);
Кнопка(170,190,10,10,wh.a10,"Рэмбо2",pDevice,pFont);
}

if(qw==2){
Кнопка(10,10,10,10,wh.b11,"Функция 1",pDevice,pFont);
Кнопка(10,30,10,10,wh.b12,"Функция 2",pDevice,pFont);
Кнопка(10,50,10,10,wh.b13,"Функция 3",pDevice,pFont);
Кнопка(10,70,10,10,wh.b14,"Функция 4",pDevice,pFont);
Кнопка(10,90,10,10,wh.b15,"Функция 5",pDevice,pFont);
Кнопка(10,110,10,10,wh.b16,"Функция 6",pDevice,pFont);
Кнопка(10,130,10,10,wh.b17,"Функция 7",pDevice,pFont);
Кнопка(10,150,10,10,wh.b18,"Функция 8",pDevice,pFont);
Кнопка(10,170,10,10,wh.b19,"Функция 9",pDevice,pFont);
Кнопка(10,190,10,10,wh.b20,"Функция 10",pDevice,pFont);

Кнопка(170,10,10,10,wh.a11,"Функция 11",pDevice,pFont);
Кнопка(170,30,10,10,wh.a12,"Функция 12",pDevice,pFont);
Кнопка(170,50,10,10,wh.a13,"Функция 13",pDevice,pFont);
Кнопка(170,70,10,10,wh.a14,"Функция 14",pDevice,pFont);
Кнопка(170,90,10,10,wh.a15,"Функция 15",pDevice,pFont);
Кнопка(170,110,10,10,wh.a16,"Функция 16",pDevice,pFont);
Кнопка(170,130,10,10,wh.a17,"Функция 17",pDevice,pFont);
Кнопка(170,150,10,10,wh.a18,"Функция 18",pDevice,pFont);
Кнопка(170,170,10,10,wh.a19,"Функция 19",pDevice,pFont);
Кнопка(170,190,10,10,wh.a20,"Функция 20",pDevice,pFont);
}

if(qw==3){
Кнопка(10,10,10,10,wh.f1,"Анти-отдача",pDevice,pFont);
Кнопка(10,30,10,10,wh.f2,"Скорострел",pDevice,pFont);
Кнопка(10,50,10,10,wh.f3,"Б.Патроны",pDevice,pFont);
Кнопка(10,70,10,10,wh.f4,"Спидхак",pDevice,pFont);
Кнопка(10,90,10,10,wh.f5,"Мего снайперка",pDevice,pFont);
Кнопка(10,110,10,10,wh.f6,"Убийство своих",pDevice,pFont);
Кнопка(10,130,10,10,wh.f7,"Астрал",pDevice,pFont);
Кнопка(10,150,10,10,wh.f8,"Автошот",pDevice,pFont);
Кнопка(10,170,10,10,wh.f9,"Джампхак",pDevice,pFont);
Кнопка(10,190,10,10,wh.f10,"Подбор оружия",pDevice,pFont);

Кнопка(170,10,10,10,wh.a21,"Анти-отдача2",pDevice,pFont);
Кнопка(170,30,10,10,wh.a21,"Скорострел2",pDevice,pFont);
Кнопка(170,50,10,10,wh.a23,"Б.Патроны2",pDevice,pFont);
Кнопка(170,70,10,10,wh.a24,"Спидхак2",pDevice,pFont);
Кнопка(170,90,10,10,wh.a25,"Мего снайперка2",pDevice,pFont);
Кнопка(170,110,10,10,wh.a26,"Убийство своих2",pDevice,pFont);
Кнопка(170,130,10,10,wh.a27,"Астрал2",pDevice,pFont);
Кнопка(170,150,10,10,wh.a28,"Автошот2",pDevice,pFont);
Кнопка(170,170,10,10,wh.a29,"Джампхак2",pDevice,pFont);
Кнопка(170,190,10,10,wh.a30,"Подбор оружия2",pDevice,pFont);
}

if(qw==4){
Кнопка(10,10,10,10,wh.f11,"Валшот",pDevice,pFont);
Кнопка(10,30,10,10,wh.f12,"ESP GM",pDevice,pFont);
Кнопка(10,50,10,10,wh.f13,"ESP BOX",pDevice,pFont);
Кнопка(10,70,10,10,wh.f14,"ESP LINE",pDevice,pFont);
Кнопка(10,90,10,10,wh.f15,"ESP SK",pDevice,pFont);
Кнопка(10,110,10,10,wh.f16,"AIM",pDevice,pFont);
Кнопка(10,130,10,10,wh.f17,"Анти урон",pDevice,pFont);
Кнопка(10,150,10,10,wh.f18,"Б. респавн",pDevice,pFont);
Кнопка(10,170,10,10,wh.f19,"Анти-мигание",pDevice,pFont);
Кнопка(10,190,10,10,wh.b1,"Респ на месте смерти",pDevice,pFont);

Кнопка(170,10,10,10,wh.a31,"Валшот2",pDevice,pFont);
Кнопка(170,30,10,10,wh.a32,"ESP GM2",pDevice,pFont);
Кнопка(170,50,10,10,wh.a33,"ESP BOX2",pDevice,pFont);
Кнопка(170,70,10,10,wh.a34,"ESP LINE2",pDevice,pFont);
Кнопка(170,90,10,10,wh.a35,"ESP SK2",pDevice,pFont);
Кнопка(170,110,10,10,wh.a36,"AIM2",pDevice,pFont);
Кнопка(170,130,10,10,wh.a37,"Анти урон2",pDevice,pFont);
Кнопка(170,150,10,10,wh.a38,"Б. респавн2",pDevice,pFont);
Кнопка(170,170,10,10,wh.a39,"Анти-мигание2",pDevice,pFont);
Кнопка(170,190,10,10,wh.a40,"Респ на месте смерти2",pDevice,pFont);
}

}

Использовать:
DrawBox(3,3,350,200,BLACK,pDevice);
PP(338,3,15,199,pDevice,pFont);