if game.Players.LocalPlayer.leaderstats.Ingredients.Value > 1 then script.Parent.Activated:Connect(function()
local plr = game.Players:GetPlayerFromCharacter(script.Parent.Parent)
plr.leaderstats.Ingredients.Value = plr.leaderstats.Ingredients.Value -1
plr.leaderstats.Cake.Value = plr.leaderstats.Cake.Value +1
end) end

1 comment
"script.Parent.Activated" so this is probally a tool(Local Script)