local function playTheme() for _, note in ipairs(melody) do local pitch = note[1] local delay = note[2] if pitch > 0 then speaker.playNote(inst, 1.0, pitch) end sleep(delay) end end print("Crazy Frog Doorbell Active.") while true do os.pullEvent("redstone") if rs.getInput("back") then -- Change "back" to your button's side print("BING BING!") playTheme() sleep(2) -- Cooldown end end