hello, i want to add a lcuk boost system and ive tried everythiong i could, yet it didnt work so i decided to delete it and ask it here:
local module = {}
local food = script.Parent.Parent.Parent.Parent.Food
module.food = {
["6"] = food.Waffle,
["5"] = food.DarkPoisonPizza,
["4"] = food.Burger,
["3"] = food.Donut,
["2"] = food.Pizza,
["1"] = food.Chocolate,
}
module.rarities ={
["6"] = 1,
["5"] = 1,
["4"] = 50,
["3"] = 19,
["2"] = 51,
["1"] = 50,
}
module.prices = {
[6] = 20000,
[5] = 10000,
[4] = 1000,
[3] = 300,
[2] = 100,
[1] = 85,
}
module.ingredients = {
["Egg"] = 2, --times 2 luck boost
["Butter"] = 2, --times 2 luck boost
["Ice cubes"] = 2, --times 2 luck boost
}
module.ChooseFood = function()
local random = math.random(1, 172)
local counter = 0
for rarity, weight in module.rarities do
counter += weight
if random <= counter then
local price = module.prices[tonumber(rarity)]
return module.food[rarity], rarity, price
end
end
end
return module
so i want to check if the player has the ingredient in their inventory and if so apply the luck boost, please help
** You are now Level 7! **