Restrict remote event to 1 script

I have an event that’s firing from the client when I press E button. Here is a part of this script:

UIS.InputBegan:Connect(function(input, gameProcessed)
	for i,v in pairs(interactables) do	
		if input.UserInputType == Enum.UserInputType.Keyboard then
			if input.KeyCode == Enum.KeyCode.E and v.PrimaryPart.E.Enabled == true and (playerPosition - v.PrimaryPart.Position).magnitude <= 10 then
				event:FireServer(v.PrimaryPart)
			end
		end
	end
end)

And then there are multiple same scripts that activate when I press the button, but I want them to happen one at a time and not all at once. Part of the script:

local function toBread1()
	if script.Disabled == false then
		local player, item = event.OnServerEvent:Wait()
		if item.Name == "Bun" then
			local toTake = serverStorage.Items.Bun:Clone()
			toTake.Parent = workspace
			player.Character.Humanoid:EquipTool(toTake)
			return
		else
			toBread1()
		end
	end
end
toBread1()

If you want to prevent the function from executing too frequently you can add a debounce.

local debounce = false

local function toBread1()
	if script.Disabled == false then
		local player, item = event.OnServerEvent:Wait()
		if debounce then
			return
		end
		debounce = true
		if item.Name == "Bun" then
			local toTake = serverStorage.Items.Bun:Clone()
			toTake.Parent = workspace
			player.Character.Humanoid:EquipTool(toTake)
			return
		else
			toBread1()
		end
		task.wait(10) --cooldown time is here
		debounce = false
	end
end
toBread1()

This is not the problem. There are multiple copies of this script so debounce won’t fix that.

Oh, my bad, I thought you meant there were multiple copies of the local script which were calling FireServer() from the client.