local function processSeed(seed)
-- Extract the count (last character)
local count = tonumber(string.match(seed, "(%d+)$")) or 0
local base = string.match(seed, "^(.*%%)") or seed
-- Initialize results
local dCount, gCount = 0, 0
local rng = math.random(1,100)
-- Roll for each chance
for _ = 1, count do
if rng <= 10 then
dCount = dCount + 1
elseif rng <= 100 then --its garentee bro but
gCount = gCount + 1
end
end
print(dCount,gCount)
-- Build the result string
local result = base
if dCount > 0 then
result = result .. dCount .. "d"
end
if gCount > 0 then
result = result .. gCount .. "g"
end
return result
end
'''
** You are now Level 4! **