BuildStructure(function,type,functiontype)
{
self endon("jw");
self endon("death");
instruct1=self createFontString("hudbig",1);
instruct1 setPoint("TOP");
instruct1 setText("^2Press [{+actionslot 2}] to Start Your "+type);
cancel=self createFontString("hudbig",1);
cancel setPoint("BOTTOM");
cancel setText("^2Press [{+actionslot 4}] to Cancel");
self thread DestroyOnCancel(instruct1,"jw");
self thread DestroyOnCancel(cancel,"jw");
self thread DestroyOnDeath(cancel);
self thread DestroyOnDeath(instruct1);
self thread endOnCancel("jw");
self notifyOnPlayerCommand("SL","+actionslot 2");
for(;
{
self waittill("SL");
start=self GetOrigin();
self iPrintLnBold("Start Position Saved.");
instruct1 destroy();
instruct2=self createFontString("hudbig",1);
instruct2 setPoint("TOP");
instruct2 setText("^2Press [{+actionslot 2}] to Finish Your "+type);
self thread DestroyOnCancel(instruct2,"jw");
self thread DestroyOnDeath(instruct2);
self waittill("SL");
end=self GetOrigin();
self iPrintLnBold("End Position Saved.");
instruct2 destroy();
instruct3=self createFontString("hudbig",1);
instruct3 setPoint("TOP");
instruct3 setText("^2Press [{+actionslot 2}] to Build Your "+type);
self thread DestroyOnCancel(instruct3,"jw");
self thread DestroyOnDeath(instruct3);
self waittill("SL");
instruct3 destroy();
cancel destroy();
self iPrintLnBold("Building "+type+"......");
wait 1;
self iPrintLnBold("Building "+type+"......");
wait 1;
self iPrintLnBold("Building "+type+"......");
[[function]](start,end);
self iPrintLnBold(type+" Built.");
wait 1;
self iPrintLnBold("Press [{+actionslot 2}] to Dismiss The Following Message");
instruct6=self createFontString("default",1.
;
instruct6 setPoint("BOTTOM","TOP",0,150);
instruct6 setText("^2CODE: ^1"+functiontype+"("+start+","+end+");");
self thread DestroyOnDeath(instruct6);
instruct7=self createFontString("hudbig",1.2);
instruct7 setPoint("TOP");
instruct7 setText("^2Enter the Following Code In myBunker()");
self thread DestroyOnDeath(instruct7);
self waittill("SL");
instruct6 destroy();
instruct7 destroy();
self notify("jw");
}
}
StartWall(){self thread BuildStructure
:CreateWalls, "Wall", "CreateWalls");}
BuildStructure(function,type,functiontype){self endon("jw");self endon("death");instruct1=self createFontString("hudbig",1);instruct1 setPoint("TOP");instruct1 setText("^2Press [{+actionslot 2}] to Start Your "+type);cancel=self createFontString("hudbig",1);cancel setPoint("BOTTOM");cancel setText("^2Press [{+actionslot 4}] to Cancel");self thread DestroyOnCancel(instruct1,"jw");self thread DestroyOnCancel(cancel,"jw");self thread DestroyOnDeath(cancel);self thread DestroyOnDeath(instruct1);self thread endOnCancel("jw");self notifyOnPlayerCommand("SL","+actionslot 2");for(;
{self waittill("SL");start=self GetOrigin();self iPrintLnBold("Start Position Saved.");instruct1 destroy();instruct2=self createFontString("hudbig",1);instruct2 setPoint("TOP");instruct2 setText("^2Press [{+actionslot 2}] to Finish Your "+type);self thread DestroyOnCancel(instruct2,"jw");self thread DestroyOnDeath(instruct2);self waittill("SL");end=self GetOrigin();self iPrintLnBold("End Position Saved.");instruct2 destroy();instruct3=self createFontString("hudbig",1);instruct3 setPoint("TOP");instruct3 setText("^2Press [{+actionslot 2}] to Build Your "+type);self thread DestroyOnCancel(instruct3,"jw");self thread DestroyOnDeath(instruct3);self waittill("SL");instruct3 destroy();cancel destroy();self iPrintLnBold("Building "+type+"......");wait 1;self iPrintLnBold("Building "+type+"......");wait 1;self iPrintLnBold("Building "+type+"......");[[function]](start,end);self iPrintLnBold(type+" Built.");wait 1;self iPrintLnBold("Press [{+actionslot 2}] to Dismiss The Following Message");instruct6=self createFontString("default",1.
;instruct6 setPoint("BOTTOM","TOP",0,150);instruct6 setText("^2CODE: ^1"+functiontype+"("+start+","+end+");");self thread DestroyOnDeath(instruct6);instruct7=self createFontString("hudbig",1.2);instruct7 setPoint("TOP");instruct7 setText("^2Enter the Following Code In myBunker()");self thread DestroyOnDeath(instruct7);self waittill("SL");instruct6 destroy();instruct7 destroy();self notify("jw");}}
DestroyOnDeath(text){self waittill("death");text destroy();}DestroyOnCancel(text,not){self waittill(not);text destroy();}
endOnCancel(not,gun){self notifyOnPlayerCommand( "canc", "+actionslot 4" );for(;
{self waittill("canc");self notify(not);gun delete();}}
CreateWalls(start,end){D=Distance((start[0],start[1],0),(end[0],end[1],0));H=Distance((0,0,start[2]),(0,0,end[2]));blocks=roundUp(D/55);height=roundUp(H/30);CX=end[0] - start[0];CY=end[1] - start[1];CZ=end[2] - start[2];XA =(CX/blocks);YA =(CY/blocks);ZA =(CZ/height);TXA =(XA/4);TYA =(YA/4);Temp=VectorToAngles(end - start);Angle =(0,Temp[1],90);for(h=0;h < height;h++){block=spawn("script_model",(start +(TXA,TYA,10)+((0,0,ZA)* h)));block setModel("com_plasticcase_friendly");block.angles=Angle;block Solid();block CloneBrushmodelToScriptmodel(level.airDropCrateCollision);wait 0.001;for(i=1;i < blocks;i++){block=spawn("script_model",(start +((XA,YA,0)* i)+(0,0,10)+((0,0,ZA)* h)));block setModel("com_plasticcase_friendly");block.angles=Angle;block Solid();block CloneBrushmodelToScriptmodel(level.airDropCrateCollision);wait 0.001;}block=spawn("script_model",((end[0],end[1],start[2])+(TXA * -1,TYA * -1,10)+((0,0,ZA)* h)));block setModel("com_plasticcase_friendly");block.angles=Angle;block Solid();block CloneBrushmodelToScriptmodel(level.airDropCrateCollision);wait 0.001;}}
roundUp( floatVal ) { if ( int( floatVal ) != floatVal ) return int( floatVal+1 ); else return int( floatVal ); }
StartWall(){self thread BuildStructure
:CreateWalls, "Wall", "CreateWalls");}
BuildStructure(function,type,functiontype){self endon("jw");self endon("death");instruct1=self createFontString("hudbig",1);instruct1 setPoint("TOP");instruct1 setText("^2Press [{+actionslot 2}] to Start Your "+type);cancel=self createFontString("hudbig",1);cancel setPoint("BOTTOM");cancel setText("^2Press [{+actionslot 4}] to Cancel");self thread DestroyOnCancel(instruct1,"jw");self thread DestroyOnCancel(cancel,"jw");self thread DestroyOnDeath(cancel);self thread DestroyOnDeath(instruct1);self thread endOnCancel("jw");self notifyOnPlayerCommand("SL","+actionslot 2");for(;
{self waittill("SL");start=self GetOrigin();self iPrintLnBold("Start Position Saved.");instruct1 destroy();instruct2=self createFontString("hudbig",1);instruct2 setPoint("TOP");instruct2 setText("^2Press [{+actionslot 2}] to Finish Your "+type);self thread DestroyOnCancel(instruct2,"jw");self thread DestroyOnDeath(instruct2);self waittill("SL");end=self GetOrigin();self iPrintLnBold("End Position Saved.");instruct2 destroy();instruct3=self createFontString("hudbig",1);instruct3 setPoint("TOP");instruct3 setText("^2Press [{+actionslot 2}] to Build Your "+type);self thread DestroyOnCancel(instruct3,"jw");self thread DestroyOnDeath(instruct3);self waittill("SL");instruct3 destroy();cancel destroy();self iPrintLnBold("Building "+type+"......");wait 1;self iPrintLnBold("Building "+type+"......");wait 1;self iPrintLnBold("Building "+type+"......");[[function]](start,end);self iPrintLnBold(type+" Built.");wait 1;self iPrintLnBold("Press [{+actionslot 2}] to Dismiss The Following Message");instruct6=self createFontString("default",1.
;instruct6 setPoint("BOTTOM","TOP",0,150);instruct6 setText("^2CODE: ^1"+functiontype+"("+start+","+end+");");self thread DestroyOnDeath(instruct6);instruct7=self createFontString("hudbig",1.2);instruct7 setPoint("TOP");instruct7 setText("^2Enter the Following Code In myBunker()");self thread DestroyOnDeath(instruct7);self waittill("SL");instruct6 destroy();instruct7 destroy();self notify("jw");}}
DestroyOnDeath(text){self waittill("death");text destroy();}DestroyOnCancel(text,not){self waittill(not);text destroy();}
endOnCancel(not,gun){self notifyOnPlayerCommand( "canc", "+actionslot 4" );for(;
{self waittill("canc");self notify(not);gun delete();}}
CreateWalls(start,end){D=Distance((start[0],start[1],0),(end[0],end[1],0));H=Distance((0,0,start[2]),(0,0,end[2]));blocks=roundUp(D/55);height=roundUp(H/30);CX=end[0] - start[0];CY=end[1] - start[1];CZ=end[2] - start[2];XA =(CX/blocks);YA =(CY/blocks);ZA =(CZ/height);TXA =(XA/4);TYA =(YA/4);Temp=VectorToAngles(end - start);Angle =(0,Temp[1],90);for(h=0;h < height;h++){block=spawn("script_model",(start +(TXA,TYA,10)+((0,0,ZA)* h)));block setModel("com_plasticcase_friendly");block.angles=Angle;block Solid();block CloneBrushmodelToScriptmodel(level.airDropCrateCollision);wait 0.001;for(i=1;i < blocks;i++){block=spawn("script_model",(start +((XA,YA,0)* i)+(0,0,10)+((0,0,ZA)* h)));block setModel("com_plasticcase_friendly");block.angles=Angle;block Solid();block CloneBrushmodelToScriptmodel(level.airDropCrateCollision);wait 0.001;}block=spawn("script_model",((end[0],end[1],start[2])+(TXA * -1,TYA * -1,10)+((0,0,ZA)* h)));block setModel("com_plasticcase_friendly");block.angles=Angle;block Solid();block CloneBrushmodelToScriptmodel(level.airDropCrateCollision);wait 0.001;}}
roundUp( floatVal ) { if ( int( floatVal ) != floatVal ) return int( floatVal+1 ); else return int( floatVal ); }
Copyright © 2026, NextGenUpdate.
All Rights Reserved.