MenuCapacity = 12 TotalUpgradePoints = 4 TotalRerollPoints = 1 --attributes are defined as text on menu, attribute name, min, increment, max AllShops = { [1] = --Scout Shop { CommonAttribute = { {"Damage Bonus +25%", "damage bonus",1,0.25}, {"Clip Size +50%", "clip size bonus",1,0.5}, {"Firing Speed +10%", "fire rate bonus",1,-0.1,0.1}, {"Reload Speed +20%", "faster reload rate",1,-0.2,0.1}, {"Heal On Kill +25 health", "heal on kill",0,25}, {"Max Health +25", "max health additive bonus",0,25}, {"Max Ammo +50%", "custom",1,0.5}, {"Movement Speed +10%", "move speed bonus",1,0.1}, {"Jump Height +20%", "increased jump height",1,0.2}, {"Weapon Switch Speed +35%", "deploy time decreased",1,-0.35,0}, {"Consumable Recharge Rate +15%", "charge recharge rate increased",1,0.15}, {"Fire Resistance +25%", "dmg taken from fire reduced",1,-0.25,0.1}, {"Crit Resistance +30%", "dmg taken from crit reduced",1,-0.3,0.1}, {"Bullet Resistance +25%", "dmg taken from bullets reduced",1,-0.25,0.1}, {"Blast Resistance +25%", "dmg taken from blast reduced",1,-0.25,0.1}, {"Melee Resistance +25%", "dmg from melee increased",1,-0.25,0.1}, {"Health Regen +2 every second", "health regen",0,2}, {"Ammo Regen +20% every 5 seconds", "ammo regen",0,0.2,1}, {"Heal On Hit +15 health", "heal on hit for rapidfire",0,15}, {"Push Force -30%", "damage force reduction",1,-0.3,0}, }, RareAttribute = { {"(RARE) Drop On Kill: Small Health Pack", "drop health pack on kill",0,1,1}, {"(RARE) Projectile Penetration", "projectile penetration",0,1,1}, {"(RARE) Mad Milk Slows Targets", "applies snare effect",1,-0.35,0.65}, {"(RARE) Extra Jump +1", "air dash count",0,1}, }, EpicAttribute = { {"[EPIC] Bullets Per Shot +50%", "bullets per shot bonus",1,0.5}, {"[EPIC] Tank Buster Damage Bonus +50%", "mult dmg vs tanks",1,0.5}, {"[EPIC] Recall On Death +25% chance", "teleport instead of die",0,0.25,1}, {"[EPIC] Meter Effect/Debuff Duration +50%", "mult effect duration",1,0.5}, {"[EPIC] Speed Boost On Kill +5 seconds", "speed_boost_on_kill",0,5,5}, }, LegendaryAttribute = { {"【LEGENDARY】 Crit On Kill +3 seconds", "critboost on kill",0,3}, {"【LEGENDARY】 Mini-crits become Crits", "minicrits become crits",0,1,1}, {"【LEGENDARY】 All Healing Received +100%", "healing received bonus",1,1}, {"【LEGENDARY】 Mark for Death On Hit", "mark for death",0,1,1}, } }, [3] = --Soldier Shop { CommonAttribute = { {"Damage Bonus +25%", "damage bonus",1,0.25}, {"Primary: Clip Size +2", "clip size upgrade atomic",1,2}, {"Clip Size +50%", "clip size bonus",1,0.5}, {"Firing Speed +10%", "fire rate bonus",1,-0.1,0.1}, {"Reload Speed +20%", "faster reload rate",1,-0.2,0.1}, {"Heal On Kill +25 health", "heal on kill",0,25}, {"Max Health +25", "max health additive bonus",0,25}, {"Max Ammo +50%", "custom",1,0.5}, {"Movement Speed +10%", "move speed bonus",1,0.1}, {"Jump Height +20%", "increased jump height",1,0.2}, {"Weapon Switch Speed +35%", "deploy time decreased",1,-0.35,0}, {"Fire Resistance +25%", "dmg taken from fire reduced",1,-0.25,0.1}, {"Crit Resistance +30%", "dmg taken from crit reduced",1,-0.3,0.1}, {"Bullet Resistance +25%", "dmg taken from bullets reduced",1,-0.25,0.1}, {"Blast Resistance +25%", "dmg taken from blast reduced",1,-0.25,0.1}, {"Melee Resistance +25%", "dmg from melee increased",1,-0.25,0.1}, {"Health Regen +2 every second", "health regen",0,2}, {"Ammo Regen +20% every 5 seconds", "ammo regen",0,0.2,1}, {"Heal On Hit +15 health", "heal on hit for rapidfire",0,15}, {"Explosion Radius +25%", "Blast radius increased",1,0.25}, {"Projectile Speed +25%", "Projectile speed increased",1,0.25}, {"Banners: Buff Duration +25%", "increase buff duration",1,0.25}, {"Banners: Rage Gained +25%", "rage giving scale",1,0.25}, {"B.A.S.E. Jumper: Infinite Redeploy", "parachute redeploy",0,1,1}, }, RareAttribute = { {"(RARE) Drop On Kill: Small Health Pack", "drop health pack on kill",0,1,1}, {"(RARE) Rocket Specialist", "rocket specialist",0,1,1}, {"(RARE) Extra Jump +1", "air dash count",0,1}, {"(RARE) Fall Damage Immunity", "cancel falling damage",0,1,1}, {"(RARE) Mini-crit Airborne Targets", "mod mini-crit airborne",0,1,1}, }, EpicAttribute = { {"[EPIC] Banners: Buff Radius +25%", "mod soldier buff range",1,0.25}, {"[EPIC] Tank Buster Damage Bonus +50%", "mult dmg vs tanks",1,0.5}, {"[EPIC] Recall On Death +25% chance", "teleport instead of die",0,0.25,1}, {"[EPIC] Speed Boost On Kill +5 seconds", "speed_boost_on_kill",0,5,5}, {"[EPIC] Projectiles Cannot Be Deflected", "projectile no deflect",0,1,1}, }, LegendaryAttribute = { {"【LEGENDARY】 Crit On Kill +3 seconds", "critboost on kill",0,3}, {"【LEGENDARY】 Mini-crits become Crits", "minicrits become crits",0,1,1}, {"【LEGENDARY】 All Healing Received +100%", "healing received bonus",1,1}, {"【LEGENDARY】 Mark for Death On Hit", "mark for death",0,1,1}, } }, [7] = --Pyro Shop { CommonAttribute = { {"Damage Bonus +25%", "damage bonus",1,0.25}, {"Damage Bonus +25%", "damage bonus",1,0.25}, {"Damage Bonus +25%", "damage bonus",1,0.25}, {"Secondary: Clip Size +50%", "clip size bonus",1,0.5}, {"Secondary: Firing Speed +10%", "fire rate bonus",1,-0.1,0.1}, {"Secondary: Reload Speed +20%", "faster reload rate",1,-0.2,0.1}, {"Heal On Kill +25 health", "heal on kill",0,25}, {"Max Health +25", "max health additive bonus",0,25}, {"Max Ammo +50%", "custom",1,0.5}, {"Movement Speed +10%", "move speed bonus",1,0.1}, {"Jump Height +20%", "increased jump height",1,0.2}, {"Weapon Switch Speed +35%", "deploy time decreased",1,-0.35,0}, {"Fire Resistance +25%", "dmg taken from fire reduced",1,-0.25,0.1}, {"Crit Resistance +30%", "dmg taken from crit reduced",1,-0.3,0.1}, {"Bullet Resistance +25%", "dmg taken from bullets reduced",1,-0.25,0.1}, {"Blast Resistance +25%", "dmg taken from blast reduced",1,-0.25,0.1}, {"Melee Resistance +25%", "dmg from melee increased",1,-0.25,0.1}, {"Health Regen +2 every second", "health regen",0,2}, {"Ammo Regen +20% every 5 seconds", "ammo regen",0,0.2,1}, {"Heal On Hit +2 health", "heal on hit for rapidfire",0,2}, {"Primary: Ammo Consumption -25%", "flamethrower ammo consumed per second",1,0.25}, {"Afterburn Damage +100%", "weapon burn dmg increased",1,1}, {"Push Force -30%", "damage force reduction",1,-0.3,0}, {"Flares: Projectile Speed +25%", "Projectile speed increased",1,0.25}, {"Thermal Thruster: Mid-Air Relaunch", "thermal_thruster_air_launch",0,1,1}, {"Thermal Thruster: Stun Targets On Landing", "falling_impact_radius_stun",0,1,1}, {"Consumables Recharge Rate +15%", "faster recharge rate",1,-0.15,0}, {"Airblasting Teammates Gives Speed Boost", "airblast_give_teammate_speed_boost",0,1,1}, }, RareAttribute = { {"(RARE) Drop On Kill: Small Health Pack", "drop health pack on kill",0,1,1}, {"(RARE) Extra Jump +1", "air dash count",0,1}, {"(RARE) Reflected Projectile Speed +100%", "mult reflect velocity",1,1}, {"(RARE) Flame Size +50%", "flame size bonus",1,0.50}, {"(RARE) Flame Distance +50%", "flame life bonus",1,0.50}, {"(RARE) Airblast Ammo Consumption -25%", "airblast cost decreased",1,-0.25,0}, {"(RARE) Slow On Hit", "slow enemy on hit",0,1,1}, }, EpicAttribute = { {"[EPIC] Tank Buster Damage Bonus +50%", "mult dmg vs tanks",1,0.5}, {"[EPIC] Recall On Death +25% chance", "teleport instead of die",0,0.25,1}, {"[EPIC] Speed Boost On Kill +5 seconds", "speed_boost_on_kill",0,5,5}, {"[EPIC] Primary: Crits From Behind", "mod flamethrower back crit",0,1,1}, {"[EPIC] Airblast Refire Speed +50%", "mult airblast refire time",1,-0.5,0}, }, LegendaryAttribute = { {"【LEGENDARY】 Crit On Kill +3 seconds", "critboost on kill",0,3}, {"【LEGENDARY】 Mark for Death On Hit", "mark for death",0,1,1}, {"【LEGENDARY】 All Healing Received +100%", "healing received bonus",1,1}, {"【LEGENDARY】 300% Damage On Burning", "damage bonus vs burning",1,2,3}, }, Contraband = { {"☢ CAUTION!! ☢ Gas Passer: Explode On Ignite", "explode_on_ignite",0,1,1}, } }, [4] = --Demoman Shop { CommonAttribute = { {"Damage Bonus +25%", "damage bonus",1,0.25}, {"Primary: Clip Size +2", "clip size upgrade atomic",1,2}, {"Clip Size +50%", "clip size bonus",1,0.5}, {"Firing Speed +10%", "fire rate bonus",1,-0.1,0.1}, {"Reload Speed +20%", "faster reload rate",1,-0.2,0.1}, {"Heal On Kill +25 health", "heal on kill",0,25}, {"Max Health +25", "max health additive bonus",0,25}, {"Max Ammo +50%", "custom",1,0.5}, {"Movement Speed +10%", "move speed bonus",1,0.1}, {"Jump Height +20%", "increased jump height",1,0.2}, {"Weapon Switch Speed +35%", "deploy time decreased",1,-0.35,0}, {"Shields: Charge Recharge Rate +100%", "charge recharge rate increased",1,1}, {"Shields: Charge Impact Damage Bonus +100%", "charge impact damage increased",1,1}, {"Fire Resistance +25%", "dmg taken from fire reduced",1,-0.25,0.1}, {"Crit Resistance +30%", "dmg taken from crit reduced",1,-0.3,0.1}, {"Bullet Resistance +25%", "dmg taken from bullets reduced",1,-0.25,0.1}, {"Blast Resistance +25%", "dmg taken from blast reduced",1,-0.25,0.1}, {"Melee Resistance +25%", "dmg from melee increased",1,-0.25,0.1}, {"Health Regen +2 every second", "health regen",0,2}, {"Ammo Regen +20% every 5 seconds", "ammo regen",0,0.2,1}, {"Heal On Hit +15 health", "heal on hit for rapidfire",0,15}, {"Explosion Radius +25%", "Blast radius increased",1,0.25}, {"Projectile Speed +25%", "Projectile speed increased",1,0.25}, {"Push Force -30%", "damage force reduction",1,-0.3,0}, {"Max Stickybombs +2", "max pipebombs increased",1,2}, {"Stickybombs: Charge Rate +25%", "stickybomb charge rate",1,-0.25,0}, {"Stickybombs: Arm Time -0.2 seconds", "sticky arm time bonus",1,-0.2,0}, {"B.A.S.E. Jumper: Infinite Redeploy", "parachute redeploy",0,1,1}, }, RareAttribute = { {"(RARE) Drop On Kill: Small Health Pack", "drop health pack on kill",0,1,1}, {"(RARE) Melee Attack Width +50%", "melee bounds multiplier",1,0.5}, {"(RARE) Melee Range +25%", "melee range multiplier",1,0.25}, {"(RARE) Extra Jump +1", "air dash count",0,1}, {"(RARE) Fall Damage Immunity", "cancel falling damage",0,1,1}, {"(RARE) Mini-crit Airborne Targets", "mod mini-crit airborne",0,1,1}, {"(RARE) Shields: Charge Duration +1 second", "charge time increased",1,1}, {"(RARE) Pipebombs: Explode On Impact", "grenade explode on impact",0,1,1}, }, EpicAttribute = { {"[EPIC] Tank Buster Damage Bonus +50%", "mult dmg vs tanks",1,0.5}, {"[EPIC] Recall On Death +25% chance", "teleport instead of die",0,0.25,1}, {"[EPIC] Speed Boost On Kill +5 seconds", "speed_boost_on_kill",0,5,5}, {"[EPIC] Shields: Full Turning Control", "full charge turn control",0,1,1}, {"[EPIC] Stickybombs: Charging Increases Damage +35%", "stickybomb_charge_damage_increase",1,0.35}, {"[EPIC] Melee Attacks Cleave All Targets", "melee cleave attack",0,1,1}, {"[EPIC] Projectiles Cannot Be Deflected", "projectile no deflect",0,1,1}, }, LegendaryAttribute = { {"【LEGENDARY】 Crit On Kill +3 seconds", "critboost on kill",0,3}, {"【LEGENDARY】 Mini-crits become Crits", "minicrits become crits",0,1,1}, {"【LEGENDARY】 All Healing Received +100%", "healing received bonus",1,1}, {"【LEGENDARY】 Mark for Death On Hit", "mark for death",0,1,1}, } }, [6] = --Heavy Shop { CommonAttribute = { {"Secondary: Clip Size +50%", "clip size bonus",1,0.5}, {"Firing Speed +10%", "fire rate bonus",1,-0.1,0.1}, {"Secondary: Reload Speed +20%", "faster reload rate",1,-0.2,0.1}, {"Consumables Recharge Rate +15%", "charge recharge rate increased",1,-0.15,0}, {"Heal On Kill +25 health", "heal on kill",0,25}, {"Max Health +25", "max health additive bonus",0,25}, {"Max Ammo +50%", "custom",1,0.5}, {"Movement Speed +10%", "move speed bonus",1,0.1}, {"Jump Height +20%", "increased jump height",1,0.2}, {"Weapon Switch Speed +35%", "deploy time decreased",1,-0.35,0}, {"Fire Resistance +25%", "dmg taken from fire reduced",1,-0.25,0.1}, {"Crit Resistance +30%", "dmg taken from crit reduced",1,-0.3,0.1}, {"Bullet Resistance +25%", "dmg taken from bullets reduced",1,-0.25,0.1}, {"Blast Resistance +25%", "dmg taken from blast reduced",1,-0.25,0.1}, {"Melee Resistance +25%", "dmg from melee increased",1,-0.25,0.1}, {"Health Regen +2 every second", "health regen",0,2}, {"Ammo Regen +20% every 5 seconds", "ammo regen",0,0.2,1}, {"Heal On Hit +2 health", "heal on hit for rapidfire",0,2}, {"Push Force -30%", "damage force reduction",1,-0.3,0}, {"Spin Up Speed +15%", "minigun spinup time decreased",1,-0.15,0}, {"Move Speed While Spinning +20%", "aiming movespeed increased",1,0.20}, }, RareAttribute = { {"(RARE) Damage Bonus +25%", "damage bonus",1,0.25}, {"(RARE) Drop On Kill: Small Health Pack", "drop health pack on kill",0,1,1}, {"(RARE) Extra Jump +1", "air dash count",0,1}, {"(RARE) Projectile Penetration", "projectile penetration",0,1,1}, {"(RARE) Destroy Projectiles", "attack projectiles",0,1,2}, {"(RARE) Rage Knockback", "generate rage on damage",0,1,3}, {"(RARE) Switch Weapons While Spinning", "mod minigun can holster while spinning",0,1,1}, {"(RARE) Slow On Hit", "slow enemy on hit",0,1,1}, }, EpicAttribute = { {"[EPIC] Tank Buster Damage Bonus +50%", "mult dmg vs tanks",1,0.5}, {"[EPIC] Recall On Death +25% chance", "teleport instead of die",0,0.25,1}, {"[EPIC] Speed Boost On Kill +5 seconds", "speed_boost_on_kill",0,5,5}, {"[EPIC] Ring Of Fire", "ring of fire while aiming",0,1,1}, {"[EPIC] Bullets Per Shot +25%", "bullets per shot bonus",1,0.25}, }, LegendaryAttribute = { {"【LEGENDARY】 Crit On Kill +3 seconds", "critboost on kill",0,3}, {"【LEGENDARY】 Mini-crits become Crits", "minicrits become crits",0,1,1}, {"【LEGENDARY】 All Healing Received +100%", "healing received bonus",1,1}, {"【LEGENDARY】 Mark for Death On Hit", "mark for death",0,1,1}, } }, [9] = --Engineer Shop { CommonAttribute = { {"Weapons: Damage Bonus +25%", "damage bonus",1,0.25}, {"Weapons: Clip Size +50%", "clip size bonus",1,0.5}, {"Weapons: Firing Speed +10%", "fire rate bonus",1,-0.1,0.1}, {"Weapons: Reload Speed +20%", "faster reload rate",1,-0.2,0.1}, {"Heal On Kill +25 health", "heal on kill",0,25}, {"Max Health +25", "max health additive bonus",0,25}, {"Weapons: Max Ammo +50%", "custom",1,0.5}, {"Movement Speed +10%", "move speed bonus",1,0.1}, {"Jump Height +20%", "increased jump height",1,0.2}, {"Weapon Switch Speed +70%", "deploy time decreased",1,-0.70,0}, {"Fire Resistance +25%", "dmg taken from fire reduced",1,-0.25,0.1}, {"Crit Resistance +30%", "dmg taken from crit reduced",1,-0.3,0.1}, {"Bullet Resistance +25%", "dmg taken from bullets reduced",1,-0.25,0.1}, {"Blast Resistance +25%", "dmg taken from blast reduced",1,-0.25,0.1}, {"Melee Resistance +25%", "dmg from melee increased",1,-0.25,0.1}, {"Health Regen +2 every second", "health regen",0,2}, {"Ammo Regen +20% every 5 seconds", "ammo regen",0,0.2,1}, {"Heal On Hit +15 health", "heal on hit for rapidfire",0,3}, {"Max Metal Capacity +50%", "maxammo metal increased",1,0.50}, {"Building Max Health +100%", "engy building health bonus",1,1}, {"Sentry Firing Speed +10%", "engy sentry fire rate increased",1,-0.1,0}, {"Dispenser Range +100%", "engy dispenser radius increased",1,1}, {"Disposable Sentry +1", "engy disposable sentries",0,1}, {"Two-Way Teleporter", "bidirectional teleport",0,1,1}, {"Metal Regen +100 every 5 seconds", "metal regen",0,100}, {"Sentry Max Ammo +50%", "mvm sentry ammo",1,0.50}, {"Build Speed +25%", "build rate bonus",1,-0.25,0}, {"Wrench Construction Speed +30%", "Construction rate increased",1,0.3}, {"Repair Speed +20%", "Repair rate increased",1,0.2}, {"Upgrade Speed +20%", "upgrade rate decrease",1,0.2}, {"Increased Metal From Ammo +25%", "metal_pickup_decreased",1,0.25}, }, RareAttribute = { {"(RARE) Drop On Kill: Small Health Pack", "drop health pack on kill",0,1,1}, {"(RARE) Extra Jump +1", "air dash count",0,1}, {"(RARE) Projectile Penetration", "projectile penetration",0,1,1}, {"(RARE) Sentry Damage Bonus +25%", "engy sentry damage bonus",1,0.25}, {"(RARE) Sentry Range +50%", "engy sentry radius increased",1,0.5}, {"(RARE) Dispenser Heal/Resupply +50%", "mult dispenser rate",1,0.5}, }, EpicAttribute = { {"[EPIC] Tank Buster Damage Bonus +50%", "mult dmg vs tanks",1,0.5}, {"[EPIC] Recall On Death +25% chance", "teleport instead of die",0,0.25,1}, {"[EPIC] Speed Boost On Kill +5 seconds", "speed_boost_on_kill",0,5,5}, {"[EPIC] Bullets Per Shot +50%", "bullets per shot bonus",1,0.5}, {"[EPIC] Sentry Rocket Firing Speed +25%", "mult firerocket rate",1,-0.25,0}, {"[EPIC] Teleporter Recharge Rate +100%", "mult teleporter recharge rate",1,1}, {"[EPIC] Teleporter Grants Speed Boost", "mod teleporter speed boost",0,1,1}, {"[EPIC] Damage Bonus vs Sentry's Target +50%", "damage bonus bullet vs sentry target",1,0.25}, }, LegendaryAttribute = { {"【LEGENDARY】 Crit On Kill +3 seconds", "critboost on kill",0,3}, {"【LEGENDARY】 Mini-crits become Crits", "minicrits become crits",0,1,1}, {"【LEGENDARY】 All Healing Received +100%", "healing received bonus",1,1}, {"【LEGENDARY】 Mark for Death On Hit", "mark for death",0,1,1}, {"【LEGENDARY】 Construction Cost -80%", "building cost reduction",1,-0.8,0.2}, } }, [5] = --Medic Shop { CommonAttribute = { {"Damage Bonus +25%", "damage bonus",1,0.25}, {"Clip Size +50%", "clip size bonus",1,0.5}, {"Clip Size +2", "clip size upgrade atomic",1,2}, {"Firing Speed +10%", "fire rate bonus",1,-0.1,0.1}, {"Reload Speed +20%", "faster reload rate",1,-0.2,0.1}, {"Heal On Kill +25 health", "heal on kill",0,25}, {"Max Health +25", "max health additive bonus",0,25}, {"Max Ammo +50%", "custom",1,0.5}, {"Movement Speed +10%", "move speed bonus",1,0.1}, {"Jump Height +20%", "increased jump height",1,0.2}, {"Weapon Switch Speed +70%", "deploy time decreased",1,-0.70,0}, {"Fire Resistance +25%", "dmg taken from fire reduced",1,-0.25,0.1}, {"Crit Resistance +30%", "dmg taken from crit reduced",1,-0.3,0.1}, {"Bullet Resistance +25%", "dmg taken from bullets reduced",1,-0.25,0.1}, {"Blast Resistance +25%", "dmg taken from blast reduced",1,-0.25,0.1}, {"Melee Resistance +25%", "dmg from melee increased",1,-0.25,0.1}, {"Health Regen +2 every second", "health regen",0,2}, {"Ammo Regen +20% every 5 seconds", "ammo regen",0,0.2,1}, {"Heal On Hit +6 health", "heal on hit for rapidfire",0,3}, {"ÜberCharge Rate +25%", "ubercharge rate bonus",1,0.25}, {"Über Duration +2 seconds", "uber duration bonus",0,2}, {"Healing Mastery", "healing mastery",0,1}, {"Overheal Expert", "overheal expert",0,1}, {"Heal Rate +25%", "heal rate bonus",1,0.25}, {"Max Overheal +25%", "overheal bonus",1,0.25}, {"Overheal Duration +50%", "overheal bonus",1,0.25}, {"Revive Speed +25%", "revive rate",1,0.25}, {"Push Force -30%", "damage force reduction",1,-0.3,0}, }, RareAttribute = { {"(RARE) Projectile Shield", "generate rage on heal",0,1,2}, {"(RARE) Extra Jump +1", "air dash count",0,1}, {"(RARE) Gain Über On Hit +1%", "add uber charge on hit",0,0.01}, {"(RARE) Mad Milk Syringes", "mad milk syringes",0,1,1}, {"(RARE) Medigun Range +25%", "mult medigun range",1,0.25}, }, EpicAttribute = { {"[EPIC] Recall On Death +25% chance", "teleport instead of die",0,0.25,1}, {"[EPIC] Crit On Kill +2 seconds", "critboost on kill",0,2}, {"[EPIC] Mixed Concoction On Hit", "custom",0,1,1}, {"[EPIC] Heal Buildings +50% healing", "medic machinery beam",0,5}, {"[EPIC] Melee Attacks Cleave All Targets", "melee cleave attack",0,1,1}, {"[EPIC] Speed Boost On Kill +5 seconds", "speed_boost_on_kill",0,5,5}, }, LegendaryAttribute = { {"【LEGENDARY】 Mini-crits become Crits", "minicrits become crits",0,1,1}, {"【LEGENDARY】 All Healing Received +100%", "healing received bonus",1,1}, {"【LEGENDARY】 Invulnerable On Taking Damage +10% Chance", "uber on damage taken",0,0.1,0.1}, } }, [2] = --Sniper Shop { CommonAttribute = { {"Damage Bonus +25%", "damage bonus",1,0.25}, {"Secondary: Clip Size +50%", "clip size bonus",1,0.5}, {"Firing Speed +10%", "fire rate bonus",1,-0.1,0.1}, {"Reload Speed +20%", "faster reload rate",1,-0.2,0.1}, {"Heal On Kill +25 health", "heal on kill",0,25}, {"Max Health +25", "max health additive bonus",0,25}, {"Max Ammo +50%", "custom",1,0.5}, {"Movement Speed +10%", "move speed bonus",1,0.1}, {"Jump Height +20%", "increased jump height",1,0.2}, {"Weapon Switch Speed +35%", "deploy time decreased",1,-0.35,0}, {"Consumable Recharge Rate +15%", "charge recharge rate increased",1,0.15}, {"Fire Resistance +25%", "dmg taken from fire reduced",1,-0.25,0.1}, {"Crit Resistance +30%", "dmg taken from crit reduced",1,-0.3,0.1}, {"Bullet Resistance +25%", "dmg taken from bullets reduced",1,-0.25,0.1}, {"Blast Resistance +25%", "dmg taken from blast reduced",1,-0.25,0.1}, {"Melee Resistance +25%", "dmg from melee increased",1,-0.25,0.1}, {"Health Regen +2 every second", "health regen",0,2}, {"Ammo Regen +20% every 5 seconds", "ammo regen",0,0.2,1}, {"Heal On Hit +15 health", "heal on hit for rapidfire",0,3}, {"Bows: Arrow Mastery", "arrow mastery",0,1}, {"Faster Charge +25%", "SRifle Charge rate increased",1,0.25}, {"Bleed On Hit +5 seconds", "bleeding duration",0,5}, }, RareAttribute = { {"(RARE) Drop On Kill: Small Health Pack", "drop health pack on kill",0,1,1}, {"(RARE) Extra Jump +1", "air dash count",0,1}, {"(RARE) Projectile Penetration", "projectile penetration",0,1,1}, {"(RARE) Jarate Slows Targets", "applies snare effect",1,-0.35,0.65}, {"(RARE) Damage All Targets Connected By Medigun", "damage all connected",0,1,1}, {"(RARE) No Fliching When Scoped", "no damage view flinch",0,1,1}, {"(RARE) Damage Bonus On Full Charge +35%", "sniper full charge damage bonus",1,0.35}, {"(RARE) SMGs: Accuracy +100%", "weapon spread bonus",1,-1,0}, }, EpicAttribute = { {"[EPIC] Tank Buster Damage Bonus +50%", "mult dmg vs tanks",1,0.5}, {"[EPIC] Recall On Death +25% chance", "teleport instead of die",0,0.25,1}, {"[EPIC] Meter Effect/Debuff Duration +50%", "mult effect duration",1,0.5}, {"[EPIC] Explosive Headshot", "explosive sniper shot",0,1}, {"[EPIC] Explosive Munitions", "explosive bullets",0,147,147}, {"[EPIC] Speed Boost On Kill +5 seconds", "speed_boost_on_kill",0,5,5}, }, LegendaryAttribute = { {"【LEGENDARY】 All Healing Received +100%", "healing received bonus",1,1}, {"【LEGENDARY】 Jarate Headshot", "radius sleeper",0,1,1}, } }, [8] = --Spy Shop { CommonAttribute = { {"Damage Bonus +25%", "damage bonus",1,0.25}, {"Clip Size +50%", "clip size bonus",1,0.5}, {"Firing Speed +10%", "fire rate bonus",1,-0.1,0.1}, {"Reload Speed +20%", "faster reload rate",1,-0.2,0.1}, {"Heal On Kill +25 health", "heal on kill",0,25}, {"Max Health +25", "max health additive bonus",0,25}, {"Max Ammo +50%", "custom",1,0.5}, {"Movement Speed +10%", "move speed bonus",1,0.1}, {"Jump Height +20%", "increased jump height",1,0.2}, {"Weapon Switch Speed +35%", "deploy time decreased",1,-0.35,0}, {"Sapper Recharge Rate +15%", "charge recharge rate increased",1,0.15}, {"Fire Resistance +25%", "dmg taken from fire reduced",1,-0.25,0.1}, {"Crit Resistance +30%", "dmg taken from crit reduced",1,-0.3,0.1}, {"Bullet Resistance +25%", "dmg taken from bullets reduced",1,-0.25,0.1}, {"Blast Resistance +25%", "dmg taken from blast reduced",1,-0.25,0.1}, {"Melee Resistance +25%", "dmg from melee increased",1,-0.25,0.1}, {"Health Regen +2 every second", "health regen",0,2}, {"Ammo Regen +20% every 5 seconds", "ammo regen",0,0.2,1}, {"Heal On Hit +15 health", "heal on hit for rapidfire",0,3}, {"Robot Sapper Power", "robo sapper",0,1,3}, {"Armor Penetration", "armor piercing",0,25,100}, {"Cloak Duration +20%", "cloak consume rate decreased",1,-0.2}, {"Cloak Recharge Rate +50%", "mult cloak meter regen rate",1,0.5}, {"Add Cloak On Hit +15%", "add cloak on hit",0,15}, {"Add Cloak On Kill +30%", "add cloak on kill",0,30}, }, RareAttribute = { {"(RARE) Drop On Kill: Small Health Pack", "drop health pack on kill",0,1,1}, {"(RARE) Extra Jump +1", "air dash count",0,1}, {"(RARE) Projectile Penetration", "projectile penetration",0,1,1}, {"(RARE) Damage All Targets Connected By Medigun", "damage all connected",0,1,1}, {"(RARE) Revolvers: Accuracy +100%", "weapon spread bonus",1,-1,0}, {"(RARE) Headshots Enabled", "can headshot",0,1,1}, {"(RARE) Decloak Speed +50%", "mult decloak rate",1,-0.5,0.01}, }, EpicAttribute = { {"[EPIC] Recall On Death +25% chance", "teleport instead of die",0,0.25,1}, {"[EPIC] Secondary: Buff/Debuff Duration +50%", "mult effect duration",1,0.5}, {"[EPIC] Speed Boost On Kill", "speed_boost_on_kill",0,1,1}, {"[EPIC] Last Bullet Is A Crit", "last shot crits",0,1,1}, {"[EPIC] Wet Immunity", "wet immunity",0,1,1}, {"[EPIC] Afterburn Immunity", "afterburn immunity",0,1,1}, {"[EPIC] Damage Bonus While Disguised +20%", "damage bonus while disguised",1,0.2}, }, LegendaryAttribute = { {"【LEGENDARY】 All Healing Received +100%", "healing received bonus",1,1}, {"【LEGENDARY】 Tank Buster Damage Bonus +300%", "mult dmg vs tanks",1,3}, {"【LEGENDARY】 Revolver Retains Disguise", "keep disguise on attack",0,1,1}, {"【LEGENDARY】 Disguise On Backstab", "disguise on backstab",0,1,1}, {"【LEGENDARY】 Backstabs and Saps Store Crits", "sapper kills collect crits",0,1,1}, } } } classIndices_Internal = { [1] = "Scout", [3] = "Soldier", [7] = "Pyro", [4] = "Demoman", [6] = "Heavy", [9] = "Engineer", [5] = "Medic", [2] = "Sniper", [8] = "Spy", } UniqueAccountIDs = {} WaveState = {} function EnableUpgradeStations() for _, v in pairs(ents.FindAllByClass("func_upgradestation")) do v:AddCallback(ON_START_TOUCH, function(_,player) if player:IsRealPlayer() then RollUpgrades(player) ShowUpgradeMenu(player) player:Print(2, "Weclome to the Randomizer Upgrade Station!") end end) v:AddCallback(ON_END_TOUCH, function(_,player) if player:IsRealPlayer() then CloseUpgradeMenu(player) player:Print(2, "You have left the Randomizer Upgrade Station.") end end) end end function OnPlayerConnected(player) if player:IsRealPlayer() then player:AddCallback(ON_SPAWN, function(player) InitUserId(player) ReAddPurchasedUpgrades(player) end) end end function InitUserId(activator) local player = (ents.FindByClass("tf_player_manager", nil)):DumpProperties().m_iAccountID[activator:GetNetIndex()+1] if UniqueAccountIDs[player] == nil then UniqueAccountIDs[player] = { UpgradePoints = TotalUpgradePoints, RerollPoints = TotalRerollPoints, } end local class = activator:DumpProperties().m_iClass if UniqueAccountIDs[player][class] == nil then UniqueAccountIDs[player][class] = { hasRolled = false, PurchasedUpgrades = {}, MaxedUpgrades = {}, UpgradeMenu = { timeout = 0, title = "Select an upgrade - ", itemsPerPage = nil, flags = MENUFLAG_BUTTON_EXIT, onSelect = function(activator, index, value) local player = UniqueAccountIDs[(ents.FindByClass("tf_player_manager", nil)):DumpProperties().m_iAccountID[activator:GetNetIndex()+1]] local class = activator:DumpProperties().m_iClass local purchased = player[class].PurchasedUpgrades local menu = player[class].UpgradeMenu local playername = activator:DumpProperties().m_szNetname[1] if value ~= "reroll" then if purchased[value] == nil then purchased[value] = 1 else purchased[value] = purchased[value] + 1 end menu[index].disabled = true AddUpgrade(activator, value) local upgradetable = {} for i in (string.gmatch(value, "[^,]+")) do upgradetable[#upgradetable + 1] = i end local upgrade = upgradetable[1] if string.find(upgrade, "(RARE)",1,true) then util.PrintToChatAll("\x07ff3d3d" .. playername .. "\x07fbeccb has purchased: " .. "\x074B69FF".. string.sub(upgrade,1,6) .. "\x07FFD700".. string.sub(upgrade,7,#upgrade) .. "\x07fbeccb Level " .. purchased[value]) elseif string.find(upgrade, "[EPIC]",1,true) then util.PrintToChatAll("\x07ff3d3d" .. playername .. "\x07fbeccb has purchased: " .. "\x078847FF".. string.sub(upgrade,1,6) .. "\x07FFD700".. string.sub(upgrade,7,#upgrade) .. "\x07fbeccb Level " .. purchased[value]) elseif string.find(upgrade, "【LEGENDARY】",1,true) then util.PrintToChatAll("\x07ff3d3d" .. playername .. "\x07fbeccb has purchased: " .. "\x07EB4B4B".. string.sub(upgrade,1,15) .. "\x07FFD700".. string.sub(upgrade,16,#upgrade) .. "\x07fbeccb Level " .. purchased[value]) else util.PrintToChatAll("\x07ff3d3d" .. playername .. "\x07fbeccb has purchased: " .. "\x07FFD700" .. upgrade .. "\x07fbeccb Level " .. purchased[value]) end player.UpgradePoints = player.UpgradePoints - 1 --[[player[class].hasRolled = false RollUpgrades(activator)]] -- uncomment this if you want to reroll after purchase else RerollUpgrades(activator) end ShowUpgradeMenu(activator) end, onCancel = nil } } end end function UpgradeRoulette(activator) local number = math.random(1,100) local class = activator:DumpProperties().m_iClass local shop = AllShops[class] local pool = {} if number < 80 then pool = shop.CommonAttribute elseif (number >= 80 and number < 95) then pool = shop.RareAttribute elseif (number >= 95 and number < 100) then pool = shop.EpicAttribute elseif number == 100 then pool = shop.LegendaryAttribute end local index = math.random(1,(#pool)) local upgrade = pool[index] return upgrade end function RollUpgrades(activator) local player = UniqueAccountIDs[(ents.FindByClass("tf_player_manager", nil)):DumpProperties().m_iAccountID[activator:GetNetIndex()+1]] local class = activator:DumpProperties().m_iClass local menu = player[class].UpgradeMenu local purchased = player[class].PurchasedUpgrades local maxed = player[class].MaxedUpgrades if player[class].hasRolled ~= true then for index = 1, MenuCapacity, 1 do menu[index] = {} maxed = {} end for index = 1, MenuCapacity, 1 do local upgrade = UpgradeRoulette(activator) local upgradestring = table.concat(upgrade,",") function CheckMaxed(upgrade) local min = upgrade[3] local increment = upgrade[4] local max = upgrade[5] if max ~= nil then if maxed[upgradestring] == nil then if purchased[upgradestring] == nil then maxed[upgradestring] = 0 else maxed[upgradestring] = purchased[upgradestring] end else maxed[upgradestring] = maxed[upgradestring] + 1 end local value = min + maxed[upgradestring] * increment if increment > 0 then return (tostring(value) >= tostring(max)) --floating point issue else return (tostring(value) <= tostring(max)) end end end if CheckMaxed(upgrade) == true then while CheckMaxed(upgrade) == true do upgrade = UpgradeRoulette(activator) end end --[[for i = 1, MenuCapacity, 1 do if menu[i].text == upgrade[1] then while menu[i].text == upgrade[1] do upgrade = UpgradeRoulette(activator) end end end]] --uncomment to disallow duplicate upgrades in shop menu menu[index] = {text = upgrade[1], value = table.concat(upgrade,","), disabled = false} end player[class].hasRolled = true end end function RerollUpgrades(activator) local player = UniqueAccountIDs[(ents.FindByClass("tf_player_manager", nil)):DumpProperties().m_iAccountID[activator:GetNetIndex()+1]] local class = activator:DumpProperties().m_iClass player.RerollPoints = player.RerollPoints - 1 player[class].hasRolled = false RollUpgrades(activator) end function ResetRolls() for _, v in pairs(UniqueAccountIDs) do for i = 1, 9, 1 do if v[i] ~= nil then v[i].hasRolled = false end end end end function AddUpgrade(activator, value) local player = UniqueAccountIDs[(ents.FindByClass("tf_player_manager", nil)):DumpProperties().m_iAccountID[activator:GetNetIndex()+1]] local class = activator:DumpProperties().m_iClass local purchased = player[class].PurchasedUpgrades local upgradetable = {} for i in string.gmatch(value, "[^,]+") do upgradetable[#upgradetable + 1] = i end local upgrade = upgradetable[1] local attributename = upgradetable[2] local min = tonumber(upgradetable[3]) local increment = tonumber(upgradetable[4]) local max = tonumber(upgradetable[5]) if attributename == "custom" then if upgrade == "Max Ammo +50%" then activator:SetAttributeValue("maxammo primary increased",min+increment*purchased[value]) activator:SetAttributeValue("maxammo secondary increased",min+increment*purchased[value]) activator:SetAttributeValue("maxammo grenades1 increased",min+increment*2*purchased[value]) elseif upgrade == "[EPIC] Mixed Concoction On Hit" then activator:SetAttributeValue("add cond on hit",123 + 27*256 + 24*65536) --123 = gas, 27 = milk, 24 = jarate activator:SetAttributeValue("add cond on hit duration",10) activator:SetAttributeValue("bleeding duration",10) end elseif attributename ~= "custom" then if max ~= nil then if increment > 0 then activator:SetAttributeValue(attributename,math.min(min+increment*purchased[value],max)) else activator:SetAttributeValue(attributename,math.max(min+increment*purchased[value],max)) end else activator:SetAttributeValue(attributename,min+increment*purchased[value]) end end end function AddUpgradePoints(number) for _, v in pairs(UniqueAccountIDs) do v.UpgradePoints = v.UpgradePoints + number end TotalUpgradePoints = TotalUpgradePoints + number end function AddRerollPoints(number) for _, v in pairs(UniqueAccountIDs) do v.RerollPoints = v.RerollPoints + number end TotalRerollPoints = TotalRerollPoints + number end function SetUpgradePoints(number) for _, v in pairs(UniqueAccountIDs) do v.UpgradePoints = number end end function SetRerollPoints(number) for _, v in pairs(UniqueAccountIDs) do v.RerollPoints = number end end function ReAddPurchasedUpgrades(activator) local player = UniqueAccountIDs[(ents.FindByClass("tf_player_manager", nil)):DumpProperties().m_iAccountID[activator:GetNetIndex()+1]] local class = activator:DumpProperties().m_iClass local purchased = player[class].PurchasedUpgrades for k, _ in pairs(purchased) do AddUpgrade(activator, k) end activator:RefillAmmo() end function ShowUpgradeMenu(activator) local player = UniqueAccountIDs[(ents.FindByClass("tf_player_manager", nil)):DumpProperties().m_iAccountID[activator:GetNetIndex()+1]] local class = activator:DumpProperties().m_iClass local menu = player[class].UpgradeMenu local purchased = player[class].PurchasedUpgrades menu[MenuCapacity+1] = {text="Reroll " .. classIndices_Internal[class] .. " Shop\n " .. player.RerollPoints .. " rerolls remaining", value="reroll"} if player.RerollPoints == 1 then menu[MenuCapacity+1] = {text="Reroll " .. classIndices_Internal[class] .. " Shop\n " .. player.RerollPoints .. " reroll remaining", value="reroll"} elseif player.RerollPoints <= 0 then menu[MenuCapacity+1] = {text="Reroll " .. classIndices_Internal[class] .. " Shop\n " .. player.RerollPoints .. " rerolls remaining", value="reroll", disabled = true} end menu.title = classIndices_Internal[class] .. " Shop\nSelect an upgrade\n" .. player.UpgradePoints .. " upgrade points remaining\n " if player.UpgradePoints == 1 then menu.title = classIndices_Internal[class] .. " Shop\nSelect an upgrade\n" .. player.UpgradePoints .. " upgrade point remaining\n " elseif player.UpgradePoints <= 0 then for i = 1, MenuCapacity+1, 1 do menu[i].disabled = true end end for i = 1, MenuCapacity, 1 do local value = menu[i].value local upgradetable = {} for k in string.gmatch(value, "[^,]+") do upgradetable[#upgradetable + 1] = k end local min = upgradetable[3] local increment = upgradetable[4] local max = upgradetable[5] if purchased[value] ~= nil then menu[i].text = menu[i].text .. "\n #: " .. purchased[value] else menu[i].text = menu[i].text .. "\n #: 0" end if max ~= nil then menu[i].text = menu[i].text .. " Max: " .. math.ceil((max-min)/increment) end end activator:DisplayMenu(menu) for i = 1, MenuCapacity, 1 do local value = menu[i].value local upgradetable = {} for k in string.gmatch(value, "[^,]+") do upgradetable[#upgradetable + 1] = k end upgrade = upgradetable[1] menu[i].text = upgrade end end function CloseUpgradeMenu(activator) activator:HideMenu() end function deepCopy(original) --special thx to https://developer.roblox.com local copy = {} for k, v in pairs(original) do if type(v) == "table" then v = deepCopy(v) end copy[k] = v end return copy end function OnWaveSuccess(wave) AddUpgradePoints(4) SetRerollPoints(1) end function OnWaveReset(wave) if WaveState[wave] ~= nil then TotalUpgradePoints = WaveState[wave].TotalUpgradePoints TotalRerollPoints = WaveState[wave].TotalRerollPoints UniqueAccountIDs = deepCopy(WaveState[wave].UniqueAccountIDs) end end function OnWaveInit(wave) EnableUpgradeStations() if WaveState[wave] == nil then WaveState[wave] = { TotalUpgradePoints = TotalUpgradePoints, TotalRerollPoints = TotalRerollPoints, UniqueAccountIDs = deepCopy(UniqueAccountIDs) } end ResetRolls() end