Put it in a GUIControl. I.e:
PHP Code:
new GuiControl("Arm_Inventory") { // Assuming it's your inventory...
x = 0;
y = 0;
width = 200; // You'll probably have to adjust this to fit your GUI...
height = 200;
// pay attention to the use of thiso
for (temp.v = thiso.selected_num2; temp.v < thiso.selected_num2 + 91; temp.v ++) {
//new GuiShowImgCtrl(); stuff
}
}
Then you can do: Arm_Inventory.clearcontrols();
To destroy all the controls or just hide().
I'm not sure what your original script's purpose is but I feel like it's getting really complicated when it doesn't need to be.