Some sort of talent system, not sure where to even start

Not sure where to even start on this but what im trying to do is get some sort of talent system for my gun
like there is 3 Talent slots on a gun which each slot having their own list of talents, like some talent that does extra damage can only be in talent slot one

how would i make this work? i dont wanna just spam if statements
Like how would i check what talent is in the slot and make it work: Like

Talent for S1
Healthly Damage, and it has a 50% chance to double your damage if the hit player / npcs health is over 50% of its MaxHealth

Dictionary for the weapons’ talents?

local talents = {
    ["S1"] = --[[..]],
    ["S2"] = --[[..]],
    ["S3"] = --[[..]]
}

each “talent” itself can be a call to a function that modifies the base statistics of the weapon before performance calculations are done

this seems interesting although how do i use it?, im not sure how it works?

boosting for a answer (char limit)