If I understand you correctly you want something like this:
function chanse(percent)
return percent >= math.random(1, 100)
end
if chanse(50) then player:addItem(2287, 1) end
if chanse(30) then player:addItem(2265, 1) end
if chanse(10) then player:addItem(2311, 1) end
if chanse(5) then...