Back to home
This game is archived.
If you with to unarchive it, click the "restore" button in the options menu.
This code can also be found at workshop.codes/APPPX

Category:
Custom game mode

Author:
scort

Rating:
2

Version:
1.6.1

Posted:
8 months ago

Last updated:
24 days ago

Tags:
instagib mccree bhop mobility paintball wallbang powerup power-up buff buffs pickup pick-up pickups pick-ups pick up pick ups

Project Links

Share this workshop!

Options

Instagib FFA aims to be a customizable fragging experience, with lots of options

  • Holding space lets you bunnyhop and the potential to gain insane amounts of speed

  • Primary fire is a one-shot

  • Secondary fire is an orb that knocks players back, including yourself allowing for extra mobility

  • Ability 2 (E) is a grappling hook, pulling you towards a surface or an enemy towards you

  • Buffs are littered throughout various maps that can change your weapon drastically

Gameplay elements are inspired by Xonotic, Nexuiz (2005), and Ratz Instagib. Made with https://github.com/ItsDeltin/Overwatch-Script-To-Workshop OSTW code is included in the GitHub link

Known Bugs

  • Once a player joins the game for the first time a red explosion effect and its accompanying sound will play at Vector(0,0,0)
settings
{
	main
	{
		Description: "Instagib | Created by scort#11221"
	}

	lobby
	{
		Allow Players Who Are In Queue: Yes
		Map Rotation: After A Game
		Max Spectators: 12
		Return To Lobby: Never
	}

	modes
	{
		Deathmatch
		{
			enabled maps
			{
				Black Forest
				Black Forest Winter
				Blizzard World
				Blizzard World Winter
				Castillo
				Château Guillard
				Dorado
				Ecopoint: Antarctica
				Ecopoint: Antarctica Winter
				Eichenwalde
				Havana
				Hollywood
				King's Row
				King's Row Winter
				Lijiang Control Center
				Lijiang Control Center Lunar New Year
				Necropolis
				Paris
			}
		}

		General
		{
			Game Mode Start: Immediately
			Hero Limit: Off
			Respawn Time Scalar: 10%
			Spawn Health Packs: Disabled
		}
	}

	heroes
	{
		General
		{
			McCree
			{
				Combat Roll: Off
				Damage Dealt: 500%
				Damage Received: 500%
				Flashbang: Off
				No Ammunition Requirement: On
				Quick Melee: Off
				Secondary Fire: Off
				Ultimate Ability Deadeye: Off
			}

			enabled heroes
			{
				McCree
			}
		}
	}

	workshop
	{
		Buckshot Spread Lower is Tighter 3.5: 3.500
	}
}

variables
{
	global:
		2: DEFAULT_START_SPEED
		3: BHOP_MAX_SPEED
		4: BHOP_SPEED_RATE
		5: GRAPPLE_PULL_SPEED
		6: SECONDARY_PROJECTILE_SPEED
		7: MATCH_TIME_LIMIT
		8: matchStarted
		9: buffsEnabled
		10: buffsSpawnImmediately
		11: validBuffMap
		12: buffEffect
		13: buffPos
		14: buffIcon
		15: cdText
		16: spawnWallbang
		17: spawnWithWallbang
		18: NUM_WALLBANGS
		19: wallbangCD
		20: WALLBANG_CD
		21: WALLBANG_DUR
		22: spawnLife
		23: spawnWithLife
		24: lifeCD
		25: LIFE_CD
		26: spawnBounce
		27: spawnWithBounce
		28: NUM_BOUNCES
		29: bounceCD
		30: BOUNCE_CD
		31: BOUNCE_DUR
		32: spawnBuckshot
		33: spawnWithBuckshot
		34: BUCKSHOT_SPREAD
		35: buckshotCD
		36: BUCKSHOT_CD
		37: BUCKSHOT_DUR
		38: spreadDiag
		39: spreadHori
		40: randomSpread

	player:
		1: bhopSpeed
		2: speedAccumInAir
		3: isChasing
		4: primaryHit
		5: primaryStartPos
		6: primaryBeam
		7: secondaryHit
		8: secondaryEyePos
		9: secondaryOrb
		11: grappleEyePos
		12: grappleBeamEffect
		13: usingGrapple
		14: grappleHit
		15: grappleHitSphere
		16: grapplePlayerBeamEffect
		17: grappleHitPlayer
		18: grappleHitPlayerSphere
		19: livingEnemies
		20: hudText
		21: wallbangEffect
		22: wallbangEnabled
		23: wallbangDur
		24: extraLife
		25: extraLifeIcon
		26: bounceEnabled
		27: bounceDur
		28: buckshotHitPos
		29: buckshotHitPlayer
		30: buckshotCenter
		31: buckshotEnabled
		32: buckshotDur
		33: lifeKills
		34: spreeInWorld
		35: spreeEffects
		36: normals
		37: hitPos
		38: hitPosPlayer
		39: ricochets
		40: hitPosBounces
		41: hitPosPlayerBounces
		42: eyePos
		43: facing
		44: randomizedSpreadHori
		45: randomizedSpreadDiag
		46: i
		47: players
		48: loop
		49: wallbangBuffEffect
		50: sound
		51: gunPos
		52: wallbangHitPos
		53: wallbangLivingEnemies
		54: wallbangHitPlayer
		55: wallbangCount
		56: bounceBuffEffect
		57: sound_0
		58: bounceEffects
		59: bounceEffect
		60: loop_0
		61: i_0
		62: buckshotBuffEffect
		63: sound_1
		64: gunPos_0
		65: buckshotBeam
		66: centerBeam
		67: hori
		68: diag
		69: pellets
		70: beams
}

subroutines
{
	0: WallbangCooldown
	1: LifeCooldown
	2: BounceCooldown
	3: BuckshotCooldown
}

rule("[Sub] :: Wallbang Cooldown")
{
	event
	{
		Subroutine;
		WallbangCooldown;
	}

	actions
	{
		If(!Global.spawnWithWallbang && Global.spawnWallbang);
			Global.wallbangCD = Global.WALLBANG_CD;
			Chase Global Variable At Rate(wallbangCD, 0, 1, None);
			Create In-World Text(All Players(All Teams), Custom String("{0}", Round To Integer(Global.wallbangCD, Up)), Global.buffPos[0], 2,
				Clip Against Surfaces, Visible To Position and String, White, Default Visibility);
			Global.cdText[0] = Last Text ID;
		End;
	}
}

rule("[Sub] :: Life Cooldown")
{
	event
	{
		Subroutine;
		LifeCooldown;
	}

	actions
	{
		If(!Global.spawnWithLife && Global.spawnLife);
			Global.lifeCD = Global.LIFE_CD;
			Chase Global Variable At Rate(lifeCD, 0, 1, None);
			Create In-World Text(All Players(All Teams), Custom String("{0}", Round To Integer(Global.lifeCD, Up)), Global.buffPos[1], 2,
				Clip Against Surfaces, Visible To Position and String, White, Default Visibility);
			Global.cdText[1] = Last Text ID;
		End;
	}
}

rule("[Sub] :: Bounce Cooldown")
{
	event
	{
		Subroutine;
		BounceCooldown;
	}

	actions
	{
		If(!Global.spawnWithBounce && Global.spawnBounce);
			Global.bounceCD = Global.BOUNCE_CD;
			Chase Global Variable At Rate(bounceCD, 0, 1, None);
			Create In-World Text(All Players(All Teams), Custom String("{0}", Round To Integer(Global.bounceCD, Up)), Global.buffPos[2], 2,
				Clip Against Surfaces, Visible To Position and String, White, Default Visibility);
			Global.cdText[2] = Last Text ID;
		End;
	}
}

rule("[Sub] :: Buckshot Cooldown")
{
	event
	{
		Subroutine;
		BuckshotCooldown;
	}

	actions
	{
		If(!Global.spawnWithBuckshot && Global.spawnBuckshot);
			Global.buckshotCD = Global.BUCKSHOT_CD;
			Chase Global Variable At Rate(buckshotCD, 0, 1, None);
			Create In-World Text(All Players(All Teams), Custom String("{0}", Round To Integer(Global.buckshotCD, Up)), Global.buffPos[3], 2,
				Clip Against Surfaces, Visible To Position and String, White, Default Visibility);
			Global.cdText[3] = Last Text ID;
		End;
	}
}

rule("[Main] :: Initial Global")
{
	event
	{
		Ongoing - Global;
	}

	actions
	{
		Disable Inspector Recording;
		Disable Built-In Game Mode Completion;
		Disable Built-In Game Mode Announcer;
		Create HUD Text(All Players(All Teams), Null, Custom String("ã…¤Instagib: v1.6.1 | Created by scort#11221"), Custom String(
			"ã…¤           Share Code: APPPX"), Right, 0, White, White, White, Visible To and String, Default Visibility);
		Global.cdText = Empty Array;
		Global.buffEffect = Empty Array;
		Global.buffPos = Empty Array;
		Global.buffIcon = Empty Array;
		Global.matchStarted = False;
		Global.DEFAULT_START_SPEED = Workshop Setting Integer(Custom String("BHop"), Custom String("Starting Speed (100)"), 100, 25, 300);
		Global.BHOP_MAX_SPEED = Workshop Setting Integer(Custom String("BHop"), Custom String("Maximum Speed Possible From Hops (320)"),
			320, 25, 10000);
		Global.BHOP_SPEED_RATE = Workshop Setting Real(Custom String("BHop"), Custom String("Speed gain rate (12.5)"), 12.500, 1, 100);
		Global.buffsSpawnImmediately = Workshop Setting Toggle(Custom String("Buff Spawns"), Custom String(
			"Buffs Spawn Immediately When Match Starts (Off)"), False);
		Global.buffsEnabled = Workshop Setting Toggle(Custom String("Buff Spawns"), Custom String("Spawn Buffs (On)"), True);
		Global.NUM_WALLBANGS = Workshop Setting Integer(Custom String("Wallbang Buff Settings"), Custom String("Wallbang Amount (5)"), 5,
			2, 100);
		Global.WALLBANG_CD = Workshop Setting Integer(Custom String("Wallbang Buff Settings"), Custom String(
			"Wallbang Orb Spawn Time (75)"), 75, 1, 300);
		Global.WALLBANG_DUR = Workshop Setting Integer(Custom String("Wallbang Buff Settings"), Custom String(
			"Wallbang Buff Duration (25)"), 25, 1, 300);
		Global.spawnWallbang = Workshop Setting Toggle(Custom String("Wallbang Buff Settings"), Custom String("Spawn Wallbang Orb (On)"),
			True);
		Global.spawnWithWallbang = Workshop Setting Toggle(Custom String("Wallbang Buff Settings"), Custom String(
			"Spawn With Wallbang (Lasts Forever) (Off)"), False);
		Global.BOUNCE_CD = Workshop Setting Integer(Custom String("Ricochet Buff Settings"), Custom String("Ricochet Orb Spawn Time (65)"),
			65, 1, 300);
		Global.BOUNCE_DUR = Workshop Setting Integer(Custom String("Ricochet Buff Settings"), Custom String("Ricochet Buff Duration (25)"),
			25, 1, 300);
		Global.NUM_BOUNCES = Workshop Setting Integer(Custom String("Ricochet Buff Settings"), Custom String("Ricochet Amount (4)"), 4, 1,
			64);
		Global.spawnBounce = Workshop Setting Toggle(Custom String("Ricochet Buff Settings"), Custom String("Spawn Ricochet Orb (On)"),
			True);
		Global.spawnWithBounce = Workshop Setting Toggle(Custom String("Ricochet Buff Settings"), Custom String(
			"Spawn With Ricochet (Lasts Forever) (Off)"), False);
		Global.LIFE_CD = Workshop Setting Integer(Custom String("Extra Life Buff Settings"), Custom String(
			"Extra Life Orb Spawn Time (120)"), 120, 1, 400);
		Global.spawnLife = Workshop Setting Toggle(Custom String("Extra Life Buff Settings"), Custom String("Spawn Extra Life Orb (On)"),
			True);
		Global.spawnWithLife = Workshop Setting Toggle(Custom String("Extra Life Buff Settings"), Custom String(
			"Spawn With Extra Life (Off)"), False);
		Global.BUCKSHOT_CD = Workshop Setting Integer(Custom String("Buckshot Buff Settings"), Custom String(
			"Buckshot Orb Spawn Time (95)"), 95, 1, 300);
		Global.BUCKSHOT_DUR = Workshop Setting Integer(Custom String("Buckshot Buff Settings"), Custom String(
			"Buckshot Buff Duration (20)"), 20, 1, 300);
		Global.BUCKSHOT_SPREAD = Workshop Setting Real(Custom String("Buckshot Buff Settings"), Custom String(
			"Buckshot Spread (Lower is Tighter) (3.5)"), 3.500, 0.100, 20);
		Global.randomSpread = Workshop Setting Toggle(Custom String("Buckshot Buff Settings"), Custom String(
			"Randomized Buckshot Spread (Off)"), False);
		Global.spawnBuckshot = Workshop Setting Toggle(Custom String("Buckshot Buff Settings"), Custom String("Spawn Buckshot Orb (On)"),
			True);
		Global.spawnWithBuckshot = Workshop Setting Toggle(Custom String("Buckshot Buff Settings"), Custom String(
			"Spawn With Buckshot (Lasts Forever) (Off)"), False);
		Global.SECONDARY_PROJECTILE_SPEED = Workshop Setting Integer(Custom String("Secondary Fire"), Custom String(
			"Secondary Projectile Speed (110)"), 110, 10, 500);
		Global.MATCH_TIME_LIMIT = Workshop Setting Integer(Custom String("Misc"), Custom String("Match Time (Minutes) (20)"), 20, 1, 60)
			* 60;
		Global.GRAPPLE_PULL_SPEED = Workshop Setting Real(Custom String("Misc"), Custom String("Grapple Pull Speed (3.5)"), 3.500, 1, 10);
	}
}

