My first Forum was answered but I had to scratch that idea because; 1. there will be over 16 million combinations and 2. The RNG will be wrong as well. Right now, what I have is this:
local cubeConfig = {
{ Chance = 1/1, Color = Color3.fromRGB(255,255,255), Name = "White" },
{ Chance = 1/13, Color = Color3.fromRGB(30,15,15), Name = "Bighorn Sheep" },
{ Chance = 1/13, Color = Color3.fromRGB(15,30,15), Name = "Nightmare" },
{ Chance = 1/13, Color = Color3.fromRGB(15,15,30), Name = "Tristesse" },
{ Chance = 1/13, Color = Color3.fromRGB(45,15,0), Name = "Chocolate Melange" },
{ Chance = 1/13, Color = Color3.fromRGB(45,0,15), Name = "Ilvaite Black" },
{ Chance = 1/14, Color = Color3.fromRGB(15,15,15), Name = "Chaos Black" },
{ Chance = 1/14, Color = Color3.fromRGB(30,15,0), Name = "Super Black" },
{ Chance = 1/14, Color = Color3.fromRGB(30,0,15), Name = "Belladonna" },
{ Chance = 1/14, Color = Color3.fromRGB(15,30,0), Name = "Yuzu Soy" },
{ Chance = 1/14, Color = Color3.fromRGB(0,30,15), Name = "Clock Chimes Thirteen" },
{ Chance = 1/14, Color = Color3.fromRGB(15,0,30), Name = "Election Night" },
{ Chance = 1/14, Color = Color3.fromRGB(0,15,30), Name = "Kuretake Black Manga" },
{ Chance = 1/14, Color = Color3.fromRGB(45,0,0), Name = "Sepia Black" },
{ Chance = 1/14, Color = Color3.fromRGB(0,45,0), Name = "PCB Green" },
{ Chance = 1/14, Color = Color3.fromRGB(0,0,45), Name = "Illicit Darkness" },
{ Chance = 1/15, Color = Color3.fromRGB(15,15,0), Name = "Chinese Black"},
{ Chance = 1/15, Color = Color3.fromRGB(15,0,15), Name = "Glossy Black" },
{ Chance = 1/15, Color = Color3.fromRGB(0,15,15), Name = "Black Glaze" },
{ Chance = 1/15, Color = Color3.fromRGB(30,0,0), Name = "Dwarf Fortress" },
{ Chance = 1/15, Color = Color3.fromRGB(0,30,0), Name = "Rainforest Nights" },
{ Chance = 1/15, Color = Color3.fromRGB(0,0,30), Name = "Hadopelagic Water" },
{ Chance = 1/16, Color = Color3.fromRGB(15,0,0), Name = "Dark Matter"},
{ Chance = 1/16, Color = Color3.fromRGB(0,15,0), Name = "Cosmic Bit Flip" },
{ Chance = 1/16, Color = Color3.fromRGB(0,0,15), Name = "Benthic Black" },
{ Chance = 1/17, Color = Color3.fromRGB(0,0,0), Name = "Black" },
}
local sum = 0
for _, cube in pairs(cubeConfig) do
sum += cube.Chance
end
local draw = math.random() * sum
for _, cube in pairs(cubeConfig) do
if draw <= cube.Chance then
print(cube.Color)
break
end
draw -= cube.Chance
end
-- Schedule the cube to despawn after 60 seconds
game:GetService("Debris"):AddItem(cube, 60)
end
wait()
end
I decreased the amount of colors, and started making a list of putting the color probabilities from most common (white) to the most rarest (black) by increments of 15 RGB light. Not only do I want want to know how to execute all probabilities at once, I also want to know how to make part of the script select the lowest probability that was able to succeed and print it on the basic cube. (If multiple colors of the same probability succeed, the script will randomly choose a color from that set of successful colors.)
I tried using the Roblox assistant. I’m staring to realize that it’s not that reliable for calculations…