I'm trying to make a rarity thing. is there a way to make this list not have like infinity dirt and sand and stone
Blocks= {"Emerald","Emerald","Ruby","Sapphire","Diamond","Ruby","Sapphire","Coal","Coal","Coal","Co al","Coal","Coal","Coal","Gold","Gold","Gold","Gold","Gold","Dirt","Dirt","Dirt","Dirt","Dirt","Dirt ","Dirt","Dirt","Dirt","Dirt","Dirt","Dirt","Dirt","Dirt","Dirt","Dirt","Dirt","Dirt","Dirt","Dirt","Dirt"," Dirt","Dirt","Dirt","Dirt","Dirt","Dirt","Dirt","Dirt","Dirt","Dirt","Dirt","Dirt","Dirt","Dirt","Dirt","Dirt ","Dirt","Dirt","Dirt","Dirt","Dirt","Dirt","Dirt","Dirt","Dirt","Dirt","Dirt","Dirt","Dirt","Dirt","Dirt"," Dirt","Dirt","Dirt","Dirt","Dirt","Dirt","Dirt","Dirt","Dirt","Dirt","Dirt","Dirt","Dirt","Dirt","Dirt","Dirt ","Dirt","Dirt","Dirt","Dirt","Dirt","Dirt","Dirt","Dirt","Dirt","Dirt","Dirt","Dirt","Dirt","Dirt","Dirt"," Dirt","Dirt","Dirt","Dirt","Dirt","Dirt","Dirt","Dirt","Dirt","Dirt","Dirt","Dirt","Dirt","Dirt","Dirt","Dirt ","Dirt","Dirt","Dirt","Dirt","Dirt","Dirt","Dirt","Stone","Stone","Stone","Stone","Stone","Stone"," Stone","Stone","Stone","Stone","Stone","Stone","Stone","Stone","Stone","Stone","Stone","Ston e","Stone","Stone","Stone","Stone","Stone","Stone","Stone","Stone","Stone","Stone","Stone"," Stone","Stone","Stone","Stone","Stone","Stone","Stone","Stone","Stone","Stone","Stone","Ston e","Stone","Stone","Stone","Stone","Stone","Stone","Stone","Stone","Stone","Stone","Stone"," Stone","Stone","Stone","Stone","Stone","Stone","Stone","Stone","Stone","Stone","Stone","Ston e","Stone","Stone","Sand","Sand","Sand","Sand","Sand","Sand","Sand","Sand","Sand","Sand"," Sand","Sand","Sand","Sand","Sand","Sand","Sand","Sand","Sand","Sand","Sand","Sand","Sand ","Sand","Sand","Sand","Sand","Sand","Sand","Sand","Sand","Sand","Sand","Sand","Sand","Sa nd","Sand","Sand","Sand","Sand","Sand","Sand","Sand","Sand","Sand","Sand","Sand","Sand"," Sand","Sand","Sand","Sand","Sand","Sand","Sand","Sand","Sand","Sand","Sand","Sand","Sand ","Sand","Sand"}
what I mean is I need to know if you can do something like
Blocks#Sand = 45
You can create dictionaries, with one value meaning another, so:
local blocks = { ["Sand"] = 45 ["Stone"] = 45 --etc. }
You can also add to dictionaries by doing this:
blocks["Emerald"] = 2 -- if emerald exists, change it to 2, if not create 'Emerald' with a value of 2
To remove:
blocks["Ruby"] = nil