rule("[Main] :: Initial Player Join")
{
	event
	{
		Player Joined Match;
		All;
		All;
	}

	actions
	{
		Event Player.hudText = Empty Array;
		Event Player.spreeInWorld = Empty Array;
		Event Player.spreeEffects = Empty Array;
	}
}

rule("[Main] :: Start Match")
{
	event
	{
		Ongoing - Global;
	}

	conditions
	{
		(!Global.matchStarted && Count Of(All Living Players(All Teams)) > 0 && !Is Waiting For Players) == True;
	}

	actions
	{
		Set Match Time(10);
		Wait(10.500, Ignore Condition);
		Set Match Time(Global.MATCH_TIME_LIMIT);
		Global.matchStarted = True;
		If(Global.validBuffMap && !Global.buffsSpawnImmediately && !Is Waiting For Players);
			Call Subroutine(LifeCooldown);
			Call Subroutine(WallbangCooldown);
			Call Subroutine(BounceCooldown);
			Call Subroutine(BuckshotCooldown);
		End;
		If(Global.buffsEnabled);
			If(!Global.spawnWithWallbang && Global.spawnWallbang);
				Create HUD Text(All Players(All Teams), Custom String("{0}", Ability Icon String(Hero(Baptiste), Button(Ultimate))), Null,
					Global.wallbangCD != 0 ? Custom String("{0}", Round To Integer(Global.wallbangCD, Up)) : (Entity Exists(Global.buffEffect[0])
					? Custom String("{0}", Icon String(Checkmark)) : Custom String("In-Use")), Left, 1, Yellow, White, White,
					Visible To and String, Default Visibility);
			End;
			If(!Global.spawnWithBounce && Global.spawnBounce);
				Create HUD Text(All Players(All Teams), Custom String("{0}", Ability Icon String(Hero(Winston), Button(Ability 1))), Null,
					Global.bounceCD != 0 ? Custom String("{0}", Round To Integer(Global.bounceCD, Up)) : (Entity Exists(Global.buffEffect[2])
					? Custom String("{0}", Icon String(Checkmark)) : Custom String("In-Use")), Left, 2, Purple, White, White,
					Visible To and String, Default Visibility);
			End;
			If(!Global.spawnWithBuckshot && Global.spawnBuckshot);
				Create HUD Text(All Players(All Teams), Custom String("{0}", Ability Icon String(Hero(Ashe), Button(Ability 1))), Null,
					Global.buckshotCD != 0 ? Custom String("{0}", Round To Integer(Global.buckshotCD, Up)) : (Entity Exists(Global.buffEffect[3])
					? Custom String("{0}", Icon String(Checkmark)) : Custom String("In-Use")), Left, 3, Green, White, White, Visible To and String,
					Default Visibility);
			End;
			If(!Global.spawnWithLife && Global.spawnLife);
				Create HUD Text(All Players(All Teams), Custom String("{0}", Ability Icon String(Hero(Mercy), Button(Ability 2))), Null,
					Global.lifeCD != 0 ? Custom String("{0}", Round To Integer(Global.lifeCD, Up)) : (Entity Exists(Global.buffEffect[2])
					? Custom String("{0}", Icon String(Checkmark)) : Custom String("{0}", Icon String(Checkmark))), Left, 4, Sky Blue, White,
					White, Visible To and String, Default Visibility);
			End;
		End;
	}
}

rule("[Main] :: Player Spawned")
{
	event
	{
		Ongoing - Each Player;
		All;
		All;
	}

	conditions
	{
		(Has Spawned(Event Player) && Global.matchStarted) == True;
	}

	actions
	{
		Small Message(Event Player, Custom String("Welcome!"));
		Wait(3, Ignore Condition);
		Small Message(Event Player, Custom String("Holding down {0} will let you gain speed by bunny hopping", Input Binding String(Button(
			Jump))));
		Wait(3, Ignore Condition);
		Small Message(Event Player, Custom String(
			"Press {0} to throw out a grappling hook to pull you towards a surface or to pull players towards you", Input Binding String(
			Button(Ability 2))));
		Wait(3, Ignore Condition);
		Small Message(Event Player, Custom String(
			"Press {0} to fire an orb that knocks players back, including yourself allowing for extra mobility", Input Binding String(
			Button(Secondary Fire))));
		Wait(3, Ignore Condition);
		Small Message(Event Player, Custom String("Buffs are littered thorughout the map that give you special changes to your weapon"));
		Wait(3, Ignore Condition);
		Small Message(Event Player, Custom String("Happy Fragging!"));
	}
}

rule("[Main] :: End Game")
{
	event
	{
		Ongoing - Global;
	}

	conditions
	{
		Global.matchStarted == True;
	}

	actions
	{
		Wait(Global.MATCH_TIME_LIMIT, Ignore Condition);
		Enable Built-In Game Mode Completion;
	}
}

rule("[Main] :: Primary Effect")
{
	event
	{
		Ongoing - Each Player;
		All;
		All;
	}

	conditions
	{
		(!Event Player.wallbangEnabled && !Event Player.bounceEnabled && !Event Player.buckshotEnabled && Is Firing Primary(Event Player))
			== True;
	}

	actions
	{
		Event Player.primaryBeam = Empty Array;
		Event Player.livingEnemies = Filtered Array(All Players(Opposite Team Of(Team Of(Event Player))), Is Alive(Current Array Element));
		Event Player.primaryStartPos = World Vector Of(Right - Vector(0, 0.300, 0), Event Player, Rotation) * 0.180;
		Event Player.primaryHit = Ray Cast Hit Position(Eye Position(Event Player), Eye Position(Event Player)   Facing Direction Of(
			Event Player) * 100, Event Player.livingEnemies, Event Player, True);
		Play Effect(Event Player, Good Explosion, Aqua, Event Player.primaryHit, 0.200);
		Play Effect(Remove From Array(All Players(Opposite Team Of(Team Of(Event Player))), Event Player), Good Explosion, Red,
			Event Player.primaryHit, 0.200);
		Create Beam Effect(Event Player, Bad Beam, Eye Position(Event Player)   Facing Direction Of(Event Player)
			  Event Player.primaryStartPos, Event Player.primaryHit, Aqua, None);
		Event Player.primaryBeam[0] = Last Created Entity;
		Create Beam Effect(Remove From Array(All Players(Opposite Team Of(Team Of(Event Player))), Event Player), Bad Beam, Eye Position(
			Event Player)   Facing Direction Of(Event Player)   Event Player.primaryStartPos, Event Player.primaryHit, Red, None);
		Event Player.primaryBeam[1] = Last Created Entity;
		Wait(0.150, Ignore Condition);
		Destroy Effect(Event Player.primaryBeam[0]);
		Destroy Effect(Event Player.primaryBeam[1]);
	}
}

disabled rule("---------------- Killing Spree Notifs ----------------")
{
	event
	{
		Ongoing - Global;
	}
}

rule("[Killspree] :: Record Kills While Alive")
{
	event
	{
		Player Dealt Final Blow;
		All;
		All;
	}

	actions
	{
		Event Player.lifeKills  = 1;
	}
}

rule("[Killspree] :: Reset Kills on death")
{
	event
	{
		Player Died;
		All;
		All;
	}

	actions
	{
		If(Event Player.lifeKills > 5);
			Big Message(All Players(All Teams), !Event Was Environment ? Custom String("{0}'s {1} player spree was put to an end by {2}!",
				Victim, Event Player.lifeKills, Attacker) : Custom String("{0}'s {1} player spree was put to an end by the world!", Victim,
				Event Player.lifeKills));
		End;
		Event Player.i = 0;
		While(Event Player.i < 7);
			Destroy Effect(Event Player.spreeEffects[Event Player.i]);
			Event Player.i  = 1;
		End;
		Wait(0.032, Ignore Condition);
		Event Player.lifeKills = 0;
		Event Player.spreeInWorld = Empty Array;
		Event Player.spreeEffects = Empty Array;
	}
}

rule("[Killspree] :: 5 Kills")
{
	event
	{
		Player Dealt Final Blow;
		All;
		All;
	}

	conditions
	{
		Event Player.lifeKills == 5;
	}

	actions
	{
		Big Message(All Players(All Teams), Custom String("{0} is on a Killing Spree!", Event Player));
		Create In-World Text(Event Player, Custom String("Killing Spree!"), Position Of(Victim)   Up, 3, Do Not Clip, None, White,
			Default Visibility);
		Event Player.spreeInWorld[0] = Last Text ID;
		Create Effect(All Players(All Teams), Sparkles, White, Event Player, 1, Visible To Position and Radius);
		Event Player.spreeEffects[0] = Last Created Entity;
		Wait(2, Ignore Condition);
		Destroy In-World Text(Event Player.spreeInWorld[0]);
	}
}

rule("[Killspree] :: 8 Kills")
{
	event
	{
		Player Dealt Final Blow;
		All;
		All;
	}

	conditions
	{
		Event Player.lifeKills == 8;
	}

	actions
	{
		Destroy Effect(Event Player.spreeEffects[0]);
		Big Message(All Players(All Teams), Custom String("{0} is on a Rampage!", Event Player));
		Create In-World Text(Event Player, Custom String("Rampage!"), Position Of(Victim)   Up, 3, Do Not Clip, None, Lime Green,
			Default Visibility);
		Event Player.spreeInWorld[1] = Last Text ID;
		Create Effect(All Players(All Teams), Sparkles, Lime Green, Event Player, 1, Visible To Position and Radius);
		Event Player.spreeEffects[1] = Last Created Entity;
		Wait(2, Ignore Condition);
		Destroy In-World Text(Event Player.spreeInWorld[1]);
	}
}

