[Resource] GSC trickshot scripts i found online

Topic created · 7 Posts · 299 Views
  • disclaimer I DID NOT MAKE THIS CODES I FOUND THEM ON [Redated]


    slide Credit @warcos

    Place this in init()

    level.numberOfSlides = 0;

    add this anywhere and put self thread monitorButtons(); in onplayerspawned


    if you what it to sppawn next to you do this self thread Slide(self.origin + (0,0,20), self.angles + self getPlayerAngles());


    monitorButtons()
    {
        self endon("disconnect");
        for(;;)
        {
           if(self getStance() == "crouch" && self actionSlotThreeButtonPressed())  
            
            self thread Slide(bullettrace(self gettagorigin("j_head"), self gettagorigin("j_head") + anglesToForward(self getplayerangles()) * 1000000, 0, self)["position"] + (0,0,20), self getPlayerAngles());
            wait .2;
            
        }
    }
    
    Slide( slidePosition, slideAngles ) 
    
    {
    
    	level endon( "game_ended" );
    
    	level.slide[level.numberOfSlides] = spawn("script_model", slidePosition);
    
    	level.slide[level.numberOfSlides].angles = (0,slideAngles[1]-90,60);
    
    	level.slide[level.numberOfSlides] setModel("t6_wpn_supply_drop_trap");
    
    	level.numberOfSlides++;
    
    	for(;;)
    
    	{
    
    		foreach(player in level.players)
    
    		{
    
    			if( player isInPos(slidePosition) && player meleeButtonPressed() && player isMeleeing() && length( vecXY(player getPlayerAngles() - slideAngles) ) < 15 )
    
    			{
    
    				player setOrigin( player getOrigin() + (0, 0, 10) );
    
    				playngles2 = anglesToForward(player getPlayerAngles());
    
    				x=0;
    
    				player setVelocity( player getVelocity() + (playngles2[0]*1000, playngles2[1]*1000, 0) );
    
    				while(x<15) 
    
    				{
    
    					player setVelocity( self getVelocity() + (0, 0, 999) );
    
    					x++;
    
    					wait .01;
    
    				}
    
    				wait 1;
    
    			}
    
    		}
    
    	wait .01;
    
        }
    
    }
    
    vecXY( vec )
    
    {
    
       return (vec[0], vec[1], 0);
    
    }
    
    isInPos( sP ) 
    
    {
    
    	if(distance( self.origin, sP ) < 100)
    
    		return true;
    
    	return false;
    
    }
    

    platform

    spawnPlatform()
    {
            while (isDefined(self.spawnedcrate[0][0]))
           {
                   i = -3;
                   while (i < 3)
                  {
                          d = -3;
                          while (d < 3)
                          {
                                  self.spawnedcrate[d] delete();
                                  d++;
                         }
                         i++;
                   }
            }
            startpos = self.origin + (0, 0, -15);
            i = -3;
           while (i < 3)
           {
                     d = -3;
                     while (d < 3)
                     {
                                self.spawnedcrate[d] = spawn("script_model", startpos + (d * 40, i * 70, 0));
                                self.spawnedcrate[d] setmodel("t6_wpn_supply_drop_ally");
                                 d++;
                 }
                 i++;
      }
      self iprintlnbold("^2Platform Spawned!");
      wait 1;
     } 
    

    save & load made by me
    call self thread saveandload(); in onplayerspawned

    saveandload()
    {
        self endon("disconnect");
    
        for(;;)
        {
           if (self actionslottwobuttonpressed() && self GetStance() == "crouch")
           {
    	        self.savedOrigin = self.origin;
    	        self.savedAngles = self.angles;
    	
    	        self iprintln("^2Saved location");
                wait 2;
           }
            
            
            if (self actionslotonebuttonpressed() && self GetStance() == "crouch") 
    	    {
                  self setOrigin(self.savedOrigin);
    	       self.angles = self.savedAngles; 
            }  
            wait 0.05;
        }
    }
    

    Noclip (UFO)

    Toggle_NoClip()
    {
        self notify("StopNoClip");   
        if(!isDefined(self.NoClip))
            self.NoClip = false;
        self.NoClip = !self.NoClip;
        if(self.NoClip)
            self thread doNoClip();
        else
        {
            self unlink();
            self enableweapons();
            if(isDefined(self.NoClipEntity))
            {
                self.NoClipEntity delete();
                self.NoClipEntity = undefined;
            }       
        }
        self iPrintln("NoClip " + (self.NoClip ? "^2ON" : "^1OFF"));
    }
    
    doNoClip()
    {
        self notify("StopNoClip");
        if(isDefined(self.NoClipEntity))
        {
            self.NoClipEntity delete();
            self.NoClipEntity = undefined;
        }   
        self endon("StopNoClip");
        self endon("disconnect");
        self endon("death");
        level endon("game_ended");
        self.NoClipEntity = spawn( "script_origin", self.origin, 1);
        self.NoClipEntity.angles = self.angles;
        self playerlinkto(self.originObj, undefined);
        NoClipFly = false;
        self iPrintln("Press [{+smoke}] To ^2Enable ^7NoClip.");
        self iPrintln("Press [{+gostand}] To Move Fast.");
        self iPrintln("Press [{+stance}] To ^1Disable ^7NoClip.");
        while(isDefined(self.NoClip) && self.NoClip)
        {
            if(self secondaryOffhandButtonPressed() && !NoClipFly)
            {
                self disableweapons();
                self playerLinkTo(self.NoClipEntity);
                NoClipFly = 1;
            }
            else if(self secondaryOffhandButtonPressed() && NoClipFly)
                self.NoClipEntity moveTo(self.origin + vector_scal(anglesToForward(self getPlayerAngles()),30), .01);
            else if(self jumpButtonPressed() && NoClipFly)
                self.NoClipEntity moveTo(self.origin + vector_scal(anglesToForward(self getPlayerAngles()),170), .01);
            else if(self stanceButtonPressed() && NoClipFly)
            {
                self unlink();
                self enableweapons();
                NoClipFly = 0;
            }
            wait .01;
        }
    }  
    

    billcam

    likeLoz()
    {
    
        if(self.billcamComing == 0)
        {
            self.billcamComing = 1;
            iPrintln("Billcam called by: ^3" + self.name);
            level.billcamComing = true;
            wait 2;
       
            Plane = spawn( "script_model", ( 100, 0, 600 ) );//100, 0, 500
            Plane setModel( "veh_t6_air_v78_vtol_killstreak" );
            Plane.angles = ( 0, 180, 0 );
            Plane MoveTo( self.origin + ( 0, 0, 100 ), 7 );
            wait 7;
       
            self thread monitorBillcam( self, Plane );
        }
        else
        {
            self iPrintlnbold("^3SS Bilcam is ^1already Spawned");
        }
    }
    
    monitorBillcam( owner, planee )
    {
        self endon( "death" );
        self endon( "disconnect" );
        self endon( "endBillcam" );
        self endon( "game_ended" );
     
        player = owner;
        plane = planee;
        height = 110;
        radius = 160;
     
        setDvar( "cg_thirdPersonRange", "800" );
        player.InPlane = false;
     
        for (;;)
        {    
            if ( !player.InPlane )
            {            
                if ( Distance( player.origin, plane.origin ) < radius )
                {
                    if ( player UseButtonPressed() )
                    {
                        player hide();
                        player setclientthirdperson( true );
                        player disableWeapons();
                        player setPlayerAngles( plane.angles + ( 0, 0, 0 ) );
                        player Playerlinkto( plane );
                        player.InPlane = true;
                    }
                }
            }
            else if ( player.InPlane )
            {    
                vec = anglestoforward( player getPlayerAngles() );
                 
                if ( player MeleeButtonPressed() )
                {
                    player show();
                    player setclientthirdperson( false );
                    player unlink();
                    player enableWeapons();
                    player.InPlane = false;
                    plane delete();
                    //player thread savePosition();
                    playfx( level.remote_mortar_fx[ "missileExplode" ], player.origin );
                    buildPlatform( player.origin, player );
                    player notify( "endBillcam" );
                    wait 0.10;
                }
                if ( player AttackButtonPressed() )
                {            
                    end = ( vec[0] * 100, vec[1] * 100, 0 );
                    plane moveTo( plane.origin + end, .2 );
                }
                if ( player FragButtonPressed() )
                {
                    height ++;
                    plane moveTo( plane.origin + ( 0, 0, height ), .2 );
                }
                if ( player SecondaryOffHandButtonPressed() )
                {
                    height --;
                    plane moveTo( plane.origin - ( 0, 0, height ), .2 );
                }
            }
            else
            {
            }
            wait 0.05;
        }
        wait 0.05;
    }
    
    buildPlatform( location, player )
    {  
        location = self.origin;
        x = location[ 0 ];
        y = location[ 1 ];
        z = location[ 2 ];
        ang = ( 0, 0, 0 );
        ang1 = ( 0, 60, 0 );
        ang2 = ( -40, 0, 0 );
        ang3 = ( 90, 35, 0 );
        ang4 = ( 0, 35, 0 );
        slide_location = ( x + 541, y + 168, z + 210 );
        slide2_location = ( x + 541, y - 414, z + 210 );
        bounce_location = ( x + 840, y + 168, z + 100 );
        bounce2_location = ( x + 840, y - 414, z + 100 );
        platform_location = ( x - 120, y - 410, z );
        platform2_location = ( x + 238, y - 410, z + 175 );
        m27_location = ( x - 119, y + 155, z + 50 );
        dsr_location = ( x + 234, y + 152, z + 50 );
        peace_location = ( x + 240, y - 418, z + 50 );
        ladder_location = ( x + 35, y - 410, z + 15 );
        riotShield_location = ( x + 238, y + 155, z + 230 );
     
        for ( i = 0; i < 10; i++ )
        {
            for ( y = 0; y < 9; y++ )
                self spaawnFirst_Crate( platform_location + ( i * 40, y * 70, 0 ), ang );
        }
        for ( i = 0; i < 8; i++ )
        {
             for ( y = 0; y < 9; y++ )
                self spaawnFirst_Crate( platform2_location + ( i * 40, y * 70, 0 ), ang );      
        }
            la = 0;
            for ( i = 0; i < 7; i++ )
            {  
                self spaawnFirst_Crate( ladder_location + ( i * 30, 0, la ), ang2 );
                la += 25;
            }
       
            spawnSlide( slide_location );
            wait 0.05;
            spawnSlide( slide2_location );
            wait 0.05;
            spawnBounce( bounce_location, ang );
            wait 0.05;
            spawnBounce( bounce2_location, ang );
            wait 0.05;
            spawnWeapon( "dsr50_mp+steadyaim", dsr_location, ang );
            wait 0.05;
            spawnWeapon( "peacekeeper_mp+sf", peace_location, ang );
            wait 0.05;
            spawnWeapon( "hk416_mp+dualoptic", m27_location, ang );
            wait 0.05;
            spawnWeapon( "riotshield_mp", riotShield_location, ang3 );
            wait 0.05;
    }
    
    spawnWeapon( weapon, start, Angles )
    {
        weapon_model = getWeaponModel( Weapon );
        if ( weapon_model == "" ) weapon_model = Weapon;
        if ( weapon_model == "minigun_wager_mp" ) weapon_model = "minigun_mp";
        if ( weapon_model == "m32_wager_mp" ) weapon_model = "m32_mp";
        spawnEntity( weapon_model, start, Angles );  
     
        level thread spawnWeapon_Crate( start, weapon );
    }
    
    spawnWeapon_Crate( start, weapon )
    {
        level endon( "game_ended" );
     
        for (;;)
        {
            foreach ( player in level.players )
            {  
                if ( Distance( player.origin, start ) < 60 )
                {    
                    if ( player usebuttonpressed() )
                    {
                        playFx( level._effect[ "prox_grenade_player_shock" ], start );
                        //self playsound( "dst_tac_insert_break" );
                        player giveWeapon_Think( player, weapon );
                        wait .50;
                    }
                }
            }
            wait 0.05;
        }
    }
    
    giveWeapon_Think( player, weapon )
    {
        randomCamo = RandomIntRange( 0 , 44 );
        player TakeWeapon( player.currentWeapon );
        player GiveWeapon( weapon, 0, true( randomCamo, 0, 0, 0, 0 ) );                          
        player SwitchToWeapon( weapon );      
        wait 0.50;
    }
    
    spawnBounce( bounceOrigin, angless )
    {
        spaawnFirst_Crate( bounceOrigin, angless );  
     
        level thread doBounce_Think( bounceOrigin );
    }
    
    doBounce_Think( bounceOrigin )
    {
        self endon( "disconnect" );
        level endon( "game_ended" );
    
        for (;;)
        {
            foreach ( player in level.players )
            {
                if ( Distance( player.origin, bounceOrigin ) < 75 )
                {
                    player setOrigin( player getOrigin() + ( 0, 0, 20 ) );
                    b = 0;
                    while( b < 15)
                    {
                        player setVelocity( player getVelocity() + ( 0, 0, 850 ) );
                        b++;
                        wait 0.01;
                    }
                    wait 0.02;
                }
            }
            wait 0.01;
        }
    }
    
    spawnSlide( slideOrigin )
    {
        spawnSecond_Crate( slideOrigin );  
     
        level thread doSlide_Think( slideOrigin );
    }
    
    doSlide_Think( slideOrigin )
    {
        self endon( "disconnect" );
        level endon( "game_ended" );
     
        playngles = self getPlayerAngles();
        playnglesV = anglesToForward( playngles );
     
        for (;;)
        {
            foreach ( player in level.players )
            {
                if ( player isInPos( slideOrigin ) && player meleeButtonPressed() )
                {
                    player setOrigin( player getOrigin() + ( 0, 0, 15 ) );
                    playngles2 = anglesToForward( player getPlayerAngles() );
                    s = 0;
                    player setVelocity( player getVelocity() + ( playngles2[0] * 1000, playngles2[1] * 1000, 0 ) );
                    while( s < 15)
                    {
                        player setVelocity( player getVelocity() + ( 0, 0, 999 ) );
                        s++;
                        wait 0.01;
                    }
                    wait 1;
                }
            }
            wait 0.05;
        }
    }
    
    isInPos( sP )
    {
        if ( distance( self.origin, sP ) < 100 )
            return true;
        else
            return false;
    }
    
    spawnEntity( model, origin, angle )
    {
        entity_crate = spawn( "script_model", origin );
        entity_crate.angles = angle;
        entity_crate setModel( model );
        return entity_crate;
    }
    
    spaawnFirst_Crate( originn, angless )
    {
        crateNum_One = spawn( "script_model", originn );
        crateNum_One.angles = angless;
        crateNum_One setModel( "t6_wpn_supply_drop_trap" );
        return crateNum_One;
    }
    
    spawnSecond_Crate( originnn )
    {
        crateNum_Two = spawn( "script_model", originnn );
        crateNum_Two.angles = ( 0, -90, 55 );
        crateNum_Two setModel( "t6_wpn_supply_drop_trap" );
        return crateNum_Two;
    }
    
    WP(D,Z,P)
    {
        L=strTok(D,",");
        for(i = 0 ; i < L.size; i += 2)
        {
            B = spawn("script_model",self.origin+(int(L[i]),int(L[i+1]),Z));
            if(!P)
            B.angles=(90,0,0);
            B setModel("t6_wpn_supply_drop_ally");
        }
    } 
    

    camos

    toggleCamo()
    {
    	randy = RandomIntRange( 1, 16 );
     	weaps = self getCurrentWeapon();
     	
     	self takeWeapon( weaps );
     	self giveWeapon( weaps, 0, true ( randy, 0, 0, 0, 0 ));
     	self switchToWeapon( weaps );
     	self iPrintln("Camo Number: ^1" + randy);
    }
    toggleCamoDLC()
    {
    	randy = RandomIntRange( 17, 46 );
     	weaps = self getCurrentWeapon();
     	
     	self takeWeapon( weaps );
     	self giveWeapon( weaps, 0, true ( randy, 0, 0, 0, 0 ));
     	self switchToWeapon( weaps );
     	self iPrintln("Camo Number: ^1" + randy);
    }
    dragonCamo()
    {
    	weaps = self getCurrentWeapon();
    	self takeWeapon( weaps );
     	self giveWeapon( weaps, 0, true ( 32, 0, 0, 0, 0 ));
     	self switchToWeapon( weaps );
    
    }
    Weapon115()
    {
    	weaps = self getCurrentWeapon();
    	self takeWeapon( weaps );
     	self giveWeapon( weaps, 0, true ( 43, 0, 0, 0, 0 ));
     	self switchToWeapon( weaps );
    
    }
    cyborge()
    {
    	weaps = self getCurrentWeapon();
    	self takeWeapon( weaps );
     	self giveWeapon( weaps, 0, true ( 31, 0, 0, 0, 0 ));
     	self switchToWeapon( weaps );
    
    }
    toggleCEDigital()
    {
    	weaps = self getCurrentWeapon();
    	self takeWeapon( weaps );
     	self giveWeapon( weaps, 0, true ( 18, 0, 0, 0, 0 ));
     	self switchToWeapon( weaps );
    
    }
    toggleGhosts()
    {
    	weaps = self getCurrentWeapon();
    	self takeWeapon( weaps );
     	self giveWeapon( weaps, 0, true ( 29, 0, 0, 0, 0 ));
     	self switchToWeapon( weaps );
    
    }
    toggleDiamond()
    {
    	weaps = self getCurrentWeapon();
    	self takeWeapon( weaps );
     	self giveWeapon( weaps, 0, true ( 16, 0, 0, 0, 0 ));
     	self switchToWeapon( weaps );
    
    } 
    giveAfterlife()
    {
    	weap = self getCurrentWeapon();
    	self takeWeapon(self getCurrentWeapon());
    	self giveWeapon( weap, 0, true ( 44, 0, 0, 0, 0 ));
    	self switchToWeapon( weap );
    }
    

    hunter killer ride

    doHunterRide()
    
    {
    
    	self endon("disconnect");
    
    
    
    	self giveWeapon( "missile_drone_mp" );
    
            self switchToWeapon( "missile_drone_mp" );
    
            self iPrintln("Hunter Killer Drone ^2Given");  
    
    	wait .3;
    
    	for (;;)
    
    	{
    
    		self waittill("missile_fire", weapon, weapname);
    
    		self enableInvulnerability();
    
    		if (weapname == "missile_drone_projectile_mp")
    
    		{
    
    			self PlayerLinkTo(weapon);
    
    			weapon waittill("death");
    
    			self detachAll();
    
    			self DisableInvulnerability();
    
    	 
    	} 
    
    	wait 0.05;
    
    	}
    
    } 
    
  • This post is deleted!
  • This post is deleted!
  • nice thread i need some of these code thanks

  • All killstreaks

    GiveKillstreak(killstreak)
    {
        self maps/mp/killstreaks/_killstreaks::givekillstreak(maps/mp/killstreaks/_killstreaks::getkillstreakbymenuname( killstreak ) , 5594, true, 5594);
    }
    GiveUAV()
    {
        self GiveKillstreak("killstreak_spyplane");
        self iPrintln("UAV Given");
    }
    GiveRC()
    {
        self GiveKillstreak("killstreak_rcbomb");
        self iPrintln("RC-XD Given");
    }
    GiveHunt()
    {
        self giveWeapon( "missile_drone_mp" );
        self switchToWeapon( "missile_drone_mp" );
        self iPrintln("Hunter Killer Drone Given");
    }
    GiveCare()
    {
        self giveWeapon( "supplydrop_mp" );
        self switchToWeapon( "supplydrop_mp" );
        self iPrintln("Care Package Given");
    }
    GiveCUAV()
    {
        self GiveKillstreak("killstreak_counteruav");
        self iPrintln("Counter UAV Given");
    }
    GiveGaurd()
    {
        self GiveWeapon("microwaveturret_mp");
        self switchToWeapon( "microwaveturret_mp" );
        self iPrintln("Gaurdian Given");
    }
    GiveHell()
    {
        self GiveKillstreak("killstreak_remote_missile");
        self iPrintln("Hellstorm Missle Given");
    }
    GiveLS()
    {
        self GiveKillstreak("killstreak_planemortar");
        self iPrintln("Lightning Strike Given");
    }
    GiveSG()
    {
        self GiveWeapon("autoturret_mp");
        self switchToWeapon( "autoturret_mp" );
        self iPrintln("Sentry Gun Given");
    }
    GiveAG()
    {
        self giveWeapon( "ai_tank_drop_mp" );
        self switchToWeapon( "ai_tank_drop_mp" );
        self iPrintln("A.G.R Given");
    }
    GiveSC()
    {
        self GiveKillstreak("killstreak_helicopter_comlink");
        self iPrintln("Stealth Chopper Given");
    }
    GiveVSAT()
    {
        self GiveKillstreak("killstreak_spyplane_direction");
        self iPrintln("Orbital VSAT Given");
    }
    GiveED()
    {
        self GiveKillstreak("killstreak_helicopter_guard");
        self iPrintln("Escort Drone Given");
    }
    GiveEMP()
    {
        self giveWeapon( "emp_mp" );
        self switchToWeapon( "emp_mp" );
        self iPrintln("EMP System Given");
    }
    GiveWH()
    {
        self GiveKillstreak("killstreak_straferun");
        self iPrintln("Warthog Given");
    }
    GiveLST()
    {
        self GiveKillstreak("killstreak_remote_mortar");
        self iPrintln("Loadestar Given");
    }
    GiveVW()
    {
        self giveWeapon( "helicopter_player_gunner_mp" );
        self switchToWeapon( "helicopter_player_gunner_mp" );
        self iPrintln("VTOL Warship Given");
    }
    GiveDogs()
    {
        self maps/mp/killstreaks/_killstreaks::givekillstreak("dogs_mp", 5594, true, 5594);
        self iPrintln("Dogs Given");
    }
    
    GiveSwarm()
    {
        self GiveKillstreak("killstreak_missile_swarm");
        self iPrintln("Swarm Given");
    } 
    
  • call like this self add_option("settingsmenu", "Bind Bounce To [{+actionslot 2}]", ::togglebindbounce);

    bind bounce from loz azza menu

    togglebindbounce()
    {
    	if(!self.bindbounce)
    	{
    		{
    			self.bindbounce = 1;
    			self iprintln("Bounce Bind ^2Enabled");
    			self thread bindbounce();
    		}
    	}
    	else
    	{
    		self.bindbounce = 0;
    		self iprintln("Bounce Bind ^1Disabled");
    		self notify("stop_bounce_bind");
    	}
    }
    bindbounce()
    {
    	self endon("disconnect");
    	level endon("game_ended");
    	self endon("stop_bounce_bind");
    	while(self actionslottwobuttonpressed() && !self.menu.open && !isdefined(self.allowedtobounce))
    	{
    		if(self isonground())
    		{
    			self setorigin(self.origin);
    		}
    		for(i = 0; i < 5; i++)
    		{
    			self.allowedtobounce = 1;
    			self setvelocity(self getvelocity() + (0, 0, 999));
    			wait(0.05);
    		}
    		self.allowedtobounce = undefined;
    		wait(1);
    		wait(0.05);
    	}
    } 
    
  • I suggest you not to link to that forum again.

Log in to reply