So i herd u liek ganissss,
[CODE]
// NPC made by tricxta
if (playerenters){
if (!isweapon)toweapons Ganis;
setstring this.allowedGanis,Walk,Sit,idle,sword,hurt,dead;
this.ganisShown = 4;//ganis shown at one time
//No need to edit anything below here
//GUI dimensions
this.gap = 64;//Space between items vertically
this.width = 0;
for (this.i=0;this.i<sarraylen(this.allowedGanis);this.i++){//Find the longest text width
this.txtWidth = textwidth(1,arial,c,#I(this.allowedGanis,this.i));
if (this.txtWidth>this.width)this.width = this.txtWidth;
}
this.width += 48;//add a bit on the side for the gani
this.height = min(this.ganisShown,sarraylen(this.allowedGanis))*this.gap;
this.ox = screenwidth-this.width;
this.oy = screenheight-this.height;
}
if (mousewheel && this.on == 1){
this.add = mousewheeldelta;
this.scroll = (this.scroll+this.add)%sarraylen(this.allowedGanis);
openMenu();
}
if (mousedown && this.on == 1){
if (mousescreenx in |this.ox,this.ox+this.width| && mousescreeny in |this.oy,this.oy+this.height|){
for (this.i=0;this.i<min(this.ganisShown,sarraylen(this.allowedGanis));this.i++){
this.checkY = this.oy+this.i*this.gap;
if (mousescreeny in |this.checkY,this.checkY+this.gap|)setani #I(this.allowedGanis,(this.scroll+this.i)%sarraylen(this.allowedGanis)),;
}
}
}
if (keypressed && strtofloat(#p(0)) == 87 && isweapon){//w is pressed
this.on = (this.on+1)%2;
if (this.on == 1)openMenu();
else closeMenu();
}
function openMenu(){
hideimgs 300,301+this.ganisShown2;
showpoly 300,{this.ox,this.oy,this.ox+this.width,this.oy,this.ox+this.width,this.oy+this.height,this.ox,this.oy+this.height};
changeimgvis 300,4;
changeimgcolors 300,0,0,0,0;
for (this.i=0;this.i<min(this.ganisShown,sarraylen(this.allowedGanis));this.i++){
showtext 301+this.i2,this.ox+(this.width-48)/2,this.oy+this.gap/2+this.ithis.gap,arial,c,#I(this.allowedGanis,(this.scroll+this.i)%sarraylen(this.allowedGanis));
changeimgvis 301+this.i2,5;
showani 302+this.i2,this.ox+this.width-48,this.oy+10+this.ithis.gap,2,#I(this.allowedGanis,(this.scroll+this.i)%sarraylen(this.allowedGanis)),;
changeimgvis 302+this.i*2,5;
}
}
function closeMenu(){
hideimgs 300,301+this.ganisShown*2;
}
[/php]