rule("[Killspree] :: 11 Kills")
{
	event
	{
		Player Dealt Final Blow;
		All;
		All;
	}

	conditions
	{
		Event Player.lifeKills == 11;
	}

	actions
	{
		Destroy Effect(Event Player.spreeEffects[1]);
		Big Message(All Players(All Teams), Custom String("{0} is Dominating!", Event Player));
		Create In-World Text(Event Player, Custom String("Dominating!"), Position Of(Victim)   Up, 3, Do Not Clip, None, Blue,
			Default Visibility);
		Event Player.spreeInWorld[2] = Last Text ID;
		Create Effect(All Players(All Teams), Sparkles, Blue, Event Player, 1, Visible To Position and Radius);
		Event Player.spreeEffects[2] = Last Created Entity;
		Wait(2, Ignore Condition);
		Destroy In-World Text(Event Player.spreeInWorld[2]);
	}
}

rule("[Killspree] :: 14 Kills")
{
	event
	{
		Player Dealt Final Blow;
		All;
		All;
	}

	conditions
	{
		Event Player.lifeKills == 14;
	}

	actions
	{
		Destroy Effect(Event Player.spreeEffects[2]);
		Big Message(All Players(All Teams), Custom String("{0} is Unstoppable!", Event Player));
		Create In-World Text(Event Player, Custom String("Unstoppable!"), Position Of(Victim)   Up, 3, Do Not Clip, None, Purple,
			Default Visibility);
		Event Player.spreeInWorld[3] = Last Text ID;
		Create Effect(All Players(All Teams), Sparkles, Purple, Event Player, 1, Visible To Position and Radius);
		Event Player.spreeEffects[3] = Last Created Entity;
		Wait(2, Ignore Condition);
		Destroy In-World Text(Event Player.spreeInWorld[3]);
	}
}

rule("[Killspree] :: 17 Kills")
{
	event
	{
		Player Dealt Final Blow;
		All;
		All;
	}

	conditions
	{
		Event Player.lifeKills == 17;
	}

	actions
	{
		Destroy Effect(Event Player.spreeEffects[3]);
		Big Message(All Players(All Teams), Custom String("{0} is Godlike!", Event Player));
		Create In-World Text(Event Player, Custom String("Godlike!"), Position Of(Victim)   Up, 3, Do Not Clip, None, Yellow,
			Default Visibility);
		Event Player.spreeInWorld[4] = Last Text ID;
		Create Effect(All Players(All Teams), Sparkles, Yellow, Event Player, 1, Visible To Position and Radius);
		Event Player.spreeEffects[4] = Last Created Entity;
		Wait(2, Ignore Condition);
		Destroy In-World Text(Event Player.spreeInWorld[4]);
	}
}

rule("[Killspree] :: 21 Kills")
{
	event
	{
		Player Dealt Final Blow;
		All;
		All;
	}

	conditions
	{
		Event Player.lifeKills == 21;
	}

	actions
	{
		Destroy Effect(Event Player.spreeEffects[4]);
		Big Message(All Players(All Teams), Custom String("{0} is Divine!", Event Player));
		Create In-World Text(Event Player, Custom String("Divine!"), Position Of(Victim)   Up, 3, Do Not Clip, None, Orange,
			Default Visibility);
		Event Player.spreeInWorld[5] = Last Text ID;
		Create Effect(All Players(All Teams), Sparkles, Orange, Event Player, 1, Visible To Position and Radius);
		Event Player.spreeEffects[5] = Last Created Entity;
		Wait(2, Ignore Condition);
		Destroy In-World Text(Event Player.spreeInWorld[5]);
	}
}

rule("[Killspree] :: 24 Kills")
{
	event
	{
		Player Dealt Final Blow;
		All;
		All;
	}

	conditions
	{
		Event Player.lifeKills == 24;
	}

	actions
	{
		Destroy Effect(Event Player.spreeEffects[5]);
		Big Message(All Players(All Teams), Custom String("{0} is Empyreal!", Event Player));
		Create In-World Text(Event Player, Custom String("Empyreal!"), Position Of(Victim)   Up, 3, Do Not Clip, None, Red,
			Default Visibility);
		Event Player.spreeInWorld[6] = Last Text ID;
		Create Effect(All Players(All Teams), Sparkles, Red, Event Player, 1, Visible To Position and Radius);
		Event Player.spreeEffects[6] = Last Created Entity;
		Wait(2, Ignore Condition);
		Destroy In-World Text(Event Player.spreeInWorld[6]);
	}
}

disabled rule("---------------- Bhop ----------------")
{
	event
	{
		Ongoing - Global;
	}
}

rule("[Bhop] :: Auto Hop")
{
	event
	{
		Ongoing - Each Player;
		All;
		All;
	}

	conditions
	{
		(Is On Ground(Event Player) && Is Button Held(Event Player, Jump)) == True;
	}

	actions
	{
		Disallow Button(Event Player, Jump);
		Wait(0.016, Ignore Condition);
		Allow Button(Event Player, Jump);
	}
}

rule("[Bhop] :: Starting Speed")
{
	event
	{
		Ongoing - Each Player;
		All;
		All;
	}

	actions
	{
		Event Player.bhopSpeed = Global.DEFAULT_START_SPEED;
	}
}

rule("[Bhop] :: If Airborne")
{
	event
	{
		Ongoing - Each Player;
		All;
		All;
	}

	conditions
	{
		((!Event Player.usingGrapple && Is Jumping(Event Player) && Horizontal Speed Of(Event Player)
			> Global.DEFAULT_START_SPEED / 33.330) || (Event Player.usingGrapple && Is In Air(Event Player) && Distance Between(
			Event Player.grappleEyePos, Event Player.grappleHit) < 40)) == True;
	}

	actions
	{
		Event Player.speedAccumInAir = Horizontal Speed Of(Event Player);
		Wait(0.050, Ignore Condition);
		Chase Player Variable At Rate(Event Player, bhopSpeed, Global.BHOP_MAX_SPEED, Global.BHOP_SPEED_RATE, Destination and Rate);
		Event Player.isChasing = True;
	}
}

rule("[Bhop] :: Update Speed")
{
	event
	{
		Ongoing - Each Player;
		All;
		All;
	}

	conditions
	{
		Event Player.isChasing == True;
	}

	actions
	{
		Event Player.speedAccumInAir = Horizontal Speed Of(Event Player);
		Set Move Speed(Event Player, Event Player.bhopSpeed);
		Wait(0.032, Ignore Condition);
		Loop If Condition Is True;
	}
}

rule("[Bhop] :: Update isChasing")
{
	event
	{
		Ongoing - Each Player;
		All;
		All;
	}

	conditions
	{
		((Event Player.isChasing && Event Player.bhopSpeed == Global.BHOP_MAX_SPEED) || (
			Event Player.bhopSpeed == Global.DEFAULT_START_SPEED)) == True;
	}

	actions
	{
		Stop Chasing Player Variable(Event Player, bhopSpeed);
		Event Player.isChasing = False;
	}
}

rule("[Bhop] :: Reset speed if turning too fast")
{
	event
	{
		Ongoing - Each Player;
		All;
		All;
	}

	conditions
	{
		Horizontal Speed Of(Event Player) < Event Player.speedAccumInAir - 0.450;
	}

	actions
	{
		Stop Chasing Player Variable(Event Player, bhopSpeed);
		Event Player.isChasing = False;
		Event Player.bhopSpeed = Global.DEFAULT_START_SPEED;
		Set Move Speed(Event Player, Event Player.bhopSpeed);
	}
}

rule("[Bhop] :: Stop chasing if too slow")
{
	event
	{
		Ongoing - Each Player;
		All;
		All;
	}

	conditions
	{
		(!Event Player.usingGrapple && Event Player.isChasing && Horizontal Speed Of(Event Player) <= Global.DEFAULT_START_SPEED / 66.660)
			== True;
	}

	actions
	{
		Stop Chasing Player Variable(Event Player, bhopSpeed);
		Event Player.isChasing = False;
		Event Player.bhopSpeed = Global.DEFAULT_START_SPEED;
		Set Move Speed(Event Player, Event Player.bhopSpeed);
		Wait(0.032, Ignore Condition);
		Loop If Condition Is True;
	}
}

rule("[Bhop] :: Stop if player is on ground")
{
	event
	{
		Ongoing - Each Player;
		All;
		All;
	}

	conditions
	{
		(Is On Ground(Event Player) && !Event Player.usingGrapple && Event Player.bhopSpeed > Global.DEFAULT_START_SPEED) == True;
	}

	actions
	{
		Wait(0.200, Abort When False);
		Stop Chasing Player Variable(Event Player, bhopSpeed);
		Event Player.bhopSpeed = Global.DEFAULT_START_SPEED;
		Set Move Speed(Event Player, Event Player.bhopSpeed);
	}
}

disabled rule("---------------- Secondary Fire ----------------")
{
	event
	{
		Ongoing - Global;
	}
}

rule("[Secondary Fire] :: Projectile")
{
	event
	{
		Ongoing - Each Player;
		All;
		All;
	}

	conditions
	{
		(Global.matchStarted && Is Button Held(Event Player, Secondary Fire) && Is Alive(Event Player)) == True;
	}

	actions
	{
		Event Player.livingEnemies = Filtered Array(All Players(Opposite Team Of(Team Of(Event Player))), Is Alive(Current Array Element));
		Event Player.secondaryHit = Ray Cast Hit Position(Eye Position(Event Player), Eye Position(Event Player)   Facing Direction Of(
			Event Player) * 100, Event Player.livingEnemies, Event Player, True);
		Event Player.secondaryEyePos = Eye Position(Event Player);
		Destroy Effect(Event Player.secondaryOrb);
		Play Effect(All Players(All Teams), Ring Explosion Sound, White, Event Player, 50);
		Create Effect(All Players(All Teams), Orb, Red, Event Player.secondaryEyePos, 0.100, Visible To Position and Radius);
		Event Player.secondaryOrb = Last Created Entity;
		Chase Player Variable At Rate(Event Player, secondaryEyePos, Event Player.secondaryHit, Global.SECONDARY_PROJECTILE_SPEED,
			Destination and Rate);
		Wait(0.500, Ignore Condition);
	}
}

rule("[Secondary Fire] :: Impulse")
{
	event
	{
		Ongoing - Each Player;
		All;
		All;
	}

	conditions
	{
		(Distance Between(Event Player.secondaryEyePos, Event Player.secondaryHit) < 0.100 || Ray Cast Hit Player(Eye Position(
			Event Player), Event Player.secondaryEyePos, All Living Players(All Teams), Event Player, True) != Null) == True;
	}

	actions
	{
		Stop Chasing Player Variable(Event Player, secondaryEyePos);
		Event Player.players = Filtered Array(All Living Players(All Teams), Distance Between(Current Array Element,
			Event Player.secondaryEyePos) <= 4.500);
		For Player Variable(Event Player, loop, 0, Count Of(Event Player.players), 1);
			Apply Impulse(Event Player.players[Event Player.loop], Direction Towards(Event Player.secondaryEyePos,
				Event Player.players[Event Player.loop]   Vector(0, Y Component Of(Eye Position(Event Player.players[Event Player.loop])
				- Event Player.players[Event Player.loop]) / 2, 0)   Up), 15, To World, Incorporate Contrary Motion);
		End;
		Play Effect(All Players(All Teams), Good Explosion, Red, Event Player.secondaryHit, 2.500);
		Destroy Effect(Event Player.secondaryOrb);
	}
}

disabled rule("---------------- Grapple ----------------")
{
	event
	{
		Ongoing - Global;
	}
}

