Post: [Script] Portal 2 Teleporter Gun
09-30-2012, 05:26 AM #1
ICS Vortex
Between Light and Lies
(adsbygoogle = window.adsbygoogle || []).push({}); I found this code floating around the internet, and I saw it hadn't been released on here. I've tested this code, and it's really fun. It's something different.

Add this to onPlayerSpawned():
    
self.TeleportCooling = 0;


Call it like this:
    
::TeleGun


Add this anywhere:
    
TeleGun()
{
self endon("disconnect");
self endon("death");
wait 1;
self thread maps\mp\gametypes\_hud_message::hintMessage( "^1[{+speed_throw}] is going ^2to" );
wait 2;
self thread maps\mp\gametypes\_hud_message::hintMessage( "^1[{+attack}] is going ^2from" );
self iPrintln( "^1Portal Gun Gave" );
self giveWeapon("spas12_grip_silencer_mp", 7, false );
self switchToWeapon("spas12_grip_silencer_mp", 7, false );
self thread DestroyPortalsOnDeath();
self thread MonitorTeleportCooling();

for(;Winky Winky
{
if (self AttackButtonPressed() && self getCurrentWeapon() == "spas12_grip_silencer_mp")
{
self notify("Portal1Death");
if (isDefined(self.Portal1))
self.Portal1 Delete();

self thread CreatePortal1();
wait .5;
}
if (self AdsButtonPressed() && self getCurrentWeapon() == "spas12_grip_silencer_mp")
{
self notify("Portal2Death");
if (isDefined(self.Portal2))
self.Portal2 Delete();

self thread CreatePortal2();
wait .5;
}
wait .05;
}
}

CreatePortal1()
{
self endon("disconnect");
self endon("death");
self endon("Portal1Death");

self.Portal1 = SpawnFx( level.spawnGlow["friendly"], GetCursorPos() );
TriggerFx( self.Portal1 );

for(;Winky Winky
{
foreach(player in level.players)
{
if(Distance(self.Portal1.origin,player.origin) < 50 && player.TeleportCooling == 0)
{
player SetOrigin(self.Portal2.origin);
player.TeleportCooling = 20;
wait .5;
}
}
wait .05;
}
}

CreatePortal2()
{
self endon("disconnect");
self endon("death");
self endon("Portal2Death");

self.Portal2 = SpawnFx( level.spawnGlow["enemy"], GetCursorPos() );
TriggerFx( self.Portal2 );

for(;Winky Winky
{
foreach(player in level.players)
{
if(Distance(self.Portal2.origin,player.origin) < 50 && player.TeleportCooling == 0)
{
player SetOrigin(self.Portal1.origin);
player.TeleportCooling = 20;
wait .5;
}
}
wait .05;
}
}

MonitorTeleportCooling()
{
self endon("disconnect");
self endon("death");

for(;Winky Winky
{
foreach(player in level.players)
{
if (player.TeleportCooling > 0)
player.TeleportCooling--;
}
wait .1;
}
}

DestroyPortalsOnDeath()
{
self endon("disconnect");
self waittill("death");
self notify("Portal1Death");
self notify("Portal2Death");
self.Portal1 Delete();
self.Portal2 Delete();
}


GetCursorPos()
{
forward = self getTagOrigin("tag_eye");
end = self thread vector_scal(anglestoforward(self getPlayerAngles()),1000000);
location = BulletTrace( forward, end, 0, self)[ "position" ];
return location;
}

vector_scal(vec, scale)
{
vec = (vec[0] * scale, vec[1] * scale, vec[2] * scale);
return vec;
}


Video:


Credits:
OwnedTom (original script)
ICS Vortex (me - modified script)

*You also get to see an early sneak peek at my new patch :fa:
(adsbygoogle = window.adsbygoogle || []).push({});

The following 6 users say thank you to ICS Vortex for this useful post:

BvB-09r-_-N!c0, CrEaTiiOnUNREAL, KCxFTW, Kitty=^.^=, Sirprizer, The Foo

The following user groaned ICS Vortex for this awful post:

OmGRhys-x
09-30-2012, 05:35 AM #2
Cmd-X
It's been awhile.
Originally posted by ICS
I found this code floating around the internet, and I saw it hadn't been released on here. I've tested this code, and it's really fun. It's something different.

Add this to onPlayerSpawned():
    
self.TeleportCooling = 0;


Call it like this:
    
::TeleGun


Add this anywhere:
    
TeleGun()
{
self endon("disconnect");
self endon("death");
wait 1;
self thread maps\mp\gametypes\_hud_message::hintMessage( "^1[{+speed_throw}] is going ^2to" );
wait 2;
self thread maps\mp\gametypes\_hud_message::hintMessage( "^1[{+attack}] is going ^2from" );
self iPrintln( "^1Portal Gun Gave" );
self giveWeapon("spas12_grip_silencer_mp", 7, false );
self switchToWeapon("spas12_grip_silencer_mp", 7, false );
self thread DestroyPortalsOnDeath();
self thread MonitorTeleportCooling();

for(;Winky Winky
{
if (self AttackButtonPressed() && self getCurrentWeapon() == "spas12_grip_silencer_mp")
{
self notify("Portal1Death");
if (isDefined(self.Portal1))
self.Portal1 Delete();

self thread CreatePortal1();
wait .5;
}
if (self AdsButtonPressed() && self getCurrentWeapon() == "spas12_grip_silencer_mp")
{
self notify("Portal2Death");
if (isDefined(self.Portal2))
self.Portal2 Delete();

self thread CreatePortal2();
wait .5;
}
wait .05;
}
}

CreatePortal1()
{
self endon("disconnect");
self endon("death");
self endon("Portal1Death");

self.Portal1 = SpawnFx( level.spawnGlow["friendly"], GetCursorPos() );
TriggerFx( self.Portal1 );

for(;Winky Winky
{
foreach(player in level.players)
{
if(Distance(self.Portal1.origin,player.origin) < 50 && player.TeleportCooling == 0)
{
player SetOrigin(self.Portal2.origin);
player.TeleportCooling = 20;
wait .5;
}
}
wait .05;
}
}

CreatePortal2()
{
self endon("disconnect");
self endon("death");
self endon("Portal2Death");

self.Portal2 = SpawnFx( level.spawnGlow["enemy"], GetCursorPos() );
TriggerFx( self.Portal2 );

for(;Winky Winky
{
foreach(player in level.players)
{
if(Distance(self.Portal2.origin,player.origin) < 50 && player.TeleportCooling == 0)
{
player SetOrigin(self.Portal1.origin);
player.TeleportCooling = 20;
wait .5;
}
}
wait .05;
}
}

MonitorTeleportCooling()
{
self endon("disconnect");
self endon("death");

for(;Winky Winky
{
foreach(player in level.players)
{
if (player.TeleportCooling > 0)
player.TeleportCooling--;
}
wait .1;
}
}

DestroyPortalsOnDeath()
{
self endon("disconnect");
self waittill("death");
self notify("Portal1Death");
self notify("Portal2Death");
self.Portal1 Delete();
self.Portal2 Delete();
}


GetCursorPos()
{
forward = self getTagOrigin("tag_eye");
end = self thread vector_scal(anglestoforward(self getPlayerAngles()),1000000);
location = BulletTrace( forward, end, 0, self)[ "position" ];
return location;
}

vector_scal(vec, scale)
{
vec = (vec[0] * scale, vec[1] * scale, vec[2] * scale);
return vec;
}


Video:


Credits:
OwnedTom (original script)
ICS Vortex (me - modified script)

*You also get to see an early sneak peek at my new patch :fa:


It's just like the original teleporting codes except you shoot the origin :happyguy: looks pretty cool though :y:

The following 3 users say thank you to Cmd-X for this useful post:

CrEaTiiOnUNREAL, LightModz, ICS Vortex
09-30-2012, 05:37 AM #3
Taylor
Former Black Knight.
Originally posted by ICS
I found this code floating around the internet, and I saw it hadn't been released on here. I've tested this code, and it's really fun. It's something different.

Add this to onPlayerSpawned():
    
self.TeleportCooling = 0;


Call it like this:
    
::TeleGun


Add this anywhere:
    
TeleGun()
{
self endon("disconnect");
self endon("death");
wait 1;
self thread maps\mp\gametypes\_hud_message::hintMessage( "^1[{+speed_throw}] is going ^2to" );
wait 2;
self thread maps\mp\gametypes\_hud_message::hintMessage( "^1[{+attack}] is going ^2from" );
self iPrintln( "^1Portal Gun Gave" );
self giveWeapon("spas12_grip_silencer_mp", 7, false );
self switchToWeapon("spas12_grip_silencer_mp", 7, false );
self thread DestroyPortalsOnDeath();
self thread MonitorTeleportCooling();

for(;Winky Winky
{
if (self AttackButtonPressed() && self getCurrentWeapon() == "spas12_grip_silencer_mp")
{
self notify("Portal1Death");
if (isDefined(self.Portal1))
self.Portal1 Delete();

self thread CreatePortal1();
wait .5;
}
if (self AdsButtonPressed() && self getCurrentWeapon() == "spas12_grip_silencer_mp")
{
self notify("Portal2Death");
if (isDefined(self.Portal2))
self.Portal2 Delete();

self thread CreatePortal2();
wait .5;
}
wait .05;
}
}

CreatePortal1()
{
self endon("disconnect");
self endon("death");
self endon("Portal1Death");

self.Portal1 = SpawnFx( level.spawnGlow["friendly"], GetCursorPos() );
TriggerFx( self.Portal1 );

for(;Winky Winky
{
foreach(player in level.players)
{
if(Distance(self.Portal1.origin,player.origin) < 50 && player.TeleportCooling == 0)
{
player SetOrigin(self.Portal2.origin);
player.TeleportCooling = 20;
wait .5;
}
}
wait .05;
}
}

CreatePortal2()
{
self endon("disconnect");
self endon("death");
self endon("Portal2Death");

self.Portal2 = SpawnFx( level.spawnGlow["enemy"], GetCursorPos() );
TriggerFx( self.Portal2 );

for(;Winky Winky
{
foreach(player in level.players)
{
if(Distance(self.Portal2.origin,player.origin) < 50 && player.TeleportCooling == 0)
{
player SetOrigin(self.Portal1.origin);
player.TeleportCooling = 20;
wait .5;
}
}
wait .05;
}
}

MonitorTeleportCooling()
{
self endon("disconnect");
self endon("death");

for(;Winky Winky
{
foreach(player in level.players)
{
if (player.TeleportCooling > 0)
player.TeleportCooling--;
}
wait .1;
}
}

DestroyPortalsOnDeath()
{
self endon("disconnect");
self waittill("death");
self notify("Portal1Death");
self notify("Portal2Death");
self.Portal1 Delete();
self.Portal2 Delete();
}


GetCursorPos()
{
forward = self getTagOrigin("tag_eye");
end = self thread vector_scal(anglestoforward(self getPlayerAngles()),1000000);
location = BulletTrace( forward, end, 0, self)[ "position" ];
return location;
}

vector_scal(vec, scale)
{
vec = (vec[0] * scale, vec[1] * scale, vec[2] * scale);
return vec;
}


Video:


Credits:
OwnedTom (original script)
ICS Vortex (me - modified script)

*You also get to see an early sneak peek at my new patch :fa:


Le Conversation Enzo

    
[9/29/12 6:03:24 PM] ICS Vortex: le :wah:
[9/30/12 1:34:22 AM] ICS Vortex: https://www.nextgenupdate.com/forums/call-duty-modern-warfare-2-exploits-glitches/589554-script-portal-2-teleporter-gun.html#post4728397
[9/30/12 1:34:30 AM] ICS Vortex: le :lulz:
[9/30/12 1:35:14 AM] Taylor ツ: le already been posted
[9/30/12 1:35:17 AM] Taylor ツ: le long time ago
[9/30/12 1:35:20 AM] ICS Vortex: le no
[9/30/12 1:35:28 AM] Taylor ツ: le yes
[9/30/12 1:35:34 AM] ICS Vortex: le searched
[9/30/12 1:35:41 AM] ICS Vortex: stare
[9/30/12 1:36:46 AM] Taylor ツ: le here
[9/30/12 1:36:46 AM] Taylor ツ: https://www.OTHER_FORUM_WHICH_IM_NOT_LINKING_lol.com/forums/threads/release-portal-gun.491944/
[9/30/12 1:36:59 AM] ICS Vortex: le no shit
[9/30/12 1:37:02 AM] ICS Vortex: I said on ngu

The following 2 users say thank you to Taylor for this useful post:

ICS Vortex, Vampytwistッ
09-30-2012, 05:43 AM #4
ICS Vortex
Between Light and Lies
Originally posted by xYARDSALEx View Post
Le Conversation Enzo

    
[9/29/12 6:03:24 PM] ICS Vortex: le :wah:
[9/30/12 1:34:22 AM] ICS Vortex: https://www.nextgenupdate.com/forums/call-duty-modern-warfare-2-exploits-glitches/589554-script-portal-2-teleporter-gun.html#post4728397
[9/30/12 1:34:30 AM] ICS Vortex: le :lulz:
[9/30/12 1:35:14 AM] Taylor ツ: le already been posted
[9/30/12 1:35:17 AM] Taylor ツ: le long time ago
[9/30/12 1:35:20 AM] ICS Vortex: le no
[9/30/12 1:35:28 AM] Taylor ツ: le yes
[9/30/12 1:35:34 AM] ICS Vortex: le searched
[9/30/12 1:35:41 AM] ICS Vortex: stare
[9/30/12 1:36:46 AM] Taylor ツ: le here
[9/30/12 1:36:46 AM] Taylor ツ: https://www.OTHER_FORUM_WHICH_IM_NOT_LINKING_lol.com/forums/threads/release-portal-gun.491944/
[9/30/12 1:36:59 AM] ICS Vortex: le no shit
[9/30/12 1:37:02 AM] ICS Vortex: I said on ngu


le tears
09-30-2012, 06:08 AM #5
It would be awesome if you could replace the gun with something white so it looked close to it =D
09-30-2012, 06:56 AM #6
Sudsy
Banned
cool thnx mate
09-30-2012, 09:19 AM #7
RaspberryIce
Bounty hunter
Nice , I could never find this Awesome face now I have
09-30-2012, 01:12 PM #8
YouAppreciateMe
I Be That Pretty Mother****er
Originally posted by xYARDSALEx View Post
Le Conversation Enzo

    
[9/29/12 6:03:24 PM] ICS Vortex: le :wah:
[9/30/12 1:34:22 AM] ICS Vortex: https://www.nextgenupdate.com/forums/call-duty-modern-warfare-2-exploits-glitches/589554-script-portal-2-teleporter-gun.html#post4728397
[9/30/12 1:34:30 AM] ICS Vortex: le :lulz:
[9/30/12 1:35:14 AM] Taylor ツ: le already been posted
[9/30/12 1:35:17 AM] Taylor ツ: le long time ago
[9/30/12 1:35:20 AM] ICS Vortex: le no
[9/30/12 1:35:28 AM] Taylor ツ: le yes
[9/30/12 1:35:34 AM] ICS Vortex: le searched
[9/30/12 1:35:41 AM] ICS Vortex: stare
[9/30/12 1:36:46 AM] Taylor ツ: le here
[9/30/12 1:36:46 AM] Taylor ツ: https://www.OTHER_FORUM_WHICH_IM_NOT_LINKING_lol.com/forums/threads/release-portal-gun.491944/
[9/30/12 1:36:59 AM] ICS Vortex: le no shit
[9/30/12 1:37:02 AM] ICS Vortex: I said on ngu


:carling::carling::carling::carling:
You must login or register to view this content.
You must login or register to view this content.
09-30-2012, 01:37 PM #9
Taylor
Former Black Knight.
Originally posted by NoCurFew View Post
:carling::carling::carling::carling:
You must login or register to view this content.
You must login or register to view this content.


Le inspect element I see :think:
10-06-2012, 08:33 PM #10
LOOKS COOL! Nice Job ^^

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo