Basically, for every key (Pistol, Sniper, OneShot) you have, you can put the strings of all of them into a table. Then, you would get a random item from that table and get that item’s value from the dictionary.
local SFXWEAPON = {
Pistol = {'rbxassetid://15730646395','rbxassetid://15730646395'},
Sniper = {'rbxassetid://15730650090'},
OneShot = {'rbxassetid://15730648071','rbxassetid://15730648578'},
Auto = {'rbxassetid://15730644695','rbxassetid://15730645241', 'rbxassetid://15730645692','rbxassetid://15730646395'}
}
local NAMES = {"Pistol", "Sniper", "OneShot", "Auto"}
local randomWeapon = SFXWEAPON[NAMES[math.random(#NAMES)]]
print(randomWeapon)