rule("[Grapple] :: Grapple Start")
{
	event
	{
		Ongoing - Each Player;
		All;
		All;
	}

	conditions
	{
		(Global.matchStarted && Is Button Held(Event Player, Ability 2) && Is Alive(Event Player)) == True;
	}

	actions
	{
		Event Player.livingEnemies = Filtered Array(All Players(Opposite Team Of(Team Of(Event Player))), Is Alive(Current Array Element));
		Event Player.grappleHit = Ray Cast Hit Position(Eye Position(Event Player), Eye Position(Event Player)   Facing Direction Of(
			Event Player) * 40, Event Player.livingEnemies, Event Player, True);
		Event Player.grappleHitPlayer = Ray Cast Hit Player(Eye Position(Event Player), Eye Position(Event Player)   Facing Direction Of(
			Event Player) * 40, Event Player.livingEnemies, Event Player, True);
		Event Player.grappleEyePos = Eye Position(Event Player);
		If(Event Player.grappleHitPlayer);
			Create Beam Effect(All Players(All Teams), Grapple Beam, Event Player, Event Player.grappleHitPlayer, Yellow,
				Visible To Position and Radius);
			Event Player.grappleBeamEffect = Last Created Entity;
			Create Effect(All Players(All Teams), Sphere, Yellow, Event Player.grappleHitPlayer, 0.200, Visible To Position and Radius);
			Event Player.grappleHitPlayerSphere = Last Created Entity;
		Else;
			Create Beam Effect(All Players(All Teams), Grapple Beam, Event Player, Event Player.grappleHit, Yellow,
				Visible To Position and Radius);
			Event Player.grappleBeamEffect = Last Created Entity;
			Create Effect(All Players(All Teams), Sphere, Yellow, Event Player.grappleHit, 0.200, Visible To Position and Radius);
			Event Player.grappleHitSphere = Last Created Entity;
		End;
		Play Effect(All Players(All Teams), Bad Explosion, Yellow, Event Player, 0.330);
		Play Effect(All Players(All Teams), Buff Impact Sound, White, Event Player, 100);
		Play Effect(All Players(All Teams), Bad Explosion, Yellow, Event Player.grappleHit, 0.200);
		Play Effect(All Players(All Teams), Buff Impact Sound, White, Event Player.grappleHit, 50);
		Event Player.usingGrapple = True;
		If(Distance Between(Event Player.grappleEyePos, Event Player.grappleHit) == 40);
			Wait(0.250, Ignore Condition);
			Event Player.usingGrapple = False;
			Destroy Effect(Event Player.grappleBeamEffect);
			Destroy Effect(Event Player.grapplePlayerBeamEffect);
			Destroy Effect(Event Player.grappleHitSphere);
			Destroy Effect(Event Player.grappleHitPlayerSphere);
		End;
		Wait(0.500, Ignore Condition);
	}
}

rule("[Grapple] :: Pull")
{
	event
	{
		Ongoing - Each Player;
		All;
		All;
	}

	conditions
	{
		(Event Player.usingGrapple && Distance Between(Event Player.grappleEyePos, Event Player.grappleHit) < 40) == True;
	}

	actions
	{
		Start Forcing Throttle(Event Player, 0, 0.050, 0, 0.050, 0, 0.050);
		If(Event Player.grappleHitPlayer && Is Alive(Event Player.grappleHitPlayer));
			Apply Impulse(Event Player.grappleHitPlayer, Vector(0, 0.300, 0)   Direction Towards(Event Player.grappleHitPlayer, Eye Position(
				Event Player)), Global.GRAPPLE_PULL_SPEED / 1.250, To World, Incorporate Contrary Motion);
		Else;
			If(Is Button Held(Event Player, Jump));
				Apply Impulse(Event Player, Vector(0, 0.300, 0)   Direction Towards(Eye Position(Event Player), Event Player.grappleHit),
					Global.GRAPPLE_PULL_SPEED, To World, Incorporate Contrary Motion);
			Else;
				Apply Impulse(Event Player, Direction Towards(Eye Position(Event Player), Event Player.grappleHit), Global.GRAPPLE_PULL_SPEED,
					To World, Incorporate Contrary Motion);
			End;
		End;
		Wait(0.064, Ignore Condition);
		Loop If Condition Is True;
	}
}

rule("[Grapple] :: Grapple End")
{
	event
	{
		Ongoing - Each Player;
		All;
		All;
	}

	conditions
	{
		(!Is Button Held(Event Player, Ability 2) || Is Dead(Event Player) || Is Dead(Event Player.grappleHitPlayer)
			|| !Is In Line of Sight(Event Player, Event Player.grappleHitPlayer, Barriers Do Not Block LOS) || !Is In View Angle(
			Event Player, Event Player.grappleHitPlayer, 105)) == True;
	}

	actions
	{
		Event Player.usingGrapple = False;
	}
}

rule("[Grapple] :: Destroy Effects")
{
	event
	{
		Ongoing - Each Player;
		All;
		All;
	}

	conditions
	{
		!Event Player.usingGrapple == True;
	}

	actions
	{
		Destroy Effect(Event Player.grappleBeamEffect);
		Destroy Effect(Event Player.grapplePlayerBeamEffect);
		Destroy Effect(Event Player.grappleHitSphere);
		Destroy Effect(Event Player.grappleHitPlayerSphere);
		Stop Forcing Throttle(Event Player);
	}
}

disabled rule("---------------- Buff ----------------")
{
	event
	{
		Ongoing - Global;
	}
}

rule("[Buff] :: Locations Switch")
{
	event
	{
		Ongoing - Global;
	}

	actions
	{
		"i do not recommend opening the large action in-game"
		Global.validBuffMap = False;
		Skip(Array(83, 0, 6, 12, 18, 24, 30, 36, 42, 48, 54, 60, 66, 72, 78)[Index Of Array Value(Array((
			Global.buffsEnabled && Current Map == Map(Workshop Chamber)) || (Current Map == Map(Workshop Expanse)) || Current Map == Map(
			Workshop Expanse Night) || Current Map == Map(Workshop Island) || Current Map == Map(Workshop Island Night), (
			Global.buffsEnabled && Current Map == Map(Blizzard World)) || (Current Map == Map(Blizzard World Winter)), (
			Global.buffsEnabled && Current Map == Map(Château Guillard)) || (Current Map == Map(Château Guillard Halloween)),
			Global.buffsEnabled && Current Map == Map(Dorado), (Global.buffsEnabled && Current Map == Map(Ecopoint: Antarctica)) || (
			Current Map == Map(Ecopoint: Antarctica Winter)), (Global.buffsEnabled && Current Map == Map(Eichenwalde)) || (
			Current Map == Map(Eichenwalde Halloween)), (Global.buffsEnabled && Current Map == Map(Hollywood)) || (Current Map == Map(
			Hollywood Halloween)), (Global.buffsEnabled && Current Map == Map(King's Row)) || (Current Map == Map(King's Row Winter)), (
			Global.buffsEnabled && Current Map == Map(Lijiang Control Center)) || (Current Map == Map(
			Lijiang Control Center Lunar New Year)), Global.buffsEnabled && Current Map == Map(Necropolis),
			Global.buffsEnabled && Current Map == Map(Paris), Global.buffsEnabled && Current Map == Map(Havana),
			Global.buffsEnabled && Current Map == Map(Castillo), (Global.buffsEnabled && Current Map == Map(Black Forest)) || (
			Current Map == Map(Black Forest Winter))), True)   1]);
		Global.validBuffMap = True;
		Global.buffPos[0] = Vector(0, 1, 2);
		Global.buffPos[1] = Vector(0, 1, 6);
		Global.buffPos[2] = Vector(0, 1, -2);
		Global.buffPos[3] = Vector(0, 1, -6);
		Skip(77);
		Global.validBuffMap = True;
		Global.buffPos[0] = Vector(-32.500, 0.610, 73.150);
		Global.buffPos[1] = Vector(-67.550, 1.750, 138.740);
		Global.buffPos[2] = Vector(-77.280, 5.880, 66.150);
		Global.buffPos[3] = Vector(-54.500, 0.610, 110.200);
		Skip(71);
		Global.validBuffMap = True;
		Global.buffPos[0] = Vector(206.210, 16.500, 87);
		Global.buffPos[1] = Vector(196.350, 17.500, 47.060);
		Global.buffPos[2] = Vector(206.150, 1, 77.420);
		Global.buffPos[3] = Vector(180.600, 10, 101.930);
		Skip(65);
		Global.validBuffMap = True;
		Global.buffPos[0] = Vector(102.460, 12.010, 9.680);
		Global.buffPos[1] = Vector(128.330, 10.020, -23.860);
		Global.buffPos[2] = Vector(64.440, 15.010, 25.150);
		Global.buffPos[3] = Vector(114.300, 12, 44.920);
		Skip(59);
		Global.validBuffMap = True;
		Global.buffPos[0] = Vector(1.660, 12.630, -25);
		Global.buffPos[1] = Vector(29.600, 4, 0);
		Global.buffPos[2] = Vector(-32.270, 10, 0);
		Global.buffPos[3] = Vector(1.660, 12.630, 25);
		Skip(53);
		Global.validBuffMap = True;
		Global.buffPos[0] = Vector(55.700, 22, -67.840);
		Global.buffPos[1] = Vector(103.960, 13.720, -109.470);
		Global.buffPos[2] = Vector(58.330, 5.720, -90.390);
		Global.buffPos[3] = Vector(54.740, 11.720, -121.020);
		Skip(47);
		Global.validBuffMap = True;
		Global.buffPos[0] = Vector(-11.910, 2.730, -74.640);
		Global.buffPos[1] = Vector(7.870, 13.900, -48.380);
		Global.buffPos[2] = Vector(-4.090, 2.600, -15.870);
		Global.buffPos[3] = Vector(20.670, 2.600, -51.820);
		Skip(41);
		Global.validBuffMap = True;
		Global.buffPos[0] = Vector(-49.460, 1, 2.690);
		Global.buffPos[1] = Vector(-69.640, 1.500, -35.480);
		Global.buffPos[2] = Vector(-31.190, 10, -13.400);
		Global.buffPos[3] = Vector(-93.670, 8.500, -29.380);
		Skip(35);
		Global.validBuffMap = True;
		Global.buffPos[0] = Vector(-33.500, 268, 323);
		Global.buffPos[1] = Vector(0, 271, 267.500);
		Global.buffPos[2] = Vector(0, 271, 323);
		Global.buffPos[3] = Vector(33.500, 268, 323);
		Skip(29);
		Global.validBuffMap = True;
		Global.buffPos[0] = Vector(0, -5, 0);
		Global.buffPos[1] = Vector(1.060, 4, 23.070);
		Global.buffPos[2] = Vector(-29.500, 3, 0);
		Global.buffPos[3] = Vector(1.060, 4, -23.070);
		Skip(23);
		Global.validBuffMap = True;
		Global.buffPos[0] = Vector(-104, 16, -100);
		Global.buffPos[1] = Vector(-73.390, 11.020, -38.230);
		Global.buffPos[2] = Vector(-109.180, 11, -60.600);
		Global.buffPos[3] = Vector(-57.190, 14, -82);
		Skip(17);
		Global.validBuffMap = True;
		Global.buffPos[0] = Vector(0, 7, -79.230);
		Global.buffPos[1] = Vector(64.500, 13, -83.330);
		Global.buffPos[2] = Vector(32.090, 5, -97.450);
		Global.buffPos[3] = Vector(64.200, 5, -65.680);
		Skip(11);
		Global.validBuffMap = True;
		Global.buffPos[0] = Vector(-106.180, 40.560, 43.200);
		Global.buffPos[1] = Vector(-74.820, 33, 52.930);
		Global.buffPos[2] = Vector(-128.200, 35.380, 63.400);
		Global.buffPos[3] = Vector(-100.350, 40.560, 73.750);
		Skip(5);
		Global.validBuffMap = True;
		Global.buffPos[0] = Vector(16.790, 12.440, 29.480);
		Global.buffPos[1] = Vector(-25.490, 13.090, 5);
		Global.buffPos[2] = Vector(4.660, 18.280, 5);
		Global.buffPos[3] = Vector(16.180, 12.360, -20.110);
	}
}

