#So i created a code for mutating dinosaurs and how do I make my own mutations?

1 messages · Page 1 of 1 (latest)

idle musk
#

This is the code for it:

local Rarity = {}

Rarity.Scale = {
{Name = "Rainbow", Colour = Color3.fromRGB(240, 210, 41), Chance = "Very Rare"},
{Name = "Gold", Colour = Color3.fromRGB(240, 210, 41), Chance = "Rare"},
{Name = "Normal", Chance = "Common"},
}

Rarity.Chance = {
{Name = "Very Rare", Chance = 100},
{Name = "Rare", Chance = 300},
{Name = "Common", Chance = 600},
}

Rarity.PickRandom = function()
local RandomNum = math.random(1,1000)
local Counter = 0
for i, ChanceTable in ipairs(Rarity.Chance) do

    Counter += ChanceTable["Chance"]
    
    if RandomNum <= Counter then
    
        local ChosenModifier = Rarity.Scale[i]["Name"]
        
        return ChosenModifier
    end
end

end

return Rarity

idle steeple
#

wait... so you created a code for mutating dinosaurs.... but you don't know how to make the mutations? huh?? how is that possible? you either created the code for mutating or you didn't, which is it? thonkoof