local Items = --table of your items
function ChooseItem(Egg , Player)
local TotalWeight = 0
for i,v in pairs(Items) do
TotalWeight = TotalWeight + v.Chance
end
local Chance = math.random(1,TotalWeight)
local Counter = 0
for i,v in pairs(Items) do
Counter = Counter + v.Chance
if Counter >= Chance then
return v.Name
end
end
end