rule("[Buff] :: Wallbang : Create Orb")
{
	event
	{
		Ongoing - Global;
	}

	conditions
	{
		(Global.validBuffMap && !Global.spawnWithWallbang && Global.spawnWallbang && Global.wallbangCD == 0 && (
			Global.matchStarted || Global.buffsSpawnImmediately)) == True;
	}

	actions
	{
		Play Effect(All Players(All Teams), Good Pickup Effect, Yellow, Global.buffPos[0], 1);
		Create Effect(All Players(All Teams), Orb, Yellow, Global.buffPos[0], 2, Visible To Position and Radius);
		Global.buffEffect[0] = Last Created Entity;
		Create In-World Text(All Players(All Teams), Ability Icon String(Hero(Baptiste), Button(Ultimate)), Global.buffPos[0], 2,
			Clip Against Surfaces, Visible To Position and String, White, Default Visibility);
		Global.buffIcon[0] = Last Text ID;
		Destroy In-World Text(Global.cdText[0]);
	}
}

rule("[Buff] :: Wallbang : Collect")
{
	event
	{
		Ongoing - Each Player;
		All;
		All;
	}

	conditions
	{
		((Global.matchStarted && Entity Exists(Global.buffEffect[0]) && Distance Between(Global.buffPos[0], Event Player)
			< 2.500 && Has Spawned(Event Player) && Is Alive(Event Player)) || Global.spawnWithWallbang) == True;
	}

	actions
	{
		Event Player.wallbangBuffEffect = 0;
		Event Player.wallbangEnabled = True;
		If(!Global.spawnWithWallbang);
			Destroy In-World Text(Global.cdText[0]);
			Destroy In-World Text(Global.buffIcon[0]);
			Destroy Effect(Global.buffEffect[0]);
			Play Effect(All Players(All Teams), Good Pickup Effect, Yellow, Global.buffPos[0], 1);
			Play Effect(All Players(All Teams), Buff Explosion Sound, Yellow, Global.buffPos[0], 200);
			Event Player.wallbangDur = Global.WALLBANG_DUR;
			Chase Player Variable At Rate(Event Player, wallbangDur, 0, 1, None);
			Create HUD Text(Event Player, Null, Null, Custom String("{0} Wallbang: {1} {0}", Ability Icon String(Hero(Baptiste), Button(
				Ultimate)), Round To Integer(Event Player.wallbangDur, Up)), Top, 2, White, White, White, Visible To and String,
				Default Visibility);
			Event Player.hudText[0] = Last Text ID;
			Small Message(Event Player, Custom String("Your bullets go through walls!"));
			Big Message(Event Player, Custom String("Wallbang"));
			Create Effect(All Players(All Teams), Good Aura, Yellow, Event Player, 0.750, Visible To Position and Radius);
			Event Player.wallbangBuffEffect = Last Created Entity;
			Wait(Global.WALLBANG_DUR - 4, Ignore Condition);
			For Player Variable(Event Player, sound, 0, 4, 1);
				Play Effect(All Players(All Teams), Debuff Impact Sound, White, Event Player, 100);
				Wait(1, Ignore Condition);
			End;
			Destroy HUD Text(Event Player.hudText[0]);
			Destroy Effect(Event Player.wallbangBuffEffect);
			Event Player.wallbangEnabled = False;
			Call Subroutine(WallbangCooldown);
		Else;
			Create HUD Text(Event Player, Null, Null, Custom String("{0} Wallbang: Forever {0}", Ability Icon String(Hero(Baptiste), Button(
				Ultimate))), Top, 2, White, White, White, Visible To and String, Default Visibility);
			Event Player.hudText[0] = Last Text ID;
		End;
	}
}

rule("[Buff] :: Wallbang : Action")
{
	event
	{
		Ongoing - Each Player;
		All;
		All;
	}

	conditions
	{
		(Event Player.wallbangEnabled && Is Firing Primary(Event Player)) == True;
	}

	actions
	{
		Event Player.gunPos = Eye Position(Event Player)   Facing Direction Of(Event Player)   World Vector Of(Right - Vector(0, 0.300, 0),
			Event Player, Rotation) * 0.180;
		Event Player.wallbangHitPos = Eye Position(Event Player);
		Event Player.wallbangLivingEnemies = 0;
		Event Player.wallbangHitPlayer = 0;
		Event Player.wallbangCount = 0;
		While(Distance Between(Event Player.gunPos, Event Player.wallbangHitPos)
			< 100 && Event Player.wallbangCount < Global.NUM_WALLBANGS);
			Event Player.wallbangLivingEnemies = Filtered Array(All Players(Opposite Team Of(Team Of(Event Player))), Is Alive(
				Current Array Element));
			Event Player.wallbangHitPos = Ray Cast Hit Position(Event Player.wallbangHitPos   Facing Direction Of(Event Player),
				Event Player.wallbangHitPos   Facing Direction Of(Event Player) * (100 - Distance Between(Event Player.gunPos,
				Event Player.wallbangHitPos)), Event Player.wallbangLivingEnemies, Event Player, True);
			Play Effect(All Players(All Teams), Good Explosion, Yellow, Event Player.wallbangHitPos, 0.200);
			Event Player.wallbangHitPlayer = Ray Cast Hit Player(Event Player.wallbangHitPos,
				Event Player.wallbangHitPos   Facing Direction Of(Event Player) * (100 - Distance Between(Event Player.gunPos,
				Event Player.wallbangHitPos)), Event Player.wallbangLivingEnemies, Event Player, True);
			If(Event Player.wallbangHitPlayer != Null && Event Player.wallbangHitPlayer != Event Player);
				Damage(Event Player.wallbangHitPlayer, Event Player, 10000);
			End;
			Event Player.wallbangCount  = 1;
		End;
		Create Beam Effect(All Players(All Teams), Bad Beam, Event Player.gunPos, Event Player.wallbangHitPos, Yellow, None);
		Event Player.wallbangEffect[0] = Last Created Entity;
		Wait(0.250, Ignore Condition);
		Destroy Effect(Event Player.wallbangEffect[0]);
	}
}

rule("[Buff] :: Extra Life : Create Orb")
{
	event
	{
		Ongoing - Global;
	}

	conditions
	{
		(Global.validBuffMap && !Global.spawnWithLife && Global.spawnLife && Global.lifeCD == 0 && (
			Global.matchStarted || Global.buffsSpawnImmediately)) == True;
	}

	actions
	{
		Play Effect(All Players(All Teams), Good Pickup Effect, Sky Blue, Global.buffPos[1], 1);
		Create Effect(All Players(All Teams), Orb, Sky Blue, Global.buffPos[1], 2, Visible To Position and Radius);
		Global.buffEffect[1] = Last Created Entity;
		Create In-World Text(All Players(All Teams), Ability Icon String(Hero(Mercy), Button(Ability 2)), Global.buffPos[1], 2,
			Clip Against Surfaces, Visible To Position and String, White, Default Visibility);
		Global.buffIcon[1] = Last Text ID;
		Destroy In-World Text(Global.cdText[1]);
	}
}

rule("[Buff] :: Extra Life : Collect")
{
	event
	{
		Ongoing - Each Player;
		All;
		All;
	}

	conditions
	{
		((Global.matchStarted && !Event Player.extraLife && Entity Exists(Global.buffEffect[1]) && Distance Between(Global.buffPos[1],
			Event Player) < 2.500 && Has Spawned(Event Player) && Is Alive(Event Player)) || (Global.spawnWithLife && Is Alive(
			Event Player))) == True;
	}

	actions
	{
		Event Player.extraLife = True;
		Set Status(Event Player, Null, Unkillable, 10000);
		If(!Global.spawnWithLife);
			Destroy In-World Text(Global.cdText[1]);
			Destroy In-World Text(Global.buffIcon[1]);
			Destroy Effect(Global.buffEffect[1]);
			Play Effect(All Players(All Teams), Good Pickup Effect, Sky Blue, Global.buffPos[1], 1);
			Play Effect(All Players(All Teams), Buff Explosion Sound, Sky Blue, Global.buffPos[1], 200);
			Small Message(Event Player, Custom String("Extra life"));
			Big Message(Event Player, Custom String("Extra Life"));
			Call Subroutine(LifeCooldown);
		End;
		Create HUD Text(Event Player, Null, Null, Custom String("{0} Extra Life {0}", Ability Icon String(Hero(Mercy), Button(Ability 2))),
			Top, 2, White, White, White, Visible To and String, Default Visibility);
		Event Player.hudText[1] = Last Text ID;
		Create In-World Text(All Players(All Teams), Ability Icon String(Hero(Mercy), Button(Ability 2)), Event Player, 0.750,
			Clip Against Surfaces, Visible To Position and String, White, Default Visibility);
		Event Player.extraLifeIcon = Last Text ID;
	}
}

rule("[Buff] :: Extra Life : Remove")
{
	event
	{
		Ongoing - Each Player;
		All;
		All;
	}

	conditions
	{
		(Event Player.extraLife && (Health(Event Player) == 1 || (Is Dead(Event Player) && !Global.spawnWithLife))) == True;
	}

	actions
	{
		Event Player.extraLife = False;
		Clear Status(Event Player, Unkillable);
		Small Message(Event Player, Custom String("Extra life used"));
		Play Effect(Event Player, Debuff Impact Sound, White, Event Player, 200);
		Destroy In-World Text(Event Player.extraLifeIcon);
		Destroy HUD Text(Event Player.hudText[1]);
		Wait(0.500, Ignore Condition);
		Set Player Health(Event Player, Max Health(Event Player));
	}
}

rule("[Buff] :: Ricochet : Create Orb")
{
	event
	{
		Ongoing - Global;
	}

	conditions
	{
		(Global.validBuffMap && !Global.spawnWithBounce && Global.spawnBounce && Global.bounceCD == 0 && (
			Global.matchStarted || Global.buffsSpawnImmediately)) == True;
	}

	actions
	{
		Play Effect(All Players(All Teams), Good Pickup Effect, Purple, Global.buffPos[2], 1);
		Create Effect(All Players(All Teams), Orb, Purple, Global.buffPos[2], 2, Visible To Position and Radius);
		Global.buffEffect[2] = Last Created Entity;
		Create In-World Text(All Players(All Teams), Ability Icon String(Hero(Winston), Button(Ability 1)), Global.buffPos[2], 2,
			Clip Against Surfaces, Visible To Position and String, White, Default Visibility);
		Global.buffIcon[2] = Last Text ID;
		Destroy In-World Text(Global.cdText[2]);
	}
}

