function playerspawn(_, activator) local randomnumber_health = math.random(-50,250) --local randomnumber_damage = math.randomseed(0.75,1.5) local randomnumber_movespeed = math.randomseed(1,2) local randomnumber_healthregen = math.random(0,10) local randomnumber_weapons_primary = math.random(1,18) local randomnumber_weapons_secondary = math.random(1,18) local randomnumber_weapons_melee = math.random(1,18) local randomnumber_attribute = math.random(1,5) print(randomnumber_health) --print(randomnumber_damage) print(randomnumber_movespeed) print(randomnumber_healthregen) print(randomnumber_weapons_primary) print(randomnumber_weapons_secondary) print(randomnumber_weapons_melee) print(randomnumber_attribute) if activator.m_iClass == 8 then activator:SwitchClass(1) util.PrintToChat(activator, "cant be assed to make spy not a broken piece of shit") return end activator:SetAttributeValue("hidden secondary max ammo penalty", 5000) activator:SetAttributeValue("hidden primary max ammo bonus", 5000) activator:SetAttributeValue("hidden maxhealth non buffed", randomnumber_health) --activator:SetAttributeValue("damage bonus hidden", randomnumber_damage) activator:SetAttributeValue("card: move speed bonus", randomnumber_movespeed) activator:SetAttributeValue("health drain", randomnumber_healthregen) --character if randomnumber_attribute == 1 then activator:SetAttributeValue("fire rate bonus", 0.8) end if randomnumber_attribute == 2 then activator:SetAttributeValue("move speed bonus", 4) end if randomnumber_attribute == 3 then activator:SetAttributeValue("override projectile type", 1) end if randomnumber_attribute == 4 then activator:SetAttributeValue("single wep deploy time decreased", 0.1) end if randomnumber_attribute == 5 then activator:SetAttributeValue("ignore player clip", 1) end --primary if randomnumber_weapons_primary == 1 then activator:GiveItem("tf_weapon_scattergun") end if randomnumber_weapons_primary == 2 then activator:GiveItem("tf_weapon_rocketlauncher") end if randomnumber_weapons_primary == 3 then activator:GiveItem("tf_weapon_flamethrower") end if randomnumber_weapons_primary == 4 then activator:GiveItem("tf_weapon_grenadelauncher") end if randomnumber_weapons_primary == 5 then activator:GiveItem("tf_weapon_minigun") end if randomnumber_weapons_primary == 6 then activator:GiveItem("upgradeable tf_weapon_shotgun_primary") end if randomnumber_weapons_primary == 7 then activator:GiveItem("tf_weapon_syringegun_medic") end if randomnumber_weapons_primary == 8 then activator:GiveItem("tf_weapon_sniperrifle") end if randomnumber_weapons_primary == 9 then activator:GiveItem("tf_weapon_revolver") end if randomnumber_weapons_primary == 10 then activator:GiveItem("the force-a-nature") end if randomnumber_weapons_primary == 11 then activator:GiveItem("the direct hit") end if randomnumber_weapons_primary == 12 then activator:GiveItem("the backburner") end if randomnumber_weapons_primary == 13 then activator:GiveItem("the iron bomber") end if randomnumber_weapons_primary == 14 then activator:GiveItem("natascha") end if randomnumber_weapons_primary == 15 then activator:GiveItem("the widowmaker") end if randomnumber_weapons_primary == 16 then activator:GiveItem("the blutsauger") end if randomnumber_weapons_primary == 17 then activator:GiveItem("the bazaar bargain") end if randomnumber_weapons_primary == 18 then activator:GiveItem("the ambassador") end --secondary if randomnumber_weapons_secondary == 1 then activator:GiveItem("tf_weapon_pistol") end if randomnumber_weapons_secondary == 2 then activator:GiveItem("the mantreads") end if randomnumber_weapons_secondary == 3 then activator:GiveItem("the gunboats") end if randomnumber_weapons_secondary == 4 then activator:GiveItem("tf_weapon_pipebomblauncher") end if randomnumber_weapons_secondary == 5 then activator:GiveItem("the thermal thruster") end if randomnumber_weapons_secondary == 6 then activator:GiveItem("the quick-fix") end if randomnumber_weapons_secondary == 7 then activator:GiveItem("tf_weapon_medigun") end if randomnumber_weapons_secondary == 8 then activator:GiveItem("the huntsman") end if randomnumber_weapons_secondary == 9 then activator:GiveItem("the winger") end if randomnumber_weapons_secondary == 10 then activator:GiveItem("the sandvich") end if randomnumber_weapons_secondary == 11 then activator:GiveItem("the short circuit") end if randomnumber_weapons_secondary == 12 then activator:GiveItem("jarate") end if randomnumber_weapons_secondary == 13 then activator:GiveItem("the flare gun") end if randomnumber_weapons_secondary == 14 then activator:GiveItem("tf_weapon_smg") end if randomnumber_weapons_secondary == 15 then activator:GiveItem("the scottish resistance") end if randomnumber_weapons_secondary == 16 then activator:GiveItem("mad milk") end if randomnumber_weapons_secondary == 17 then activator:GiveItem("the chargin' targe") end if randomnumber_weapons_secondary == 18 then activator:GiveItem("the buff banner") end --melee if randomnumber_weapons_melee == 1 then activator:GiveItem("tf_weapon_bat") end if randomnumber_weapons_melee == 2 then activator:GiveItem("the market gardener") end if randomnumber_weapons_melee == 3 then activator:GiveItem("the axtinguisher") end if randomnumber_weapons_melee == 4 then activator:GiveItem("the killing gloves of boxing") end if randomnumber_weapons_melee == 5 then activator:GiveItem("tf_weapon_fists") end if randomnumber_weapons_melee == 6 then activator:GiveItem("tf_weapon_wrench") end if randomnumber_weapons_melee == 7 then activator:GiveItem("the big earner") end if randomnumber_weapons_melee == 8 then activator:GiveItem("tf_weapon_club") end if randomnumber_weapons_melee == 9 then activator:GiveItem("tf_weapon_knife") end if randomnumber_weapons_melee == 10 then activator:GiveItem("the atomizer") end if randomnumber_weapons_melee == 11 then activator:GiveItem("the escape plan") end if randomnumber_weapons_melee == 12 then activator:GiveItem("the homewrecker") end if randomnumber_weapons_melee == 13 then activator:GiveItem("the eyelander") end if randomnumber_weapons_melee == 14 then activator:GiveItem("gloves of running urgently") end if randomnumber_weapons_melee == 15 then activator:GiveItem("the jag") end if randomnumber_weapons_melee == 16 then activator:GiveItem("the amputator") end if randomnumber_weapons_melee == 17 then activator:GiveItem("the shahanshah") end if randomnumber_weapons_melee == 18 then activator:GiveItem("conniver's kunai") end end --[[function OnGameTick() local menu = ents.FindByName("classmenu") for _, player in pairs(ents.GetAllPlayers()) do if activator.m_bUsingActionSlot == 1 then menu:AcceptInput( end end ]]