Help with module script

Hello! I want to make a script that will process button clicks, I did it but I probably made a mistake in if Button.Name == ButtonsHandler[Button.Name] and not Debounce then

ButtonHandler Script:

--// Services
local Players = game:GetService("Players")
local ReplicatedStorage = game:GetService("ReplicatedStorage")

--// Variables
local Buttons = workspace.Buttons:GetDescendants()

--// Modules
local ButtonsHandler = require(ReplicatedStorage.Modules.Buttons)

--// Other
local Debounce = false

print(ButtonsHandler)

for _, Button in pairs(Buttons) do
	if Button.Name == ButtonsHandler[Button.Name] and not Debounce then
		Debounce = true
		print(Button.Name.." Found")
		
		local stat = ButtonsHandler[Button.Name].Stat
		local nextStat = ButtonsHandler[Button.Name].NextStat
		local amount = ButtonsHandler[Button.Name].Amount
		local cost = ButtonsHandler[Button.Name].Cost
		
		local Frame = Button.Stats.Frame
		local Amount = Frame.Amount
		local Cost = Frame.Cost
		
		Amount.Text = amount.."  "..stat
		Cost.Text = cost.."  "..nextStat
		
		Button.Button.Touched:Connect(function(hit)
				if hit.Parent:FindFirstChildOfClass("Humanoid") then
				local Player = Players:GetPlayerFromCharacter(hit.Parent)
				if Player then
					local cash = Player.leaderstats.Cash
					local multi = Player.leaderstats.Multiplier
					local rebirths = Player.leaderstats.Rebirths
					
					if stat == "Robux" then
						-- Buy Robux / Gamepass
					elseif stat == "Cash" then
						if cash.Value >= cost then
							cash.Value -= cost
							multi.Value += amount
						end
					elseif stat == "Multi" then
						if multi.Value >= cost then
							multi.Value -= cost
							rebirths.Value += amount
						end
					end
					
					task.wait(0.2)
					Debounce = false
				end
			end
		end)
	end
end

ButtonHandler Module:

return
	{
		["Multiplier1"] = {
			Stat = "Cash",
			NextStat = "Multi",
			Amount = 1,
			Cost = 25,
		},
		["Multiplier2"] = {
			Stat = "Cash",
			NextStat = "Multi",
			Amount = 5,
			Cost = 150,
		},
		["Multiplier3"] = {
			Stat = "Cash",
			NextStat = "Multi",
			Amount = 10,
			Cost = 400,
		},
		
		--//
		
		["Rebirths1"] = {
			Stat = "Multi",
			NextStat = "Rebirths",
			Amount = 10,
			Cost = 2500,
		},
		["Rebirths2"] = {
			Stat = "Multi",
			NextStat = "Rebirths",
			Amount = 50,
			Cost = 15000,
		},
		["Rebirths3"] = {
			Stat = "Multi",
			NextStat = "Rebirths",
			Amount = 400,
			Cost = 150000,
		},
	}

I assume you want to use the loop to initialise all the buttons with their connections, and then debounce the button touches.

Remove the debounce from the first if statement inside the loop

if Button.Name == ButtonsHandler[Button.Name] then --and not Debounce then--remove
		--Debounce = true --remove

and move it to the first if statement inside

button.button.Touched:Connect(function(hit)
   if not debounce and hit.Parent: FindFirstChild etc

the problem is that the buttons are not initialized correctly

image
this is my redictory

I see, Button.Name is a string and Buttons handler[Button.Name] is a table so they will never be equivalent.
If you just need to check if there is a key in the table you can just attempt to access it, as it will return nil if not found so like this:

if ButtonsHandler[Button.Name] then
    --your code
end