rule("[Buff] :: Ricochet : Collect")
{
	event
	{
		Ongoing - Each Player;
		All;
		All;
	}

	conditions
	{
		((Global.matchStarted && Entity Exists(Global.buffEffect[2]) && Distance Between(Global.buffPos[2], Event Player)
			< 2.500 && Has Spawned(Event Player) && Is Alive(Event Player)) || Global.spawnWithBounce) == True;
	}

	actions
	{
		Event Player.bounceBuffEffect = 0;
		Event Player.bounceEnabled = True;
		If(!Global.spawnWithBounce);
			Destroy In-World Text(Global.cdText[2]);
			Destroy In-World Text(Global.buffIcon[2]);
			Destroy Effect(Global.buffEffect[2]);
			Play Effect(All Players(All Teams), Good Pickup Effect, Purple, Global.buffPos[2], 1);
			Play Effect(All Players(All Teams), Buff Explosion Sound, Purple, Global.buffPos[2], 200);
			Event Player.bounceDur = Global.BOUNCE_DUR;
			Chase Player Variable At Rate(Event Player, bounceDur, 0, 1, None);
			Create HUD Text(Event Player, Null, Null, Custom String("{0} Ricochet Bullets: {1} {0}", Ability Icon String(Hero(Winston), Button(
				Ability 1)), Round To Integer(Event Player.bounceDur, Up)), Top, 2, White, White, White, Visible To and String,
				Default Visibility);
			Event Player.hudText[2] = Last Text ID;
			Small Message(Event Player, Custom String("Your bullets ricochet off walls!"));
			Big Message(Event Player, Custom String("Ricochet Bullets"));
			Create Effect(All Players(All Teams), Good Aura, Purple, Event Player, 0.750, Visible To Position and Radius);
			Event Player.bounceBuffEffect = Last Created Entity;
			Wait(Global.BOUNCE_DUR - 4, Ignore Condition);
			For Player Variable(Event Player, sound_0, 0, 4, 1);
				Play Effect(All Players(All Teams), Debuff Impact Sound, White, Event Player, 100);
				Wait(1, Ignore Condition);
			End;
			Destroy HUD Text(Event Player.hudText[2]);
			Destroy Effect(Event Player.bounceBuffEffect);
			Event Player.bounceEnabled = False;
			Call Subroutine(BounceCooldown);
		Else;
			Create HUD Text(Event Player, Null, Null, Custom String("{0} Ricochet Bullets: Forever {0}", Ability Icon String(Hero(Winston),
				Button(Ability 1))), Top, 2, White, White, White, Visible To and String, Default Visibility);
			Event Player.hudText[2] = Last Text ID;
		End;
	}
}

rule("[Buff] :: Ricochet : Action")
{
	event
	{
		Ongoing - Each Player;
		All;
		All;
	}

	conditions
	{
		(Event Player.bounceEnabled && Is Firing Primary(Event Player)) == True;
	}

	actions
	{
		"https://math.stackexchange.com/questions/13261/how-to-get-a-reflection-vector"
		Event Player.normals = Empty Array;
		Event Player.hitPos = Empty Array;
		Event Player.hitPosPlayer = Empty Array;
		Event Player.ricochets = Empty Array;
		Event Player.hitPosBounces = Empty Array;
		Event Player.hitPosPlayerBounces = Empty Array;
		Event Player.bounceEffects = Empty Array;
		Event Player.bounceEffect = Empty Array;
		Event Player.loop_0 = 0;
		While(Event Player.loop_0 < Global.NUM_BOUNCES);
			If(Event Player.loop_0 > 0);
				Event Player.eyePos = Event Player.hitPos[Event Player.loop_0 - 1];
				Event Player.facing = Event Player.ricochets[Event Player.loop_0 - 1];
			Else;
				Event Player.eyePos = Eye Position(Event Player)   Facing Direction Of(Event Player)   World Vector Of(Right - Vector(0, 0.300, 0),
					Event Player, Rotation) * 0.180;
				Event Player.facing = Facing Direction Of(Event Player);
			End;
			Event Player.normals[Event Player.loop_0] = Ray Cast Hit Normal(Event Player.eyePos,
				Event Player.eyePos   Event Player.facing * 100, All Players(All Teams), Event Player, True);
			Event Player.hitPos[Event Player.loop_0] = Ray Cast Hit Position(Event Player.eyePos,
				Event Player.eyePos   Event Player.facing * 100, All Players(All Teams), Event Player, True);
			Event Player.hitPosPlayer[Event Player.loop_0] = Ray Cast Hit Player(Event Player.eyePos,
				Event Player.eyePos   Event Player.facing * 100, All Players(All Teams), Event Player, True);
			Event Player.ricochets[Event Player.loop_0] = Event Player.facing - 2 * Event Player.normals[Event Player.loop_0] * Dot Product(
				Event Player.facing, Event Player.normals[Event Player.loop_0]);
			Event Player.hitPosBounces[Event Player.loop_0] = Ray Cast Hit Position(Event Player.hitPos[Event Player.loop_0],
				Event Player.hitPos[Event Player.loop_0]   Event Player.ricochets[Event Player.loop_0] * 100, All Living Players(All Teams),
				Event Player, True);
			Event Player.hitPosPlayerBounces[Event Player.loop_0] = Ray Cast Hit Player(Event Player.hitPos[Event Player.loop_0],
				Event Player.hitPos[Event Player.loop_0]   Event Player.ricochets[Event Player.loop_0] * 100, All Living Players(All Teams),
				Event Player, True);
			Create Beam Effect(All Players(All Teams), Bad Beam, Event Player.eyePos, Event Player.hitPos[Event Player.loop_0], Purple, None);
			Event Player.bounceEffect[Event Player.loop_0] = Last Created Entity;
			Create Beam Effect(All Players(All Teams), Bad Beam, Event Player.hitPos[Event Player.loop_0],
				Event Player.hitPosBounces[Event Player.loop_0], Purple, None);
			Event Player.bounceEffects[Event Player.loop_0] = Last Created Entity;
			Play Effect(All Players(All Teams), Good Explosion, Purple, Event Player.hitPos[Event Player.loop_0], 0.200);
			Play Effect(All Players(All Teams), Good Explosion, Purple, Event Player.hitPosBounces[Event Player.loop_0], 0.200);
			Damage(Event Player.hitPosPlayer[Event Player.loop_0], Event Player, 10000);
			Damage(Event Player.hitPosPlayerBounces[Event Player.loop_0], Event Player, 10000);
			Event Player.loop_0  = 1;
		End;
		Wait(0.150, Ignore Condition);
		Event Player.i_0 = 0;
		While(Event Player.i_0 < Global.NUM_BOUNCES);
			Destroy Effect(Event Player.bounceEffect[Event Player.i_0]);
			Destroy Effect(Event Player.bounceEffects[Event Player.i_0]);
			Event Player.i_0  = 1;
		End;
	}
}

rule("[Buff] :: Buckshot : Create Orb")
{
	event
	{
		Ongoing - Global;
	}

	conditions
	{
		(Global.validBuffMap && !Global.spawnWithBuckshot && Global.spawnBuckshot && Global.buckshotCD == 0 && (
			Global.matchStarted || Global.buffsSpawnImmediately)) == True;
	}

	actions
	{
		Play Effect(All Players(All Teams), Good Pickup Effect, Green, Global.buffPos[3], 1);
		Create Effect(All Players(All Teams), Orb, Green, Global.buffPos[3], 2, Visible To Position and Radius);
		Global.buffEffect[3] = Last Created Entity;
		Create In-World Text(All Players(All Teams), Ability Icon String(Hero(Ashe), Button(Ability 1)), Global.buffPos[3], 2,
			Clip Against Surfaces, Visible To Position and String, White, Default Visibility);
		Global.buffIcon[3] = Last Text ID;
		Destroy In-World Text(Global.cdText[3]);
	}
}

rule("[Buff] :: Buckshot : Collect")
{
	event
	{
		Ongoing - Each Player;
		All;
		All;
	}

	conditions
	{
		((Global.matchStarted && Entity Exists(Global.buffEffect[3]) && Distance Between(Global.buffPos[3], Event Player)
			< 2.500 && Has Spawned(Event Player) && Is Alive(Event Player)) || Global.spawnWithBuckshot) == True;
	}

	actions
	{
		Event Player.buckshotBuffEffect = 0;
		Event Player.buckshotEnabled = True;
		If(!Global.spawnWithBuckshot);
			Destroy In-World Text(Global.cdText[3]);
			Destroy In-World Text(Global.buffIcon[3]);
			Destroy Effect(Global.buffEffect[3]);
			Play Effect(All Players(All Teams), Good Pickup Effect, Green, Global.buffPos[3], 1);
			Play Effect(All Players(All Teams), Buff Explosion Sound, Green, Global.buffPos[3], 200);
			Event Player.buckshotDur = Global.BUCKSHOT_DUR;
			Chase Player Variable At Rate(Event Player, buckshotDur, 0, 1, Destination and Rate);
			Create HUD Text(Event Player, Null, Null, Custom String("{0} Buckshot: {1} {0}", Ability Icon String(Hero(Ashe), Button(
				Ability 1)), Round To Integer(Event Player.buckshotDur, Up)), Top, 2, White, White, White, Visible To and String,
				Default Visibility);
			Event Player.hudText[3] = Last Text ID;
			Big Message(Event Player, Custom String("Buckshot"));
			Small Message(Event Player, Custom String("Your bullets spread like a shotgun!"));
			Create Effect(All Players(All Teams), Good Aura, Green, Event Player, 0.750, Visible To Position and Radius);
			Event Player.buckshotBuffEffect = Last Created Entity;
			Wait(Global.BUCKSHOT_DUR - 4, Ignore Condition);
			For Player Variable(Event Player, sound_1, 0, 4, 1);
				Play Effect(All Players(All Teams), Debuff Impact Sound, White, Event Player, 100);
				Wait(1, Ignore Condition);
			End;
			Destroy HUD Text(Event Player.hudText[3]);
			Destroy Effect(Event Player.buckshotBuffEffect);
			Event Player.buckshotEnabled = False;
			Call Subroutine(BuckshotCooldown);
		Else;
			Create HUD Text(Event Player, Null, Null, Custom String("{0} Buckshot: Forever {0}", Ability Icon String(Hero(Ashe), Button(
				Ability 1))), Top, 2, White, White, White, Visible To and String, Default Visibility);
			Event Player.hudText[3] = Last Text ID;
		End;
	}
}

