I have 2 primary suggestions for you. I could name a lot, lot more, but it would mostly be in order to tell you why they’re not quite as good as these suggestions.
But first, a note up-front:
we'll be using a slightly modified version of Pathfinder’s guns.
This is extremely problematic—Pathfinder’s gun rules are near-crippling for everyone who isn’t a gunslinger, which is a Pathfinder class you wouldn’t otherwise find in 3.5e. Even if it’s available, it’s not really a good class—all it really does is fix problems with the gun rules to make them workable. A gunslinger can eventually do a lot of very-reliable damage, but that is all a gunslinger can do, and other characters can do that, better, and do more besides.
You might consider asking to just reskin a hand crossbow. It has far more support, and simplifies a lot of concerns here.
Beguiler (Player’s Handbook II)
Without a doubt the most powerful suggestion here, beguiler is a spellcasting class that packs some mundane stealth skills to back up their magic. They are “full” spellcasters, meaning they go up to 9th-level spells, but rather than maintaining a spellbook and having to prepare spells every morning, or have to choose spells each level, they can simply cast any spell on their spell list that they have a spell slot for. This makes them much simpler to play, and since their spell list is very, very good, they remain quite strong.
Their spell list focuses on Enchantment and Illusion, giving them the magical skills to get in and get out. They also get a very large number of skill points (6+Int, for a class that casts Int-based spells), so they can also have the non-magical skills to get in and get out. They gain some decent weapon proficiencies, and can wear light armor without interfering with their spells.
Their physical combat skills are a bit lacking. They get some (weird) abilities with respect to feinting, which are okay but not amazing. You will likely want to enter a prestige class or two as you play and level up:
Mindbender from Complete Arcane is mostly awful, and you should never take more than 1 level of it. It won’t help with your physical combat skills. That said, a 5th-level beguiler qualifies for mindbender almost by default, and that 1st level gets you telepathy out to 100 feet without losing any spellcasting. That’s amazing for coordinating silently with your party, of course, but even better is that it qualifies you for the incredible Mindsight feat from Lords of Madness, which will let you sense any mind within the 100-foot range of your telepathy. This option is so good that there are some who joke that the 6th level of beguiler is mindbender 1st.
Unseen seer from Complete Mage is the magical espionage class, which is obviously appropriate. Useful because it has full spellcasting progression, better physical combat skills (¾ BAB instead of ½ BAB), just as many skill points, and you can pick up a few divinations you couldn’t otherwise cast—the ranger’s hunter’s eye is an excellent choice for getting some sneak attack (which, once you have it from elsewhere, unseen seer can also boost). Because it’s so easy to enter and costs you almost nothing, you should almost-certainly get at least a few levels of this. Note that the divination spell power ability penalizes your non-divination spells—if that bothers you, Practiced Spellcaster from Complete Arcane can fix that right up.
Abjurant champion from Complete Mage is a magical warrior class, and as the name implies, it’s kind of defensive. On the other hand, it’s the only class in the game with both full BAB and full spellcasting, which will go a long way to make up for the beguiler’s poor BAB. Easy to enter, easy to take levels of, abjurant champion is your choice for when you just want to be a little bit better with weapons. It’s also 5 levels long, so 5 levels of this, 5 levels of beguiler, and 10 levels of unseen seer works out pretty nicely. (In reality, though, you almost-certainly want a level of mindbender instead of one of those abjurant champion or unseen seer levels.)
Swiftblade, from this web enhancement that used to be on Wizards.com, is also a warrior class, but it’s a much more agile and dexterous one than abjurant champion. It does not have full spellcasting (missing spellcasting at 1st, 4th, 7th, and 10th), which is very painful, but it does make up for it with some incredible abilities focused around the haste spell, which the beguiler has. A beguiler 5th/mindbender 1st/swiftblade 10th is a very formidable assassin indeed... Anyway, because of the lost spellcasting, swiftblade is not nearly as easy to take as the above levels—easily skipped if you’re not feeling it. The feat requirements are really painful, too, and that’s a problem because your gun skills are going to need feats.
Swordsage (Tome of Battle)
For a vastly more traditional assassin, the swordsage is the way to go. The swordsage is the kind of monk-y, ninja-y master of the Sublime Way, also known as “blade magic.” The maneuvers from the Shadow Hand and Tiger Claw disciplines are likely to be right up your alley, and those from Diamond Mind are very appropriate, too.
Unfortunately, most sublime maneuvers are strikes, and most strikes are melee-only, which is going to limit you when it comes to firearms. You’ll end up with a lot of mobility and utility options (various Diamond Mind counters, Shadow Hand boosts and teleports, maybe some Setting Sun crowd-control?), but you can eventually get dancing mongoose and then raging mongoose for extra attacks (Tiger Claw), and time stands still (Diamond Mind) at the highest levels to become a one-person firing squad.
There is a fairly-well-regarded homebrew firearm discipline, Black Rain. It can go a massive way towards making swordsage a great answer instead of only an OK one. (Note that, because magic thoroughly dominates 3.5e, beguiler will still be stronger.)
There are fewer prestige classes that are especially notable for a swordsage, but on the other hand, a swordsage has a lot more flexibility than a spellcaster for taking other class levels. A few thoughts:
With some levels in cleric, ruby knight vindicator, also from Tome of Battle, becomes an interesting idea. Ruby knight vindicators are the special operations forces of Wee Jas, lawful-neutral goddess of death—seems pretty fitting for an assassin. Discipline choices are possibly even less ranged-attack friendly than the swordsage’s, though, and you’ll really miss both Diamond Mind and Tiger Claw.
With just a single level of cleric, to get some bonus feats, master of nine (Tome of Battle again) becomes a reasonable option, and it is a phenomenal prestige class. You may run out of non-melee maneuvers you can take, though.
Mixing in ardent from Complete Psionic is nice with swordsage, because both classes are so multiclass-friendly. Then you could take the aptly-named slayer class to go with master of nine: see the build at the bottom of this answer for some ideas (obviously, you’d skip the unarmed combat and call weaponry things).
You could potentially mix some of the beguiler ideas above with this through the jade phoenix mage prestige class in Tome of Battle. Great combat skills for the beguiler, though the sublime disciplines available (Desert Wind and Devoted Spirit) are poor for you. At that point, you’re really more of a beguiler build dipping swordsage than a swordsage build.
Dips
There are a number of classes that you wouldn’t want to devote more than a level or two to, but that can be very valuable with that level or two.
Gunslinger: if allowed, you want at least one level of the Pathfinder gunslinger class, because the gunsmith ability and the quick clear deed are basically mandatory for making Pathfinder firearms anything but worthless.
Fighter: you are going to desperately need feats; the first two levels of fighter are a reasonably efficient way to get them. Furthermore, the hit-and-run tactics option from Drow of the Underdark is very strong for you, allowing you to add your Dexterity bonus to damage rolls against flat-footed targets. Making targets flat-footed is going to be hard, but that’s still useful.
Psychic warrior: gets the same feats as fighter for the first two levels, and also gets some power points and psionic powers, which can be useful. Usually better, though hit-and-run tactics gives the fighter something the psychic warrior can’t replicate.
Cleric: cleric 1st is the best single level in the game, though as a ranged character you don’t need Travel Devotion nearly so badly. Can ease entry into master of nine, which is otherwise prohibitive. Can also get you all kinds of other neat things.
Rogue: you might have expected rogue as a primary contender here, but ultimately the rogue doesn’t get much beyond sneak attack and skill points—both of which we can get elsewhere. The main reason you’d consider rogue is for the Dungeonscape option of replacing evasion with penetrating strike—the ability to deal half your sneak attack damage against creatures that are otherwise immune to it. Immunity to sneak attack damage is very common, and one of the big reasons why we don’t want to focus on rogue, but if you are getting a bunch of sneak attack (as both beguiler and swordsage can), you may want to consider penetrating strike. Note the existence of golemstrike, gravestrike, and vinestrike, 1st-level spells which allow you to sneak attack constructs, undead, and plants, respectively. Constructs and undead are two of the most common foes immune to sneak attack, so golemstrike and gravestrike go a long way towards making penetrating strike unnecessary. On the other hand, neither beguiler nor swordsage has a great way to get those spells, or to activate wands of them. (If dipping cleric, consider the Magic domain in order to use such wands.)
Feats
You will probably need Rapid Reload for your guns. Dead Eye from Dragon Compendium will help a lot with your damage, allowing you to use Dexterity for that. (Note that its errata changed the BAB requirement to +1 rather than +14!) If you do use reskinned hand crossbows, Hand Crossbow Focus from Drow of the Underdark is a better option than Rapid Reload, and Crossbow Sniper from Player’s Handbook II adds ½ your Dexterity bonus to your damage (so with Dead Eye you’re up to 1½×Dex, which is pretty good).
As any ranged character must, you will need Point-Blank Shot, Precise Shot, and (probably) Rapid Shot. If you’re back-porting Pathfinder material, the Clustered Shots is also near-mandatory.
That is a lot of feats—this is going to be something of a problem. Hence possibly recommending dips in fighter, psychic warrior, and/or cleric.
Races
Considering your feat requirements, you are going to almost-certainly need to be human.
Some words of caution
Even beyond my concerns with Pathfinder guns, just so you’re aware:
Magic is incredibly dominant in D&D 3.5e. Those with magic trounce those who don’t, and among those who have magic, “has the higher-level spell” is very-nearly synonymous for “is stronger.” For a true “best” class, you’re almost-always talking about archivist, cleric, druid, or wizard no matter what you’re doing—those are the premier spellcasting classes that eventually get 9th-level spells. But while a cleric or wizard could be a nigh-unstoppable assassin, that answer doesn’t really capture the kind of character and narrative you’re going for. Beguiler hits the sweet spot much better.
Sneak attack—the signature rogue special feature that is, to many, the mark of being a stealth character—is very limited by its applicable targets, since many types of creatures (e.g. all constructs, elementals, oozes, plants, and undead) are completely immune to it. That’s a problem, and one which makes it recommended to diversify and not focus solely on sneak attack.
- Death attack—the signature special feature of the actual assassin class—has the same problems as sneak attack, but much, much worse. Death effects in general are the Useless Useful Spell trope, because so many things are immune to them, and death attack in particular requires a successful sneak attack, so everything immune to those is also immune to death attack. Even against things that are vulnerable to death attack, all the requirements for performing one basically make it useless. Hence not even looking at taking levels in the assassin class.
Feats are going to be a huge problem for you. Ranged attacks are incredibly feat-intensive, and if you want to dual-wield those firearms—and you probably do as a Dexterity-based character—that means you also need a ton of feats for that, too. And that’s not even getting into any problems that the firearms you’re using present—that’s probably gonna require at least Rapid Reload. This is a problem both because it leaves relatively little room for flexibility, and also because you just won’t actually have enough, which means you’ll be constantly fighting your lack of something important. Both bonus feats and ways to function without certain feats will be important.
None of these is necessarily damning. You can, and should, play the character you want. But you should also be aware going in that there are going to be these problems, and they may detract from your fun at the table (they also may not, depending on what you find fun).
:-)
\$\endgroup\$