rule("[Buff] :: Buckshot : Action")
{
	event
	{
		Ongoing - Each Player;
		All;
		All;
	}

	conditions
	{
		(Event Player.buckshotEnabled && Is Firing Primary(Event Player)) == True;
	}

	actions
	{
		Event Player.buckshotHitPos = Empty Array;
		Event Player.buckshotHitPlayer = Empty Array;
		Event Player.livingEnemies = Filtered Array(All Players(Opposite Team Of(Team Of(Event Player))), Is Alive(Current Array Element));
		Event Player.gunPos_0 = World Vector Of(Right - Vector(0, 0.300, 0), Event Player, Rotation) * 0.180;
		Event Player.buckshotBeam = Empty Array;
		Event Player.centerBeam = 0;
		Global.spreadDiag = Global.BUCKSHOT_SPREAD - Global.BUCKSHOT_SPREAD * 0.330;
		Global.spreadHori = Global.BUCKSHOT_SPREAD;
		If(Global.randomSpread);
			Event Player.randomizedSpreadHori = Empty Array;
			Event Player.randomizedSpreadDiag = Empty Array;
			Event Player.hori = 0;
			While(Event Player.hori < 4);
				Event Player.randomizedSpreadHori[Event Player.hori] = Random Real(Global.spreadHori / 5, Global.spreadHori   1.500);
				Event Player.hori  = 1;
			End;
			Event Player.diag = 0;
			While(Event Player.diag < 4);
				Event Player.randomizedSpreadDiag[Event Player.diag] = Random Real(Global.spreadHori / 5, Global.spreadDiag   1.500);
				Event Player.diag  = 1;
			End;
		End;
		If(!Global.randomSpread);
			Event Player.buckshotHitPos[0] = Ray Cast Hit Position(Eye Position(Event Player), Eye Position(Event Player)   World Vector Of(
				Vector(Tangent From Degrees(Global.spreadDiag) * 100, 0, 0), Event Player, Rotation)   Direction From Angles(
				Horizontal Facing Angle Of(Event Player), Vertical Facing Angle Of(Event Player)   Global.spreadDiag) * 100,
				All Living Players(All Teams), Event Player, False);
			Event Player.buckshotHitPlayer[0] = Ray Cast Hit Player(Eye Position(Event Player), Eye Position(Event Player)   World Vector Of(
				Vector(Tangent From Degrees(Global.spreadDiag) * 100, 0, 0), Event Player, Rotation)   Direction From Angles(
				Horizontal Facing Angle Of(Event Player), Vertical Facing Angle Of(Event Player)   Global.spreadDiag) * 100,
				All Living Players(All Teams), Event Player, False);
		Else;
			Event Player.buckshotHitPos[0] = Ray Cast Hit Position(Eye Position(Event Player), Eye Position(Event Player)   World Vector Of(
				Vector(Tangent From Degrees(Event Player.randomizedSpreadDiag[0]) * 100, 0, 0), Event Player, Rotation)
				  Direction From Angles(Horizontal Facing Angle Of(Event Player), Vertical Facing Angle Of(Event Player)
				  Event Player.randomizedSpreadDiag[0]) * 100, All Living Players(All Teams), Event Player, False);
			Event Player.buckshotHitPlayer[0] = Ray Cast Hit Player(Eye Position(Event Player), Eye Position(Event Player)   World Vector Of(
				Vector(Tangent From Degrees(Event Player.randomizedSpreadDiag[0]) * 100, 0, 0), Event Player, Rotation)
				  Direction From Angles(Horizontal Facing Angle Of(Event Player), Vertical Facing Angle Of(Event Player)
				  Event Player.randomizedSpreadDiag[0]) * 100, All Living Players(All Teams), Event Player, False);
		End;
		If(!Global.randomSpread);
			Event Player.buckshotHitPos[1] = Ray Cast Hit Position(Eye Position(Event Player), Eye Position(Event Player)   World Vector Of(
				Vector(Tangent From Degrees(Global.spreadDiag) * 100, 0, 0), Event Player, Rotation)   Direction From Angles(
				Horizontal Facing Angle Of(Event Player), Vertical Facing Angle Of(Event Player)   Global.spreadDiag * -1) * 100,
				All Living Players(All Teams), Event Player, False);
			Event Player.buckshotHitPlayer[1] = Ray Cast Hit Player(Eye Position(Event Player), Eye Position(Event Player)   World Vector Of(
				Vector(Tangent From Degrees(Global.spreadDiag) * 100, 0, 0), Event Player, Rotation)   Direction From Angles(
				Horizontal Facing Angle Of(Event Player), Vertical Facing Angle Of(Event Player)   Global.spreadDiag * -1) * 100,
				All Living Players(All Teams), Event Player, False);
		Else;
			Event Player.buckshotHitPos[1] = Ray Cast Hit Position(Eye Position(Event Player), Eye Position(Event Player)   World Vector Of(
				Vector(Tangent From Degrees(Event Player.randomizedSpreadDiag[1]) * 100, 0, 0), Event Player, Rotation)
				  Direction From Angles(Horizontal Facing Angle Of(Event Player), Vertical Facing Angle Of(Event Player)
				  Event Player.randomizedSpreadDiag[1] * -1) * 100, All Living Players(All Teams), Event Player, False);
			Event Player.buckshotHitPlayer[1] = Ray Cast Hit Player(Eye Position(Event Player), Eye Position(Event Player)   World Vector Of(
				Vector(Tangent From Degrees(Event Player.randomizedSpreadDiag[1]) * 100, 0, 0), Event Player, Rotation)
				  Direction From Angles(Horizontal Facing Angle Of(Event Player), Vertical Facing Angle Of(Event Player)
				  Event Player.randomizedSpreadDiag[1] * -1) * 100, All Living Players(All Teams), Event Player, False);
		End;
		If(!Global.randomSpread);
			Event Player.buckshotHitPos[2] = Ray Cast Hit Position(Eye Position(Event Player), Eye Position(Event Player)   World Vector Of(
				Vector(Tangent From Degrees(Global.spreadDiag * -1) * 100, 0, 0), Event Player, Rotation)   Direction From Angles(
				Horizontal Facing Angle Of(Event Player), Vertical Facing Angle Of(Event Player)   Global.spreadDiag) * 100,
				All Living Players(All Teams), Event Player, False);
			Event Player.buckshotHitPlayer[2] = Ray Cast Hit Player(Eye Position(Event Player), Eye Position(Event Player)   World Vector Of(
				Vector(Tangent From Degrees(Global.spreadDiag * -1) * 100, 0, 0), Event Player, Rotation)   Direction From Angles(
				Horizontal Facing Angle Of(Event Player), Vertical Facing Angle Of(Event Player)   Global.spreadDiag) * 100,
				All Living Players(All Teams), Event Player, False);
		Else;
			Event Player.buckshotHitPos[2] = Ray Cast Hit Position(Eye Position(Event Player), Eye Position(Event Player)   World Vector Of(
				Vector(Tangent From Degrees(Event Player.randomizedSpreadDiag[2] * -1) * 100, 0, 0), Event Player, Rotation)
				  Direction From Angles(Horizontal Facing Angle Of(Event Player), Vertical Facing Angle Of(Event Player)
				  Event Player.randomizedSpreadDiag[2]) * 100, All Living Players(All Teams), Event Player, False);
			Event Player.buckshotHitPlayer[2] = Ray Cast Hit Player(Eye Position(Event Player), Eye Position(Event Player)   World Vector Of(
				Vector(Tangent From Degrees(Event Player.randomizedSpreadDiag[2] * -1) * 100, 0, 0), Event Player, Rotation)
				  Direction From Angles(Horizontal Facing Angle Of(Event Player), Vertical Facing Angle Of(Event Player)
				  Event Player.randomizedSpreadDiag[2]) * 100, All Living Players(All Teams), Event Player, False);
		End;
		If(!Global.randomSpread);
			Event Player.buckshotHitPos[3] = Ray Cast Hit Position(Eye Position(Event Player), Eye Position(Event Player)   World Vector Of(
				Vector(Tangent From Degrees(Global.spreadDiag * -1) * 100, 0, 0), Event Player, Rotation)   Direction From Angles(
				Horizontal Facing Angle Of(Event Player), Vertical Facing Angle Of(Event Player)   Global.spreadDiag * -1) * 100,
				All Living Players(All Teams), Event Player, False);
			Event Player.buckshotHitPlayer[3] = Ray Cast Hit Player(Eye Position(Event Player), Eye Position(Event Player)   World Vector Of(
				Vector(Tangent From Degrees(Global.spreadDiag * -1) * 100, 0, 0), Event Player, Rotation)   Direction From Angles(
				Horizontal Facing Angle Of(Event Player), Vertical Facing Angle Of(Event Player)   Global.spreadDiag * -1) * 100,
				All Living Players(All Teams), Event Player, False);
		Else;
			Event Player.buckshotHitPos[3] = Ray Cast Hit Position(Eye Position(Event Player), Eye Position(Event Player)   World Vector Of(
				Vector(Tangent From Degrees(Event Player.randomizedSpreadDiag[3] * -1) * 100, 0, 0), Event Player, Rotation)
				  Direction From Angles(Horizontal Facing Angle Of(Event Player), Vertical Facing Angle Of(Event Player)
				  Event Player.randomizedSpreadDiag[3] * -1) * 100, All Living Players(All Teams), Event Player, False);
			Event Player.buckshotHitPlayer[3] = Ray Cast Hit Player(Eye Position(Event Player), Eye Position(Event Player)   World Vector Of(
				Vector(Tangent From Degrees(Event Player.randomizedSpreadDiag[3] * -1) * 100, 0, 0), Event Player, Rotation)
				  Direction From Angles(Horizontal Facing Angle Of(Event Player), Vertical Facing Angle Of(Event Player)
				  Event Player.randomizedSpreadDiag[3] * -1) * 100, All Living Players(All Teams), Event Player, False);
		End;
		If(!Global.randomSpread);
			Event Player.buckshotHitPos[4] = Ray Cast Hit Position(Eye Position(Event Player), Eye Position(Event Player)   World Vector Of(
				Vector(Tangent From Degrees(0) * 100, 0, 0), Event Player, Rotation)   Direction From Angles(Horizontal Facing Angle Of(
				Event Player), Vertical Facing Angle Of(Event Player)   Global.spreadHori) * 100, All Living Players(All Teams), Event Player,
				False);
			Event Player.buckshotHitPlayer[4] = Ray Cast Hit Player(Eye Position(Event Player), Eye Position(Event Player)   World Vector Of(
				Vector(Tangent From Degrees(0) * 100, 0, 0), Event Player, Rotation)   Direction From Angles(Horizontal Facing Angle Of(
				Event Player), Vertical Facing Angle Of(Event Player)   Global.spreadHori) * 100, All Living Players(All Teams), Event Player,
				False);
		Else;
			Event Player.buckshotHitPos[4] = Ray Cast Hit Position(Eye Position(Event Player), Eye Position(Event Player)   World Vector Of(
				Vector(Tangent From Degrees(0) * 100, 0, 0), Event Player, Rotation)   Direction From Angles(Horizontal Facing Angle Of(
				Event Player), Vertical Facing Angle Of(Event Player)   Event Player.randomizedSpreadHori[0]) * 100, All Living Players(
				All Teams), Event Player, False);
			Event Player.buckshotHitPlayer[4] = Ray Cast Hit Player(Eye Position(Event Player), Eye Position(Event Player)   World Vector Of(
				Vector(Tangent From Degrees(0) * 100, 0, 0), Event Player, Rotation)   Direction From Angles(Horizontal Facing Angle Of(
				Event Player), Vertical Facing Angle Of(Event Player)   Event Player.randomizedSpreadHori[0]) * 100, All Living Players(
				All Teams), Event Player, False);
		End;
		If(!Global.randomSpread);
			Event Player.buckshotHitPos[5] = Ray Cast Hit Position(Eye Position(Event Player), Eye Position(Event Player)   World Vector Of(
				Vector(Tangent From Degrees(0) * 100, 0, 0), Event Player, Rotation)   Direction From Angles(Horizontal Facing Angle Of(
				Event Player), Vertical Facing Angle Of(Event Player)   Global.spreadHori * -1) * 100, All Living Players(All Teams),
				Event Player, False);
			Event Player.buckshotHitPlayer[5] = Ray Cast Hit Player(Eye Position(Event Player), Eye Position(Event Player)   World Vector Of(
				Vector(Tangent From Degrees(0) * 100, 0, 0), Event Player, Rotation)   Direction From Angles(Horizontal Facing Angle Of(
				Event Player), Vertical Facing Angle Of(Event Player)   Global.spreadHori * -1) * 100, All Living Players(All Teams),
				Event Player, False);
		Else;
			Event Player.buckshotHitPos[5] = Ray Cast Hit Position(Eye Position(Event Player), Eye Position(Event Player)   World Vector Of(
				Vector(Tangent From Degrees(0) * 100, 0, 0), Event Player, Rotation)   Direction From Angles(Horizontal Facing Angle Of(
				Event Player), Vertical Facing Angle Of(Event Player)   Event Player.randomizedSpreadHori[1] * -1) * 100, All Living Players(
				All Teams), Event Player, False);
			Event Player.buckshotHitPlayer[5] = Ray Cast Hit Player(Eye Position(Event Player), Eye Position(Event Player)   World Vector Of(
				Vector(Tangent From Degrees(0) * 100, 0, 0), Event Player, Rotation)   Direction From Angles(Horizontal Facing Angle Of(
				Event Player), Vertical Facing Angle Of(Event Player)   Event Player.randomizedSpreadHori[1] * -1) * 100, All Living Players(
				All Teams), Event Player, False);
		End;
		If(!Global.randomSpread);
			Event Player.buckshotHitPos[6] = Ray Cast Hit Position(Eye Position(Event Player), Eye Position(Event Player)   World Vector Of(
				Vector(Tangent From Degrees(Global.spreadHori) * 100, 0, 0), Event Player, Rotation)   Direction From Angles(
				Horizontal Facing Angle Of(Event Player), Vertical Facing Angle Of(Event Player)   0) * 100, All Living Players(All Teams),
				Event Player, False);
			Event Player.buckshotHitPlayer[6] = Ray Cast Hit Player(Eye Position(Event Player), Eye Position(Event Player)   World Vector Of(
				Vector(Tangent From Degrees(Global.spreadHori) * 100, 0, 0), Event Player, Rotation)   Direction From Angles(
				Horizontal Facing Angle Of(Event Player), Vertical Facing Angle Of(Event Player)   0) * 100, All Living Players(All Teams),
				Event Player, False);
		Else;
			Event Player.buckshotHitPos[6] = Ray Cast Hit Position(Eye Position(Event Player), Eye Position(Event Player)   World Vector Of(
				Vector(Tangent From Degrees(Event Player.randomizedSpreadHori[2]) * 100, 0, 0), Event Player, Rotation)
				  Direction From Angles(Horizontal Facing Angle Of(Event Player), Vertical Facing Angle Of(Event Player)   0) * 100,
				All Living Players(All Teams), Event Player, False);
			Event Player.buckshotHitPlayer[6] = Ray Cast Hit Player(Eye Position(Event Player), Eye Position(Event Player)   World Vector Of(
				Vector(Tangent From Degrees(Event Player.randomizedSpreadHori[2]) * 100, 0, 0), Event Player, Rotation)
				  Direction From Angles(Horizontal Facing Angle Of(Event Player), Vertical Facing Angle Of(Event Player)   0) * 100,
				All Living Players(All Teams), Event Player, False);
		End;
		If(!Global.randomSpread);
			Event Player.buckshotHitPos[7] = Ray Cast Hit Position(Eye Position(Event Player), Eye Position(Event Player)   World Vector Of(
				Vector(Tangent From Degrees(Global.spreadHori * -1) * 100, 0, 0), Event Player, Rotation)   Direction From Angles(
				Horizontal Facing Angle Of(Event Player), Vertical Facing Angle Of(Event Player)   0) * 100, All Living Players(All Teams),
				Event Player, False);
			Event Player.buckshotHitPlayer[7] = Ray Cast Hit Player(Eye Position(Event Player), Eye Position(Event Player)   World Vector Of(
				Vector(Tangent From Degrees(Global.spreadHori * -1) * 100, 0, 0), Event Player, Rotation)   Direction From Angles(
				Horizontal Facing Angle Of(Event Player), Vertical Facing Angle Of(Event Player)   0) * 100, All Living Players(All Teams),
				Event Player, False);
		Else;
			Event Player.buckshotHitPos[7] = Ray Cast Hit Position(Eye Position(Event Player), Eye Position(Event Player)   World Vector Of(
				Vector(Tangent From Degrees(Event Player.randomizedSpreadHori[3] * -1) * 100, 0, 0), Event Player, Rotation)
				  Direction From Angles(Horizontal Facing Angle Of(Event Player), Vertical Facing Angle Of(Event Player)   0) * 100,
				All Living Players(All Teams), Event Player, False);
			Event Player.buckshotHitPlayer[7] = Ray Cast Hit Player(Eye Position(Event Player), Eye Position(Event Player)   World Vector Of(
				Vector(Tangent From Degrees(Event Player.randomizedSpreadHori[3] * -1) * 100, 0, 0), Event Player, Rotation)
				  Direction From Angles(Horizontal Facing Angle Of(Event Player), Vertical Facing Angle Of(Event Player)   0) * 100,
				All Living Players(All Teams), Event Player, False);
		End;
		Event Player.buckshotCenter = Ray Cast Hit Position(Eye Position(Event Player), Eye Position(Event Player)   Facing Direction Of(
			Event Player) * 100, Event Player.livingEnemies, Event Player, True);
		Play Effect(All Players(All Teams), Good Explosion, Green, Event Player.buckshotCenter, 0.200);
		Create Beam Effect(All Players(All Teams), Bad Beam, Eye Position(Event Player)   Facing Direction Of(Event Player)
			  Event Player.gunPos_0, Event Player.buckshotCenter, Green, None);
		Event Player.centerBeam = Last Created Entity;
		Event Player.pellets = 0;
		While(Event Player.pellets < 8);
			Damage(Event Player.buckshotHitPlayer[Event Player.pellets], Event Player, 10000);
			Play Effect(All Players(All Teams), Good Explosion, Green, Event Player.buckshotHitPos[Event Player.pellets], 0.200);
			Create Beam Effect(All Players(All Teams), Bad Beam, Eye Position(Event Player)   Facing Direction Of(Event Player)
				  Event Player.gunPos_0, Event Player.buckshotHitPos[Event Player.pellets], Green, None);
			Event Player.buckshotBeam[Event Player.pellets] = Last Created Entity;
			Event Player.pellets  = 1;
		End;
		Wait(0.150, Ignore Condition);
		Destroy Effect(Event Player.centerBeam);
		Event Player.beams = 0;
		While(Event Player.beams < 8);
			Destroy Effect(Event Player.buckshotBeam[Event Player.beams]);
			Event Player.beams  = 1;
		End;
	}
}

Changelog

24 days ago 1.6.1

General:

  • Workshop settings
  • Removed "muzzle flashes"
  • Removed 'Hit' and 'Crit' in world texts
  • Enemy primary fire effect
  • Information on what the mode is about pops up upon a player joining
  • Wallbang toggle removed, replaced with buffs. Collect buffs around maps to gain an extra life, or modify your weapon, such as your bullets going through walls, bounce around on walls, or fire buckshot rounds. Test out the different buffs in the workshop maps Unreal Tournament style killstreak notifications

Grapple:

  • Holding jump while using grapple pushes you more upwards than not holding jump
  • Grapple range decreased from 100 to 40
  • Grapple detaches if the attached player loses los or is out of your view area
  • Changed grapple sound
  • 0.5s cooldown on grapple

APPPX
click to copy
7 months ago 1.5.3

  • Re-disabled workshop inspector

XJP6S
click to copy
7 months ago 1.5.3

  • Improved consistency with grapple and the speed you gain with bhopping
  • Implemented sound effect if you get a headshot through a wall
  • Fixed bug where primary fire beam effects won't get destroyed properly if wallbangs are turned on/off while the effect is in the world
  • Fixed bug where dead players still get hit by raycasts (wallbang logic, grapple, and effects) as if they were still alive
  • Fixed bug back in 1.4 where wallbangs can sometimes kill both the victim and attacker if you are directly in front of the victim

PMG5V
click to copy
7 months ago 1.5.2

  • Right click will now push you in an upwards direction no matter what
  • Cleaned up code a bit + slight optimizations
  • Grapple now breaks if target loses line of sight
  • Removed secondary radius variable
  • Removed enemy players variable because it wasn't used
  • You should be able to keep speed gained more consistently if you're using grapple
  • Slowing directional movement now works as intended

QJKPC
click to copy
7 months ago 1.5.1

Bug fixes for the grappling hook

  • Fixed issue where the grappling hook would continue to pull a hit player after death
  • Fixed issue where if the player who shot the grappling hook died they will still be pulled to the position they initially shot
  • Hitting an enemy player no longer pulls you towards the hit player, pull only affects the hit player now
  • Impulse on the pull is updating after 5 ticks instead of 4 ticks, meaning the pull takes slightly longer to gain speed
  • Decreased the movement penalty while using grapple
  • Added a sphere effect to show where the grapple hit (added because personal irk)

K4FTXR
click to copy
7 months ago 1.5.0

  • Added a grappling hook

You can use the grappling hook with E and it will pull you towards a surface or an enemy towards you

  • Damage text now shows either "Hit!" or "Critical!" depending on the shot because showing the damage number was pretty pointless in a one-shot mode.
  • Hitting a wall during a bhop should stop speed more consistently now
  • Added more values you can change in the "Initial Global" rule

There is a possibility this is the final version, as I have exhausted the amount of stuff I can add without the server crashing.

7G0DC
click to copy
7 months ago 1.4.0

  • You can now change the number of walls a bullet can go through (note: this required a re-write of how the logic worked so it might impact the server even more than 1.3.0 when above the default)
  • Wallbang toggle for the host is now Ability 1 + Reload
  • Comments of what each variable does in "Initial Global" rule
  • Probably more but I don't remember

Todo (maybe): Strafe system for bhops

FYR3E
click to copy
8 months ago 1.3.1

  • Fixed lobby

i hate the lobby settings

Q8GV0
click to copy
8 months ago 1.3.1

  • Actually fixed the win condition
  • Removed Wallbang effect at Vector(0,0,0)
  • Match time value is seconds again instead of minutes

GDQCW
click to copy
8 months ago 1.3.0

  • Added Wallbangs (NOTE: Disabled by default because it is not performant and is usually not in arena shooters, Host can enable/disable this for everyone by pressing Crouch + Reload)
  • Scoring should work as intended
  • Debug rules I used are in the script now, the rules are disabled. Useful if you want to visualize wallbangs
  • Removed unused vars
  • Match time var is now in minutes instead of seconds
  • Even more value tweaking:

Default run speed is now Overwatch default

Max speed from Bhops: 320 from 340

Speed Increments: 15 from 25

W1Y00
click to copy
8 months ago 1.3.0

  • Added Wallbangs (NOTE: Disabled by default because it is not performant and is usually not in arena shooters, Host can enable/disable this for everyone by pressing Crouch + Reload)
  • Scoring should work as intended
  • Debug rules I used are in the script now, the rules are disabled. Useful if you want to visualize wallbangs
  • Removed unused vars
  • Match time var is now in minutes instead of seconds
  • Even more value tweaking:

Default run speed is now Overwatch default

Max speed from Bhops: 320 from 340

Speed Increments: 15 from 25

S0MDA
click to copy
8 months ago 1.2.0

i fixed a very bad oversight

like very bad

H1TP9
click to copy
8 months ago 1.2.0

  • Removed Overwatch's Score condition, just frag until the time runs out.
  • Damage numbers now have an animation.
  • Critical hit text when you get a kill.
  • Added Global constants which add QOL improvements for me and easier customizability for players (you can adjust these values at the bottom of the "Init" rule).
  • Added pseudo momentum when you stop bunny hopping, not entirely sure how I feel about it yet.
  • Secondary fire projectile now appears to look like it's from the gun.
  • Secondary fire projectile speed lowered (from 150 to 110).

5NTH0
click to copy
8 months ago 1.1.2

  • Added Speed string
  • Added enemyPlayers array for my own internal reasons
  • Added Damage Numbers
  • Debug text is shown by default for the host player in the top right corner
  • Capped speed from bunny hops
  • Lobby now allows for players in queue because I'm dumb and forgot about it until now

Version number is considered minor since lack of gameplay features

D27QF
click to copy
8 months ago 1.1.1

  • Minor fix with secondary fire hitbox

HJ536
click to copy
8 months ago 1.1.0

v1.1.0 changes

  • Fixed Beam Effect going through walls. (forgot to use ray cast)
  • Right Click is now a fast projectile instead of hitscan. v1.0 secondary fire is still in OSTW code commented out.
  • Primary fire now creates an effect at the end position you fire (wall or enemy).
  • Secondary fire now has a "muzzle flash" when fired.
  • Removed Primary Fire Cooldown, it's still there in the OSTW code commented out.
  • Speed HUD text is no longer under the crosshair and is now at the top of the screen because I didn't like the hacky workaround with invisible HUD texts. Hopefully, Blizzard will give us more position flexibility with HUD text in the future.

CG3MT
click to copy
8 months ago 1.0.0

Initial Release

7AN59
click to copy